[packages/polkit] - fix building with elogind

hawk hawk at pld-linux.org
Tue Apr 23 22:22:11 CEST 2024


commit 76dc67c658af9d33da96e4e0b8289188e27271db
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Tue Apr 23 22:16:05 2024 +0200

    - fix building with elogind

 elogind-build.patch | 14 ++++++++++++++
 polkit.spec         |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/polkit.spec b/polkit.spec
index 3bd966a..82e1068 100644
--- a/polkit.spec
+++ b/polkit.spec
@@ -19,6 +19,7 @@ Group:		Libraries
 Source0:	https://gitlab.freedesktop.org/polkit/polkit/-/archive/%{version}/%{name}-%{version}.tar.bz2
 # Source0-md5:	5cb95118e21d0cf2348069847c3879e8
 Patch0:		systemd-fallback.patch
+Patch1:		elogind-build.patch
 URL:		https://www.freedesktop.org/wiki/Software/polkit
 BuildRequires:	dbus-devel
 BuildRequires:	docbook-dtd412-xml
@@ -114,6 +115,7 @@ Pliki nagłówkowe PolicyKit.
 %if %{with consolekit} && (%{with systemd} || %{with elogind})
 %patch0 -p1
 %endif
+%patch1 -p1
 
 %build
 %meson build \
@@ -170,7 +172,7 @@ fi
 %dir %{_sysconfdir}/polkit-1
 %attr(700,polkitd,root) %dir %{_sysconfdir}/polkit-1/rules.d
 %{_prefix}/lib/pam.d/polkit-1
-/usr/lib/sysusers.d/polkit.conf
+%{?with_systemd/usr/lib/sysusers.d/polkit.conf}
 %dir %{_datadir}/polkit-1
 %{_datadir}/polkit-1/policyconfig-1.dtd
 %{_datadir}/polkit-1/actions
diff --git a/elogind-build.patch b/elogind-build.patch
new file mode 100644
index 0000000..b02d80c
--- /dev/null
+++ b/elogind-build.patch
@@ -0,0 +1,14 @@
+diff -ur polkit-124.orig/meson.build polkit-124/meson.build
+--- polkit-124.orig/meson.build	2024-01-17 16:43:53.000000000 +0100
++++ polkit-124/meson.build	2024-04-23 22:11:14.035586601 +0200
+@@ -217,9 +217,9 @@
+     systemd_dep = dependency('systemd', not_found_message: 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
+     # 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')
++    systemd_sysusers_dir = systemd_dep.get_pkgconfig_variable('sysusers_dir', default: '/usr/lib/sysusers.d')
+   endif
+ 
+-  systemd_sysusers_dir = systemd_dep.get_pkgconfig_variable('sysusers_dir', default: '/usr/lib/sysusers.d')
+ endif
+ config_h.set('HAVE_LIBSYSTEMD', enable_logind)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/polkit.git/commitdiff/76dc67c658af9d33da96e4e0b8289188e27271db



More information about the pld-cvs-commit mailing list