[packages/cluster-sbd] - initial; sbd used to be part of cluster-glue up to 1.0.8 - patched to build with corosync 2

qboosh qboosh at pld-linux.org
Sat Oct 22 23:13:17 CEST 2016


commit cd378ea7fc0a8a470631ef3a58af426e0295d017
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 22 23:15:09 2016 +0200

    - initial; sbd used to be part of cluster-glue up to 1.0.8
    - patched to build with corosync 2

 cluster-sbd.spec | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sbd-coro.patch   | 31 +++++++++++++++++++++++++
 2 files changed, 101 insertions(+)
---
diff --git a/cluster-sbd.spec b/cluster-sbd.spec
new file mode 100644
index 0000000..65cb953
--- /dev/null
+++ b/cluster-sbd.spec
@@ -0,0 +1,70 @@
+# NOTE: upstream name is "sbd" but is was already occupied, so using "cluster-" prefix
+Summary:	Shared-storage based death
+Summary(pl.UTF-8):	Uśmiercanie węzła poprzez współdzieloną przestrzeń dyskową
+Name:		cluster-sbd
+Version:	1.2.0
+Release:	1
+License:	GPL v2+
+Group:		Daemons
+#Source0Download: https://github.com/ClusterLabs/sbd/releases
+Source0:	https://github.com/ClusterLabs/sbd/archive/v%{version}/sbd-%{version}.tar.gz
+# Source0-md5:	59d4aeaa8470ccecfc6af375532a6e05
+Patch0:		sbd-coro.patch
+URL:		https://github.com/ClusterLabs/sbd/
+BuildRequires:	autoconf >= 2.63
+BuildRequires:	automake
+BuildRequires:	cluster-glue-libs-devel >= 1.0.9
+BuildRequires:	corosync-devel >= 1.4
+BuildRequires:	glib2-devel >= 2.0
+BuildRequires:	libaio-devel
+BuildRequires:	libxml2-devel >= 2.0
+BuildRequires:	pacemaker-devel >= 1.1.8
+BuildRequires:	perl-tools-pod
+BuildRequires:	pkgconfig
+Requires:	cluster-glue-stonith >= 1.0.9
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A highly reliable fencing or Shoot-the-other-node-in-the-head
+(STONITH) mechanism that works by utilizing shared storage.
+
+The component works with Pacemaker clusters. (Currently, it is only
+tested on clusters using the "old" plugin to corosync, not yet the MCP
+code).
+
+%description -l pl.UTF-8
+Wysoko wiarygodny mechanizm odgrodzenia lub "odstrzeliwania" (STONITH
+- Shoot-the-other-node-in-the-head), działający dzięki wykorzystaniu
+współdzielonej przestrzeni dyskowej.
+
+Komponent działa z klastrami Pacemaker (aktualnie testowany był tylko
+z klastrami wykorzystującymi "starą" wtyczkę corosync, nie kod MCP).
+
+%prep
+%setup -q -n sbd-%{version}
+%patch0 -p1
+
+%build
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS README.md ROADMAP
+%attr(755,root,root) %{_sbindir}/sbd
+%attr(755,root,root) %{_libdir}/stonith/plugins/external/sbd
+%{_mandir}/man8/sbd.8*
diff --git a/sbd-coro.patch b/sbd-coro.patch
new file mode 100644
index 0000000..02d9b55
--- /dev/null
+++ b/sbd-coro.patch
@@ -0,0 +1,31 @@
+--- sbd-1.2.0/configure.ac.orig	2016-10-22 21:55:35.214353481 +0200
++++ sbd-1.2.0/configure.ac	2016-10-22 21:55:38.464353444 +0200
+@@ -29,7 +29,6 @@
+ AM_PROG_CC_C_O
+ 
+ PKG_CHECK_MODULES(glib, [glib-2.0])
+-PKG_CHECK_MODULES(libcoroipcc, [libcoroipcc])
+ 
+ dnl pacemaker > 1.1.8
+ PKG_CHECK_MODULES(pacemaker, [pacemaker, pacemaker-cib], HAVE_pacemaker=1, HAVE_pacemaker=0)
+--- sbd-1.2.0/src/Makefile.am.orig	2013-07-04 12:22:36.000000000 +0200
++++ sbd-1.2.0/src/Makefile.am	2016-10-22 22:50:18.537649324 +0200
+@@ -8,5 +8,5 @@
+ 
+ sbd_SOURCES = sbd-common.c sbd-md.c sbd-pacemaker.c
+ 
+-sbd_LDFLAGS = $(glib_LIBS) $(libcoroipcc_LIBS)
++sbd_LDFLAGS = $(glib_LIBS) $(libcoroipcc_LIBS) -lqb -luuid -lplumb
+ 
+--- sbd-1.2.0/src/sbd-pacemaker.c.orig	2013-07-04 12:22:36.000000000 +0200
++++ sbd-1.2.0/src/sbd-pacemaker.c	2016-10-22 22:51:12.680982040 +0200
+@@ -227,7 +227,9 @@
+ ais_membership_destroy(gpointer user_data)
+ {
+ 	cl_log(LOG_ERR, "AIS connection terminated - corosync down?");
++#if 0
+ 	ais_fd_sync = -1;
++#endif
+ 	/* TODO: Is recovery even worth it here? After all, this means
+ 	 * that corosync died ... */
+ 	exit(1);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cluster-sbd.git/commitdiff/cd378ea7fc0a8a470631ef3a58af426e0295d017



More information about the pld-cvs-commit mailing list