diff options
author | Sam James <sam@gentoo.org> | 2022-02-19 01:56:05 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-19 02:03:44 +0000 |
commit | a5f0be7ceb05007e3a309487badb9a098b877952 (patch) | |
tree | 06e3ad8d62ea6101ad613c3faf3e689e0814c099 /sys-auth | |
parent | media-libs/dav1d: Stabilize 0.9.2 arm64, #833580 (diff) | |
download | gentoo-a5f0be7ceb05007e3a309487badb9a098b877952.tar.gz gentoo-a5f0be7ceb05007e3a309487badb9a098b877952.tar.bz2 gentoo-a5f0be7ceb05007e3a309487badb9a098b877952.zip |
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@gentoo.org>
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/polkit/Manifest | 1 | ||||
-rw-r--r-- | sys-auth/polkit/metadata.xml | 1 | ||||
-rw-r--r-- | sys-auth/polkit/polkit-0.120_p20220127.ebuild | 123 |
3 files changed, 125 insertions, 0 deletions
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-bugs@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 +} |