summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-01-19 06:35:27 +0000
committerSam James <sam@gentoo.org>2024-01-19 06:35:27 +0000
commite94da7f8dae815704fe1c371688feb045db9eb16 (patch)
tree3b348275d711cf5395ba3a840bdf88a66592995e /sys-auth
parentsys-auth/polkit: update upstream metadata (diff)
downloadgentoo-e94da7f8dae815704fe1c371688feb045db9eb16.tar.gz
gentoo-e94da7f8dae815704fe1c371688feb045db9eb16.tar.bz2
gentoo-e94da7f8dae815704fe1c371688feb045db9eb16.zip
sys-auth/polkit: fix non-systemd build, don't install redundant sysusers file
No need for our own sysusers file as acct-user/polkitd already installs one. Closes: https://bugs.gentoo.org/922458 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/polkit/files/polkit-124-systemd-fixup.patch26
-rw-r--r--sys-auth/polkit/polkit-124-r1.ebuild (renamed from sys-auth/polkit/polkit-124.ebuild)4
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-auth/polkit/files/polkit-124-systemd-fixup.patch b/sys-auth/polkit/files/polkit-124-systemd-fixup.patch
new file mode 100644
index 000000000000..fceb33d31afd
--- /dev/null
+++ b/sys-auth/polkit/files/polkit-124-systemd-fixup.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/922458
+https://github.com/polkit-org/polkit/pull/417/files#r1458416421
+--- a/meson.build
++++ b/meson.build
+@@ -212,11 +212,14 @@ if enable_logind
+ config_h.set10('HAVE_' + func.to_upper(), cc.has_function(func, dependencies: logind_dep))
+
+ # systemd unit / service files
+- systemd_dep = dependency('systemd', not_found_message: 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
+ systemd_systemdsystemunitdir = get_option('systemdsystemunitdir')
+- if systemd_systemdsystemunitdir == '' and session_tracking == 'libsystemd-login'
+- # FIXME: systemd.pc file does not use variables with relative paths, so `define_variable` cannot be used
+- systemd_systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
++ if session_tracking == 'libsystemd-login'
++ systemd_dep = dependency('systemd', not_found_message: 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
++
++ if systemd_systemdsystemunitdir == ''
++ # FIXME: systemd.pc file does not use variables with relative paths, so `define_variable` cannot be used
++ systemd_systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
++ endif
+ endif
+
+ systemd_sysusers_dir = systemd_dep.get_pkgconfig_variable('sysusers_dir', default: '/usr/lib/sysusers.d')
+--
+2.43.0
+
diff --git a/sys-auth/polkit/polkit-124.ebuild b/sys-auth/polkit/polkit-124-r1.ebuild
index 1b576a7af2d7..d5ae6fcf9f54 100644
--- a/sys-auth/polkit/polkit-124.ebuild
+++ b/sys-auth/polkit/polkit-124-r1.ebuild
@@ -91,6 +91,7 @@ QA_MULTILIB_PATHS="
PATCHES=(
"${FILESDIR}"/${PN}-124-systemd.patch
+ "${FILESDIR}"/${PN}-124-systemd-fixup.patch
)
python_check_deps() {
@@ -140,6 +141,9 @@ src_compile() {
src_install() {
meson_src_install
+ # acct-user/polkitd installs its own (albeit with a different filename)
+ rm -rf "${ED}"/usr/lib/sysusers.d || die
+
if use examples ; then
docinto examples
dodoc src/examples/{*.c,*.policy*}