[Pkg-samba-maint] [samba] 02/06: Merge ctdb source package

Mathieu Parent sathieu at moszumanska.debian.org
Sun Jul 26 20:29:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

sathieu pushed a commit to branch experimental
in repository samba.

commit f88cb2d4877c35f409b389f522d43485631ca19b
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Tue Jun 16 13:59:08 2015 +0200

    Merge ctdb source package
    
    This adds the ctdb, ctdb-dbg and ctdb-pcp-pmda packages
    
    Known changes:
    - Package libctdb-dev dropped, as API is not stable
    - Priority optional from extra
    - ./configure direclty called, instead of dh_auto_configure
    
    Still missing (TODO):
    - DEB_BUILD_MAINT_OPTIONS   := hardening=+bindnow
    - clustering enabled in samba
---
 debian/clean                  |  2 ++
 debian/control                | 70 ++++++++++++++++++++++++++++++++++++++++++-
 debian/ctdb-dbg.README.Debian | 10 +++++++
 debian/ctdb-dbg.install       |  4 +++
 debian/ctdb-pcp-pmda.install  |  1 +
 debian/ctdb.README.hurd       | 14 +++++++++
 debian/ctdb.README.kfreebsd   | 14 +++++++++
 debian/ctdb.dirs              |  1 +
 debian/ctdb.doc-base          |  7 +++++
 debian/ctdb.docs              |  6 ++++
 debian/ctdb.examples          |  1 +
 debian/ctdb.install           | 24 +++++++++++++++
 debian/ctdb.lintian-overrides |  7 +++++
 debian/ctdb.logrotate         |  8 +++++
 debian/rules                  | 52 +++++++++++++++++++++++++++++++-
 15 files changed, 219 insertions(+), 2 deletions(-)

diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..fd07874
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,2 @@
+ctdb/utils/smnotify/smnotify.h
+ctdb/utils/smnotify/gen_smnotify.c
diff --git a/debian/control b/debian/control
index ec3bd50..6c362c0 100644
--- a/debian/control
+++ b/debian/control
@@ -5,11 +5,13 @@ Maintainer: Debian Samba Maintainers <pkg-samba-maint at lists.alioth.debian.org>
 Uploaders: Steve Langasek <vorlon at debian.org>,
            Christian Perrier <bubulle at debian.org>,
            Jelmer Vernooij <jelmer at debian.org>,
-           Ivo De Decker <ivodd at debian.org>
+           Ivo De Decker <ivodd at debian.org>,
+           Mathieu Parent <sathieu at debian.org>
 Homepage: http://www.samba.org
 Standards-Version: 3.9.6
 Build-Depends: bison,
                debhelper (>> 9),
+               dh-systemd (>= 1.5),
                docbook-xml,
                docbook-xsl,
                faketime,
@@ -30,6 +32,9 @@ Build-Depends: bison,
                libntdb-dev (>= 1.0),
                libpam0g-dev,
                libparse-yapp-perl,
+               libpcap-dev [hurd-i386 kfreebsd-any],
+               libpcp-pmda3-dev,
+               libpcp3-dev,
                libpopt-dev,
                libreadline-dev,
                libsubunit-dev,
@@ -571,3 +576,66 @@ Description: Samba winbind client library - development files
  required for building applications against libwbclient, a library for client
  applications that interact via the winbind pipe protocol with a Samba
  winbind server.
+
+Package: ctdb
+Architecture: any
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, iproute2 [linux-any], psmisc, tdb-tools, time, sudo
+Recommends: ethtool [linux-any]
+Suggests: logrotate, lsof, libctdb-dev
+Description: clustered database to store temporary data
+ CTDB is a cluster implementation of the TDB database used by Samba and other
+ projects to store temporary data. If an application is already using TDB for
+ temporary data it is very easy to convert that application to be cluster aware
+ and use CTDB instead.
+ .
+ CTDB provides the same types of functions as TDB but in a clustered fashion,
+ providing a TDB-style database that spans multiple physical hosts in a cluster.
+ .
+ Features include:
+  * CTDB provides a TDB that has consistent data and consistent locking across
+    all nodes in a cluster.
+  * CTDB is very fast.
+  * In case of node failures, CTDB will automatically recover and repair all TDB
+    databases that it manages.
+  * CTDB is the core component that provides pCIFS ("parallel CIFS") with
+    Samba3/4.
+  * CTDB provides HA features such as node monitoring, node failover, and IP
+    takeover.
+  * CTDB provides a reliable messaging transport to allow applications linked
+    with CTDB to communicate to other instances of the application running on
+    different nodes in the cluster.
+  * CTDB has pluggable transport backends. Currently implemented backends are
+    TCP and Infiniband.
+  * CTDB supports a system of application specific management scripts, allowing
+    applications that depend on network or filesystem resources to be managed in
+    a highly available manner on a cluster.
+
+Package: ctdb-dbg
+Section: debug
+Architecture: any
+Depends: ctdb (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: clustered database to store temporary data -- debugging symbols and test suite
+ CTDB is a cluster implementation of the TDB database used by Samba and other
+ projects to store temporary data. If an application is already using TDB for
+ temporary data it is very easy to convert that application to be cluster aware
+ and use CTDB instead.
+ .
+ More detailed description can be found in the ctdb package.
+ .
+ This package provides debugging information and test suite for CTDB. Install it
+ to get a better backtrace in the event of a crash, or to test.
+
+Package: ctdb-pcp-pmda
+Architecture: any
+Depends: ctdb (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: clustered database to store temporary data -- PDM PMDA
+ CTDB is a cluster implementation of the TDB database used by Samba and other
+ projects to store temporary data. If an application is already using TDB for
+ temporary data it is very easy to convert that application to be cluster aware
+ and use CTDB instead.
+ .
+ More detailed description can be found in the ctdb package.
+ .
+ This package provides PCP-PMDA (Performance Co-Pilot - Performance Metric
+ Domain Agents) support for CTDB.
diff --git a/debian/ctdb-dbg.README.Debian b/debian/ctdb-dbg.README.Debian
new file mode 100644
index 0000000..c0d6e99
--- /dev/null
+++ b/debian/ctdb-dbg.README.Debian
@@ -0,0 +1,10 @@
+Running the testsuite
+---------------------
+
+* Add /usr/lib/ctdb/tests/bin to the PATH, in /root/.bashrc on all nodes:
+ PATH="$PATH:/usr/lib/ctdb/tests/bin"
+
+* On one node, change dir to /usr/share/ctdb/tests:
+ cd /usr/share/ctdb/tests
+ 
+* And follow instructions from /usr/share/ctdb/tests/README
diff --git a/debian/ctdb-dbg.install b/debian/ctdb-dbg.install
new file mode 100644
index 0000000..2667018
--- /dev/null
+++ b/debian/ctdb-dbg.install
@@ -0,0 +1,4 @@
+usr/bin/ctdb_run_tests
+usr/bin/ctdb_run_cluster_tests
+usr/lib/*/ctdb-tests
+usr/share/ctdb-tests
diff --git a/debian/ctdb-pcp-pmda.install b/debian/ctdb-pcp-pmda.install
new file mode 100644
index 0000000..ca03d52
--- /dev/null
+++ b/debian/ctdb-pcp-pmda.install
@@ -0,0 +1 @@
+/var/lib/pcp/pmdas/ctdb/*
diff --git a/debian/ctdb.README.hurd b/debian/ctdb.README.hurd
new file mode 100644
index 0000000..647874a
--- /dev/null
+++ b/debian/ctdb.README.hurd
@@ -0,0 +1,14 @@
+CTDB has the following limitations on GNU Hurd:
+
+- The pid of a peer is not get from the socket [1]. As a consequence, the peer
+  process is not killed when releasing IP [2].
+
+- network interfaces are always considered present [3]
+
+- Some other functions are not yet supported [4]
+
+[1]: ctdb_get_peer_pid() in common/system_gnu.c
+[2]: release_kill_clients() in server/ctdb_takeover.c
+[3]: ctdb_sys_check_iface_exists() in common/system_gnu.c
+[4]: See FIXME in common/system_gnu.c (ctdb_sys_send_arp(),
+     ctdb_get_process_name(), ctdb_get_lock_info(), ctdb_get_blocker_pid())
diff --git a/debian/ctdb.README.kfreebsd b/debian/ctdb.README.kfreebsd
new file mode 100644
index 0000000..6bf9b42
--- /dev/null
+++ b/debian/ctdb.README.kfreebsd
@@ -0,0 +1,14 @@
+CTDB has the following limitations on Debian/kFreeBSD:
+
+- The pid of a peer is not get from the socket [1]. As a consequence, the peer
+  process is not killed when releasing IP [2].
+
+- network interfaces are always considered present [3]
+
+- Some other functions are not yet supported [4]
+
+[1]: ctdb_get_peer_pid() in common/system_kfreebsd.c
+[2]: release_kill_clients() in server/ctdb_takeover.c
+[3]: ctdb_sys_check_iface_exists() in common/system_kfreebsd.c
+[4]: See FIXME in common/system_kfreebsd.c (ctdb_sys_send_arp(),
+     ctdb_get_process_name(), ctdb_get_lock_info(), ctdb_get_blocker_pid())
diff --git a/debian/ctdb.dirs b/debian/ctdb.dirs
new file mode 100644
index 0000000..2c65b74
--- /dev/null
+++ b/debian/ctdb.dirs
@@ -0,0 +1 @@
+var/log/ctdb
diff --git a/debian/ctdb.doc-base b/debian/ctdb.doc-base
new file mode 100644
index 0000000..abe33d2
--- /dev/null
+++ b/debian/ctdb.doc-base
@@ -0,0 +1,7 @@
+Document: ctdb-web
+Title: CTDB website
+Section: Network/File Transfer
+
+Format: HTML
+Index: /usr/share/doc/ctdb/web/index.html
+Files: /usr/share/doc/ctdb/web/*
diff --git a/debian/ctdb.docs b/debian/ctdb.docs
new file mode 100644
index 0000000..f3eae5d
--- /dev/null
+++ b/debian/ctdb.docs
@@ -0,0 +1,6 @@
+ctdb/doc/recovery-process.txt
+ctdb/web
+ctdb/NEWS
+ctdb/README
+ctdb/README.eventscripts
+ctdb/README.notify.d
diff --git a/debian/ctdb.examples b/debian/ctdb.examples
new file mode 100644
index 0000000..28432d0
--- /dev/null
+++ b/debian/ctdb.examples
@@ -0,0 +1 @@
+ctdb/doc/examples/*
diff --git a/debian/ctdb.install b/debian/ctdb.install
new file mode 100644
index 0000000..fdc5870
--- /dev/null
+++ b/debian/ctdb.install
@@ -0,0 +1,24 @@
+etc/ctdb
+etc/sudoers.d
+lib/systemd/system/ctdb.service
+usr/bin/ctdb
+usr/bin/ctdb_diagnostics
+usr/bin/ctdb_event_helper
+usr/bin/ctdb_lock_helper
+usr/bin/ltdbtool
+usr/bin/onnode
+usr/bin/ping_pong
+usr/bin/smnotify
+usr/lib/*/ctdb/*
+usr/sbin/ctdbd
+usr/sbin/ctdbd_wrapper
+usr/share/man/man1/ctdb.1
+usr/share/man/man1/ctdbd.1
+usr/share/man/man1/ctdbd_wrapper.1
+usr/share/man/man1/ltdbtool.1
+usr/share/man/man1/onnode.1
+usr/share/man/man1/ping_pong.1
+usr/share/man/man7/ctdb.7
+usr/share/man/man7/ctdb-statistics.7
+usr/share/man/man7/ctdb-tunables.7
+usr/share/man/man5/ctdbd.conf.5
diff --git a/debian/ctdb.lintian-overrides b/debian/ctdb.lintian-overrides
new file mode 100644
index 0000000..a065688
--- /dev/null
+++ b/debian/ctdb.lintian-overrides
@@ -0,0 +1,7 @@
+# Some scripts are not executable by default: They are disabled.
+# They can be enabled with "ctdb enablescript <script>" command which sets the
+# executable bit
+ctdb: script-not-executable etc/ctdb/events.d/20.multipathd
+ctdb: script-not-executable etc/ctdb/events.d/31.clamd
+ctdb: script-not-executable etc/ctdb/events.d/40.fs_use
+ctdb: script-not-executable etc/ctdb/events.d/99.timeout
diff --git a/debian/ctdb.logrotate b/debian/ctdb.logrotate
new file mode 100644
index 0000000..47cfc2d
--- /dev/null
+++ b/debian/ctdb.logrotate
@@ -0,0 +1,8 @@
+/var/log/ctdb/log.ctdb {
+	weekly
+	missingok
+	rotate 7
+	copytruncate
+	compress
+	notifempty
+}
diff --git a/debian/rules b/debian/rules
index fc7274a..385b4ac 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,6 +32,15 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 WAF += -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
 
+ctdb_conf_args = \
+		--prefix=/usr \
+		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
+		--sysconfdir=/etc \
+		--localstatedir=/var \
+		--with-socketpath=/var/run/ctdb/ctdbd.socket \
+		--with-logdir=/var/log/ctdb \
+		--enable-pmda
+
 conf_args = \
 		--prefix=/usr \
 		--enable-fhs \
@@ -65,29 +74,49 @@ conf_args = \
 		--minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)"
 
 %:
-	dh $* --with python2
+	dh $* --with python2 --with systemd
 
 override_dh_auto_configure:
+	cd ctdb; $(shell dpkg-buildflags --export=configure) ./configure $(ctdb_conf_args)
 	$(shell dpkg-buildflags --export=configure) $(WAF) configure \
 		$(conf_args)
 
 override_dh_auto_clean:
 	-$(WAF) clean
+	dh_auto_clean --sourcedirectory=ctdb
 	find . -name "*.pyc" | xargs rm -f
 	rm -rf buildtools/bin/.waf-*
 	rm -rf bin
 	rm -f .lock-wscript
 
 override_dh_auto_install:
+	dh_auto_install --sourcedirectory=ctdb
 	DESTDIR="$(DESTDIR)" $(WAF) install
 
 override_dh_auto_build:
+	dh_auto_build --sourcedirectory=ctdb
 	DESTDIR="$(DESTDIR)" $(WAF)
 
 override_dh_auto_test:
 	# Running make test requires configuration with --enable-selftest, which
 	# we don't want to do for production systems.
 
+override_dh_systemd_start:
+	dh_systemd_start -pctdb --no-start --no-restart-on-upgrade
+
+override_dh_installdocs:
+	cp ctdb/config/events.d/README ctdb/README.eventscripts
+	cp ctdb/config/notify.d.README ctdb/README.notify.d
+	dh_installdocs
+ifeq ($(DEB_BUILD_ARCH_OS), hurd)
+	dh_installdocs -pctdb debian/ctdb.README.hurd
+endif
+ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
+	dh_installdocs -pctdb debian/ctdb.README.kfreebsd
+endif
+	#patch doc
+	sed -i 's|/etc/sysconfig/|/etc/default/|' $(CURDIR)/debian/ctdb/usr/share/doc/ctdb/web/*.html
+
 override_dh_install:
 	# get list of files in build log
 	find ${DESTDIR}
@@ -137,6 +166,17 @@ override_dh_install:
 	# this is a temporary workaround for #750593 in xsltproc
 	[ -e $(DESTIDR)/usr/share/man/man5/smb.conf.5 ] || \
 	   cp docs/manpages/smb.conf.5 $(DESTDIR)/usr/share/man/man5/smb.conf.5
+	# Remove ctdb dev files
+	rm $(DESTDIR)/usr/include/ctdb.h
+	rm $(DESTDIR)/usr/include/ctdb_client.h
+	rm $(DESTDIR)/usr/include/ctdb_private.h
+	rm $(DESTDIR)/usr/include/ctdb_protocol.h
+	rm $(DESTDIR)/usr/include/ctdb_version.h
+	rm $(DESTDIR)/usr/include/ctdb_typesafe_cb.h
+	rm $(DESTDIR)/usr/lib/*/pkgconfig/ctdb.pc
+	# Install ctdb conffiles
+	mkdir -p $(DESTDIR)/lib/systemd/system/
+	install -m 0644 ctdb/config/ctdb.service $(DESTDIR)/lib/systemd/system/
 	dh_install --sourcedir=$(DESTDIR) --list-missing --fail-missing
 
 override_dh_python2:
@@ -165,6 +205,16 @@ endif
 ifneq (,$(filter winbind, $(shell dh_listpackages)))
 	dh_installinit -pwinbind
 endif
+ifneq (,$(filter ctdb, $(shell dh_listpackages)))
+	# Install /etc/default/ctdb
+	mkdir -p $(CURDIR)/debian/ctdb/etc/default
+	install -m644 ctdb/config/ctdb.sysconfig $(CURDIR)/debian/ctdb/etc/default/ctdb
+	# Install /etc/init.d/ctdb
+	mkdir -p $(CURDIR)/debian/ctdb/etc/init.d
+	install -m755 ctdb/config/ctdb.init $(CURDIR)/debian/ctdb/etc/init.d/ctdb
+	# Install dh scripts
+	dh_installinit -pctdb --no-start --no-restart-on-upgrade --onlyscripts
+endif
 
 override_dh_shlibdeps:
 	LD_LIBRARY_PATH=$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/samba:$$LD_LIBRARY_PATH dh_shlibdeps -a

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list