sys-auth/polkit: drop USE=daemon

I really think I just had a braino here and meant to add it for
dbus (for dbus-broker) and somehow ended it up to polkit when bumping
it as I'd had it on my mind, or something.

See be4011d5f8 as well. I can't see
any real use for this other than perhaps avoiding spidermonkey back
before duktape wasn't an option (when packages needed libpolkit but
you really didn't want to run the daemon or could live without it).

The *upstream* intended-use for USE=daemon is for Flatpak where there's
no point in having the daemon as you use the system daemon there but
you need the utilities within a Flatpak.

Closes: https://bugs.gentoo.org/954290
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-04-24 09:11:58 +01:00
parent 4da4eead72
commit cb787d63a8
3 changed files with 28 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -23,7 +23,7 @@ fi
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="+daemon examples gtk +introspection kde pam selinux systemd test"
IUSE="examples gtk +introspection kde pam selinux systemd test"
# https://gitlab.freedesktop.org/polkit/polkit/-/issues/181 for test restriction
RESTRICT="!test? ( test ) test"
@@ -57,7 +57,7 @@ BDEPEND="
DEPEND="
>=dev-libs/glib-2.32:2
dev-libs/expat
daemon? ( dev-lang/duktape:= )
dev-lang/duktape:=
pam? (
sys-auth/pambase
sys-libs/pam
@@ -120,7 +120,7 @@ src_configure() {
-Dsession_tracking="$(usex systemd libsystemd-login libelogind)"
-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
-Djs_engine=duktape
$(meson_use !daemon libs-only)
-Dlibs-only=false
$(meson_use introspection)
$(meson_use test tests)
$(usex pam "-Dpam_module_dir=$(getpam_mod_dir)" '')
@@ -143,16 +143,14 @@ src_install() {
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
if [[ ${EUID} == 0 ]]; then
diropts -m 0700 -o polkitd
fi
keepdir /etc/polkit-1/rules.d
}
pkg_postinst() {
if use daemon && [[ ${EUID} == 0 ]]; then
if [[ ${EUID} == 0 ]]; then
chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
fi

View File

@@ -28,7 +28,7 @@ SLOT="0"
if [[ ${PV} != 9999 ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
IUSE="+daemon examples gtk +introspection kde pam nls selinux systemd test"
IUSE="examples gtk +introspection kde pam nls selinux systemd test"
RESTRICT="!test? ( test )"
BDEPEND="
@@ -52,9 +52,7 @@ BDEPEND="
DEPEND="
>=dev-libs/glib-2.32:2
dev-libs/expat
daemon? (
dev-lang/duktape:=
)
dev-lang/duktape:=
pam? (
sys-auth/pambase
sys-libs/pam
@@ -119,7 +117,7 @@ src_configure() {
-Dprivileged_group=0
-Dsession_tracking="$(usex systemd logind elogind)"
-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
$(meson_use !daemon libs-only)
-Dlibs-only=false
$(meson_use introspection)
$(meson_use nls gettext)
$(meson_use test tests)
@@ -145,21 +143,17 @@ src_install() {
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
if [[ ${EUID} == 0 ]]; then
diropts -m 0700 -o polkitd
fi
keepdir /etc/polkit-1/rules.d
}
pkg_postinst() {
if use daemon ; then
tmpfiles_process polkit-tmpfiles.conf
tmpfiles_process polkit-tmpfiles.conf
if [[ ${EUID} == 0 ]]; then
chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
fi
if [[ ${EUID} == 0 ]]; then
chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
fi
}

View File

@@ -28,7 +28,7 @@ SLOT="0"
if [[ ${PV} != 9999 ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
IUSE="+daemon examples gtk +introspection kde pam nls selinux systemd test"
IUSE="examples gtk +introspection kde pam nls selinux systemd test"
RESTRICT="!test? ( test )"
BDEPEND="
@@ -52,9 +52,7 @@ BDEPEND="
DEPEND="
>=dev-libs/glib-2.32:2
dev-libs/expat
daemon? (
dev-lang/duktape:=
)
dev-lang/duktape:=
pam? (
sys-auth/pambase
sys-libs/pam
@@ -119,7 +117,7 @@ src_configure() {
-Dprivileged_group=0
-Dsession_tracking="$(usex systemd logind elogind)"
-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
$(meson_use !daemon libs-only)
-Dlibs-only=false
$(meson_use introspection)
$(meson_use nls gettext)
$(meson_use test tests)
@@ -145,21 +143,17 @@ src_install() {
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
if [[ ${EUID} == 0 ]]; then
diropts -m 0700 -o polkitd
fi
keepdir /etc/polkit-1/rules.d
}
pkg_postinst() {
if use daemon ; then
tmpfiles_process polkit-tmpfiles.conf
tmpfiles_process polkit-tmpfiles.conf
if [[ ${EUID} == 0 ]]; then
chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
fi
if [[ ${EUID} == 0 ]]; then
chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
fi
}