aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2017-08-26 19:10:09 +0300
committerFrancesco Colista <fcolista@alpinelinux.org>2017-08-28 06:46:19 +0000
commitb32c9583cb6819cf1d07a6ae5b232b7bf35203d5 (patch)
tree8099be3bf49ed6d14b6b08b2dbd3e745d9b3616e /community/bareos
parent43e59b98f610896a3c338761d0898aba9f528693 (diff)
downloadaports-b32c9583cb6819cf1d07a6ae5b232b7bf35203d5.tar.bz2
aports-b32c9583cb6819cf1d07a6ae5b232b7bf35203d5.tar.xz
community/bareos: upgrade to 16.2.6, fixes
- many fixes in APKBUILD - add perl as dependency, because some scripts use it - add bat subpackage (qt administration tool) - remove conf.d files because they are obsolete and incorrect - rewrite init.d scripts
Diffstat (limited to 'community/bareos')
-rw-r--r--community/bareos/APKBUILD139
-rw-r--r--community/bareos/bareos-dir-conf7
-rw-r--r--community/bareos/bareos-dir-init23
-rw-r--r--community/bareos/bareos-dir.initd11
-rw-r--r--community/bareos/bareos-fd-conf4
-rw-r--r--community/bareos/bareos-fd-init22
-rw-r--r--community/bareos/bareos-fd.initd10
-rw-r--r--community/bareos/bareos-sd-conf7
-rw-r--r--community/bareos/bareos-sd-init22
-rw-r--r--community/bareos/bareos-sd.initd10
-rw-r--r--community/bareos/bareos.post-install3
-rw-r--r--community/bareos/bareos.pre-install2
-rw-r--r--community/bareos/path-mounted.patch (renamed from community/bareos/bareos-path-mounted.patch)0
13 files changed, 94 insertions, 166 deletions
diff --git a/community/bareos/APKBUILD b/community/bareos/APKBUILD
index 714134c18a..19e8dbd286 100644
--- a/community/bareos/APKBUILD
+++ b/community/bareos/APKBUILD
@@ -1,30 +1,27 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=bareos
-pkgver=15.2.4
-pkgrel=6
+pkgver=16.2.6
+pkgrel=0
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
url="http://www.bareos.org"
arch="all"
+options="!check"
license="AGPL3"
-depends=""
-depends_dev=""
-makedepends="$depends_dev libtool libintl libpcap-dev lzo-dev \
+depends="perl"
+makedepends="file libtool libintl libpcap-dev lzo-dev \
sqlite-dev postgresql-dev libressl-dev mariadb-dev acl-dev \
qt-dev python2-dev readline-dev ncurses-dev jansson-dev"
install="$pkgname.pre-install $pkgname.post-install"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-trayicon"
-pkgusers="bareos"
-pkggroups="bareos"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-bat $pkgname-trayicon"
+pkgusers=$pkgname
+pkggroups=$pkgname
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/Release/$pkgver.tar.gz
- bareos-dir-init
- bareos-dir-conf
- bareos-sd-init
- bareos-sd-conf
- bareos-fd-init
- bareos-fd-conf
- bareos-path-mounted.patch"
-
+ $pkgname-dir.initd
+ $pkgname-sd.initd
+ $pkgname-fd.initd
+ path-mounted.patch"
builddir="$srcdir"/${pkgname}-Release-${pkgver}
prepare() {
@@ -38,16 +35,16 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/share/man \
- --docdir=/usr/share/doc \
- --infodir=/usr/share/info \
- --with-confdir=/etc/bareos \
- --with-archivedir=/var/lib/bareos/archive \
- --with-scriptdir=/etc/bareos/scripts \
- --with-working-dir=/var/lib/bareos \
- --with-pid-dir=/var/run \
- --with-logdir=/var/log/bareos \
+ --with-confdir=/etc/$pkgname \
+ --with-archivedir=/var/lib/$pkgname/archive \
+ --with-scriptdir=/etc/$pkgname/scripts \
+ --with-working-dir=/var/lib/$pkgname \
+ --with-plugindir=/usr/lib/$pkgname \
+ --with-backenddir=/usr/lib/$pkgname \
+ --with-pid-dir=/run \
+ --with-logdir=/var/log/$pkgname \
--with-subsys-dir=/var/lock \
+ --enable-bat \
--enable-smartalloc \
--enable-largefile \
--enable-readline \
@@ -60,6 +57,7 @@ build() {
--enable-ipv6 \
--enable-dynamic-cats-backends \
--enable-dynamic-debian-package-list \
+ --enable-sql-pooling \
--enable-includes \
--disable-conio \
--disable-nls \
@@ -70,76 +68,59 @@ build() {
--with-openssl \
--with-python \
--without-systemd \
- --with-dir-user=$pkgusers \
- --with-dir-group=$pkggroups \
- --with-sd-user=$pkgusers \
- --with-sd-group=$pkggroups \
+ --with-dir-user=$pkgname \
+ --with-dir-group=$pkgname \
+ --with-sd-user=$pkgname \
+ --with-sd-group=$pkgname \
--with-fd-user=root \
--with-fd-group=root
- make || return 1
+ make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
- for DAEMON in dir sd fd
- do
- install -Dm755 "$srcdir"/bareos-${DAEMON}-init \
- "$pkgdir"/etc/init.d/bareos-${DAEMON}
- install -Dm644 "$srcdir"/bareos-${DAEMON}-conf \
- "$pkgdir"/etc/conf.d/bareos-${DAEMON}
+ local daemon; for daemon in dir sd fd; do
+ install -Dm755 "$srcdir"/$pkgname-$daemon.initd \
+ "$pkgdir"/etc/init.d/$pkgname-$daemon
done
+
# Install logrotate script
- install -Dm644 scripts/logrotate $pkgdir/etc/logrotate.d/bareos
- # Use shell script for catalog backup instead of perl
- sed -i -e 's/make_catalog_backup.pl/make_catalog_backup/' \
- "$pkgdir"/etc/bareos/bareos-dir.conf
- for dir in /var/lib/bareos /etc/bareos/scripts/make_catalog_backup* \
- /etc/bareos/scripts/mtx-changer*
- do
- chown $pkgusers:$pkgroups "$pkgdir"$dir || return 1
+ install -Dm644 scripts/logrotate "$pkgdir"/etc/logrotate.d/$pkgname
+
+ local dir; for dir in /var/lib/$pkgname /var/lib/$pkgname/archive \
+ /etc/$pkgname/scripts/make_catalog_backup* \
+ /etc/$pkgname/scripts/mtx-changer*; do
+ chown $pkgname:$pkgname "$pkgdir"/$dir || return 1
done
}
-dev() {
- pkgdesc="Bareos header files"
- mkdir -p "$subpkgdir"/usr
- mv "$pkgdir"/usr/include "$subpkgdir"/usr
+bat() {
+ local dir name=${subpkgname#$pkgname-}
+ depends="$pkgname"
+ pkgdesc="$pkgdesc (qt administration tool)"
+ mkdir -p "$subpkgdir"/etc/$pkgname "$subpkgdir"/usr/bin
+ for dir in applications pixmaps; do
+ mkdir -p "$subpkgdir"/usr/share/$dir
+ mv "$pkgdir"/usr/share/$dir/$name.* "$subpkgdir"/usr/share/$dir
+ done
+ mv "$pkgdir"/etc/$pkgname/$name.* "$subpkgdir"/etc/$pkgname
+ mv "$pkgdir"/usr/bin/$name "$subpkgdir"/usr/bin
}
trayicon() {
- pkgdesc="Bareos trayicon"
- depends="bareos"
- mkdir -p "$subpkgdir"/usr/share
- mkdir -p "$subpkgdir"/usr/bin
- for dirs in applications pixmaps; do
- mv "$pkgdir"/usr/share/$dirs "$subpkgdir"/usr/share
- done
+ depends="$pkgname"
+ pkgdesc="$pkgdesc (qt tray monitor)"
+ mkdir -p "$subpkgdir"/etc/$pkgname "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/share "$subpkgdir"/usr
+ mv "$pkgdir"/etc/xdg "$subpkgdir"/etc
+ mv "$pkgdir"/etc/$pkgname/tray-monitor.d "$subpkgdir"/etc/$pkgname
mv "$pkgdir"/usr/bin/bareos-tray-monitor "$subpkgdir"/usr/bin
}
-md5sums="328eebb89d64c11d4594837341b809ac bareos-15.2.4.tar.gz
-3967099975a3eafe5811482b231b159f bareos-dir-init
-20f28a16f34e3f20ed18ed81b010e765 bareos-dir-conf
-5ae1fba6860a320394d65744e5640bdb bareos-sd-init
-afe2f9a4d79d7d96eb9372d003d10f86 bareos-sd-conf
-6ae93e570f95fa845fa534c2d2efaac0 bareos-fd-init
-4500ce2d62bf9df33c07f70dc40f7b85 bareos-fd-conf
-12a609832cdec5e03bc93c09c93aaeac bareos-path-mounted.patch"
-sha256sums="dde2b0b1ed8d878f9731cee9c7f723e3bac479b5fb367e61efca636465b40ebb bareos-15.2.4.tar.gz
-3dcba6d60dd2c67b1378a791d730588ff7d29eb59024fc731d4f4be01660e293 bareos-dir-init
-5891bdb3a8ec581f8a2fd404a5a8995d8950d80da71a3b732474fb45e80d22c2 bareos-dir-conf
-7c08606bbd391fa73773ef52bcee2dd989530c8c44b9dfae0b82cfe73976a400 bareos-sd-init
-88808b3b971825acffc9dc3b6d418e52d9bd89df8527052c555cba4336ead784 bareos-sd-conf
-12a62dd9c7a7931060c2c21e52cb9069a3774ebe7c8370455068e2dded0c2f80 bareos-fd-init
-64124036c19e849cc580b981887be35b5746acb584397190a0afe2797b2d1ace bareos-fd-conf
-d20fa8fade3cd3551e1e4cff1a736d1901be1c650bf1386a5a336bfec19fea4c bareos-path-mounted.patch"
-sha512sums="35d06f48fc96b397598918af1346874f323a9f87abf85d8b3ccf39d7383667e8e7b454ff5e4311bfdec99ca2da13f06b348b03262ed6c671dfcb91fab2baa85e bareos-15.2.4.tar.gz
-852df12c6555ad65661345e15872ca75b99a9d3e5b9e6ed80d82021006c9716a04919dabe88ff672aa550ac0b00b31eaa2e739469557fc326e6bb4216e2308b9 bareos-dir-init
-e06e5f8821d4a9a3f40cc8f11feeb5004780b82e2ad5e645f69a0f8faff78d8a8c6e66b36e105619b2a78d6b2f294dedd0e00e9bbf568af201cf299387135fef bareos-dir-conf
-ee8a9206d3e604f5ac81bc70bece97ec77dae87b463a6ff4d08fba9418bf37e99a30895f115b2e9fbba1ec5f92b5d9368fd155717fedae12792f255b02413208 bareos-sd-init
-80f6cf74cc14e722747d92e6e7b073bdf32456d395c6b4b63daa1ddcaf75f3d76d1b9a0e8e2da512e8f82e4d59a4a93cc38117af91d974fe7db644516bdb9909 bareos-sd-conf
-e4c09734ccf9e1ac197ac4684c8294dddae817cf764b168ce7357b2529d11314f948ed2807d501b3c7cd7725ba488981fe573d7b389fca7feedfa9c8a1cce6fa bareos-fd-init
-ff312e8952b31de27f22b257d12b570e151794d985f854ff19bab34363ea974d7583edced6b125518da3ecfe2b2a229b732473958b10484d988fcc8a67a372cc bareos-fd-conf
-eac4614c1b29ff0f12061837e425ae495890076021b6d1b0f1beb93501cfb905170342dac5dab69b09f825d5b9416eea25fa02e2174b5a704315c7feb08ff3d3 bareos-path-mounted.patch"
+sha512sums="f379fd1d568260b1ad3c426b7b80b1d33a1b078db1aa03b847a4e1dc262cf0155419f20f7105bc095167bb5e64169d5e6b0bcfa3e3913d5e4b5f8f23f4fde750 bareos-16.2.6.tar.gz
+e895b7d7de17a3f7c19dadb0072b0aaecbd9225a071e569b1ab537a3b51dc714a43f2cd044c638151ef5b1d6e9ab533201a15d386b157d1acedbccec1431bce3 bareos-dir.initd
+8991b90e4cbfdb8b73b17421b8970788e9d2a669c7ba981dbfa8573bc7b6bcfa174fa38771f6bffaf408efd9f8f544e746458c214a1af0e23917dfb87048467d bareos-sd.initd
+dab8aa37e44743649b7c5ba1e41ee2d020b966481e390005e13af0514ae63e27ba06b59b7c3ceb7bebb81607cd72beffcc3cdea62815387494a2c2e5b03e8dfa bareos-fd.initd
+eac4614c1b29ff0f12061837e425ae495890076021b6d1b0f1beb93501cfb905170342dac5dab69b09f825d5b9416eea25fa02e2174b5a704315c7feb08ff3d3 path-mounted.patch"
diff --git a/community/bareos/bareos-dir-conf b/community/bareos/bareos-dir-conf
deleted file mode 100644
index 17a56161f0..0000000000
--- a/community/bareos/bareos-dir-conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# Config file for /etc/init.d/bacula-dir
-
-# Options for the director daemon.
-# The DIR can be run as a non-root user, however
-# please ensure that this user has proper permissions to
-# access your backup devices.
-DIR_OPTIONS="-u bacula -g bacula -c /etc/bacula/bacula-dir.conf"
diff --git a/community/bareos/bareos-dir-init b/community/bareos/bareos-dir-init
deleted file mode 100644
index ee20f52a5c..0000000000
--- a/community/bareos/bareos-dir-init
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-dir-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $
-
-depend() {
- need net
- after firewall
- use dns bacula-fd bacula-sd postgresql mariadb
-}
-
-start() {
- ebegin "Starting bacula director"
- start-stop-daemon --start --quiet --exec /usr/sbin/bacula-dir \
- -- ${DIR_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bacula director"
- start-stop-daemon --stop --quiet --pidfile /var/run/bacula/bacula-dir.*.pid
- eend $?
-}
diff --git a/community/bareos/bareos-dir.initd b/community/bareos/bareos-dir.initd
new file mode 100644
index 0000000000..1ea2b6aecc
--- /dev/null
+++ b/community/bareos/bareos-dir.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+
+name="Bareos Director"
+command=/usr/sbin/bareos-dir
+pidfile=/run/$RC_SVCNAME.pid
+
+depend() {
+ need net
+ after firewall
+ use dns bareos-fd bareos-sd postgresql mariadb
+}
diff --git a/community/bareos/bareos-fd-conf b/community/bareos/bareos-fd-conf
deleted file mode 100644
index 033ef74b4b..0000000000
--- a/community/bareos/bareos-fd-conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# Config file for /etc/init.d/bacula-fd
-
-# Options for the file daemon.
-FD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-fd.conf"
diff --git a/community/bareos/bareos-fd-init b/community/bareos/bareos-fd-init
deleted file mode 100644
index 1e36a19479..0000000000
--- a/community/bareos/bareos-fd-init
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-fd-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $
-
-depend() {
- need net
- use dns
-}
-
-start() {
- ebegin "Starting bacula file daemon"
- start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd \
- -- ${FD_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bacula file daemon"
- start-stop-daemon --stop --quiet --pidfile /var/run/bacula/bacula-fd.*.pid
- eend $?
-}
diff --git a/community/bareos/bareos-fd.initd b/community/bareos/bareos-fd.initd
new file mode 100644
index 0000000000..dc899b38c1
--- /dev/null
+++ b/community/bareos/bareos-fd.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+name="Bareos File"
+command=/usr/sbin/bareos-fd
+pidfile=/run/$RC_SVCNAME.pid
+
+depend() {
+ need net
+ use dns
+}
diff --git a/community/bareos/bareos-sd-conf b/community/bareos/bareos-sd-conf
deleted file mode 100644
index 88e13aa0eb..0000000000
--- a/community/bareos/bareos-sd-conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# Config file for /etc/init.d/bacula-sd
-
-# Options for the storage daemon.
-# The SD can be run as a non-root user, however
-# please ensure that this user has proper permissions to
-# access your backup devices.
-SD_OPTIONS="-u bacula -g bacula -c /etc/bacula/bacula-sd.conf"
diff --git a/community/bareos/bareos-sd-init b/community/bareos/bareos-sd-init
deleted file mode 100644
index 2375b8e457..0000000000
--- a/community/bareos/bareos-sd-init
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-sd-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $
-
-depend() {
- need net
- use dns
-}
-
-start() {
- ebegin "Starting bacula storage daemon"
- start-stop-daemon --start --quiet --exec /usr/sbin/bacula-sd \
- -- ${SD_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bacula storage daemon"
- start-stop-daemon --stop --quiet --pidfile /var/run/bacula/bacula-sd.*.pid
- eend $?
-}
diff --git a/community/bareos/bareos-sd.initd b/community/bareos/bareos-sd.initd
new file mode 100644
index 0000000000..cc8331b05e
--- /dev/null
+++ b/community/bareos/bareos-sd.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+name="Bareos Storage"
+command=/usr/sbin/bareos-sd
+pidfile=/run/$RC_SVCNAME.pid
+
+depend() {
+ need net
+ use dns
+}
diff --git a/community/bareos/bareos.post-install b/community/bareos/bareos.post-install
index 9eb6220996..d65c859b7f 100644
--- a/community/bareos/bareos.post-install
+++ b/community/bareos/bareos.post-install
@@ -2,7 +2,8 @@
addgroup bareos disk 2>/dev/null
addgroup bareos tape 2>/dev/null
-addgroup bareos cdrom 2>/dev/null
addgroup bareos cdrw 2>/dev/null
+addgroup bareos cdrom 2>/dev/null
+addgroup bareos floppy 2>/dev/null
exit 0
diff --git a/community/bareos/bareos.pre-install b/community/bareos/bareos.pre-install
index 4b1b8d83ed..25a44c5be6 100644
--- a/community/bareos/bareos.pre-install
+++ b/community/bareos/bareos.pre-install
@@ -1,6 +1,6 @@
#!/bin/sh
addgroup -S bareos 2>/dev/null
-adduser -S -D -h /var/lib/bareos/ -s /sbin/nologin -G bareos -g bareos bareos 2>/dev/null
+adduser -S -D -H -h /var/lib/bareos -s /sbin/nologin -G bareos -g bareos bareos 2>/dev/null
exit 0
diff --git a/community/bareos/bareos-path-mounted.patch b/community/bareos/path-mounted.patch
index 8fb56723f6..8fb56723f6 100644
--- a/community/bareos/bareos-path-mounted.patch
+++ b/community/bareos/path-mounted.patch