diff --git a/0001-New-location-of-major-and-minor-macros-for-glibc-2.2.patch b/0001-New-location-of-major-and-minor-macros-for-glibc-2.2.patch new file mode 100644 index 0000000000000000000000000000000000000000..3d8290b4ab763ec909d4c63abc8c6c24383d7063 --- /dev/null +++ b/0001-New-location-of-major-and-minor-macros-for-glibc-2.2.patch @@ -0,0 +1,41 @@ +From d006495e2f95969522e60c6ea83ff226f098d413 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 24 Mar 2018 08:50:07 +0000 +Subject: [PATCH] New location of major() and minor() macros for glibc 2.27. + +glibc 2.27 moves the major() and minor() macros to the + header file. + +Signed-off-by: Richard W.M. Jones +--- + dlm_controld/dlm_daemon.h | 1 + + libdlm/libdlm.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h +index 6cb0f11c..731818c5 100644 +--- a/dlm_controld/dlm_daemon.h ++++ b/dlm_controld/dlm_daemon.h +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + +diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c +index a9e61955..ebfba457 100644 +--- a/libdlm/libdlm.c ++++ b/libdlm/libdlm.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_SELINUX + #include + #endif +-- +2.15.1 + diff --git a/0001-dlm_controld-libsystemd-broke-itself.patch b/0001-dlm_controld-libsystemd-broke-itself.patch new file mode 100644 index 0000000000000000000000000000000000000000..f1dd4a97dcc4586437fb0e1a6e750146e1cb97fc --- /dev/null +++ b/0001-dlm_controld-libsystemd-broke-itself.patch @@ -0,0 +1,28 @@ +From 2eefc91150a3292c2be82f4139207e06b4c4bba4 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Fri, 10 Jun 2016 13:13:48 -0500 +Subject: [PATCH] dlm_controld: libsystemd broke itself + +--- + dlm_controld/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile +index 13d6339ab263..cf556c9d72b8 100644 +--- a/dlm_controld/Makefile ++++ b/dlm_controld/Makefile +@@ -62,9 +62,9 @@ LIB_CFLAGS += $(BIN_CFLAGS) + LIB_LDFLAGS += -Wl,-z,relro -pie + + ifeq ($(USE_SD_NOTIFY),yes) +- BIN_CFLAGS += $(shell pkg-config --cflags libsystemd-daemon) \ ++ BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \ + -DUSE_SD_NOTIFY +- BIN_LDFLAGS += $(shell pkg-config --libs libsystemd-daemon) ++ BIN_LDFLAGS += $(shell pkg-config --libs libsystemd) + endif + + all: $(LIB_TARGET) $(BIN_TARGET) +-- +1.8.3.1 + diff --git a/dlm-dlm-4.0.6.tar.gz b/dlm-dlm-4.0.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..15f1cb0e4105b5b6ab004b27945b105b5d944996 Binary files /dev/null and b/dlm-dlm-4.0.6.tar.gz differ diff --git a/dlm.spec b/dlm.spec new file mode 100644 index 0000000000000000000000000000000000000000..2ad697ba6978cafdda6a94bc18e21f46fe4fd86a --- /dev/null +++ b/dlm.spec @@ -0,0 +1,89 @@ +Name: dlm +Version: 4.0.6 +Release: 10 +License: GPLv2 and GPLv2+ and LGPLv2+ +Summary: distributed lock manager +URL: https://pagure.io/dlm +BuildRequires: util-linux glibc-kernheaders corosynclib-devel >= 1.99.9 pacemaker-libs-devel >= 1.1.7 +BuildRequires: libxml2-devel systemd-units systemd-devel +Source0: https://pagure.io/dlm/archive/dlm-%{version}/dlm-dlm-%{version}.tar.gz +Patch0000: 0001-dlm_controld-libsystemd-broke-itself.patch +Patch0001: 0001-New-location-of-major-and-minor-macros-for-glibc-2.2.patch + +Requires: dlm-lib = %{version}-%{release} corosync >= 1.99.9 kernel-modules-extra +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +Conflicts: cman clusterlib +Provides: dlm-lib = %{version}-%{release} +Obsoletes: dlm-lib < %{version}-%{release} +%description +dlm is used for inter-process synchronization where processes may live on different machines. + +%package devel +Summary: Development files for dlm +Requires: dlm = %{version}-%{release} +Conflicts: clusterlib-devel + +%description devel +dlm-devel package contains libraries and header files for +developing applications that use dlm. + +%package help +Summary: Documentation for dlm +Requires: dlm = %{version}-%{release} + +%description help +Documentation for dlm development + +%prep +%autosetup -n dlm-dlm-%{version} -p1 + +%build +CFLAGS=$RPM_OPT_FLAGS make +CFLAGS=$RPM_OPT_FLAGS make -C fence + +%install +%make_install +%make_install -C fence + +mkdir -p %{buildroot}%{_unitdir} +cp init/dlm.service %{buildroot}%{_unitdir}/dlm.service +chmod 644 %{buildroot}%{_unitdir}/dlm.service + +mkdir -p %{buildroot}/etc/sysconfig +cp init/dlm.sysconfig %{buildroot}/etc/sysconfig/dlm +chmod 644 %{buildroot}/etc/sysconfig/dlm + +%post +%systemd_post dlm.service +/sbin/ldconfig + +%preun +%systemd_preun dlm.service + +%postun +%systemd_postun_with_restart dlm.service +/sbin/ldconfig + +%files +%doc README.license +%config(noreplace) %{_sysconfdir}/sysconfig/dlm +%{_unitdir}/dlm.service +%{_sbindir}/{dlm_controld,dlm_tool,dlm_stonith} +/usr/lib/udev/rules.d/*-dlm.rules +%{_libdir}/libdlm*.so.* + +%files devel +%{_libdir}/libdlm*.so +%{_includedir}/libdlm*.h +%{_libdir}/pkgconfig/*.pc + +%files help +%{_mandir}/man8/dlm* +%{_mandir}/man5/dlm* +%{_mandir}/man3/*dlm* + +%changelog +* Fri Apr 24 2020 lizhenhua - 4.0.6-10 +- Package init diff --git a/dlm.yaml b/dlm.yaml new file mode 100644 index 0000000000000000000000000000000000000000..861bf487853418744bac7914d30ddf92a88c4d95 --- /dev/null +++ b/dlm.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://pagure.io/dlm.git +tag_prefix: dlm- +seperator: .