From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 18A951581C1 for ; Mon, 8 Jul 2024 17:55:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1C752BC0F1; Mon, 8 Jul 2024 17:55:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C089F2BC0F1 for ; Mon, 8 Jul 2024 17:55:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ABA9A335CB9 for ; Mon, 8 Jul 2024 17:55:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB1411DF9 for ; Mon, 8 Jul 2024 17:55:21 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1720461302.8bccc0d6db2283430ff320ad85f6d1db088c7a0e.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kscreenlocker/, kde-plasma/kscreenlocker/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-plasma/kscreenlocker/files/kscreenlocker-6.1.2-greeter-unlock-button.patch kde-plasma/kscreenlocker/kscreenlocker-6.1.2-r1.ebuild X-VCS-Directories: kde-plasma/kscreenlocker/files/ kde-plasma/kscreenlocker/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 8bccc0d6db2283430ff320ad85f6d1db088c7a0e X-VCS-Branch: master Date: Mon, 8 Jul 2024 17:55:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b037470a-f2b5-444c-8c2c-5957d6d891a1 X-Archives-Hash: 6bcc4846f7242330ef2997a8af5f5f90 commit: 8bccc0d6db2283430ff320ad85f6d1db088c7a0e Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Jul 8 17:00:21 2024 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Jul 8 17:55:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bccc0d6 kde-plasma/kscreenlocker: Fix redundant unlock button KDE-bug: https://bugs.kde.org/show_bug.cgi?id=485520 Signed-off-by: Andreas Sturmlechner gentoo.org> ...kscreenlocker-6.1.2-greeter-unlock-button.patch | 85 ++++++++++++++++++++++ .../kscreenlocker/kscreenlocker-6.1.2-r1.ebuild | 82 +++++++++++++++++++++ 2 files changed, 167 insertions(+) diff --git a/kde-plasma/kscreenlocker/files/kscreenlocker-6.1.2-greeter-unlock-button.patch b/kde-plasma/kscreenlocker/files/kscreenlocker-6.1.2-greeter-unlock-button.patch new file mode 100644 index 000000000000..7fc6a2e5e225 --- /dev/null +++ b/kde-plasma/kscreenlocker/files/kscreenlocker-6.1.2-greeter-unlock-button.patch @@ -0,0 +1,85 @@ +From 6297d4d2e37abadfab0f7389aec9aa4af7f928bc Mon Sep 17 00:00:00 2001 +From: Xaver Hugl +Date: Tue, 2 Jul 2024 20:07:06 +0000 +Subject: [PATCH] greeter/authenticators: add a property for if a prompt was + shown in the past + +This is needed to properly check for whether or not to show an unlock button + +CCBUG: 485520 + + +(cherry picked from commit bc1e4a18ce37d1f40cb6a50acf3d9c53b052bf5e) + +Co-authored-by: Xaver Hugl +--- + greeter/pamauthenticators.cpp | 14 ++++++++++++++ + greeter/pamauthenticators.h | 5 +++++ + 2 files changed, 19 insertions(+) + +diff --git a/greeter/pamauthenticators.cpp b/greeter/pamauthenticators.cpp +index 8fcbb6d5..d564420 100644 +--- a/greeter/pamauthenticators.cpp ++++ b/greeter/pamauthenticators.cpp +@@ -17,6 +17,7 @@ struct PamAuthenticators::Private { + PamAuthenticator::NoninteractiveAuthenticatorTypes computedTypes = PamAuthenticator::NoninteractiveAuthenticatorType::None; + AuthenticatorsState state = AuthenticatorsState::Idle; + bool graceLocked = false; ++ bool hadPrompt = false; + + void recomputeNoninteractiveAuthenticationTypes() + { +@@ -83,10 +84,18 @@ PamAuthenticators::PamAuthenticators(std::unique_ptr &&interac + Q_EMIT busyChanged(); + }); + connect(d->interactive.get(), &PamAuthenticator::prompt, this, [this] { ++ if (!d->hadPrompt) { ++ d->hadPrompt = true; ++ Q_EMIT hadPromptChanged(); ++ } + qCDebug(KSCREENLOCKER_GREET) << "PamAuthenticators: Normal prompt from interactive authenticator" << qUtf8Printable(d->interactive->service()); + Q_EMIT promptChanged(); + }); + connect(d->interactive.get(), &PamAuthenticator::promptForSecret, this, [this] { ++ if (!d->hadPrompt) { ++ d->hadPrompt = true; ++ Q_EMIT hadPromptChanged(); ++ } + qCDebug(KSCREENLOCKER_GREET) << "PamAuthenticators: Secret prompt from interactive authenticator" << qUtf8Printable(d->interactive->service()); + Q_EMIT promptForSecretChanged(); + }); +@@ -198,3 +207,8 @@ void PamAuthenticators::setGraceLocked(bool b) + { + d->graceLocked = b; + } ++ ++bool PamAuthenticators::hadPrompt() const ++{ ++ return d->hadPrompt; ++} +diff --git a/greeter/pamauthenticators.h b/greeter/pamauthenticators.h +index e82f77b..9184e7e 100644 +--- a/greeter/pamauthenticators.h ++++ b/greeter/pamauthenticators.h +@@ -31,6 +31,8 @@ class PamAuthenticators : public QObject + + Q_PROPERTY(AuthenticatorsState state READ state NOTIFY stateChanged) + ++ Q_PROPERTY(bool hadPrompt READ hadPrompt NOTIFY hadPromptChanged) ++ + public: + PamAuthenticators(std::unique_ptr &&interactive, + std::vector> &&noninteractive, +@@ -78,6 +80,9 @@ public: + + void setGraceLocked(bool b); + ++ bool hadPrompt() const; ++ Q_SIGNAL void hadPromptChanged(); ++ + private: + struct Private; + QScopedPointer d; +-- +2.45.2 + diff --git a/kde-plasma/kscreenlocker/kscreenlocker-6.1.2-r1.ebuild b/kde-plasma/kscreenlocker/kscreenlocker-6.1.2-r1.ebuild new file mode 100644 index 000000000000..ab2b1699cdf0 --- /dev/null +++ b/kde-plasma/kscreenlocker/kscreenlocker-6.1.2-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=6.3.0 +PVCUT=$(ver_cut 1-3) +QTMIN=6.7.1 +inherit ecm plasma.kde.org pam + +DESCRIPTION="Library and components for secure lock screen architecture" + +LICENSE="GPL-2" # TODO: CHECK +SLOT="6" +KEYWORDS="~amd64 ~arm64 ~riscv" +IUSE="" + +RESTRICT="test" + +# qtbase slot op: GuiPrivate use in greeter +COMMON_DEPEND=" + dev-libs/wayland + >=dev-qt/qtbase-${QTMIN}:6=[dbus,gui,network,widgets] + >=dev-qt/qtdeclarative-${QTMIN}:6 + >=kde-frameworks/kcmutils-${KFMIN}:6 + >=kde-frameworks/kconfig-${KFMIN}:6[qml] + >=kde-frameworks/kconfigwidgets-${KFMIN}:6 + >=kde-frameworks/kcoreaddons-${KFMIN}:6 + >=kde-frameworks/kcrash-${KFMIN}:6 + >=kde-frameworks/kglobalaccel-${KFMIN}:6 + >=kde-frameworks/ki18n-${KFMIN}:6 + >=kde-frameworks/kidletime-${KFMIN}:6 + >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/knotifications-${KFMIN}:6 + >=kde-frameworks/ksvg-${KFMIN}:6 + >=kde-frameworks/kwindowsystem-${KFMIN}:6 + >=kde-frameworks/solid-${KFMIN}:6 + >=kde-plasma/layer-shell-qt-${PVCUT}:6 + >=kde-plasma/libplasma-${PVCUT}:6 + >=kde-plasma/libkscreen-${PVCUT}:6 + sys-libs/pam + x11-libs/libX11 + x11-libs/libXi + x11-libs/libxcb + x11-libs/xcb-util-keysyms +" +DEPEND="${COMMON_DEPEND} + x11-base/xorg-proto +" +RDEPEND="${COMMON_DEPEND} + >=kde-frameworks/kirigami-${KFMIN}:6 + >=kde-plasma/libplasma-${PVCUT}:6 +" +BDEPEND=" + dev-util/wayland-scanner + >=kde-frameworks/kcmutils-${KFMIN}:6 +" +PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:*" + +PATCHES=( "${FILESDIR}/${P}-greeter-unlock-button.patch" ) # KDE-bug 485520 + +src_prepare() { + ecm_src_prepare + use test || cmake_run_in greeter cmake_comment_add_subdirectory autotests +} + +src_test() { + # requires running environment + local myctestargs=( + -E x11LockerTest + ) + ecm_src_test +} + +src_install() { + ecm_src_install + + newpamd "${FILESDIR}/kde-r1.pam" kde + newpamd "${FILESDIR}/kde-fingerprint.pam" kde-fingerprint + newpamd "${FILESDIR}/kde-smartcard.pam" kde-smartcard +}