summaryrefslogtreecommitdiff
path: root/bareos
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-10 15:29:01 +0100
committerErich Eckner <git@eckner.net>2020-03-10 15:29:01 +0100
commit88908d19ca3b408681ccef854d5be255258a7297 (patch)
tree1deed221d43679f3f7d29348f1bd48ecad6c7a5c /bareos
parent293b7746f41be835b4a48d1f644945387414a9c0 (diff)
downloadarchlinuxewe.git.save-88908d19ca3b408681ccef854d5be255258a7297.tar.xz
bareos: install stuff under /etc/bareos instead of /usr/share/bareos/config, also give installed stuff the right permissions up-front - only the owner will be set after installation
Diffstat (limited to 'bareos')
-rw-r--r--bareos/PKGBUILD651
-rw-r--r--bareos/bareos-bconsole.install1
-rw-r--r--bareos/bareos-director.install1
-rw-r--r--bareos/bareos-storage.install2
4 files changed, 387 insertions, 268 deletions
diff --git a/bareos/PKGBUILD b/bareos/PKGBUILD
index 38c3739e..a624529e 100644
--- a/bareos/PKGBUILD
+++ b/bareos/PKGBUILD
@@ -22,7 +22,7 @@ pkgname=("${pkgbase}-common"
"${pkgbase}-storage-python-plugin")
pkgver=19.2.6
-pkgrel=5
+pkgrel=6
arch=(x86_64 i686 pentium4 armv6h armv7h aarch64)
groups=('bareos')
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
@@ -95,17 +95,12 @@ build() {
make
make DESTDIR="$srcdir/install" install
-}
-
-
-_cp() {
- mkdir -p "$(dirname $2)"
- cp -a "$1" "$2"
-}
-_cp_all() {
- mkdir -p "$(dirname $2)"
- cp -a "$1"* "$(dirname $2)/"
+ # Currently upstream systemd file does not automatically create run directory
+ sed -i '/\[Service\]/a RuntimeDirectory=bareos' \
+ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-dir.service" \
+ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-fd.service" \
+ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-sd.service"
}
package_bareos-common() {
@@ -118,31 +113,38 @@ package_bareos-common() {
# usr/lib/bareos/libbareoslmdb.so
# usr/lib/bareos/libbareossd.so
- for f in \
- usr/lib/bareos/libbareos.so \
- usr/lib/bareos/libbareosfind.so \
- usr/lib/bareos/libbareoslmdb.so \
- usr/lib/bareos/libbareossd.so \
- usr/lib/bareos/libbareosfastlz.so \
- ; do
- _cp_all $srcdir/install/$f $pkgdir/$f
- done
-
- for f in \
- usr/lib/bareos/scripts/bareos-config \
- usr/lib/bareos/scripts/bareos-config-lib.sh \
- usr/lib/bareos/scripts/btraceback.gdb \
- usr/bin/bsmtp \
- usr/bin/btraceback \
- usr/share/man/man1/bsmtp.1 \
- usr/share/man/man8/btraceback.8 \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
-
- install -d $pkgdir/var/lib/bareos
- install -d $pkgdir/etc/bareos
- install -d $pkgdir/run/bareos
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos"/libbareos.so* \
+ "$srcdir/install/usr/lib/bareos"/libbareosfind.so* \
+ "$srcdir/install/usr/lib/bareos"/libbareoslmdb.so* \
+ "$srcdir/install/usr/lib/bareos"/libbareossd.so* \
+ "$srcdir/install/usr/lib/bareos"/libbareosfastlz.so* \
+ -t "$pkgdir/usr/lib/bareos"
+
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/scripts/bareos-config" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/bareos-config" \
+ "$srcdir/install/usr/lib/bareos/scripts/bareos-config-lib.sh" \
+ "$srcdir/install/usr/lib/bareos/scripts/btraceback.gdb" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bsmtp" \
+ "$srcdir/install/usr/bin/btraceback" \
+ -t "$pkgdir/usr/bin"
+
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man1/bsmtp.1" \
+ -t "$pkgdir/usr/share/man/man1/"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/btraceback.8" \
+ -t "$pkgdir/usr/share/man/man8/"
+
+ install -dm755 "$pkgdir/var/lib/bareos"
+ install -dm750 "$pkgdir/etc/bareos"
+ install -dm755 "$pkgdir/run/bareos"
}
package_bareos-bconsole() {
@@ -151,37 +153,37 @@ package_bareos-bconsole() {
groups+=('bareos-client')
install=bareos-bconsole.install
- for f in \
- usr/share/bareos/config/bconsole.conf \
- usr/bin/bconsole \
- usr/share/man/man1/bconsole.1 \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ backup=('etc/bareos/bconsole.conf')
+
+ install -Dm640 "$srcdir/install/usr/share/bareos/config/bconsole.conf" \
+ -t "$pkgdir/etc/bareos"
+ install -Dm755 "$srcdir/install/usr/bin/bconsole" \
+ -t "$pkgdir/usr/bin"
+ install -Dm644 "$srcdir/install/usr/share/man/man1/bconsole.1" \
+ -t "$pkgdir/usr/share/man/man1"
+ chmod -R o-rx "$pkgdir/etc/bareos"
}
package_bareos-database-common() {
pkgdesc="${pkgdesc} - Generic abstration libs and tools for sql catalog"
depends=("bareos-common=$pkgver" 'libcap' 'lzo' 'zlib' 'openssl' 'bash' 'jansson')
- for f in \
- usr/lib/bareos/libbareoscats.so \
- usr/lib/bareos/libbareossql.so \
- ; do
- _cp_all $srcdir/install/$f $pkgdir/$f
- done
-
- for f in \
- usr/lib/bareos/scripts/create_bareos_database \
- usr/lib/bareos/scripts/drop_bareos_database \
- usr/lib/bareos/scripts/drop_bareos_tables \
- usr/lib/bareos/scripts/grant_bareos_privileges \
- usr/lib/bareos/scripts/make_bareos_tables \
- usr/lib/bareos/scripts/update_bareos_tables \
- usr/lib/bareos/scripts/ddl/versions.map \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos"/libbareoscats.so* \
+ "$srcdir/install/usr/lib/bareos"/libbareossql.so* \
+ -t "$pkgdir/usr/lib/bareos"
+
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/scripts/create_bareos_database" \
+ "$srcdir/install/usr/lib/bareos/scripts/drop_bareos_database" \
+ "$srcdir/install/usr/lib/bareos/scripts/drop_bareos_tables" \
+ "$srcdir/install/usr/lib/bareos/scripts/grant_bareos_privileges" \
+ "$srcdir/install/usr/lib/bareos/scripts/make_bareos_tables" \
+ "$srcdir/install/usr/lib/bareos/scripts/update_bareos_tables" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/versions.map" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl"
}
package_bareos-database-mysql() {
@@ -190,22 +192,29 @@ package_bareos-database-mysql() {
depends=("bareos-database-common=$pkgver" 'libmariadbclient')
install=bareos-database-mysql.install
- for f in \
- usr/lib/bareos/backends/libbareoscats-mysql.so \
- usr/lib/bareos/scripts/ddl/drops/mysql.sql \
- usr/lib/bareos/scripts/ddl/grants/mysql.sql \
- usr/lib/bareos/scripts/ddl/creates/mysql.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.10_11.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.11_12.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.12_14.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.14_2001.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.2001_2002.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.2002_2003.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.2003_2004.sql \
- usr/lib/bareos/scripts/ddl/updates/mysql.2004_2171.sql \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/backends/libbareoscats-mysql.so" \
+ -t "$pkgdir/usr/lib/bareos/backends"
+
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/drops/mysql.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/drops"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/mysql.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/grants"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/creates/mysql.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/creates"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.10_11.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.11_12.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.12_14.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.14_2001.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2001_2002.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2002_2003.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2003_2004.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2004_2171.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/updates"
}
package_bareos-database-postgresql() {
@@ -214,25 +223,31 @@ package_bareos-database-postgresql() {
depends=("bareos-database-common=$pkgver" "postgresql-libs")
install='bareos-database-postgresql.install'
- for f in \
- usr/lib/bareos/backends/libbareoscats-postgresql.so \
- usr/lib/bareos/scripts/ddl/drops/postgresql.sql \
- usr/lib/bareos/scripts/ddl/grants/postgresql-change_owner.dbconfig-template.sql \
- usr/lib/bareos/scripts/ddl/grants/postgresql-readonly.sql \
- usr/lib/bareos/scripts/ddl/grants/postgresql.sql \
- usr/lib/bareos/scripts/ddl/creates/postgresql.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.10_11.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.11_12.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.12_14.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.14_2001.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.2001_2002.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.2002_2003.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.2003_2004.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.2004_2171.sql \
- usr/lib/bareos/scripts/ddl/updates/postgresql.bee.1017_2004.sql \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/backends/libbareoscats-postgresql.so" \
+ -t "$pkgdir/usr/lib/bareos/backends"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/drops/postgresql.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/drops"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/postgresql-change_owner.dbconfig-template.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/postgresql-readonly.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/postgresql.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/grants"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/creates/postgresql.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/creates"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.10_11.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.11_12.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.12_14.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.14_2001.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2001_2002.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2002_2003.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2003_2004.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2004_2171.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.bee.1017_2004.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/updates"
}
package_bareos-database-sqlite3() {
@@ -240,34 +255,36 @@ package_bareos-database-sqlite3() {
provides=("bareos-database=$pkgver")
depends=("bareos-database-common=$pkgver" "sqlite3")
- for f in \
- usr/lib/bareos/backends/libbareoscats-sqlite3.so \
- usr/lib/bareos/scripts/ddl/creates/sqlite3.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.10_11.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.11_12.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.12_14.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.14_2001.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.2001_2002.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.2002_2003.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.2003_2004.sql \
- usr/lib/bareos/scripts/ddl/updates/sqlite3.2004_2171.sql \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/backends/libbareoscats-sqlite3.so" \
+ -t "$pkgdir/usr/lib/bareos/backends"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/creates/sqlite3.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/creates"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.10_11.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.11_12.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.12_14.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.14_2001.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2001_2002.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2002_2003.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2003_2004.sql" \
+ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2004_2171.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts/ddl/updates"
}
package_bareos-database-tools() {
pkgdesc="${pkgdesc} - CLI tools with database dpendencies (dbcheck, bscan)"
depends=("bareos-database-common=$pkgver" 'openssl' 'jansson')
- for f in \
- usr/bin/bareos-dbcheck \
- usr/bin/bscan \
- usr/share/man/man8/bareos-dbcheck.8 \
- usr/share/man/man8/bscan.8 \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bareos-dbcheck" \
+ "$srcdir/install/usr/bin/bscan" \
+ -t "$pkgdir/usr/bin"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/bareos-dbcheck.8" \
+ "$srcdir/install/usr/share/man/man8/bscan.8" \
+ -t "$pkgdir/usr/share/man/man8"
}
#package_bareos-devel() {
@@ -282,79 +299,141 @@ package_bareos-director() {
depends=("bareos-common=$pkgver" 'openssl' 'bash' 'jansson')
install=bareos-director.install
- for f in \
- usr/lib/bareos/scripts/delete_catalog_backup \
- usr/lib/bareos/scripts/make_catalog_backup \
- usr/lib/bareos/scripts/make_catalog_backup.pl \
- usr/lib/bareos/scripts/query.sql \
- usr/share/bareos/config/bareos-dir.d/catalog/MyCatalog.conf \
- usr/share/bareos/config/bareos-dir.d/client/bareos-fd.conf \
- usr/share/bareos/config/bareos-dir.d/console/bareos-mon.conf \
- usr/share/bareos/config/bareos-dir.d/director/bareos-dir.conf \
- usr/share/bareos/config/bareos-dir.d/fileset/Catalog.conf \
- usr/share/bareos/config/bareos-dir.d/fileset/LinuxAll.conf \
- usr/share/bareos/config/bareos-dir.d/fileset/SelfTest.conf \
- usr/share/bareos/config/bareos-dir.d/fileset/Windows\ All\ Drives.conf \
- usr/share/bareos/config/bareos-dir.d/job/backup-bareos-fd.conf \
- usr/share/bareos/config/bareos-dir.d/job/BackupCatalog.conf \
- usr/share/bareos/config/bareos-dir.d/job/RestoreFiles.conf \
- usr/share/bareos/config/bareos-dir.d/jobdefs/DefaultJob.conf \
- usr/share/bareos/config/bareos-dir.d/messages/Daemon.conf \
- usr/share/bareos/config/bareos-dir.d/messages/Standard.conf \
- usr/share/bareos/config/bareos-dir.d/pool/Differential.conf \
- usr/share/bareos/config/bareos-dir.d/pool/Full.conf \
- usr/share/bareos/config/bareos-dir.d/pool/Incremental.conf \
- usr/share/bareos/config/bareos-dir.d/pool/Scratch.conf \
- usr/share/bareos/config/bareos-dir.d/profile/operator.conf \
- usr/share/bareos/config/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf \
- usr/share/bareos/config/bareos-dir.d/schedule/WeeklyCycle.conf \
- usr/share/bareos/config/bareos-dir.d/storage/File.conf \
- usr/bin/bareos-dir \
- usr/share/man/man8/bareos-dir.8 \
- usr/share/man/man8/bareos.8 \
- ; do
- # pacman LINT tool currently does not like spaces
- space_removal=`echo $f | tr ' ' '_'`
- _cp "$srcdir/install/$f" "$pkgdir/$space_removal"
- done
-
- # Currently upstream systemd file does not automatically create run directory
- sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-dir.service
- _cp $srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-dir.service $pkgdir/usr/lib/systemd/system/bareos-dir.service
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/scripts/delete_catalog_backup" \
+ "$srcdir/install/usr/lib/bareos/scripts/make_catalog_backup" \
+ "$srcdir/install/usr/lib/bareos/scripts/make_catalog_backup.pl" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+ install -Dm644 \
+ "$srcdir/install/usr/lib/bareos/scripts/query.sql" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+
+ backup=(
+ 'etc/bareos/bareos-dir.d/catalog/MyCatalog.conf'
+ 'etc/bareos/bareos-dir.d/client/bareos-fd.conf'
+ 'etc/bareos/bareos-dir.d/console/bareos-mon.conf'
+ 'etc/bareos/bareos-dir.d/director/bareos-dir.conf'
+ 'etc/bareos/bareos-dir.d/fileset/Catalog.conf'
+ 'etc/bareos/bareos-dir.d/fileset/LinuxAll.conf'
+ 'etc/bareos/bareos-dir.d/fileset/SelfTest.conf'
+ 'etc/bareos/bareos-dir.d/fileset/Windows All Drives.conf'
+ 'etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf'
+ 'etc/bareos/bareos-dir.d/job/BackupCatalog.conf'
+ 'etc/bareos/bareos-dir.d/job/RestoreFiles.conf'
+ 'etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf'
+ 'etc/bareos/bareos-dir.d/messages/Daemon.conf'
+ 'etc/bareos/bareos-dir.d/messages/Standard.conf'
+ 'etc/bareos/bareos-dir.d/pool/Differential.conf'
+ 'etc/bareos/bareos-dir.d/pool/Full.conf'
+ 'etc/bareos/bareos-dir.d/pool/Incremental.conf'
+ 'etc/bareos/bareos-dir.d/pool/Scratch.conf'
+ 'etc/bareos/bareos-dir.d/profile/operator.conf'
+ 'etc/bareos/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf'
+ 'etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf'
+ 'etc/bareos/bareos-dir.d/storage/File.conf'
+ )
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/catalog/MyCatalog.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/catalog"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/client/bareos-fd.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/client"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/console/bareos-mon.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/console"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/director/bareos-dir.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/director"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/Catalog.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/LinuxAll.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/SelfTest.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/Windows All Drives.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/fileset"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/job/backup-bareos-fd.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/job/BackupCatalog.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/job/RestoreFiles.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/job"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/jobdefs/DefaultJob.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/jobdefs"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/messages/Daemon.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/messages/Standard.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/messages"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Differential.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Full.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Incremental.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Scratch.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/pool"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/profile/operator.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/profile"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/schedule/WeeklyCycle.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/schedule"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/storage/File.conf" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/storage"
+
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bareos-dir" \
+ -t "$pkgdir/usr/bin"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/bareos-dir.8" \
+ "$srcdir/install/usr/share/man/man8/bareos.8" \
+ -t "$pkgdir/usr/share/man/man8"
+
+ install -Dm644 \
+ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-dir.service" \
+ -t "$pkgdir/usr/lib/systemd/system/"
+ chmod -R o-rx "$pkgdir/etc/bareos"
}
package_bareos-storage-fifo() {
pkgdesc="${pkgdesc} - FIFO support for storage daemon"
depends=("bareos-storage=$pkgver" 'zlib' 'libcap' 'openssl' 'jansson' 'lzo')
- for f in \
- usr/lib/bareos/backends/libbareossd-fifo.so \
- usr/share/bareos/config/bareos-dir.d/storage/NULL.conf.example \
- usr/share/bareos/config/bareos-sd.d/device/NULL.conf.example \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/backends/libbareossd-fifo.so" \
+ -t "$pkgdir/usr/lib/bareos/backends"
+ backup=(
+ 'etc/bareos/bareos-dir.d/storage/NULL.conf.example'
+ 'etc/bareos/bareos-sd.d/device/NULL.conf.example'
+ )
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/storage/NULL.conf.example" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/storage"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/device/NULL.conf.example" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/device"
+ chmod -R o-rx "$pkgdir/etc/bareos"
}
package_bareos-tools() {
pkgdesc="${pkgdesc} - CLI tools (bcopy, bextract, bls, bregeq, bwild)"
depends=("bareos-common=$pkgver" 'glibc')
- for f in \
- usr/bin/bregex \
- usr/bin/bwild \
- usr/bin/bcopy \
- usr/bin/bextract \
- usr/bin/bls \
- usr/bin/bpluginfo \
- usr/share/man/man1/bwild.1 \
- usr/share/man/man1/bregex.1 \
- usr/share/man/man8/bcopy.8 \
- usr/share/man/man8/bextract.8 \
- usr/share/man/man8/bls.8 \
- usr/share/man/man8/bpluginfo.8 \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bregex" \
+ "$srcdir/install/usr/bin/bwild" \
+ "$srcdir/install/usr/bin/bcopy" \
+ "$srcdir/install/usr/bin/bextract" \
+ "$srcdir/install/usr/bin/bls" \
+ "$srcdir/install/usr/bin/bpluginfo" \
+ -t "$pkgdir/usr/bin"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man1/bwild.1" \
+ "$srcdir/install/usr/share/man/man1/bregex.1" \
+ -t "$pkgdir/usr/share/man/man1"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/bcopy.8" \
+ "$srcdir/install/usr/share/man/man8/bextract.8" \
+ "$srcdir/install/usr/share/man/man8/bls.8" \
+ "$srcdir/install/usr/share/man/man8/bpluginfo.8" \
+ -t "$pkgdir/usr/share/man/man8"
}
package_bareos-filedaemon() {
@@ -363,23 +442,37 @@ package_bareos-filedaemon() {
groups+=('bareos-client')
install=bareos-filedaemon.install
- for f in \
- usr/share/bareos/config/bareos-fd.d/client/myself.conf \
- usr/share/bareos/config/bareos-fd.d/director/bareos-dir.conf \
- usr/share/bareos/config/bareos-fd.d/director/bareos-mon.conf \
- usr/share/bareos/config/bareos-fd.d/messages/Standard.conf \
- usr/bin/bareos-fd \
- usr/lib/bareos/plugins/bpipe-fd.so \
- usr/share/man/man8/bareos-fd.8 \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
-
- install -Dm 755 -t "$pkgdir/usr/bin/" "$srcdir/check-if-bareos-backup-is-running"
-
- # Currently upstream systemd file does not automatically create run directory
- sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-fd.service
- _cp $srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-fd.service $pkgdir/usr/lib/systemd/system/bareos-fd.service
+ backup=(
+ 'etc/bareos/bareos-fd.d/client/myself.conf'
+ 'etc/bareos/bareos-fd.d/director/bareos-dir.conf'
+ 'etc/bareos/bareos-fd.d/director/bareos-mon.conf'
+ 'etc/bareos/bareos-fd.d/messages/Standard.conf'
+ )
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/client/myself.conf" \
+ -t "$pkgdir/etc/bareos/bareos-fd.d/client"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/director/bareos-dir.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/director/bareos-mon.conf" \
+ -t "$pkgdir/etc/bareos/bareos-fd.d/director"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/messages/Standard.conf" \
+ -t "$pkgdir/etc/bareos/bareos-fd.d/messages"
+
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bareos-fd" \
+ "$srcdir/check-if-bareos-backup-is-running" \
+ -t "$pkgdir/usr/bin"
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/plugins/bpipe-fd.so" \
+ -t "$pkgdir/usr/lib/bareos/plugins"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/bareos-fd.8" \
+ -t "$pkgdir/usr/share/man/man8"
+ install -Dm644 \
+ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-fd.service" \
+ -t "$pkgdir/usr/lib/systemd/system"
+ chmod -R o-rx "$pkgdir/etc/bareos"
}
package_bareos-storage() {
@@ -387,94 +480,124 @@ package_bareos-storage() {
depends=("bareos-common=$pkgver" 'zlib' 'lzo' 'jansson' 'openssl' 'libcap')
install=bareos-storage.install
- for f in \
- usr/lib/bareos/plugins/autoxflate-sd.so \
- usr/lib/bareos/scripts/disk-changer \
- usr/share/bareos/config/bareos-sd.d/device/FileStorage.conf \
- usr/share/bareos/config/bareos-sd.d/director/bareos-dir.conf \
- usr/share/bareos/config/bareos-sd.d/director/bareos-mon.conf \
- usr/share/bareos/config/bareos-sd.d/messages/Standard.conf \
- usr/share/bareos/config/bareos-sd.d/storage/bareos-sd.conf \
- usr/bin/bareos-sd \
- usr/share/man/man8/bareos-sd.8 \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
-
- install -d $pkgdir/var/lib/bareos/storage
- # Currently upstream systemd file does not automatically create run directory
- sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-sd.service
- _cp $srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-sd.service $pkgdir/usr/lib/systemd/system/bareos-sd.service
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/plugins/autoxflate-sd.so" \
+ -t "$pkgdir/usr/lib/bareos/plugins"
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/scripts/disk-changer" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+ backup=(
+ 'etc/bareos/bareos-sd.d/device/FileStorage.conf'
+ 'etc/bareos/bareos-sd.d/director/bareos-dir.conf'
+ 'etc/bareos/bareos-sd.d/director/bareos-mon.conf'
+ 'etc/bareos/bareos-sd.d/messages/Standard.conf'
+ 'etc/bareos/bareos-sd.d/storage/bareos-sd.conf'
+ )
+ install -Dm644 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/device/FileStorage.conf" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/device"
+ install -Dm644 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/director/bareos-dir.conf" \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/director/bareos-mon.conf" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/director"
+ install -Dm644 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/messages/Standard.conf" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/messages"
+ install -Dm644 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/storage/bareos-sd.conf" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/storage"
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bareos-sd" \
+ -t "$pkgdir/usr/bin"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/bareos-sd.8" \
+ -t "$pkgdir/usr/share/man/man8"
+ install -Dm644 \
+ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-sd.service" \
+ -t "$pkgdir/usr/lib/systemd/system"
+ install -dm750 "$pkgdir/var/lib/bareos/storage"
+ chmod -R o-rx "$pkgdir/etc/bareos"
}
package_bareos-storage-tape() {
pkgdesc="${pkgdesc} - Tape support for storage daemon"
depends=("bareos-storage=$pkgver" 'zlib' 'libcap' 'bash' 'openssl' 'jansson' 'lzo' "mtx")
- backup=(etc/bareos/mtx-changer.conf)
-
- for f in \
- etc/bareos/mtx-changer.conf \
- usr/share/bareos/config/bareos-dir.d/storage/Tape.conf.example \
- usr/share/bareos/config/bareos-sd.d/autochanger/autochanger-0.conf.example \
- usr/share/bareos/config/bareos-sd.d/device/tapedrive-0.conf.example \
- usr/lib/bareos/backends/libbareossd-gentape.so \
- usr/lib/bareos/backends/libbareossd-tape.so \
- usr/lib/bareos/scripts/mtx-changer \
- usr/share/man/man8/bscrypto.8 \
- usr/share/man/man8/btape.8 \
- usr/bin/bscrypto \
- usr/bin/btape \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ backup=(
+ 'etc/bareos/mtx-changer.conf'
+ 'etc/bareos/bareos-dir.d/storage/Tape.conf.example'
+ 'etc/bareos/bareos-sd.d/autochanger/autochanger-0.conf.example'
+ 'etc/bareos/bareos-sd.d/device/tapedrive-0.conf.example'
+ )
+ install -Dm640 \
+ "$srcdir/install/etc/bareos/mtx-changer.conf" \
+ -t "$pkgdir/etc/bareos"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/storage/Tape.conf.example" \
+ -t "$pkgdir/etc/bareos/bareos-dir.d/storage"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/autochanger/autochanger-0.conf.example" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/autochanger"
+ install -Dm640 \
+ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/device/tapedrive-0.conf.example" \
+ -t "$pkgdir/etc/bareos/bareos-sd.d/device"
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/backends/libbareossd-gentape.so" \
+ "$srcdir/install/usr/lib/bareos/backends/libbareossd-tape.so" \
+ -t "$pkgdir/usr/lib/bareos/backends"
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/scripts/mtx-changer" \
+ -t "$pkgdir/usr/lib/bareos/scripts"
+ install -Dm644 \
+ "$srcdir/install/usr/share/man/man8/bscrypto.8" \
+ "$srcdir/install/usr/share/man/man8/btape.8" \
+ -t "$pkgdir/usr/share/man/man8"
+ install -Dm755 \
+ "$srcdir/install/usr/bin/bscrypto" \
+ "$srcdir/install/usr/bin/btape" \
+ -t "$pkgdir/usr/bin"
+ chmod -R o-rx "$pkgdir/etc/bareos"
}
package_bareos-director-python-plugin() {
pkgdesc="${pkgdesc} - Python plugin for director daemon"
depends=("bareos-director=$pkgver" 'libcap' 'jansson' 'lzo' 'python' 'python2')
- for f in \
- usr/lib/bareos/plugins/python-dir.so \
- usr/lib/bareos/plugins/bareos-dir.py.template \
- usr/lib/bareos/plugins/bareos_dir_consts.py \
- usr/lib/bareos/plugins/BareosDirWrapper.py \
- usr/lib/bareos/plugins/BareosDirPluginBaseclass.py \
- usr/lib/bareos/plugins/bareos-dir-class-plugin.py \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/plugins/python-dir.so" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-dir.py.template" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos_dir_consts.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosDirWrapper.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosDirPluginBaseclass.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-dir-class-plugin.py" \
+ -t "$pkgdir/usr/lib/bareos/plugins"
}
package_bareos-filedaemon-python-plugin() {
pkgdesc="${pkgdesc} - Python plugin for file daemon"
depends=("bareos-filedaemon=$pkgver" 'python' 'python2' 'libcap' 'lzo' 'jansson')
- for f in \
- usr/lib/bareos/plugins/python-fd.so \
- usr/lib/bareos/plugins/bareos-fd.py.template \
- usr/lib/bareos/plugins/bareos-fd-local-fileset.py \
- usr/lib/bareos/plugins/bareos-fd-mock-test.py \
- usr/lib/bareos/plugins/BareosFdPluginBaseclass.py \
- usr/lib/bareos/plugins/BareosFdPluginLocalFileset.py \
- usr/lib/bareos/plugins/BareosFdWrapper.py \
- usr/lib/bareos/plugins/bareos_fd_consts.py \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/plugins/python-fd.so" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-fd.py.template" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-fd-local-fileset.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-fd-mock-test.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosFdPluginBaseclass.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosFdPluginLocalFileset.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosFdWrapper.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos_fd_consts.py" \
+ -t "$pkgdir/usr/lib/bareos/plugins"
}
package_bareos-storage-python-plugin() {
pkgdesc="${pkgdesc} - Python plugin for storage daemon"
depends=("bareos-storage=$pkgver" 'python2' 'lzo' 'python' 'libcap' 'jansson')
- for f in \
- usr/lib/bareos/plugins/python-sd.so \
- usr/lib/bareos/plugins/bareos-sd.py.template \
- usr/lib/bareos/plugins/bareos_sd_consts.py \
- usr/lib/bareos/plugins/BareosSdPluginBaseclass.py \
- usr/lib/bareos/plugins/BareosSdWrapper.py \
- usr/lib/bareos/plugins/bareos-sd-class-plugin.py \
- ; do
- _cp $srcdir/install/$f $pkgdir/$f
- done
+ install -Dm755 \
+ "$srcdir/install/usr/lib/bareos/plugins/python-sd.so" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-sd.py.template" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos_sd_consts.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosSdPluginBaseclass.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/BareosSdWrapper.py" \
+ "$srcdir/install/usr/lib/bareos/plugins/bareos-sd-class-plugin.py" \
+ -t "$pkgdir/usr/lib/bareos/plugins"
}
diff --git a/bareos/bareos-bconsole.install b/bareos/bareos-bconsole.install
index 0b1c1d30..cdb5c014 100644
--- a/bareos/bareos-bconsole.install
+++ b/bareos/bareos-bconsole.install
@@ -4,7 +4,6 @@ post_install() {
/usr/lib/bareos/scripts/bareos-config initialize_passwords
chown root:bareos /usr/share/bareos/config/bconsole.conf
- chmod 640 /usr/share/bareos/config/bconsole.conf
}
post_upgrade() {
diff --git a/bareos/bareos-director.install b/bareos/bareos-director.install
index 518d7869..14a6e1c0 100644
--- a/bareos/bareos-director.install
+++ b/bareos/bareos-director.install
@@ -4,7 +4,6 @@ post_install() {
/usr/lib/bareos/scripts/bareos-config initialize_passwords
chown -R bareos:bareos /usr/share/bareos/config/bareos-dir.d
- chmod -R 750 /usr/share/bareos/config/bareos-dir.d
chown bareos:bareos /usr/bin/bareos-dir
diff --git a/bareos/bareos-storage.install b/bareos/bareos-storage.install
index 8026ef6f..12cf3285 100644
--- a/bareos/bareos-storage.install
+++ b/bareos/bareos-storage.install
@@ -4,12 +4,10 @@ post_install() {
/usr/lib/bareos/scripts/bareos-config initialize_passwords
chown -R bareos:bareos /usr/share/bareos/config/bareos-sd.d
- chmod -R 750 /usr/share/bareos/config/bareos-sd.d
chown bareos:bareos /usr/bin/bareos-sd
chown bareos:bareos /var/lib/bareos/storage/
- chmod 750 /var/lib/bareos/storage/
/usr/lib/bareos/scripts/bareos-config setup_sd_user
}