summaryrefslogtreecommitdiff
path: root/sys-auth/polkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-05 09:05:42 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-05 09:05:42 +0000
commitc3870d5920e6ee600e9360c3a5b004b7ad0c5abf (patch)
tree783e53d0526f67659a53911dd1dd9ca88eaad19a /sys-auth/polkit
parent94393d04ccce851b0084c650c99a2eca52f9d3bb (diff)
gentoo auto-resync : 05:12:2022 - 09:05:41
Diffstat (limited to 'sys-auth/polkit')
-rw-r--r--sys-auth/polkit/Manifest4
-rw-r--r--sys-auth/polkit/metadata.xml4
-rw-r--r--sys-auth/polkit/polkit-122.ebuild149
3 files changed, 156 insertions, 1 deletions
diff --git a/sys-auth/polkit/Manifest b/sys-auth/polkit/Manifest
index c90d73a1cb41..292b350eaca0 100644
--- a/sys-auth/polkit/Manifest
+++ b/sys-auth/polkit/Manifest
@@ -1,4 +1,6 @@
AUX polkit-0.120_p20220509-make-netgroup-support-optional.patch 7306 BLAKE2B f01dae628a31cee32ea5416a456bc8515142949a656b7e7075db1e71b04b50041fa466e659f8056b02f8b6d542219bedb77b4279b7c375c7c4971c0b20d968b3 SHA512 300867e1b32f03eafaae9c91994576ce5112a064850dee1f323401cb624a60e48776c42dbb61ab2fd4d0c5fb0e9ec25e542842572d067a7b7b0e84c2c7d6ff4a
DIST polkit-121.tar.gz 743287 BLAKE2B 6ebda8fc866ef960281ef912a3d3c45572da3ba90a84026e386b78ced8eaadc6cfc0e88d6e5a75133bf99e28041f8b29b236bb0e9666dd1ffc43af2227a5cb2d SHA512 f565027b80f32833c558900b612e089ab25027da5bf9a90c421a292467d4db9a291f6dc9850c4bca8f9ee890d476fd064a643a5f7e28497661ba1e31d4227624
+DIST polkit-122.tar.bz2 704972 BLAKE2B 601ed969de816d061a974b07490d64c144940898a75d4e1761462ee1ff0f00686b068298fa6fdc901879d8cd4bea4334c0187aa5bde50acf90728c37e73e21f4 SHA512 a7c0a951bbcdb09899adbc128296c74fc062441e996f4d6a782b214178f0936137e2fdc489eaa86a00599b988711735a5bd9b5c3b93bdb42fb915db9f9b04e26
EBUILD polkit-121.ebuild 3864 BLAKE2B 68be775abb0bd7bb841187485902222931e698c05d1aea81d7a79db13629b826416b8584ca0608fedc8c929485c191d9e4567a70d534dc7933aa8d8b540cf4f6 SHA512 3ee1cfcfea7ae9f987bbdaa6d1806a17492c593e0fd3e5b4b56259e36b461fb1d136028294c283505c9ca068d853e8d56ab6150e86029f45e1a3f3096c754104
-MISC metadata.xml 454 BLAKE2B 1a94248c1f7e644ab2501a45aa66efb0fcfe2dd2526e486b1a7c73a56d4910463b69eff0b10cc568437b467f523ced8a2f38a9b67ed6f1891a3411230819f209 SHA512 3fabdf6bce379fa08c802b52398d65071515e08eef357c9886b6c74e1415671068cad942c711e1b1348f6e4b583ae6bec443e902e7d675df1938e981d3ff8143
+EBUILD polkit-122.ebuild 3889 BLAKE2B c99a41c7e22639d7bfb00d2e1feaa8ba6460ef2bf38c011fffa76d015f0554c35347ac3b6a36b23d372576c6c4f882e80d0a74548daf7d8edd50040eb623ceca SHA512 26ef268558d965e3c432bf7eb48b06f7202d629629c78fa97facd27d4be17aa9ea5eba75d900d64632d4adb6583d0439721d2d53dee3d4a5f76bd959e81e54fd
+MISC metadata.xml 688 BLAKE2B 517529c1bf104b638fe33a10b0778ffe048713f9c437b38747eb1d65cf99a0080dfdd56f8c5174f60fec0b1c26f53d967a825760d5a1c8beaf2d048a2d43b7a3 SHA512 7f523ac0693b560e481fe4febeb3b3bc08bb84aa23cbfb99b77baf1399b11b6761493d47d014611ac8e31a4bde472ce536cf5531e9484924117574981f3fd3bb
diff --git a/sys-auth/polkit/metadata.xml b/sys-auth/polkit/metadata.xml
index 4e902cca885e..e4fe842bbae0 100644
--- a/sys-auth/polkit/metadata.xml
+++ b/sys-auth/polkit/metadata.xml
@@ -5,7 +5,11 @@
<email>freedesktop-bugs@gentoo.org</email>
</maintainer>
<use>
+ <flag name="daemon">Build polkitd in addition to libpolkit. Those using <pkg>sys-apps/dbus-broker</pkg> may wish to disable this flag.</flag>
<flag name="duktape">Use <pkg>dev-lang/duktape</pkg> instead of <pkg>dev-lang/spidermonkey</pkg> as JavaScript engine</flag>
<flag name="systemd">Use <pkg>sys-apps/systemd</pkg> for session tracking</flag>
</use>
+ <upstream>
+ <remote-id type="freedesktop-gitlab">polkit/polkit</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-auth/polkit/polkit-122.ebuild b/sys-auth/polkit/polkit-122.ebuild
new file mode 100644
index 000000000000..249ac83bdeb0
--- /dev/null
+++ b/sys-auth/polkit/polkit-122.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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://gitlab.freedesktop.org/polkit/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://gitlab.freedesktop.org/polkit/polkit/-/archive/${MY_COMMIT}/polkit-${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2"
+
+ S="${WORKDIR}"/${PN}-${MY_COMMIT}
+else
+ SRC_URI="https://gitlab.freedesktop.org/polkit/polkit/-/archive/${PV}/${P}.tar.bz2"
+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"
+# https://gitlab.freedesktop.org/polkit/polkit/-/issues/181 for test restriction
+RESTRICT="!test? ( test ) test"
+
+# This seems to be fixed with 121?
+#if [[ ${PV} == *_p* ]] ; then
+# RESTRICT="!test? ( test )"
+#else
+# # Tests currently don't work with meson in the dist tarballs. See
+# # https://gitlab.freedesktop.org/polkit/polkit/-/issues/144
+# RESTRICT="test"
+#fi
+
+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 )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/python-dbusmock[${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="
+ dev-libs/glib:2
+ dev-libs/expat
+ daemon? (
+ duktape? ( dev-lang/duktape:= )
+ !duktape? ( dev-lang/spidermonkey:102[-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
+
+ # 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
+ -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
+
+ if use examples ; then
+ docinto examples
+ dodoc src/examples/{*.c,*.policy*}
+ fi
+
+ diropts -m 0700 -o polkitd
+ keepdir /usr/share/polkit-1/rules.d
+}
+
+pkg_postinst() {
+ chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+}