[pve-devel] [PATCH 1/2] compile corosync with QDevice support

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Aug 1 15:54:58 CEST 2016


Compile qdevices with corosync and add a systemd service file for
the qdevice daemon. Disable this daemon per default.

QDevices need certutil for generating and signing certificates,
needed for a secure communication over TLS with the QDevice Net
Daemon (qnetd). certutil is included in libnss3-tools so add that
to the dependencies.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 Makefile                        |  2 +-
 debian/changelog                |  6 ++++++
 debian/control                  |  2 +-
 debian/corosync-pve.install     |  1 +
 debian/corosync-qdevice.service | 13 +++++++++++++
 debian/rules                    |  9 ++++++---
 6 files changed, 28 insertions(+), 5 deletions(-)
 create mode 100644 debian/corosync-qdevice.service

diff --git a/Makefile b/Makefile
index f1aa99b..d97a74f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ RELEASE=4.2
 # source from http://www.corosync.org
 
 CSVERSION=2.4.0
-CSRELEASE=1
+CSRELEASE=2
 CSDIR=corosync-${CSVERSION}
 CSSRC=corosync-${CSVERSION}.tar.gz
 
diff --git a/debian/changelog b/debian/changelog
index 8f8e7e4..44ec9c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+corosync-pve (2.4.0-2) unstable; urgency=medium
+
+  * also compile QDevice daemon
+
+ -- Proxmox Support Team <support at proxmox.com>  Sat, 16 Jul 2016 10:27:49 +0200
+
 corosync-pve (2.4.0-1) unstable; urgency=medium
 
   * update to v2.4.0
diff --git a/debian/control b/debian/control
index 016d57e..498c31c 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
 Source: corosync-pve
 Priority: extra
 Maintainer: Proxmox Support Team <support at proxmox.com>
-Build-Depends: debhelper (>= 7), libnss3-dev, groff, quilt, dh-systemd (>= 1.4)
+Build-Depends: debhelper (>= 7), libnss3-dev, groff, quilt, dh-systemd (>= 1.4), libnss3-tools
 Standards-Version: 3.7.3
 Section: admin
 Homepage: http://openais.org/
diff --git a/debian/corosync-pve.install b/debian/corosync-pve.install
index a9bb74a..4835b60 100644
--- a/debian/corosync-pve.install
+++ b/debian/corosync-pve.install
@@ -3,6 +3,7 @@ usr/bin/corosync-blackbox
 usr/share/man/man5
 usr/share/man/man8
 debian/corosync.service lib/systemd/system
+debian/corosync-qdevice.service lib/systemd/system
 usr/share/corosync/corosync
 usr/share/augeas/lenses/corosync.aug
 usr/share/augeas/lenses/tests/test_corosync.aug
diff --git a/debian/corosync-qdevice.service b/debian/corosync-qdevice.service
new file mode 100644
index 0000000..4e7520c
--- /dev/null
+++ b/debian/corosync-qdevice.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Corosync Qdevice daemon
+ConditionKernelCommandLine=!nocluster
+Wants=corosync.service
+After=corosync.service
+
+[Service]
+ExecStart=/usr/sbin/corosync-qdevice start
+ExecStop=/usr/sbin/corosync-qdevice stop
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index 4c37c60..83f0fb6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,10 +22,13 @@ override_dh_auto_configure:
 	--localstatedir=/var 			\
 	--infodir=\$${prefix}/share/info 	\
 	--enable-augeas 			\
+	--enable-qdevices			\
 	--enable-systemd
 
 override_dh_systemd_enable:
-	dh_systemd_enable -pcorosync-pve --name corosync
+	dh_systemd_enable -pcorosync-pve --name corosync corosync.service
+	dh_systemd_enable --no-enable -pcorosync-pve --name corosync-qdevice corosync-qdevice.service
+
+override_dh_systemd_start:
+	dh_systemd_start --no-start -pcorosync-qdevice-pve
 
-#override_dh_systemd_start:
-#	dh_systemd_start -pcorosync-pve --name corosync --no-start
-- 
2.1.4





More information about the pve-devel mailing list