[packages/ctdb] - updated to 2.0 - removed obsolete version patch - added ib patch (fixes build of InfiniBand suppor

qboosh qboosh at pld-linux.org
Sun Dec 16 18:18:20 CET 2012


commit 8eca7ff576914b68bd0be0ae8dcf2162e3d7a738
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 16 18:19:22 2012 +0100

    - updated to 2.0
    - removed obsolete version patch
    - added ib patch (fixes build of InfiniBand support)

 ctdb-ib.patch      | 44 ++++++++++++++++++++++++++++++++++++++++++++
 ctdb-version.patch |  9 ---------
 ctdb.spec          | 53 +++++++++++++++++++++++++++++++----------------------
 3 files changed, 75 insertions(+), 31 deletions(-)
---
diff --git a/ctdb.spec b/ctdb.spec
index 324a28c..e300e7d 100644
--- a/ctdb.spec
+++ b/ctdb.spec
@@ -1,36 +1,40 @@
 # TODO
+# - pcp support (pcp/{pmapi,impl,pmda}.h)
+# - shared libctdb (not ready in Makefile)
 # - skip interfaces check:
 #   checking for iface getifaddrs...
 #   lo         IP=127.0.0.1 NETMASK=255.0.0.0
 #   eth0       IP=x.x.x.x NETMASK=255.255.252.0
-# - add support for /sbin/ss instead of /bin/netstat (ss uses kernel netlink
-#   which is huge win on server with loads of open tcp sockets)
 # - patch scripts for pld
+#
+# Conditional build:
+%bcond_without	ibverbs		# InfiniBand support
+#
 Summary:	A Clustered Database based on Samba's Trivial Database (TDB)
 Summary(pl.UTF-8):	Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
 Name:		ctdb
-Version:	1.0.113
-Release:	2
+Version:	2.0
+Release:	1
 License:	GPL v3+
 Group:		Daemons
+Source0:	http://www.samba.org/ftp/ctdb/%{name}-%{version}.tar.gz
+# Source0-md5:	89a397e165e7f5347f06a6cf45fd6b60
+Patch0:		%{name}-ib.patch
 URL:		http://ctdb.samba.org/
-# Tarfile created using git
-# git clone git://git.samba.org/sahlberg/ctdb.git ctdb
-# cd ctdb
-# git-archive --format=tar --prefix=%{name}-%{version}/ %{name}-%{version} | bzip2 > %{name}-%{version}.tar.bz2
-Source0:	%{name}-%{version}.tar.bz2
-# Source0-md5:	ce3eda943bf81c7c9e513ec715f4a785
-Patch0:		%{name}-version.patch
-BuildRequires:	autoconf >= 2.50
-BuildRequires:	net-tools
 BuildRequires:	popt-devel
 BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	talloc-devel
+BuildRequires:	tdb-devel
+BuildRequires:	tevent-devel
+%if %{with ibverbs}
+BuildRequires:	libibverbs-devel
+BuildRequires:	librdmacm-devel
+%endif
 Requires(post,preun):	/sbin/chkconfig
 Requires:	coreutils
 Requires:	psmisc
 Requires:	rc-scripts
 Requires:	sed
-Requires:	tdb
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -49,6 +53,7 @@ bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
 Summary:	CTDB clustered database development package
 Summary(pl.UTF-8):	Pakiet programistyczny klastrowej bazy danych CTDB
 Group:		Development/Libraries
+Requires:	tdb-devel
 # does not require base
 
 %description devel
@@ -63,10 +68,8 @@ wykorzystujące CTDB.
 %patch0 -p1
 
 %build
-sh -x ./autogen.sh
-
-CFLAGS="%{rpmcflags} $EXTRA -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\""
-%configure
+%configure \
+	%{?with_ibverbs:--enable-infiniband}
 %{__make} showflags
 %{__make}
 
@@ -108,6 +111,9 @@ fi
 %{_docdir}/ctdb-%{version}
 %dir %{_sysconfdir}/ctdb
 %{_sysconfdir}/ctdb/events.d
+%config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
+%config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
+%config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
 %{_sysconfdir}/ctdb/statd-callout
@@ -115,16 +121,19 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/ctdb
 %attr(755,root,root) %{_sbindir}/ctdbd
 %attr(755,root,root) %{_bindir}/ctdb
-%attr(755,root,root) %{_bindir}/smnotify
-%attr(755,root,root) %{_bindir}/ping_pong
 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
+%attr(755,root,root) %{_bindir}/ltdbtool
 %attr(755,root,root) %{_bindir}/onnode
+%attr(755,root,root) %{_bindir}/ping_pong
+%attr(755,root,root) %{_bindir}/smnotify
 %{_mandir}/man1/ctdb.1*
 %{_mandir}/man1/ctdbd.1*
+%{_mandir}/man1/ltdbtool.1*
 %{_mandir}/man1/onnode.1*
+%{_mandir}/man1/ping_pong.1*
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/ctdb.h
-%{_includedir}/ctdb_private.h
+%{_libdir}/libctdb.a
+%{_includedir}/ctdb*.h
 %{_pkgconfigdir}/ctdb.pc
diff --git a/ctdb-ib.patch b/ctdb-ib.patch
new file mode 100644
index 0000000..b87deb9
--- /dev/null
+++ b/ctdb-ib.patch
@@ -0,0 +1,44 @@
+--- ctdb-2.0/ib/ibwrapper.c.orig	2012-10-31 02:33:25.000000000 +0100
++++ ctdb-2.0/ib/ibwrapper.c	2012-12-16 16:56:36.987433136 +0100
+@@ -34,7 +34,7 @@
+ #include <unistd.h>
+ 
+ #include "includes.h"
+-#include "lib/events/events.h"
++#include "tevent.h"
+ #include "ibwrapper.h"
+ 
+ #include <infiniband/kern-abi.h>
+--- ctdb-2.0/ib/ibw_ctdb_init.c.orig	2012-10-31 02:33:25.000000000 +0100
++++ ctdb-2.0/ib/ibw_ctdb_init.c	2012-12-16 17:00:33.467428207 +0100
+@@ -21,6 +21,7 @@
+  */
+ 
+ #include "includes.h"
++#include "lib/util/dlinklist.h"
+ #include <system/network.h>
+ #include <assert.h>
+ #include "ctdb_private.h"
+--- ctdb-2.0/Makefile.in.orig	2012-10-31 02:33:25.000000000 +0100
++++ ctdb-2.0/Makefile.in	2012-12-16 17:18:19.044072664 +0100
+@@ -267,7 +267,7 @@
+ CTDB_TEST_C = $(CTDB_CLIENT_OBJ:.o=.c) tools/ctdb.c tools/ctdb_vacuum.c  tests/src/ctdb_test.c
+ 
+ CTDB_TEST_OBJ =  $(TALLOC_OBJ) $(TDB_OBJ) \
+-	@CTDB_SYSTEM_OBJ@ @LIBREPLACEOBJ@ $(EXTRA_OBJ) $(TEVENT_OBJ) $(SOCKET_WRAPPER_OBJ)
++	@CTDB_SYSTEM_OBJ@ @LIBREPLACEOBJ@ $(EXTRA_OBJ) $(TEVENT_OBJ) $(SOCKET_WRAPPER_OBJ) @INFINIBAND_WRAPPER_OBJ@
+ 
+ tests/src/ctdb_takeover_tests.o: tests/src/ctdb_takeover_tests.c $(CTDBD_TEST_C)
+ 
+@@ -287,9 +287,9 @@
+ 	@echo Linking $@
+ 	@$(CC) $(CFLAGS) -o $@ tests/src/ctdb_tool_stubby.o $(CTDB_TEST_OBJ) $(POPT_OBJ) $(LIB_FLAGS)
+ 
+-tests/bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o
++tests/bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o @INFINIBAND_WRAPPER_OBJ@
+ 	@echo Linking $@
+-	@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
++	@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) @INFINIBAND_WRAPPER_OBJ@ $(LIB_FLAGS)
+ 
+ manpages:
+ 	$(MAKE) -C doc
diff --git a/ctdb-version.patch b/ctdb-version.patch
deleted file mode 100644
index 75e7d30..0000000
--- a/ctdb-version.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- ctdb-1.0.113/configure.ac.orig	2010-01-12 21:12:08.000000000 +0100
-+++ ctdb-1.0.113/configure.ac	2012-02-14 19:43:00.127559003 +0100
-@@ -1,5 +1,5 @@
- AC_PREREQ(2.50)
--AC_INIT(ctdb, m4_esyscmd([grep 'Version:' ./packaging/RPM/ctdb.spec 2>/dev/null | head -1 | sed -e 's/[ \t]*Version:[ \t]*\([^ \t]*\)[ \t]*.*/\1/' | tr -d '\n']))
-+AC_INIT(ctdb, m4_esyscmd([grep 'Version:' ./packaging/RPM/ctdb.spec.in 2>/dev/null | head -1 | sed -e 's/[ \t]*Version:[ \t]*\([^ \t]*\)[ \t]*.*/\1/' | tr -d '\n']))
- AC_DEFUN([AC_CHECK_LIB_EXT], [
- 	AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7])
- 	ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ctdb.git/commitdiff/8eca7ff576914b68bd0be0ae8dcf2162e3d7a738



More information about the pld-cvs-commit mailing list