commit: e053991a2015af56c0e1aec59b7e87055a02793f Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Tue Dec 16 20:07:25 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Wed Dec 17 21:40:21 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e053991a
sys-auth/polkit-qt: Drop IUSE qt5/qt6 (Qt6-only now) Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../polkit-qt-0.200.0-uniquify-identities.patch | 47 ++++++++++++++++++++++ sys-auth/polkit-qt/polkit-qt-0.200.0-r1.ebuild | 39 ++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/sys-auth/polkit-qt/files/polkit-qt-0.200.0-uniquify-identities.patch b/sys-auth/polkit-qt/files/polkit-qt-0.200.0-uniquify-identities.patch new file mode 100644 index 000000000000..bd84c9764b18 --- /dev/null +++ b/sys-auth/polkit-qt/files/polkit-qt-0.200.0-uniquify-identities.patch @@ -0,0 +1,47 @@ +From 27370be06e09281761be34c53a6d50d87978d4f4 Mon Sep 17 00:00:00 2001 +From: Harald Sitter <[email protected]> +Date: Tue, 14 Jan 2025 15:09:13 +0100 +Subject: [PATCH] ListenerAdapter: uniquify the identities + +prevents duplicated entries +--- + agent/listeneradapter.cpp | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/agent/listeneradapter.cpp b/agent/listeneradapter.cpp +index 507f4b6..a1b84e9 100644 +--- a/agent/listeneradapter.cpp ++++ b/agent/listeneradapter.cpp +@@ -71,13 +71,17 @@ void ListenerAdapter::polkit_qt_listener_initiate_authentication(PolkitAgentList + { + qDebug() << "polkit_qt_listener_initiate_authentication callback for " << listener; + +- PolkitQt1::Identity::List idents; + PolkitQt1::Details dets(details); + + Listener *list = findListener(listener); + +- for (GList *identity = g_list_first(identities); identity != nullptr; identity = g_list_next(identity)) { +- idents.append(PolkitQt1::Identity((PolkitIdentity *)identity->data)); ++ // Polkit enumerates identities without regard for their hash value, potentially leading to duplicated entries. ++ // Unique the identities on our end. ++ // https://github.com/polkit-org/polkit/issues/542 ++ QHash<guint, PolkitQt1::Identity> uniqueIdentities; ++ for (GList *entry = g_list_first(identities); entry != nullptr; entry = g_list_next(entry)) { ++ auto identity = static_cast<PolkitIdentity *>(entry->data); ++ uniqueIdentities.insert(polkit_identity_hash(identity), PolkitQt1::Identity(identity)); + } + + list->initiateAuthentication(QString::fromUtf8(action_id), +@@ -85,7 +89,7 @@ void ListenerAdapter::polkit_qt_listener_initiate_authentication(PolkitAgentList + QString::fromUtf8(icon_name), + dets, + QString::fromUtf8(cookie), +- idents, ++ uniqueIdentities.values(), + new AsyncResult(result)); + } + +-- +2.52.0 + diff --git a/sys-auth/polkit-qt/polkit-qt-0.200.0-r1.ebuild b/sys-auth/polkit-qt/polkit-qt-0.200.0-r1.ebuild new file mode 100644 index 000000000000..ee59f3874307 --- /dev/null +++ b/sys-auth/polkit-qt/polkit-qt-0.200.0-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +KDE_ORG_CATEGORY="libraries" +KDE_ORG_NAME="polkit-qt-1" +inherit cmake kde.org + +DESCRIPTION="Qt wrapper around polkit-1 client libraries" +HOMEPAGE="https://api.kde.org/legacy/polkit-qt-1/html/index.html" + +if [[ ${KDE_BUILD_TYPE} = release ]]; then + SRC_URI="mirror://kde/stable/${KDE_ORG_NAME}/${KDE_ORG_NAME}-${PV}.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +LICENSE="LGPL-2" +SLOT="0" + +RDEPEND=" + dev-libs/glib:2 + dev-qt/qtbase:6[dbus,gui,widgets] + >=sys-auth/polkit-0.103 +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( AUTHORS README README.porting TODO ) + +PATCHES=( "${FILESDIR}/${P}-uniquify-identities.patch" ) + +src_configure() { + local mycmakeargs=( + -DBUILD_EXAMPLES=OFF + -DQT_MAJOR_VERSION=6 + ) + cmake_src_configure +}
