aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-12-11 08:30:19 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-12-11 11:34:25 +0000
commit1945cb481a669e6d8f197e8dbcc69503976a7aff (patch)
tree353e5a7dce798924b0ac6d2a78554e182dd16530
parent3b5721482720016f2ac57ea0cbf95aea6f9c74e8 (diff)
main/bacula: various improvements and small bug fixes
- use /run dir - fix conf file permissions - Inits: points bacula-sd to right conf file use openrc to set daemon user soft depends on firewall added cosmetic fixes (cherry picked from commit bd02f881f2cd3d8b1ef786ba3e7482deafb58793)
-rw-r--r--main/bacula/APKBUILD23
-rw-r--r--main/bacula/bacula-dir.initd15
-rw-r--r--main/bacula/bacula-fd.initd15
-rw-r--r--main/bacula/bacula-sd.initd17
4 files changed, 37 insertions, 33 deletions
diff --git a/main/bacula/APKBUILD b/main/bacula/APKBUILD
index eefb198042c..c0c56dadd1e 100644
--- a/main/bacula/APKBUILD
+++ b/main/bacula/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=bacula
pkgver=9.0.5
-pkgrel=2
+pkgrel=3
pkgdesc="Enterprise ready, network based backup program"
url="http://www.bacula.org"
arch="all"
@@ -46,8 +46,8 @@ build() {
--mandir=/usr/share/man \
--docdir=/usr/share/doc \
--infodir=/usr/share/info \
- --with-pid-dir=/var/run/$pkgname \
- --with-subsys-dir=/var/lock/subsys \
+ --with-pid-dir=/run/$pkgname \
+ --with-subsys-dir=/run/lock/subsys \
--with-logdir=/var/log/$pkgname \
--enable-largefile \
--enable-smartalloc \
@@ -61,8 +61,8 @@ build() {
--with-dir-user=$pkgname \
--with-dir-group=$pkgname \
--with-archivedir=$_bworkdir/archive \
- --with-sd-user=$pkgname \
- --with-sd-group=$pkgname \
+ --with-sd-user=$pkgusers \
+ --with-sd-group=$pkggroup \
--with-fd-user=root \
--with-fd-group=root \
--with-sbin-perm=0755
@@ -96,9 +96,10 @@ package() {
sed -i 's/make_catalog_backup.pl/make_catalog_backup/' \
"$pkgdir"/etc/$pkgname/$pkgname-dir.conf
- local dir
- for dir in $_bworkdir /etc/$pkgname/scripts/make_catalog_backup* \
- /etc/$pkgname/scripts/mtx-changer*
+ local dir; for dir in $_bworkdir \
+ /etc/$pkgname/scripts/make_catalog_backup* \
+ /etc/$pkgname/scripts/mtx-changer* \
+ /etc/$pkgname/*.conf
do
chown $pkgusers.$pkggroups "$pkgdir"$dir
done
@@ -170,7 +171,7 @@ client() {
}
sha512sums="97a23c701808666833e773106f5618bcce1af90fff299da88e58b23ed04fc7e6bfdf4c231f3724d2186fad7985f5f9d7f6b629d59cea489b2d4d4ce6f041ca63 bacula-9.0.5.tar.gz
-d54a83e8ac498201a8fe7b81631b915be1f1d9f8ad30530c0a7314569ef8f91c990b63e30fda63ae9ebb79f10104e6b827ad4eae274e84cbd3d5751b1cf493af bacula-dir.initd
-c37a1000c99984510993d77733117e0e65c25011ca98272c9d8b5db5a976c42a3b6f57c240c708bc5657a7d5aae1b51f5d7db6a9b9cfe7b4d1ce682726dc5faf bacula-sd.initd
-c4f7adecc164b93c119338feebc0367c07d3060099cd87b474e7325fa5840d0e36666d78f5e2b89e322a1cd2fbbefc8e1f4455ad87d7237e41d1a201457d5448 bacula-fd.initd
+e3ea78c7b920ab33c94c715f9375cf8dc52fd963a526827941c3d6de619c999e00f01ac102d3260e4de457de50af146ab014862174b14524862c92e00908f765 bacula-dir.initd
+60f174799ad15b0f5ea94bc578d3a58681e45b8306c059c4d7e78bc3c7edfcff95f8a551495d0af5a94dc645e96d1aa36d4c378f0dfd871e38b0c9b64b82da26 bacula-sd.initd
+3887a65972f6a82b2b7b93521e534b8347a5ed9da36c9645eb2bf5eb683b6e0e3ee0613b048b7d2ec725e890ec0513afb2197adfd2bf5d91108dce3b23662c07 bacula-fd.initd
2d3757236aacca421261a8866ff04b5b0151538e1462559bd1240119b1bece1d456acbba9fee86dbc6aaec7af2a52eb2c0b7490c5f371b7deb478731c74342ff bacula-7.4.0-path-mounted.patch"
diff --git a/main/bacula/bacula-dir.initd b/main/bacula/bacula-dir.initd
index eeeee5f1091..2c3813ab620 100644
--- a/main/bacula/bacula-dir.initd
+++ b/main/bacula/bacula-dir.initd
@@ -2,20 +2,23 @@
: ${port:=9101}
: ${cfgfile:=/etc/bacula/bacula-dir.conf}
-: ${exec_user:=bacula}
-: ${exec_group:=bacula}
+: ${command_user:=bacula}
+: ${command_group:=bacula}
name="Bacula Director"
-command="/usr/sbin/$RC_SVCNAME"
-command_args="-u $exec_user -g $exec_group -c $cfgfile"
-pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid"
+command="/usr/sbin/${RC_SVCNAME}"
+command_args="-c $cfgfile"
+start_stop_daemon_args="--user $command_user --group $command_group"
+pidfile="/run/bacula/${RC_SVCNAME}.$port.pid"
depend() {
need net
use dns
+ after firewall
}
start_pre() {
- checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula
+ checkpath --directory --mode 0775 \
+ --owner ${command_user}:${command_group} /run/bacula
}
diff --git a/main/bacula/bacula-fd.initd b/main/bacula/bacula-fd.initd
index 2fff8e97875..362cf08999c 100644
--- a/main/bacula/bacula-fd.initd
+++ b/main/bacula/bacula-fd.initd
@@ -2,20 +2,17 @@
: ${port:=9102}
: ${cfgfile:=/etc/bacula/bacula-fd.conf}
-: ${exec_user:=root}
-: ${exec_group:=root}
+: ${command_user:=root}
+: ${command_group:=root}
name="Bacula File Daemon"
-command="/usr/sbin/$RC_SVCNAME"
-command_args="-u $exec_user -g $exec_group -c $cfgfile"
-pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid"
+command="/usr/sbin/${RC_SVCNAME}"
+command_args="-u $command_user -g $command_group -c $cfgfile"
+pidfile="/run/bacula/${RC_SVCNAME}.$port.pid"
depend() {
need net
use dns
-}
-
-start_pre() {
- checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula
+ after firewall
}
diff --git a/main/bacula/bacula-sd.initd b/main/bacula/bacula-sd.initd
index 3d56a9e8f2c..a678299e55f 100644
--- a/main/bacula/bacula-sd.initd
+++ b/main/bacula/bacula-sd.initd
@@ -1,20 +1,23 @@
#!/sbin/openrc-run
: ${port:=9103}
-: ${cfgfile:=/etc/bacula/bacula-dir.conf}
-: ${exec_user:=bacula}
-: ${exec_group:=bacula}
+: ${cfgfile:=/etc/bacula/bacula-sd.conf}
+: ${command_user:=bacula}
+: ${command_group:=bacula}
name="Bacula Storage Daemon"
-command="/usr/sbin/$RC_SVCNAME"
-command_args="-u $exec_user -g $exec_group -c $cfgfile"
-pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid"
+command="/usr/sbin/${RC_SVCNAME}"
+command_args="-c $cfgfile"
+start_stop_daemon_args="--user $command_user --group $command_group"
+pidfile="/run/bacula/${RC_SVCNAME}.$port.pid"
depend() {
need net
use dns
+ after firewall
}
start_pre() {
- checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula
+ checkpath --directory --mode 0775 \
+ --owner ${command_user}:${command_group} /run/bacula
}