[pkg-bacula-commits] [bacula] 02/02: Test config before attempting to start daemons via systemd, avoids regression of #825064
Carsten Leonhardt
leo at moszumanska.debian.org
Sun Jun 12 22:38:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
leo pushed a commit to branch master
in repository bacula.
commit a6a323a4a0ab1631858e8d7e3a40dc0c455856b6
Author: Carsten Leonhardt <leo at debian.org>
Date: Mon Jun 13 00:36:49 2016 +0200
Test config before attempting to start daemons via systemd,
avoids regression of #825064
---
debian/TODO | 6 ++++--
debian/changelog | 10 ++++-----
.../service-files-user-group-settings.patch | 25 +++++++++++++---------
3 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/debian/TODO b/debian/TODO
index 6d85046..35fdbab 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,6 +1,8 @@
High:
- * add native systemd support
- - execute config test in ExecStartPre=
+
+ * either warn users that /etc/defaults/bacula-* are ignored on systems
+ with systemd, or add magic that translates the defaults to the
+ systemd service files
- see https://www.freedesktop.org/software/systemd/man/systemd.service.html
Normal:
diff --git a/debian/changelog b/debian/changelog
index f295e3e..6bde67c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-bacula (7.4.1~dfsg-1.2) unstable; urgency=medium
+bacula (7.4.1~dfsg-2) unstable; urgency=low
- * Non-maintainer upload.
- * Re-enable systemd support for Linux, provide systemd-activation
- via dh-systemd
+ * Add functioning native systemd support. Thanks to Sven Hartge.
+ * Test config before attempting to start daemons via systemd, avoids
+ regression of #825064
- -- Sven Hartge <sven at svenhartge.de> Fri, 10 Jun 2016 12:44:49 +0200
+ --
bacula (7.4.1~dfsg-1) unstable; urgency=high
diff --git a/debian/patches/service-files-user-group-settings.patch b/debian/patches/service-files-user-group-settings.patch
index b55b09b..bdfa3f2 100644
--- a/debian/patches/service-files-user-group-settings.patch
+++ b/debian/patches/service-files-user-group-settings.patch
@@ -1,13 +1,15 @@
-Description: hardcode bacula user and group settings
+Description: hardcode bacula user and group settings, add configuration tests
hardcode the bacula user and groups into the systemd service files
templates.
Specifying this via configure option is not possible, as this would
require the existance of the provided users and groups during compile
time.
+ Add configuration tests to have a warning when bacula doesn't start
Author: Sven Hartge <sven at svenhartge.de>
---- bacula-7.4.1~dfsg.orig/platforms/systemd/bacula-dir.service.in
-+++ bacula-7.4.1~dfsg/platforms/systemd/bacula-dir.service.in
-@@ -23,8 +23,8 @@ RequiresMountsFor=@working_dir@ @sysconf
+Author: Carsten Leonhardt <leo at debian.org>
+--- a/platforms/systemd/bacula-dir.service.in
++++ b/platforms/systemd/bacula-dir.service.in
+@@ -23,8 +23,9 @@
# From http://www.freedesktop.org/software/systemd/man/systemd.service.html
[Service]
Type=forking
@@ -15,12 +17,13 @@ Author: Sven Hartge <sven at svenhartge.de>
-Group=@dir_group@
+User=bacula
+Group=bacula
++ExecStartPre=@sbindir@/bacula-dir -t -c @sysconfdir@/bacula-dir.conf
ExecStart=@sbindir@/bacula-dir -c @sysconfdir@/bacula-dir.conf
PIDFile=@piddir@/bacula-dir. at dir_port@.pid
ExecReload=@sbindir@/bacula-dir -t -c @sysconfdir@/bacula-dir.conf
---- bacula-7.4.1~dfsg.orig/platforms/systemd/bacula-fd.service.in
-+++ bacula-7.4.1~dfsg/platforms/systemd/bacula-fd.service.in
-@@ -23,8 +23,8 @@ RequiresMountsFor=@working_dir@ @sysconf
+--- a/platforms/systemd/bacula-fd.service.in
++++ b/platforms/systemd/bacula-fd.service.in
+@@ -23,8 +23,9 @@
# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
[Service]
Type=forking
@@ -28,12 +31,13 @@ Author: Sven Hartge <sven at svenhartge.de>
-Group=@fd_group@
+User=root
+Group=root
++ExecStartPre=@sbindir@/bacula-fd -t -c @sysconfdir@/bacula-fd.conf
ExecStart=@sbindir@/bacula-fd -c @sysconfdir@/bacula-fd.conf
PIDFile=@piddir@/bacula-fd. at fd_port@.pid
StandardError=syslog
---- bacula-7.4.1~dfsg.orig/platforms/systemd/bacula-sd.service.in
-+++ bacula-7.4.1~dfsg/platforms/systemd/bacula-sd.service.in
-@@ -22,8 +22,8 @@ RequiresMountsFor=@working_dir@ @sysconf
+--- a/platforms/systemd/bacula-sd.service.in
++++ b/platforms/systemd/bacula-sd.service.in
+@@ -22,8 +22,9 @@
# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
[Service]
Type=forking
@@ -41,6 +45,7 @@ Author: Sven Hartge <sven at svenhartge.de>
-Group=@sd_group@
+User=bacula
+Group=tape
++ExecStartPre=@sbindir@/bacula-sd -t -c @sysconfdir@/bacula-sd.conf
ExecStart=@sbindir@/bacula-sd -c @sysconfdir@/bacula-sd.conf
PIDFile=@piddir@/bacula-sd. at sd_port@.pid
StandardError=syslog
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list