diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/bareos/APKBUILD | 153 | ||||
-rw-r--r-- | testing/bareos/bareos-dir-conf | 7 | ||||
-rw-r--r-- | testing/bareos/bareos-dir-init | 23 | ||||
-rw-r--r-- | testing/bareos/bareos-fd-conf | 4 | ||||
-rw-r--r-- | testing/bareos/bareos-fd-init | 22 | ||||
-rw-r--r-- | testing/bareos/bareos-path-mounted.patch | 15 | ||||
-rw-r--r-- | testing/bareos/bareos-sd-conf | 7 | ||||
-rw-r--r-- | testing/bareos/bareos-sd-init | 22 | ||||
-rw-r--r-- | testing/bareos/bareos.pre-install | 6 |
9 files changed, 259 insertions, 0 deletions
diff --git a/testing/bareos/APKBUILD b/testing/bareos/APKBUILD new file mode 100644 index 0000000000..7d41df8f70 --- /dev/null +++ b/testing/bareos/APKBUILD @@ -0,0 +1,153 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=bareos +pkgver=15.2.3 +pkgrel=0 +pkgdesc="Bareos - Backup Archiving REcovery Open Sourced" +url="http://www.bareos.org" +arch="all" +license="AGPL3" +depends="" +depends_dev="libpcap-dev lzo-dev sqlite-dev postgresql-dev + openssl-dev mariadb-dev acl-dev qt-dev python-dev readline-dev + ncurses-dev" +makedepends="$depends_dev libtool" +install="$pkgname.pre-install" +subpackages="$pkgname-dev $pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-sqlite" +pkgusers="bareos" +pkggroups="bareos" +source="$pkgname-$pkgver.tar.gz::https://github.com/bareos/bareos/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-conio \ + --enable-readline \ + --enable-batch-insert \ + --enable-acl \ + --enable-xattr \ + --enable-scsi-crypto \ + --enable-lmdb \ + --enable-ipv6 \ + --disable-nls \ + --with-postgresql \ + --with-mysql \ + --with-sqlite3 \ + --with-openssl \ + --with-python \ + --enable-includes \ + --disable-rpath \ + --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 bareos.bareos "$pkgdir"$dir || return 1 + done + find "$pkgdir"/usr/lib -iname libbareoscats* -type l -delete +} + +_mv_backend() { + mkdir -p "$subpkgdir"/usr/lib + mkdir -p "$subpkgdir"/etc/bareos/scripts + mv "$pkgdir"/usr/lib/libbareoscats-${1}-${pkgver}.so \ + "$subpkgdir"/usr/lib || return 1 + ln -s libbareoscats-${pkgver}.so "$subpkgdir"/usr/lib/libbareoscats.so + ln -s libbareoscats-${1}-${pkgver}.so \ + "$subpkgdir"/usr/lib/libbareoscats-${pkgver}.so +} + +mysql() { + pkgdesc="Bareos MySQL backend" + depends="bareos" + _mv_backend mysql +} + +pgsql() { + pkgdesc="Bareos PGSQL backend" + depends="bareos" + pkgusers="postgres" + _mv_backend postgresql +} + +sqlite() { + pkgdesc="Bareos SQLite backend" + depends="bareos" + _mv_backend sqlite3 +} + + + +md5sums="b15872bcda22363ea9a87be7a2e3201a bareos-15.2.3.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="37821804727f06c58badc2b738ea2be5237111726c89f1306c1926cba261fc55 bareos-15.2.3.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="c6d5e8d9ac31b6b06a7b2a692136e2173e9276c717888d69a57867c52223681bb345f357c8c6054734ca2c7cf5712725b67542f5aecc90c007412cb5e5e514a8 bareos-15.2.3.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/testing/bareos/bareos-dir-conf b/testing/bareos/bareos-dir-conf new file mode 100644 index 0000000000..17a56161f0 --- /dev/null +++ b/testing/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/testing/bareos/bareos-dir-init b/testing/bareos/bareos-dir-init new file mode 100644 index 0000000000..ee20f52a5c --- /dev/null +++ b/testing/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/testing/bareos/bareos-fd-conf b/testing/bareos/bareos-fd-conf new file mode 100644 index 0000000000..033ef74b4b --- /dev/null +++ b/testing/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/testing/bareos/bareos-fd-init b/testing/bareos/bareos-fd-init new file mode 100644 index 0000000000..1e36a19479 --- /dev/null +++ b/testing/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/testing/bareos/bareos-path-mounted.patch b/testing/bareos/bareos-path-mounted.patch new file mode 100644 index 0000000000..8fb56723f6 --- /dev/null +++ b/testing/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/testing/bareos/bareos-sd-conf b/testing/bareos/bareos-sd-conf new file mode 100644 index 0000000000..88e13aa0eb --- /dev/null +++ b/testing/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/testing/bareos/bareos-sd-init b/testing/bareos/bareos-sd-init new file mode 100644 index 0000000000..2375b8e457 --- /dev/null +++ b/testing/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/testing/bareos/bareos.pre-install b/testing/bareos/bareos.pre-install new file mode 100644 index 0000000000..4b1b8d83ed --- /dev/null +++ b/testing/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 |