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

Mathieu Parent sathieu at moszumanska.debian.org
Sat Sep 10 18:34:58 UTC 2016


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

sathieu pushed a commit to branch no_pmda
in repository samba.

commit dfbb1f0d6d831c0264848d7504f623c41cd8110f
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 optionnal 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 | 11 +++++++
 debian/ctdb-dbg.install       | 18 +++++++++++
 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           |  6 ++++
 debian/ctdb.lintian-overrides |  7 +++++
 debian/ctdb.logrotate         |  8 +++++
 debian/rules                  | 40 ++++++++++++++++++++++++-
 15 files changed, 204 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..2a4e8f6
--- /dev/null
+++ b/debian/ctdb-dbg.README.Debian
@@ -0,0 +1,11 @@
+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..672cd46
--- /dev/null
+++ b/debian/ctdb-dbg.install
@@ -0,0 +1,18 @@
+ctdb/tests/bin/ctdb_bench			usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_fetch			usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_fetch_one		usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_persistent		usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_randrec			usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_store			usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_transaction		usr/lib/ctdb/tests/bin
+ctdb/tests/bin/ctdb_traverse			usr/lib/ctdb/tests/bin
+ctdb/tests/bin/rb_test				usr/lib/ctdb/tests/bin
+ctdb/tests/complex					usr/share/ctdb/tests
+ctdb/tests/events.d					usr/share/ctdb/tests
+ctdb/tests/README					usr/share/ctdb/tests
+ctdb/tests/recover.sh				usr/share/ctdb/tests
+ctdb/tests/run_tests.sh				usr/share/ctdb/tests
+ctdb/tests/scripts					usr/share/ctdb/tests
+ctdb/tests/simple					usr/share/ctdb/tests
+ctdb/tests/test_check_tcp_ports.sh	usr/share/ctdb/tests
+ctdb/tests/TODO						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..40a4f64
--- /dev/null
+++ b/debian/ctdb.install
@@ -0,0 +1,6 @@
+etc/ctdb
+etc/sudoers.d
+usr/bin/*
+usr/sbin/*
+usr/share/man/man1/*
+ctdb/config/ctdb.service /lib/systemd/system/
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..6af1808 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,6 +32,12 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 WAF += -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
 
+ctdb_conf_args = \
+		--localstatedir=/var \
+		--with-socketpath=/var/run/ctdb/ctdbd.socket \
+		--with-logdir=/var/log/ctdb \
+		--enable-pmda
+
 conf_args = \
 		--prefix=/usr \
 		--enable-fhs \
@@ -65,29 +71,51 @@ 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 config/events.d/README README.eventscripts
+	cp config/notify.d.README 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
+	#upstream changelog
+	grep -A 10000 '%changelog' packaging/RPM/ctdb.spec.in > $(CURDIR)/debian/ctdb/usr/share/doc/ctdb/changelog
+
 override_dh_install:
 	# get list of files in build log
 	find ${DESTDIR}
@@ -165,6 +193,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 config/ctdb.sysconfig $(CURDIR)/debian/ctdb/etc/default/ctdb
+	# Install /etc/init.d/ctdb
+	mkdir -p $(CURDIR)/debian/ctdb/etc/init.d
+	install -m755 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