[packages/dlm] - allow building without systemd

hawk hawk at pld-linux.org
Thu Sep 11 19:25:20 CEST 2025


commit eb4e969a87fff76e88459f9efa05674963f08198
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Thu Sep 11 19:25:05 2025 +0200

    - allow building without systemd

 dlm.spec         | 10 +++++++++-
 no_systemd.patch | 12 ++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/dlm.spec b/dlm.spec
index 3d7c940..f9ff1bc 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	systemd		# systemd
+#
 Summary:	General-purpose distributed lock manager
 Summary(pl.UTF-8):	Zarządca rozproszonych blokad ogólnego przeznaczenia
 Name:		dlm
@@ -12,13 +16,14 @@ Source2:	%{name}.sysconfig
 Source3:	%{name}.tmpfiles
 Source4:	%{name}.conf
 Patch0:		old_udev_dir.patch
+Patch1:		no_systemd.patch
 URL:		http://www.sourceware.org/cluster/dlm/
 BuildRequires:	corosync-devel >= 3.1
 BuildRequires:	libxml2-devel >= 2.0
 BuildRequires:	pacemaker-devel >= 1.1.7
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.644
-BuildRequires:	systemd-devel >= 1:209
+%{?with_systemd:BuildRequires:	systemd-devel >= 1:209}
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	rc-scripts
 Requires:	systemd-units >= 1:208-8
@@ -65,6 +70,9 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
 %prep
 %setup -q
 %patch -P0 -p1
+%if !%{with systemd}
+%patch -P1 -p1
+%endif
 
 %if "%{cc_version}" < "8"
 %{__sed} -i -e 's/-fstack-clash-protection//' {dlm_controld,dlm_tool,fence,libdlm}/Makefile
diff --git a/no_systemd.patch b/no_systemd.patch
new file mode 100644
index 0000000..4d2ebad
--- /dev/null
+++ b/no_systemd.patch
@@ -0,0 +1,12 @@
+diff -ur dlm-4.3.0.orig/dlm_controld/Makefile dlm-4.3.0/dlm_controld/Makefile
+--- dlm-4.3.0.orig/dlm_controld/Makefile	2024-04-22 18:17:54.000000000 +0200
++++ dlm-4.3.0/dlm_controld/Makefile	2025-09-11 19:17:20.719016634 +0200
+@@ -7,7 +7,7 @@
+ MANDIR=$(PREFIX)/share/man
+ PKGDIR=$(LIBDIR)/pkgconfig
+ 
+-USE_SD_NOTIFY=yes
++USE_SD_NOTIFY=no
+ 
+ BIN_TARGET = dlm_controld
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dlm.git/commitdiff/eb4e969a87fff76e88459f9efa05674963f08198



More information about the pld-cvs-commit mailing list