[Debian-ha-commits] [csync2] 04/05: Add xinetd service in disabled state
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Fri Oct 21 13:07:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch master
in repository csync2.
commit 7184b3774ba61e7f86205f6521921aff48ea9417
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date: Fri Oct 21 14:07:31 2016 +0200
Add xinetd service in disabled state
---
debian/control | 3 ++-
debian/install | 2 ++
debian/patches/fix-xinetd.patch | 18 ++++++++++++++++++
debian/patches/series | 1 +
debian/tests/control | 4 ++++
debian/tests/xinetd | 32 ++++++++++++++++++++++++++++++++
6 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index 5e308ce..ef243ef 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@ Build-Depends: debhelper (>= 9),
libgnutls-openssl-dev,
texlive-latex-extra,
pkg-config,
- dh-systemd
+ dh-systemd,
+ dh-exec
Standards-Version: 3.9.8
Vcs-Browser: https://anonscm.debian.org/cgit/debian-ha/csync2.git/
Vcs-Git: https://alioth.debian.org/anonscm/git/debian-ha/csync2.git
diff --git a/debian/install b/debian/install
old mode 100644
new mode 100755
index b4577ca..15be811
--- a/debian/install
+++ b/debian/install
@@ -1 +1,3 @@
+#!/usr/bin/dh-exec
csync2.cfg etc
+csync2.xinetd => /etc/xinetd.d/csync2
diff --git a/debian/patches/fix-xinetd.patch b/debian/patches/fix-xinetd.patch
new file mode 100644
index 0000000..f8f0b81
--- /dev/null
+++ b/debian/patches/fix-xinetd.patch
@@ -0,0 +1,18 @@
+Ship xinetd service in disabled state
+
+--- a/csync2.xinetd
++++ b/csync2.xinetd
+@@ -1,4 +1,4 @@
+-# default: on
++# default: off
+ # description: csync2
+ service csync2
+ {
+@@ -10,6 +10,6 @@
+ server = /usr/sbin/csync2
+ server_args = -i -l
+ #log_on_failure += USERID
+- disable = no
++ disable = yes
+ # only_from = 192.168.199.3 192.168.199.4
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c408b85..a07f2fe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
fix-MAXPATHLEN-for-hurd-i386.patch
fix-libsqlite3-name.patch
+fix-xinetd.patch
diff --git a/debian/tests/control b/debian/tests/control
index 7fb67f7..882ac66 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -5,3 +5,7 @@ Restrictions: needs-root, needs-recommends
Depends: @, openssl, sqlite3, systemd-sysv
Tests: systemd
Restrictions: needs-root
+
+Depends: @, openssl, sqlite3, xinetd
+Tests: xinetd
+Restrictions: needs-root
diff --git a/debian/tests/xinetd b/debian/tests/xinetd
new file mode 100755
index 0000000..d050c6d
--- /dev/null
+++ b/debian/tests/xinetd
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+HOSTNAME=$(hostname)
+
+# prepare configuration
+cat >/etc/csync2.cfg <<EOF
+group test
+{
+ host 127.0.0.1;
+ host 127.0.0.2;
+ host $HOSTNAME;
+ key /etc/csync2.key;
+ include /etc/shells;
+}
+EOF
+
+# prepare keys
+csync2 -k /etc/csync2.key
+
+openssl req -x509 -newkey rsa:2048 \
+ -days 300 -subj '/CN=csync2' -nodes \
+ -keyout /etc/csync2_ssl_key.pem \
+ -out /etc/csync2_ssl_cert.pem 2>&1
+
+# start daemon socket
+sed -i 's/disable.*/disable = no/' /etc/xinetd.d/csync2
+service xinetd restart
+
+# sync with inetd daemon on this host
+csync2 -x -N 127.0.0.2 -P 127.0.0.1 -v 2>&1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/csync2.git
More information about the Debian-HA-Commits
mailing list