aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos
diff options
context:
space:
mode:
Diffstat (limited to 'community/bareos')
-rw-r--r--community/bareos/APKBUILD140
-rw-r--r--community/bareos/bareos-dir-conf7
-rw-r--r--community/bareos/bareos-dir-init23
-rw-r--r--community/bareos/bareos-fd-conf4
-rw-r--r--community/bareos/bareos-fd-init22
-rw-r--r--community/bareos/bareos-path-mounted.patch15
-rw-r--r--community/bareos/bareos-sd-conf7
-rw-r--r--community/bareos/bareos-sd-init22
-rw-r--r--community/bareos/bareos.post-install8
-rw-r--r--community/bareos/bareos.pre-install6
10 files changed, 254 insertions, 0 deletions
diff --git a/community/bareos/APKBUILD b/community/bareos/APKBUILD
new file mode 100644
index 0000000000..6f165ad93c
--- /dev/null
+++ b/community/bareos/APKBUILD
@@ -0,0 +1,140 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=bareos
+pkgver=15.2.4
+pkgrel=2
+pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
+url="http://www.bareos.org"
+arch="all"
+license="AGPL3"
+depends=""
+depends_dev=""
+makedepends="$depends_dev libtool libintl libpcap-dev lzo-dev \
+ sqlite-dev postgresql-dev openssl-dev mariadb-dev acl-dev \
+ qt-dev python-dev readline-dev ncurses-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-trayicon"
+pkgusers="bareos"
+pkggroups="bareos"
+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"
+
+builddir="$srcdir"/${pkgname}-Release-${pkgver}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --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-subsys-dir=/var/lock \
+ --enable-smartalloc \
+ --enable-largefile \
+ --enable-readline \
+ --enable-traymonitor \
+ --enable-batch-insert \
+ --enable-acl \
+ --enable-xattr \
+ --enable-scsi-crypto \
+ --enable-lmdb \
+ --enable-ipv6 \
+ --enable-dynamic-cats-backends \
+ --enable-dynamic-debian-package-list \
+ --enable-includes \
+ --disable-conio \
+ --disable-nls \
+ --disable-rpath \
+ --with-postgresql \
+ --with-mysql \
+ --with-sqlite3 \
+ --with-openssl \
+ --with-python \
+ --without-systemd \
+ --with-dir-user=$pkgusers \
+ --with-dir-group=$pkggroups \
+ --with-sd-user=$pkgusers \
+ --with-sd-group=$pkggroups \
+ --with-fd-user=root \
+ --with-fd-group=root
+ make || return 1
+}
+
+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}
+ 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
+ done
+}
+
+dev() {
+ pkgdesc="Bareos header files"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/include "$subpkgdir"/usr
+}
+
+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
+ 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"
diff --git a/community/bareos/bareos-dir-conf b/community/bareos/bareos-dir-conf
new file mode 100644
index 0000000000..17a56161f0
--- /dev/null
+++ b/community/bareos/bareos-dir-conf
@@ -0,0 +1,7 @@
+# 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
new file mode 100644
index 0000000000..ee20f52a5c
--- /dev/null
+++ b/community/bareos/bareos-dir-init
@@ -0,0 +1,23 @@
+#!/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-fd-conf b/community/bareos/bareos-fd-conf
new file mode 100644
index 0000000000..033ef74b4b
--- /dev/null
+++ b/community/bareos/bareos-fd-conf
@@ -0,0 +1,4 @@
+# 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
new file mode 100644
index 0000000000..1e36a19479
--- /dev/null
+++ b/community/bareos/bareos-fd-init
@@ -0,0 +1,22 @@
+#!/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-path-mounted.patch b/community/bareos/bareos-path-mounted.patch
new file mode 100644
index 0000000000..8fb56723f6
--- /dev/null
+++ b/community/bareos/bareos-path-mounted.patch
@@ -0,0 +1,15 @@
+diff --git a/src/lib/mntent_cache.c b/src/lib/mntent_cache.c
+index 69cc9f9..b14c8a1 100644
+--- a/src/lib/mntent_cache.c
++++ b/src/lib/mntent_cache.c
+@@ -54,6 +54,10 @@
+ * Marco van Wieringen, August 2009
+ */
+
++#ifndef _PATH_MOUNTED
++# define _PATH_MOUNTED "/proc/mounts"
++#endif
++
+ #include "bareos.h"
+ #include "mntent_cache.h"
+
diff --git a/community/bareos/bareos-sd-conf b/community/bareos/bareos-sd-conf
new file mode 100644
index 0000000000..88e13aa0eb
--- /dev/null
+++ b/community/bareos/bareos-sd-conf
@@ -0,0 +1,7 @@
+# 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
new file mode 100644
index 0000000000..2375b8e457
--- /dev/null
+++ b/community/bareos/bareos-sd-init
@@ -0,0 +1,22 @@
+#!/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.post-install b/community/bareos/bareos.post-install
new file mode 100644
index 0000000000..9eb6220996
--- /dev/null
+++ b/community/bareos/bareos.post-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+addgroup bareos disk 2>/dev/null
+addgroup bareos tape 2>/dev/null
+addgroup bareos cdrom 2>/dev/null
+addgroup bareos cdrw 2>/dev/null
+
+exit 0
diff --git a/community/bareos/bareos.pre-install b/community/bareos/bareos.pre-install
new file mode 100644
index 0000000000..4b1b8d83ed
--- /dev/null
+++ b/community/bareos/bareos.pre-install
@@ -0,0 +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
+
+exit 0