[packages/polkit] - upstream patch to fix build with elogind on systems without systemd

hawk hawk at pld-linux.org
Sat Jul 22 13:56:59 CEST 2023


commit c06373444087f58100fef23564497e0fd241578e
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Sat Jul 22 13:02:51 2023 +0200

    - upstream patch to fix build with elogind on systems without systemd

 elogind.patch | 24 ++++++++++++++++++++++++
 polkit.spec   |  4 ++++
 2 files changed, 28 insertions(+)
---
diff --git a/polkit.spec b/polkit.spec
index cbb4639..b95ebca 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:	7eb1f0070c66e5e8646d23ad38773253
 Patch0:		systemd-fallback.patch
+Patch1:		elogind.patch
 URL:		https://www.freedesktop.org/wiki/Software/polkit
 BuildRequires:	dbus-devel
 BuildRequires:	docbook-dtd412-xml
@@ -114,6 +115,9 @@ Pliki nagłówkowe PolicyKit.
 %if %{with consolekit} && (%{with systemd} || %{with elogind})
 %patch0 -p1
 %endif
+%if %{with elogind}
+%patch1 -p1
+%endif
 
 %build
 %meson build \
diff --git a/elogind.patch b/elogind.patch
new file mode 100644
index 0000000..2eb5ce4
--- /dev/null
+++ b/elogind.patch
@@ -0,0 +1,24 @@
+diff -ur polkit-122.orig/data/meson.build polkit-122/data/meson.build
+--- polkit-122.orig/data/meson.build	2022-10-26 14:12:24.000000000 +0200
++++ polkit-122/data/meson.build	2023-07-22 13:01:22.590545340 +0200
+@@ -26,7 +26,7 @@
+   )
+ endif
+ 
+-if enable_logind
++if session_tracking == 'libsystemd-login'
+   configure_file(
+     input: 'polkit.service.in',
+     output: '@BASENAME@',
+diff -ur polkit-122.orig/meson.build polkit-122/meson.build
+--- polkit-122.orig/meson.build	2022-10-26 14:12:24.000000000 +0200
++++ polkit-122/meson.build	2023-07-22 13:00:31.328819850 +0200
+@@ -204,7 +204,7 @@
+ 
+   # systemd unit / service files
+   systemd_systemdsystemunitdir = get_option('systemdsystemunitdir')
+-  if systemd_systemdsystemunitdir == ''
++  if systemd_systemdsystemunitdir == '' and 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')
+     # 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')
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list