summaryrefslogtreecommitdiff
path: root/sys-auth
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-01 12:01:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-01 12:01:16 +0100
commit4d37b8aa4c6b04fa417e8f87f276f7e08a411ee0 (patch)
treea53cac2dfa1e2a70dea6c0d6d6e1d7ff3bde743d /sys-auth
parent5b7f6475da27c05b30659a00ecb49636aca2bece (diff)
gentoo auto-resync : 01:09:2024 - 12:01:15
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/Manifest.gzbin9254 -> 9262 bytes
-rw-r--r--sys-auth/oath-toolkit/Manifest3
-rw-r--r--sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch24
-rw-r--r--sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild16
-rw-r--r--sys-auth/polkit/Manifest5
-rw-r--r--sys-auth/polkit/files/polkit-125-musl.patch34
-rw-r--r--sys-auth/polkit/polkit-125.ebuild157
-rw-r--r--sys-auth/polkit/polkit-9999-r1.ebuild159
-rw-r--r--sys-auth/polkit/polkit-9999.ebuild156
9 files changed, 552 insertions, 2 deletions
diff --git a/sys-auth/Manifest.gz b/sys-auth/Manifest.gz
index 791e3abee1bd..9886fb87c23a 100644
--- a/sys-auth/Manifest.gz
+++ b/sys-auth/Manifest.gz
Binary files differ
diff --git a/sys-auth/oath-toolkit/Manifest b/sys-auth/oath-toolkit/Manifest
index 10004730b584..83573a95079c 100644
--- a/sys-auth/oath-toolkit/Manifest
+++ b/sys-auth/oath-toolkit/Manifest
@@ -1,3 +1,4 @@
+AUX oath-toolkit-2.6.11-fix-musl-build.patch 639 BLAKE2B da20b1df13643d4c357b4825003e917c891d1c8c6821a00d6eb219e10013e863649a09847906df0cda539644b9d5436565e101aaf850b99921f13c1b7c0440d9 SHA512 00b2541211fcb38e770d27a1d226d759dfce11c5e65acd64175a5124dc197bfcee24094f222daa4bbe84c1c78b78eac5f26aef3930556dcd3072c5cb5e36d4ab
AUX oath-toolkit-2.6.7-new-xmlsec-tests.patch 2925 BLAKE2B c3e2e52ef75f99276b449d0520a1546a8b492d1572c4d293b7b876cb64661086d195f79a420dd763d8aab06e286c46a542a345178218a5f82e43f7ac6cb92079 SHA512 b99f6601ea2d1072b815e2975ebf352a3b20a185d96686b4abb96036c983e256d51e171fbf3af9df1783261bf0051779655ac6838d720956220696c06abde108
AUX oath-toolkit-2.6.9-Fix-build-failure-noticed-on-ArchLinux-xmlsec.patch 980 BLAKE2B 467733e2e8a26751ff3a165b734d6d9f2ae621d8e903d51d6811f2b247e8585645e0c9777f040ea4c80ce139877125b919fff40f43273b2300b93290bad73ad8 SHA512 9358b3b507af454943037b6749d4fa4e7f71037702d8dd26a4f85fbcb1a7908076739ce2abe1e04d49227e8626fa4fb72b7fcca33308553701a1efef47a6bf98
DIST oath-toolkit-2.6.10.tar.gz 4710528 BLAKE2B 2fd3c890214089b47bc4eb5759735cc921ed73f9eb9fa52aa8cc9f329b9887a45dbc0118ca077aecebc38660388d1be29a94d8c87917361def86f3a9378f5d40 SHA512 b9a4447350593c206aabf4dce09273194d5ac499c4f2fca4e36ba77480793898e3011655451d9147748b56c2a8611e04640ba2aec5f4e96fcd9e967b93b1c1b7
@@ -5,7 +6,7 @@ DIST oath-toolkit-2.6.11.tar.gz 4699215 BLAKE2B f3fa3ab1818f4f9bbf7c8c88432cd343
DIST oath-toolkit-2.6.7.tar.gz 5625279 BLAKE2B 23f377c51eb633bf01d6085d33c7362cd91b6bed1cf4c2bbf32dc9433849e20c53f6896b16e5056b13f420f6a65a3c593fa1dafd7e184ed9e52666d94a7f75d1 SHA512 50edff75c8366887d69cf4740c4cc3bdfc3e43cbd4910ff40f735bca489f0953d7e5a21130f12782ac7a1f2fb00f0db313aff139085f23daba78a69bc7b2eb12
DIST oath-toolkit-2.6.9.tar.gz 4693524 BLAKE2B 572512311bbfa18d325c7b9b8d88ff85c05241c9a22942bc67edf531ed621e68b031dc4562bd8473ec1b1bfe264c8a4084c1c304ba0d24914acc5b21325b8601 SHA512 6e96b5a926f6e2448661fef267dcf9c99167b7bdfc71e319d2ab7ddc051a7be002043485547ad83744209c25ea0d87f8e28f25cccd6856281321f3d22e3cf160
EBUILD oath-toolkit-2.6.10.ebuild 1450 BLAKE2B 82c661454e51ab8f31828f3cba3adb5d4eed3d30650bd8d0da1dfb2bdbafb4034f150456eb96dd01a1d0c990ff745e4174287c5a34d895f603f1ca77de55bb1b SHA512 c38ca273f4ba52742bfd80b15cd8636844f2ee607f76f77576d74e1205cd0767edb7cee69605e70c5b9f9b4e9965e35bdf2521cd3441f2542efe439ce8c98a06
-EBUILD oath-toolkit-2.6.11.ebuild 1450 BLAKE2B 82c661454e51ab8f31828f3cba3adb5d4eed3d30650bd8d0da1dfb2bdbafb4034f150456eb96dd01a1d0c990ff745e4174287c5a34d895f603f1ca77de55bb1b SHA512 c38ca273f4ba52742bfd80b15cd8636844f2ee607f76f77576d74e1205cd0767edb7cee69605e70c5b9f9b4e9965e35bdf2521cd3441f2542efe439ce8c98a06
+EBUILD oath-toolkit-2.6.11.ebuild 1899 BLAKE2B 24c1181bc7b1e3ccfd8054b0052f7691f6f57f7bd87c4d495b7001248f82f33f663319c89c3599a94fd2dda17e6d66222f7a45ba4b68de4f4aac1d967a73d33b SHA512 0efb6e89caa96fa75493c009e85a8abadb2f1a27efb3dc7bcf19f61791b01bb127c7058dc3a048c1810c529161fb63c045127f3a53bec82bbb03329d770de84e
EBUILD oath-toolkit-2.6.7-r2.ebuild 1436 BLAKE2B 27390c345e0b42f7b42c0ef5866087945b59c5d0cb80a8d7d528aa70939ea470c4e4e1fef963dbd3c8a68a4f558b04f5f06189254c93b5586037fdce6ad8f39a SHA512 cadc1c5f8370d3124fbea92844255cdc01bec0f075d15cda0dfe7be7f18412b14f5329e30ddd894107e5396d718a170968ace6a67f30c7b716487298b2eeb995
EBUILD oath-toolkit-2.6.9.ebuild 1494 BLAKE2B 02ce27e6952f50a51a944d616520f447c89bcc219feaee3c75d30b64f7a525d081327378d2bd63d8c710fd8fee6bb29412d2c0cdb65fa00511e5d6b7c43f3572 SHA512 1a33a99b6dbc3d4d0dcd36e109f853ca7afa128bca7ba2e9ff84e78a5759da95b4f376d75159d650497f2736f30597ca3fd33fe7d2eb2dab4905901d48a89746
MISC metadata.xml 592 BLAKE2B c5428eac278df13bc3cf23e1d5dce5ac4802a262d9f586574035a54af1e0b70547d9ce645636159e3f0cd8942bd77fb4e4f2253ba962d373189ea17f209dc824 SHA512 ed86f998c76cbe3bbcf2e1efa7c91cca0d3872530b6194f8534ff41da407bb8b642c6742fae5a65f2fc216144c977ca33c1b7f414872e5e23c3862b01c256a43
diff --git a/sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch b/sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch
new file mode 100644
index 000000000000..5affd40c3111
--- /dev/null
+++ b/sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch
@@ -0,0 +1,24 @@
+From 65f37d4deb6ac87dd64df1bb281588d300a1bf3e Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Mon, 12 Feb 2024 18:18:31 -0800
+Subject: [PATCH] libpskc: fix implicit declaration with musl
+
+---
+ libpskc/global.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libpskc/global.c b/libpskc/global.c
+index 1a514506..6082e11a 100644
+--- a/libpskc/global.c
++++ b/libpskc/global.c
+@@ -24,6 +24,7 @@
+ #include <pskc/pskc.h>
+
+ #include "internal.h"
++#include <stdlib.h> /* free */
+ #include <string.h> /* strverscmp */
+ #include <libxml/parser.h> /* xmlInitParser */
+ #include <libxml/catalog.h> /* xmlLoadCatalog */
+--
+GitLab
+
diff --git a/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild b/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild
index 03d2801fa64c..b82f773e2a74 100644
--- a/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild
+++ b/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild
@@ -27,13 +27,27 @@ BDEPEND="
test? ( dev-libs/libxml2 )
"
+PATCHES=( "${FILESDIR}/${P}-fix-musl-build.patch" )
+
+# fpurge is from gnulib, and unused as of 2.6.11
QA_CONFIG_IMPL_DECL_SKIP=(
MIN # glibc fp
- unreachable
alignof
+ fpurge
static_assert
+ unreachable
)
+src_prepare() {
+ default
+
+ # After patching, we have to fix the mtime on libpskc/global.c so
+ # that it doesn't cause Makefile.gdoc to be rebuilt so that it
+ # doesn't cause Makefile.in to be rebuilt so that it doesn't try to
+ # run automake-1.16.5 for no reason. Bug 936309.
+ touch --reference=libpskc/errors.c libpskc/global.c || die
+}
+
src_configure() {
local myeconfargs=(
--cache-file="${S}"/config.cache
diff --git a/sys-auth/polkit/Manifest b/sys-auth/polkit/Manifest
index d2cb117eada0..c7161547ab38 100644
--- a/sys-auth/polkit/Manifest
+++ b/sys-auth/polkit/Manifest
@@ -3,8 +3,13 @@ AUX polkit-123-pkexec-uninitialized.patch 1118 BLAKE2B a6abfa5a67612c305823d43fc
AUX polkit-124-c99-fixes.patch 3663 BLAKE2B d3820081c0215e37855045a1e1efe4da77ef17820f115a43984f37100533f0b2fbbf80cf41f508e2d63dfeeaa4ed782246d78a267cea32bc9e2ea4c9db4f8150 SHA512 6994c5ae05067ed12fbbf7e035434c8d856848e53ffc687aca568a05077600fc55857f33a289b7ff96bcab34423729806c0ad1c02f62dafa2cd07f9bdfd2e18a
AUX polkit-124-systemd-fixup.patch 1571 BLAKE2B e9f03f0239a4af15a05a8a83749f2da50c7457849d5f170556e3ca0e8c47ec9a90359a77a8255932b3843b8d50bedf1e07472cd1e33ba1cc76a7d2b5aa0560fd SHA512 b938ac6f4de8a2e2cc799c3fcaeca7f3d4f62f14868b0281329b3b102f8cc6d7474c96ed9a16e0197ef30db229df53e7287b816ecd16efce5f00fb2783cb049b
AUX polkit-124-systemd.patch 2483 BLAKE2B 3323abefac5adff5046d7756ba19d87b9206baecce4937de6b29ca2e12025c173d503e2f6bc9274147f16a333b1dd46a3d089645708d051f7cdb59a52705dcae SHA512 97622cd525e6706e82aad8bb63f8721ae22f3da47727797556b468b9f01417f78a3c52733582c5f40ba5196261faa7a0aff1da4326baf57d9d8d470d88b2a538
+AUX polkit-125-musl.patch 1838 BLAKE2B 61615adbbd75e1cae40dfeafdf8f2cdd2423629074ae2fa0218c7b7ff1bd10d00d5649ff25e85ba4df2052245d7f1bc0e6877cbec96fe8dfd8c1fb09957f3b36 SHA512 4e6edca7a993519a4f8ad757f4efa88145f66792bb929241e7a098270478e512623b3eb5d2bf2cc0013f0e512e1d59334d398f19717055c864ed9574dd27b454
DIST polkit-123.tar.bz2 707480 BLAKE2B 27d8764606d8156118269fb4cd5eda1cfd0d56df219e4157cd78fd4c2a2d001c474271b7bb31e7e82ca376eacd26411418695058cc888700690606348b4d014a SHA512 4306363d3ed7311243de462832199bd10ddda35e36449104daff0895725d8189b07a4c88340f28607846fdf761c23470da2d43288199c46aa816426384124bb6
DIST polkit-124.tar.bz2 715490 BLAKE2B ecfc1ec73a7e1bbdf7374642ad4e1dbe534149a27e75bb1235eaa446ff912466ee0cdd978c34b7f110bc62a49b25ffddc9011e280686e3f304a234454be85a40 SHA512 db520882b0bedf1c96052570bf4c55d7e966d8172f6d26acf0791d98c4b911fce5ee39e6d830f06122ac8df33c6b43c252cdb7ba3a54523804824ebf355405dc
+DIST polkit-125.tar.gz 453652 BLAKE2B 068bd4a7c028a0b4e026a0fdc3a60bd323087282a5c5bd7cbc404dbedb997de63893ce2282e8cd5f01f8d98ff0cc1a46200543a832fa397a4f50ef8d6ba2b28b SHA512 64d85c1557355d6de6483beeb855b74a99dbb30cf9968206dc0aaf147156072ca2604bf667533099ee3972b3eed0421ec0a1ff8bea35a1e4c54da7b9688e0953
EBUILD polkit-123.ebuild 4095 BLAKE2B f0463090b6b6d356924135c83f45c6372d02250dec3663fe70d042bfbac5cfc6a08c574f0b7d353e54de348ec50d8f65628938d7c74ec0fa6a944307429159e7 SHA512 ca0c558fbcd8a98f0938fc28d279e34c5b380a9e2f61f55642b3b404bb9ecdd7492764851861b935e4d7eebd9ba23a070d4421461b11296182b8f2b9bf8130cb
EBUILD polkit-124-r1.ebuild 3912 BLAKE2B bb12b1607c9e44e1e8408faa02002d90119e1e9b2d866745c63d0e059ba68a83abc24216ebcee98e83903029d2591e8f7e9ecf2cb5456aadb6c9165d8f21cd4f SHA512 2110beac4f0fa367fd3559f8a064855e83447b9f559d338710508365979e5ab85dd38392dcc87444c746f9c208ad3d2ad27fe76860aae274e4f0b633d2a94755
+EBUILD polkit-125.ebuild 3864 BLAKE2B dd8f40a5d8c4aef783435ba1f743b3ed824059bdff911576416ce530da0ea9d718e5c0d83f895865d061c9137591b621a5d33757ac03f7befd5316646ccf6afb SHA512 110c3283c9a66db0ace26e48b888ded11d23fffc46398817e70e1562206df1f47dec98579f29549ca1c6c3e246aac880f39fc7ef1904368a5e7df2484baaa858
+EBUILD polkit-9999-r1.ebuild 4111 BLAKE2B ef71dcb6778d93a097ed50bd996321c63fe87228cecd88130ac7c46ee643ff477277540df475fd2e54e1e0f934ad54f570a1a372772709efee77db7963489c58 SHA512 ac6b032a571959cc6564db7c4ad2a8bc183d9df8d2e65ebb429771134b7570e8ab4bbff0f918e3252d5f7182327c4d481b88e172652b29b6beb96a43b9a1a3ff
+EBUILD polkit-9999.ebuild 3853 BLAKE2B e910b31a579bf9bb47c6b77a844b6496d78358ff52d1d44d46204229bb99c4e57a6f6aea7a2c580d2ca9f47d2cb092bf203a65acdf0f6d2fceff9afd7cce63f3 SHA512 ab6d376ab2e814c411f532d10af02afe4b8a4c6735f5ae056f12ae040689468196cd3a232dc59d31d4c0fb3487dc288c4a4262b3adf31033cbaadd0f998b98bd
MISC metadata.xml 605 BLAKE2B 80c7a5d7d4d370123b0ab3d40cbc51e7a606ed45fb29cf201dfb2ebf3dbb47a9c5c3648be971d18afee881bc5fc0402b27a26bcdc4ed29e083b22e8f194d415d SHA512 14f7b54a110db41ddb8ae53a6bd769352bf59b1ac8d519b448aa4a97b1dd6f7d6a315c4aec96f223effb7c84e0525e31076650d1331b17a150f614ee1aee4034
diff --git a/sys-auth/polkit/files/polkit-125-musl.patch b/sys-auth/polkit/files/polkit-125-musl.patch
new file mode 100644
index 000000000000..ee0a444c919e
--- /dev/null
+++ b/sys-auth/polkit/files/polkit-125-musl.patch
@@ -0,0 +1,34 @@
+https://github.com/polkit-org/polkit/commit/13bea3e08f924002a6a5c2f275d4bf1588fc3d02
+
+From 13bea3e08f924002a6a5c2f275d4bf1588fc3d02 Mon Sep 17 00:00:00 2001
+From: Sertonix <sertonix@posteo.net>
+Date: Sun, 11 Aug 2024 00:26:51 +0200
+Subject: [PATCH] Fix missing arguments with HAVE_PTHREAD_CONDATTR_SETCLOCK
+
+Fixes <64f5e4dda52> Add syslog-style log levels support
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -767,12 +767,14 @@ runaway_killer_common(PolkitBackendJsAuthority *authority, RunawayKillerCtx *ctx
+ #ifdef HAVE_PTHREAD_CONDATTR_SETCLOCK
+ if ((pthread_err = pthread_condattr_init(&attr))) {
+ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ LOG_LEVEL_ERROR,
+ "Error initializing condition variable attributes: %s",
+ strerror(pthread_err));
+ return FALSE;
+ }
+ if ((pthread_err = pthread_condattr_setclock(&attr, PK_CLOCK))) {
+ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ LOG_LEVEL_ERROR,
+ "Error setting condition variable attributes: %s",
+ strerror(pthread_err));
+ goto err_clean_condattr;
+@@ -780,6 +782,7 @@ runaway_killer_common(PolkitBackendJsAuthority *authority, RunawayKillerCtx *ctx
+ /* Init again, with needed attr */
+ if ((pthread_err = pthread_cond_init(&ctx->cond, &attr))) {
+ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ LOG_LEVEL_ERROR,
+ "Error initializing condition variable: %s",
+ strerror(pthread_err));
+ goto err_clean_condattr;
+
diff --git a/sys-auth/polkit/polkit-125.ebuild b/sys-auth/polkit/polkit-125.ebuild
new file mode 100644
index 000000000000..fa58387359d1
--- /dev/null
+++ b/sys-auth/polkit/polkit-125.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit meson pam pax-utils python-any-r1 systemd tmpfiles xdg-utils
+
+DESCRIPTION="Policy framework for controlling privileges for system-wide services"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/polkit https://github.com/polkit-org/polkit"
+if [[ ${PV} == *_p* ]] ; then
+ # Upstream don't make releases very often. Test snapshots throughly
+ # and review commits, but don't shy away if there's useful stuff there
+ # we want.
+ MY_COMMIT=""
+ SRC_URI="https://github.com/polkit-org/polkit/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+ S="${WORKDIR}"/${PN}-${MY_COMMIT}
+else
+ SRC_URI="https://github.com/polkit-org/polkit/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+daemon +duktape examples gtk +introspection kde pam selinux systemd test"
+# Tests restricted b/c of permissions
+RESTRICT="!test? ( test ) test"
+
+BDEPEND="
+ acct-user/polkitd
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/docbook-xsl-stylesheets
+ dev-libs/glib
+ dev-libs/gobject-introspection-common
+ dev-libs/libxslt
+ dev-util/glib-utils
+ sys-devel/gettext
+ virtual/pkgconfig
+ introspection? ( >=dev-libs/gobject-introspection-0.6.2 )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/python-dbusmock[${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="
+ >=dev-libs/glib-2.32:2
+ dev-libs/expat
+ daemon? (
+ duktape? ( dev-lang/duktape:= )
+ !duktape? ( dev-lang/spidermonkey:115[-debug] )
+ )
+ pam? (
+ sys-auth/pambase
+ sys-libs/pam
+ )
+ !pam? ( virtual/libcrypt:= )
+ systemd? ( sys-apps/systemd:0=[policykit] )
+ !systemd? ( sys-auth/elogind )
+"
+RDEPEND="
+ ${DEPEND}
+ acct-user/polkitd
+ selinux? ( sec-policy/selinux-policykit )
+"
+PDEPEND="
+ gtk? ( || (
+ >=gnome-extra/polkit-gnome-0.105
+ >=lxde-base/lxsession-0.5.2
+ ) )
+ kde? ( kde-plasma/polkit-kde-agent )
+"
+
+DOCS=( docs/TODO HACKING.md NEWS.md README.md )
+
+QA_MULTILIB_PATHS="
+ usr/lib/polkit-1/polkit-agent-helper-1
+ usr/lib/polkit-1/polkitd
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-musl.patch
+)
+
+python_check_deps() {
+ python_has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # bug #401513
+ sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ local emesonargs=(
+ --localstatedir="${EPREFIX}"/var
+ -Dauthfw="$(usex pam pam shadow)"
+ -Dexamples=false
+ -Dgtk_doc=false
+ -Dman=true
+ -Dos_type=gentoo
+ -Djs_engine=$(usex duktape duktape mozjs)
+ -Dpam_module_dir=$(getpam_mod_dir)
+ -Dsession_tracking="$(usex systemd logind elogind)"
+ -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(meson_use !daemon libs-only)
+ $(meson_use introspection)
+ $(meson_use test tests)
+ )
+ meson_src_configure
+}
+
+src_compile() {
+ meson_src_compile
+
+ # Required for polkitd on hardened/PaX due to spidermonkey's JIT
+ pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest
+}
+
+src_install() {
+ meson_src_install
+
+ # acct-user/polkitd installs its own (albeit with a different filename)
+ rm -rf "${ED}"/usr/lib/sysusers.d || die
+
+ if use examples ; then
+ docinto examples
+ dodoc src/examples/{*.c,*.policy*}
+ fi
+
+ if use daemon; then
+ if [[ ${EUID} == 0 ]]; then
+ diropts -m 0700 -o polkitd
+ fi
+ keepdir /etc/polkit-1/rules.d
+ fi
+}
+
+pkg_postinst() {
+ tmpfiles_process polkit-tmpfiles.conf
+
+ if use daemon && [[ ${EUID} == 0 ]]; then
+ chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ fi
+}
diff --git a/sys-auth/polkit/polkit-9999-r1.ebuild b/sys-auth/polkit/polkit-9999-r1.ebuild
new file mode 100644
index 000000000000..82bc0ef5d905
--- /dev/null
+++ b/sys-auth/polkit/polkit-9999-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit meson pam pax-utils python-any-r1 systemd xdg-utils
+
+DESCRIPTION="Policy framework for controlling privileges for system-wide services"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/polkit https://github.com/polkit-org/polkit"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/polkit-org/polkit"
+ inherit git-r3
+elif [[ ${PV} == *_p* ]] ; then
+ # Upstream don't make releases very often. Test snapshots throughly
+ # and review commits, but don't shy away if there's useful stuff there
+ # we want.
+ MY_COMMIT=""
+ SRC_URI="https://github.com/polkit-org/polkit/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+ S="${WORKDIR}"/${PN}-${MY_COMMIT}
+else
+ SRC_URI="https://github.com/polkit-org/polkit/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="LGPL-2"
+SLOT="0"
+if [[ ${PV} != 9999 ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+IUSE="+daemon +duktape examples gtk +introspection kde pam selinux systemd test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ acct-user/polkitd
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/docbook-xsl-stylesheets
+ dev-libs/glib
+ dev-libs/gobject-introspection-common
+ dev-libs/libxslt
+ dev-util/glib-utils
+ sys-devel/gettext
+ virtual/pkgconfig
+ introspection? ( >=dev-libs/gobject-introspection-0.6.2 )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/python-dbusmock[${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="
+ >=dev-libs/glib-2.32:2
+ dev-libs/expat
+ daemon? (
+ duktape? ( dev-lang/duktape:= )
+ !duktape? ( dev-lang/spidermonkey:115[-debug] )
+ )
+ pam? (
+ sys-auth/pambase
+ sys-libs/pam
+ )
+ !pam? ( virtual/libcrypt:= )
+ systemd? ( sys-apps/systemd:0=[policykit] )
+ !systemd? ( sys-auth/elogind )
+"
+RDEPEND="
+ ${DEPEND}
+ acct-user/polkitd
+ selinux? ( sec-policy/selinux-policykit )
+"
+PDEPEND="
+ gtk? ( || (
+ >=gnome-extra/polkit-gnome-0.105
+ >=lxde-base/lxsession-0.5.2
+ ) )
+ kde? ( kde-plasma/polkit-kde-agent )
+"
+
+DOCS=( docs/TODO HACKING.md NEWS.md README.md )
+
+QA_MULTILIB_PATHS="
+ usr/lib/polkit-1/polkit-agent-helper-1
+ usr/lib/polkit-1/polkitd
+"
+
+python_check_deps() {
+ python_has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # FIXME: Horrible hack to facilitate testing in bug #934314
+ patch -p1 -f < "${FILESDIR}"/${PN}-124-systemd.patch
+ patch -p1 -f < "${FILESDIR}"/${PN}-124-systemd-fixup.patch
+ patch -p1 -f < "${FILESDIR}"/${PN}-124-c99-fixes.patch
+
+ sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ local emesonargs=(
+ --localstatedir="${EPREFIX}"/var
+ -Dauthfw="$(usex pam pam shadow)"
+ -Dexamples=false
+ -Dgtk_doc=false
+ -Dman=true
+ -Dos_type=gentoo
+ -Dsession_tracking="$(usex systemd libsystemd-login libelogind)"
+ -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
+ -Djs_engine=$(usex duktape duktape mozjs)
+ $(meson_use !daemon libs-only)
+ $(meson_use introspection)
+ $(meson_use test tests)
+ $(usex pam "-Dpam_module_dir=$(getpam_mod_dir)" '')
+ )
+ meson_src_configure
+}
+
+src_compile() {
+ meson_src_compile
+
+ # Required for polkitd on hardened/PaX due to spidermonkey's JIT
+ pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest
+}
+
+src_install() {
+ meson_src_install
+
+ # acct-user/polkitd installs its own (albeit with a different filename)
+ rm -rf "${ED}"/usr/lib/sysusers.d || die
+
+ if use examples ; then
+ docinto examples
+ dodoc src/examples/{*.c,*.policy*}
+ fi
+
+ if use daemon; then
+ if [[ ${EUID} == 0 ]]; then
+ diropts -m 0700 -o polkitd
+ fi
+ keepdir /etc/polkit-1/rules.d
+ fi
+}
+
+pkg_postinst() {
+ if use daemon && [[ ${EUID} == 0 ]]; then
+ chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ fi
+}
diff --git a/sys-auth/polkit/polkit-9999.ebuild b/sys-auth/polkit/polkit-9999.ebuild
new file mode 100644
index 000000000000..71d7e57a0403
--- /dev/null
+++ b/sys-auth/polkit/polkit-9999.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit meson pam pax-utils python-any-r1 systemd tmpfiles xdg-utils
+
+DESCRIPTION="Policy framework for controlling privileges for system-wide services"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/polkit https://github.com/polkit-org/polkit"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/polkit-org/polkit"
+ inherit git-r3
+elif [[ ${PV} == *_p* ]] ; then
+ # Upstream don't make releases very often. Test snapshots throughly
+ # and review commits, but don't shy away if there's useful stuff there
+ # we want.
+ MY_COMMIT=""
+ SRC_URI="https://github.com/polkit-org/polkit/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+ S="${WORKDIR}"/${PN}-${MY_COMMIT}
+else
+ SRC_URI="https://github.com/polkit-org/polkit/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="LGPL-2"
+SLOT="0"
+if [[ ${PV} != 9999 ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+IUSE="+daemon examples gtk +introspection kde pam selinux systemd test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ acct-user/polkitd
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/docbook-xsl-stylesheets
+ dev-libs/glib
+ dev-libs/gobject-introspection-common
+ dev-libs/libxslt
+ dev-util/glib-utils
+ sys-devel/gettext
+ virtual/pkgconfig
+ introspection? ( >=dev-libs/gobject-introspection-0.6.2 )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/python-dbusmock[${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="
+ >=dev-libs/glib-2.32:2
+ dev-libs/expat
+ daemon? (
+ dev-lang/duktape:=
+ )
+ pam? (
+ sys-auth/pambase
+ sys-libs/pam
+ )
+ !pam? ( virtual/libcrypt:= )
+ systemd? ( sys-apps/systemd:0=[policykit] )
+ !systemd? ( sys-auth/elogind )
+"
+RDEPEND="
+ ${DEPEND}
+ acct-user/polkitd
+ selinux? ( sec-policy/selinux-policykit )
+"
+PDEPEND="
+ gtk? ( || (
+ >=gnome-extra/polkit-gnome-0.105
+ >=lxde-base/lxsession-0.5.2
+ ) )
+ kde? ( kde-plasma/polkit-kde-agent )
+"
+
+DOCS=( docs/TODO HACKING.md NEWS.md README.md )
+
+QA_MULTILIB_PATHS="
+ usr/lib/polkit-1/polkit-agent-helper-1
+ usr/lib/polkit-1/polkitd
+"
+
+python_check_deps() {
+ python_has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # bug #401513
+ sed -i -e 's|unix-group:@PRIVILEGED_GROUP@|unix-user:@PRIVILEGED_GROUP@|' src/polkitbackend/*-default.rules.in || die
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ local emesonargs=(
+ --localstatedir="${EPREFIX}"/var
+ -Dauthfw="$(usex pam pam shadow)"
+ -Dexamples=false
+ -Dgtk_doc=false
+ -Dman=true
+ -Dos_type=gentoo
+ -Dpam_module_dir=$(getpam_mod_dir)
+ -Dprivileged_group=0
+ -Dsession_tracking="$(usex systemd logind elogind)"
+ -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(meson_use !daemon libs-only)
+ $(meson_use introspection)
+ $(meson_use test tests)
+ )
+ meson_src_configure
+}
+
+src_compile() {
+ meson_src_compile
+
+ # Required for polkitd on hardened/PaX due to spidermonkey's JIT
+ pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest
+}
+
+src_install() {
+ meson_src_install
+
+ # acct-user/polkitd installs its own (albeit with a different filename)
+ rm -rf "${ED}"/usr/lib/sysusers.d || die
+
+ if use examples ; then
+ docinto examples
+ dodoc src/examples/{*.c,*.policy*}
+ fi
+
+ if use daemon; then
+ if [[ ${EUID} == 0 ]]; then
+ diropts -m 0700 -o polkitd
+ fi
+ keepdir /etc/polkit-1/rules.d
+ fi
+}
+
+pkg_postinst() {
+ tmpfiles_process polkit-tmpfiles.conf
+
+ if use daemon && [[ ${EUID} == 0 ]]; then
+ chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ fi
+}