commit:     d54b63da0d416434c82e86019cb663ad6a310547
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  5 03:39:54 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec  5 03:41:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d54b63da

sys-auth/polkit: add 122

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-auth/polkit/Manifest          |   1 +
 sys-auth/polkit/metadata.xml      |   1 +
 sys-auth/polkit/polkit-122.ebuild | 149 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 151 insertions(+)

diff --git a/sys-auth/polkit/Manifest b/sys-auth/polkit/Manifest
index 9f7fb1747d8e..be9a62f75202 100644
--- a/sys-auth/polkit/Manifest
+++ b/sys-auth/polkit/Manifest
@@ -1 +1,2 @@
 DIST polkit-121.tar.gz 743287 BLAKE2B 
6ebda8fc866ef960281ef912a3d3c45572da3ba90a84026e386b78ced8eaadc6cfc0e88d6e5a75133bf99e28041f8b29b236bb0e9666dd1ffc43af2227a5cb2d
 SHA512 
f565027b80f32833c558900b612e089ab25027da5bf9a90c421a292467d4db9a291f6dc9850c4bca8f9ee890d476fd064a643a5f7e28497661ba1e31d4227624
+DIST polkit-122.tar.bz2 704972 BLAKE2B 
601ed969de816d061a974b07490d64c144940898a75d4e1761462ee1ff0f00686b068298fa6fdc901879d8cd4bea4334c0187aa5bde50acf90728c37e73e21f4
 SHA512 
a7c0a951bbcdb09899adbc128296c74fc062441e996f4d6a782b214178f0936137e2fdc489eaa86a00599b988711735a5bd9b5c3b93bdb42fb915db9f9b04e26

diff --git a/sys-auth/polkit/metadata.xml b/sys-auth/polkit/metadata.xml
index 4e902cca885e..e52544dd09ae 100644
--- a/sys-auth/polkit/metadata.xml
+++ b/sys-auth/polkit/metadata.xml
@@ -5,6 +5,7 @@
                <email>freedesktop-b...@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>

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
+}

Reply via email to