commit:     a5f0be7ceb05007e3a309487badb9a098b877952
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 19 01:56:05 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 19 02:03:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5f0be7c

sys-auth/polkit: add 0.120_p20220127

Now with Duktape!

Closes: https://bugs.gentoo.org/833122
Closes: https://bugs.gentoo.org/734326
Signed-off-by: Sam James <sam <AT> gentoo.org>

 profiles/arch/alpha/package.use.force         |   6 +-
 profiles/arch/hppa/package.use.force          |   6 ++
 profiles/arch/ia64/package.use.force          |   6 +-
 profiles/arch/powerpc/ppc32/package.use.force |   6 ++
 profiles/arch/sparc/package.use.force         |   6 +-
 sys-auth/polkit/Manifest                      |   1 +
 sys-auth/polkit/metadata.xml                  |   1 +
 sys-auth/polkit/polkit-0.120_p20220127.ebuild | 123 ++++++++++++++++++++++++++
 8 files changed, 152 insertions(+), 3 deletions(-)

diff --git a/profiles/arch/alpha/package.use.force 
b/profiles/arch/alpha/package.use.force
index 78a0be60eff0..608e94bf64f2 100644
--- a/profiles/arch/alpha/package.use.force
+++ b/profiles/arch/alpha/package.use.force
@@ -1,6 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Sam James <s...@gentoo.org> (2022-02-19)
+# New enough SpiderMonkey not keyworded here, bug #753221
+sys-auth/polkit duktape
+
 # Tobias Klausmann <klaus...@gentoo.org> 2014-12-04
 # The Firefox/Mozilla build system is broken in regards to linking the shipped
 # ICU library. Bug 529944

diff --git a/profiles/arch/hppa/package.use.force 
b/profiles/arch/hppa/package.use.force
new file mode 100644
index 000000000000..23d2f5f96e34
--- /dev/null
+++ b/profiles/arch/hppa/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Sam James <s...@gentoo.org> (2022-02-19)
+# New enough SpiderMonkey not keyworded here, bug #753221
+sys-auth/polkit duktape

diff --git a/profiles/arch/ia64/package.use.force 
b/profiles/arch/ia64/package.use.force
index 2b9d26669439..618de622be91 100644
--- a/profiles/arch/ia64/package.use.force
+++ b/profiles/arch/ia64/package.use.force
@@ -1,6 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Sam James <s...@gentoo.org> (2022-02-19)
+# New enough SpiderMonkey not keyworded here, bug #753221
+sys-auth/polkit duktape
+
 # Raúl Porcel <armi...@gentoo.org> (2007-10-21)
 # It segfaults without debug use-flags
 # Remove when http://bugs.php.net/bug.php?id=42893 is fixed

diff --git a/profiles/arch/powerpc/ppc32/package.use.force 
b/profiles/arch/powerpc/ppc32/package.use.force
new file mode 100644
index 000000000000..5e411c13c0bc
--- /dev/null
+++ b/profiles/arch/powerpc/ppc32/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Sam James <s...@gentoo.org> (2022-02-19)
+# New enough SpiderMonkey not (yet?) keyworded here, bug #753221
+sys-auth/polkit duktape

diff --git a/profiles/arch/sparc/package.use.force 
b/profiles/arch/sparc/package.use.force
index e199f04684fe..3c53f2a73cfa 100644
--- a/profiles/arch/sparc/package.use.force
+++ b/profiles/arch/sparc/package.use.force
@@ -1,6 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Sam James <s...@gentoo.org> (2022-02-19)
+# New enough SpiderMonkey not (yet?) keyworded here, bug #753221
+sys-auth/polkit duktape
+
 # Michał Górny <mgo...@gentoo.org> (2016-09-24)
 # Force the host target to avoid dependency hell
 dev-ml/llvm-ocaml llvm_targets_Sparc

diff --git a/sys-auth/polkit/Manifest b/sys-auth/polkit/Manifest
index b92c7602f92f..8ff4f745515e 100644
--- a/sys-auth/polkit/Manifest
+++ b/sys-auth/polkit/Manifest
@@ -1,2 +1,3 @@
 DIST polkit-0.117.tar.gz 1554536 BLAKE2B 
1cf7e0ff9db19a29be626f4bea96c9e2ef8b1eab4b8287a5f1f4d2a818b86d58c1c4c4a41849d95e31559dba1b18853a31e934ebbadd8e07f94dfd58b45240e0
 SHA512 
c10ea984f2386fe436e58a2866e5323afc80d24f744f0ee61d966941259aa491bd96b07d911434aa731b300c3cca25b647804b396501175ab5b3c53384e94c70
 DIST polkit-0.120.tar.gz 1626659 BLAKE2B 
745727445b4946d44b8ea470d21ac131ca7706e83f5dbaf85cf3541ac60a1bbe23b3bf3172a62d9256ebb3dae02d2b2d476e3e0f7fe79a80c47864a120e62ed9
 SHA512 
db072769439d5e17d0eed681e7b94251b77828c1474b40fe40b94293903a64333e7fa17515a3270648691f04a1374d8b404405ead6abf292a8eb8483164adc46
+DIST polkit-0.120_p20220127.tar.bz2 733965 BLAKE2B 
839a66799df870c36ea3788f68aea355ab99cf8aa0227ee633ee1155822663ce4671de4e9b041274345c1f62fbdf0405754ed1f3c7cf2a8855974854dc126e55
 SHA512 
67f2c1c7cd69767d578ccba2b94398eb6fcb348a77a4092c3517895190f095caee95ed491c8cff2827e287f4541cf83fefbefca1a0099d7e52bee6f825bbbd4f

diff --git a/sys-auth/polkit/metadata.xml b/sys-auth/polkit/metadata.xml
index 3a32730179ec..e93e97eb38ac 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="duktape">Use <pkg>dev-lang/duktape</pkg> instead of 
<pkg>dev-lang/spidermonkey</pkg> as JavaScript engine</flag>
                <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for 
session tracking</flag>
                <flag name="systemd">Use <pkg>sys-apps/systemd</pkg> for 
session tracking</flag>
        </use>

diff --git a/sys-auth/polkit/polkit-0.120_p20220127.ebuild 
b/sys-auth/polkit/polkit-0.120_p20220127.ebuild
new file mode 100644
index 000000000000..c92d740a4cb2
--- /dev/null
+++ b/sys-auth/polkit/polkit-0.120_p20220127.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson pam pax-utils 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
+       MY_COMMIT="a6bedfd09b7bba753de7a107dc471da0db801858"
+       
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://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz";
+fi
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86"
+IUSE="+duktape examples gtk +introspection kde pam selinux systemd test"
+#RESTRICT="!test? ( test )"
+# Tests currently don't work with meson. See
+#   https://gitlab.freedesktop.org/polkit/polkit/-/issues/144
+RESTRICT="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 )
+"
+DEPEND="
+       dev-libs/glib:2
+       dev-libs/expat
+       duktape? ( dev-lang/duktape:= )
+       !duktape? ( dev-lang/spidermonkey:91[-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 NEWS README )
+
+QA_MULTILIB_PATHS="
+       usr/lib/polkit-1/polkit-agent-helper-1
+       usr/lib/polkit-1/polkitd"
+
+src_prepare() {
+       local PATCHES=(
+               "${FILESDIR}"/${PN}-0.120-meson.patch
+       )
+
+       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 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