[packages/dlm] Build the dlm_stonith fencing helper

jajcus jajcus at pld-linux.org
Thu Nov 1 19:53:15 CET 2012


commit 76b3d37791ae3a21550090c13f90bd3e3057b320
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Nov 1 19:53:00 2012 +0100

    Build the dlm_stonith fencing helper

 dlm.spec                | 28 ++++++++++++++++++++++++++++
 dlm_stonith-build.patch | 11 +++++++++++
 2 files changed, 39 insertions(+)
---
diff --git a/dlm.spec b/dlm.spec
index e82563b..4f36304 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -1,3 +1,6 @@
+# Conditional build:
+%bcond_without	dlm_stonith	# build without fencing helper
+#
 Summary:	General-purpose distributed lock manager
 Summary(pl.UTF-8):	Zarządca rozproszonych blokad ogólnego przeznaczenia
 Name:		dlm
@@ -12,8 +15,10 @@ Source2:	%{name}.sysconfig
 Source3:	%{name}.tmpfiles
 Patch0:		%{name}-link_order.patch
 Patch1:		%{name}-after_configfs.patch
+Patch2:		dlm_stonith-build.patch
 URL:		http://sources.redhat.com/cluster/dlm/
 BuildRequires:	corosync-devel
+%{?with_dlm_stonith:BuildRequires:	corosync-devel}
 Requires:	%{name}-libs = %{version}-%{release}
 Obsoletes:	cluster-dlm
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -58,6 +63,7 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__make} \
@@ -69,6 +75,17 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
 	HDRDIR=%{_includedir} \
 	CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
 
+%if %{with dlm_stonith}
+%{__make} -C fence \
+	PREFIX=%{_prefix} \
+	LIBNUM=%{_lib} \
+	BINDIR=%{_sbindir} \
+	LIBDIR=%{_libdir} \
+	MANDIR=%{_mandir} \
+	HDRDIR=%{_includedir} \
+	CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
@@ -83,6 +100,17 @@ install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
 	MANDIR=%{_mandir} \
 	HDRDIR=%{_includedir}
 
+%if %{with dlm_stonith}
+%{__make} -C fence install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	LIBNUM=%{_lib} \
+	BINDIR=%{_sbindir} \
+	LIBDIR=%{_libdir} \
+	MANDIR=%{_mandir} \
+	HDRDIR=%{_includedir}
+%endif
+
 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
diff --git a/dlm_stonith-build.patch b/dlm_stonith-build.patch
new file mode 100644
index 0000000..1ab0b33
--- /dev/null
+++ b/dlm_stonith-build.patch
@@ -0,0 +1,11 @@
+diff -dur dlm-3.99.5.org/fence/stonith_helper.c dlm-3.99.5/fence/stonith_helper.c
+--- dlm-3.99.5.org/fence/stonith_helper.c	2012-06-21 23:53:56.000000000 +0200
++++ dlm-3.99.5/fence/stonith_helper.c	2012-11-01 19:47:34.000000000 +0100
+@@ -11,6 +11,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <syslog.h>
++#include <errno.h>
+ #include <pacemaker/crm/stonith-ng.h>
+ 
+ int nodeid;
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list