diff options
-rw-r--r-- | .SRCINFO | 100 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | PKGBUILD.common | 97 | ||||
-rw-r--r-- | bareos-common.install | 1 | ||||
-rw-r--r-- | bareos-director.install | 11 | ||||
-rw-r--r-- | bareos-filedaemon.install | 4 | ||||
-rw-r--r-- | bareos-storage-fifo.install | 4 | ||||
-rw-r--r-- | bareos-storage-tape.install | 4 | ||||
-rw-r--r-- | bareos-storage.install | 9 |
9 files changed, 147 insertions, 89 deletions
@@ -1,24 +1,25 @@ pkgbase = bareos pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - pkgver = 15.2.4 - pkgrel = 2 + pkgver = 16.2.4rc1 + pkgrel = 1 url = http://www.bareos.org arch = i686 arch = x86_64 groups = bareos license = AGPL3 - makedepends = sqlite + makedepends = sqlite3 makedepends = libmariadbclient makedepends = postgresql-libs makedepends = lzo makedepends = acl makedepends = libcap makedepends = python2 + makedepends = python optdepends = openssl: network encryption between daemons - source = https://github.com/bareos/bareos/archive/Release/15.2.4.tar.gz + source = http://download.bareos.org/bareos/release/16.2/Debian_8.0/bareos_16.2.4.orig.tar.gz source = PKGBUILD.common - sha256sums = dde2b0b1ed8d878f9731cee9c7f723e3bac479b5fb367e61efca636465b40ebb - sha256sums = 518cb7c5417707245e19b2667ab4109f4984c17193cf94ed21c02b739baf8232 + sha256sums = 920196b9e07044a99c2a9146bc90ddec9c3820839b20a0b38d72c4a4aaaa0f7a + sha256sums = 7c0ddad01de8194b5e5dfd3c7ad13439a65966452c74c7a528566e3398c9f9c4 pkgname = bareos-common pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Common files @@ -30,35 +31,35 @@ pkgname = bareos-bconsole install = bareos-bconsole.install groups = bareos groups = bareos-client - depends = bareos-common=15.2.4 - backup = + depends = bareos-common=16.2.4rc1 + backup = etc/bareos/bconsole.conf pkgname = bareos-database-common pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Generic abstration libs and tools for sql catalog - depends = bareos-common=15.2.4 - depends = bareos-database-tools=15.2.4 + depends = bareos-common=16.2.4rc1 + depends = bareos-database-tools=16.2.4rc1 backup = pkgname = bareos-database-mysql pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for mysql catalog install = bareos-database-mysql.install - depends = bareos-database-common=15.2.4 + depends = bareos-database-common=16.2.4rc1 depends = libmariadbclient - provides = bareos-database=15.2.4 + provides = bareos-database=16.2.4rc1 backup = pkgname = bareos-database-postgresql pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for postgresql catalog - depends = bareos-database-common=15.2.4 + depends = bareos-database-common=16.2.4rc1 depends = postgresql-libs - provides = bareos-database=15.2.4 + provides = bareos-database=16.2.4rc1 backup = pkgname = bareos-database-sqlite3 pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for sqlite3 catalog - depends = bareos-database-common=15.2.4 + depends = bareos-database-common=16.2.4rc1 depends = sqlite3 - provides = bareos-database=15.2.4 + provides = bareos-database=16.2.4rc1 backup = pkgname = bareos-database-tools @@ -72,18 +73,41 @@ pkgname = bareos-devel pkgname = bareos-director pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Director daemon install = bareos-director.install - depends = bareos-common=15.2.4 - backup = + depends = bareos-common=16.2.4rc1 + backup = etc/bareos/tray-monitor.d/director/Director-local.conf + backup = etc/bareos/bareos-dir.d/storage/File.conf + backup = etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf + backup = etc/bareos/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf + backup = etc/bareos/bareos-dir.d/profile/operator.conf + backup = etc/bareos/bareos-dir.d/pool/Scratch.conf + backup = etc/bareos/bareos-dir.d/pool/Incremental.conf + backup = etc/bareos/bareos-dir.d/pool/Full.conf + backup = etc/bareos/bareos-dir.d/pool/Differential.conf + backup = etc/bareos/bareos-dir.d/messages/Standard.conf + backup = etc/bareos/bareos-dir.d/messages/Daemon.conf + backup = etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf + backup = etc/bareos/bareos-dir.d/job/RestoreFiles.conf + backup = etc/bareos/bareos-dir.d/job/BackupClient1.conf + backup = etc/bareos/bareos-dir.d/job/BackupCatalog.conf + backup = etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf + backup = etc/bareos/bareos-dir.d/fileset/Windows.All.Drives.conf + backup = etc/bareos/bareos-dir.d/fileset/SelfTest.conf + backup = etc/bareos/bareos-dir.d/fileset/LinuxAll.conf + backup = etc/bareos/bareos-dir.d/fileset/Catalog.conf + backup = etc/bareos/bareos-dir.d/director/bareos-dir.conf + backup = etc/bareos/bareos-dir.d/console/bareos-mon.conf + backup = etc/bareos/bareos-dir.d/client/bareos-fd.conf + backup = etc/bareos/bareos-dir.d/catalog/MyCatalog.conf + backup = etc/logrotate.d/bareos-dir pkgname = bareos-storage-fifo pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - FIFO support for storage daemon - install = bareos-storage-fifo.install - depends = bareos-storage=15.2.4 + depends = bareos-storage=16.2.4rc1 backup = pkgname = bareos-tools pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - CLI tools (bcopy, bextract, bls, bregeq, bwild) - depends = bareos-common=15.2.4 + depends = bareos-common=16.2.4rc1 backup = pkgname = bareos-filedaemon @@ -91,36 +115,50 @@ pkgname = bareos-filedaemon install = bareos-filedaemon.install groups = bareos groups = bareos-client - depends = bareos-common=15.2.4 - backup = + depends = bareos-common=16.2.4rc1 + backup = etc/bareos/tray-monitor.d/client/FileDaemon-local.conf + backup = etc/bareos/bareos-fd.d/messages/Standard.conf + backup = etc/bareos/bareos-fd.d/director/bareos-mon.conf + backup = etc/bareos/bareos-fd.d/director/bareos-dir.conf + backup = etc/bareos/bareos-fd.d/client/myself.conf pkgname = bareos-storage pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Storage daemon install = bareos-storage.install - depends = bareos-common=15.2.4 + depends = bareos-common=16.2.4rc1 optdepends = openssl: network encryption between daemons optdepends = lzo2: LZO compression for Storage Daemon - backup = + backup = etc/bareos/tray-monitor.d/storage/StorageDaemon-local.conf + backup = etc/bareos/bareos-sd.d/storage/bareos-sd.conf + backup = etc/bareos/bareos-sd.d/messages/Standard.conf + backup = etc/bareos/bareos-sd.d/director/bareos-mon.conf + backup = etc/bareos/bareos-sd.d/director/bareos-dir.conf + backup = etc/bareos/bareos-sd.d/device/FileStorage.conf pkgname = bareos-storage-tape pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Tape support for storage daemon - install = bareos-storage-tape.install - depends = bareos-storage=15.2.4 + depends = bareos-storage=16.2.4rc1 depends = mtx - backup = + backup = etc/bareos/mtx-changer.conf pkgname = bareos-director-python-plugin pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for director daemon - depends = bareos-director=15.2.4 + depends = bareos-director=16.2.4rc1 + depends = python2 + depends = python backup = pkgname = bareos-filedaemon-python-plugin pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for file daemon - depends = bareos-filedaemon=15.2.4 + depends = bareos-filedaemon=16.2.4rc1 + depends = python2 + depends = python backup = pkgname = bareos-storage-python-plugin pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for storage daemon - depends = bareos-storage=15.2.4 + depends = bareos-storage=16.2.4rc1 + depends = python2 + depends = python backup = @@ -22,8 +22,8 @@ pkgname=("${pkgbase}-common" "${pkgbase}-filedaemon-python-plugin" "${pkgbase}-storage-python-plugin") -source=("https://github.com/bareos/bareos/archive/Release/${pkgver}.tar.gz" +source=("http://download.bareos.org/bareos/release/16.2/Debian_8.0/bareos_${_pkgver}.orig.tar.gz" "PKGBUILD.common") -sha256sums=('dde2b0b1ed8d878f9731cee9c7f723e3bac479b5fb367e61efca636465b40ebb' - '518cb7c5417707245e19b2667ab4109f4984c17193cf94ed21c02b739baf8232') +sha256sums=('920196b9e07044a99c2a9146bc90ddec9c3820839b20a0b38d72c4a4aaaa0f7a' + '7c0ddad01de8194b5e5dfd3c7ad13439a65966452c74c7a528566e3398c9f9c4') diff --git a/PKGBUILD.common b/PKGBUILD.common index bda478ee8bc8..5618c401f88f 100644 --- a/PKGBUILD.common +++ b/PKGBUILD.common @@ -1,18 +1,19 @@ # Maintainer: Michael Spradling <mike@mspradling.com> # Contributor: Daniel Albers <daniel@lbe.rs> -pkgver=15.2.4 -pkgrel=2 +pkgver=16.2.4rc1 +_pkgver=16.2.4 +pkgrel=1 arch=(i686 x86_64) groups=('bareos') pkgdesc="Bareos - Backup Archiving REcovery Open Sourced" url="http://www.bareos.org" license=('AGPL3') -makedepends=('sqlite' 'libmariadbclient' 'postgresql-libs' 'lzo' 'acl' 'libcap' 'python2') +makedepends=('sqlite3' 'libmariadbclient' 'postgresql-libs' 'lzo' 'acl' 'libcap' 'python2' 'python') optdepends=('openssl: network encryption between daemons') _instdir="${startdir}/install" -_pkgsrc="${startdir}/src/bareos-Release-${pkgver}" +_pkgsrc="${startdir}/src/bareos-${_pkgver}" _configure_args="--prefix=/usr \ --with-sbin-perm=755 \ --libdir=/usr/lib/bareos \ @@ -20,7 +21,7 @@ _configure_args="--prefix=/usr \ --with-confdir=/etc/bareos \ --with-archivedir=/var/lib/bareos/storage \ --with-backenddir=/usr/lib/bareos/backends \ - --with-configtemplatedir=/usr/lib/bareos/defaultconfigs \ + --with-configtemplatedir="" \ --with-scriptdir=/usr/lib/bareos/scripts \ --with-plugindir=/usr/lib/bareos/plugins \ --with-working-dir=/var/lib/bareos \ @@ -63,10 +64,6 @@ prepare() { } build() { - # bareos 15.2 doesn't work with gcc 6.1.1 and newer with optimizations - export CFLAGS="${CFLAGS/O2/O0}" - export CXXFLAGS="${CXXFLAGS/O2/O0}" - pushd "${_pkgsrc}" &> /dev/null QMAKE="/usr/bin/qmake-qt4" DISTNAME="debian" ./configure $_configure_args make DESTDIR="$_instdir" install @@ -76,22 +73,45 @@ build() { _install_files() { pushd $_instdir &> /dev/null - # Create needed directories - if [ -e "${_pkgsrc}/debian/$1.dirs" ]; then - while read dir - do - mkdir -p ${pkgdir}${dir} - done < ${_pkgsrc}/debian/$1.dirs - fi - # Create files - while read file - do - set -f # Handle BLOB wild cards - file=$(echo $file | sed 's,\([^ ]*\).*,\1,g') # Remove second param, if exists - file=${file:1:${#file}-1} - set +f - cp --parents -a ${file} ${pkgdir} + while read line + do + # Don't expand globs yet, or it might be an old version + set -f + first=$(echo $line | sed 's,\([^ ]*\).*,\1,g') # First param + second=$(echo $line | sed 's,[^ ]*\(.*\),\1,g') # Second Param + file=$(basename $first) # File + set +f + + # Skip example files. they don't exist + if [[ $file == *".conf.example" ]]; then + continue + fi + + if [[ $second == "" ]]; then + pushd $_instdir &> /dev/null + set -f + srcpath=$(dirname $first) + srcpath=${srcpath#/} + set +f + cp -a --parents $srcpath/$file $pkgdir + else + destpath=${pkgdir}$(dirname $first) + mkdir -p $destpath + second=${second#' '} # Remove leading space from sed match + + # Handle files that have a ? in them rename to '.' + # this only works if space files are also not paired with wildcards + if [[ $file == *"?"* ]]; then + newfile=${file//\?/.} + file=${file//\?/\ } + # Contains a space, rename to '.' + cp -a "${_pkgsrc}/src/defaultconfigs${second}${file}" $destpath/${newfile} + else + # No space, but may have wild cards + cp -a ${_pkgsrc}/src/defaultconfigs${second}${file} $destpath + fi + fi done < ${_pkgsrc}/debian/$1.install mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin" &> /dev/null || true @@ -102,17 +122,24 @@ _install_files() { _etc_files() { pushd $_instdir &> /dev/null - # HACK: This allows mksrcinfo to work when determining etc files dynamically - [[ ${_pkgsrc} == $(readlink -f $(pwd)/..)* ]] || MKSRCINFO=1 - [[ $MKSRCINFO -eq 1 ]] && _pkgsrc=${_pkgsrc:1:${#_pkgsrc}-1} + if [ ! -e "${_pkgsrc}/debian/$1" ]; then + return + fi while read file do file=$(echo $file | sed 's,\([^ ]*\).*,\1,g') # Remove second param, if exists - file=${file:1:${#file}-1} + file=${file:1:${#file}-1} # Remove leading / + file=${file//\?/.} # Convert ? to . + file=${file//\*/} # Drop wildcards, pacman doesn't support them for BACKUP. Also there is only one at the moment + + # Skip example files. they don't exist + if [[ "$file" == *".conf.example" ]]; then + continue + fi if [[ "$file" =~ "etc" ]]; then - out="${file} $out" + out="${file} $out" fi done < ${_pkgsrc}/debian/$1 @@ -128,10 +155,6 @@ package_bareos-bat() { backup=(`_etc_files ${pkgname}.install`) install=bareos-bat.install _install_files ${pkgname} - - # Temp, while waiting on bug: https://bugs.bareos.org/view.php?id=576 - mv ${pkgdir}/usr/bin/bat ${pkgdir}/usr/bin/bareos-bat - mv ${pkgdir}/usr/share/man/man1/bat.1.gz ${pkgdir}/usr/share/man/man1/bareos-bat.1.gz } package_bareos-bconsole() { @@ -208,7 +231,7 @@ package_bareos-director() { package_bareos-director-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for director daemon" - depends=("bareos-director=$pkgver") + depends=("bareos-director=$pkgver" "python2" "python") backup=(`_etc_files ${pkgname}.install`) _install_files ${pkgname} } @@ -228,7 +251,7 @@ package_bareos-filedaemon() { package_bareos-filedaemon-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for file daemon" - depends=("bareos-filedaemon=$pkgver") + depends=("bareos-filedaemon=$pkgver" "python2" "python") backup=(`_etc_files ${pkgname}.install`) _install_files ${pkgname} } @@ -250,13 +273,12 @@ package_bareos-storage-fifo() { pkgdesc="${pkgdesc} - FIFO support for storage daemon" depends=("bareos-storage=$pkgver") backup=(`_etc_files ${pkgname}.install`) - install=bareos-storage-fifo.install _install_files ${pkgname} } package_bareos-storage-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for storage daemon" - depends=("bareos-storage=$pkgver") + depends=("bareos-storage=$pkgver" "python2" "python") backup=(`_etc_files ${pkgname}.install`) _install_files ${pkgname} } @@ -265,7 +287,6 @@ package_bareos-storage-tape() { pkgdesc="${pkgdesc} - Tape support for storage daemon" depends=("bareos-storage=$pkgver" "mtx") backup=(`_etc_files ${pkgname}.install`) - install=bareos-storage-tape.install _install_files ${pkgname} } diff --git a/bareos-common.install b/bareos-common.install index 4002a3aa5726..c82f70d63e0c 100644 --- a/bareos-common.install +++ b/bareos-common.install @@ -10,6 +10,7 @@ pre_install() { # arg 1: the new package version post_install() { chown bareos:bareos /var/lib/bareos/ + #chown bareos:bareos /var/log/bareos/ } # arg 1: the new package version diff --git a/bareos-director.install b/bareos-director.install index 3c1c168c7472..37321d1b9dd2 100644 --- a/bareos-director.install +++ b/bareos-director.install @@ -2,10 +2,15 @@ post_install() { /usr/lib/bareos/scripts/bareos-config initialize_local_hostname /usr/lib/bareos/scripts/bareos-config initialize_passwords + + chown -R bareos:bareos /etc/bareos/bareos-dir.d + chmod -R 750 /etc/bareos/bareos-dir.d + /usr/lib/bareos/scripts/bareos-config initialize_database_driver /usr/lib/bareos/scripts/bareos-config apply_dbconfig_settings - chown root:bareos /etc/bareos/bareos-dir.d - chown root:bareos /etc/bareos/bareos-dir.conf - chmod 640 /etc/bareos/bareos-dir.conf + #for dir in /etc/bareos/bareos-dir-export/ /etc/bareos/bareos-dir-export/client; do + #chown bareos:bareos "$dir" + #chmod 750 "$dir" + #done } diff --git a/bareos-filedaemon.install b/bareos-filedaemon.install index 60f03d6257c3..a1c9ef8e72c7 100644 --- a/bareos-filedaemon.install +++ b/bareos-filedaemon.install @@ -3,6 +3,6 @@ post_install() { /usr/lib/bareos/scripts/bareos-config initialize_local_hostname /usr/lib/bareos/scripts/bareos-config initialize_passwords - chown root:bareos /etc/bareos/bareos-fd.conf - chmod 640 /etc/bareos/bareos-fd.conf + chown -R bareos:bareos /etc/bareos/bareos-fd.d/ + chmod -R 750 /etc/bareos/bareos-fd.d/ } diff --git a/bareos-storage-fifo.install b/bareos-storage-fifo.install deleted file mode 100644 index 23cce62348ac..000000000000 --- a/bareos-storage-fifo.install +++ /dev/null @@ -1,4 +0,0 @@ -## arg 1: the new package version -post_install() { - chown root:bareos /etc/bareos/bareos-sd.d/device-fifo.conf -} diff --git a/bareos-storage-tape.install b/bareos-storage-tape.install deleted file mode 100644 index f1e01622ffe4..000000000000 --- a/bareos-storage-tape.install +++ /dev/null @@ -1,4 +0,0 @@ -## arg 1: the new package version -post_install() { - chown root:bareos /etc/bareos/bareos-sd.d/device-tape-with-autoloader.conf -} diff --git a/bareos-storage.install b/bareos-storage.install index 9ffd7d99feb5..e9b50201aedc 100644 --- a/bareos-storage.install +++ b/bareos-storage.install @@ -3,10 +3,11 @@ post_install() { /usr/lib/bareos/scripts/bareos-config initialize_local_hostname /usr/lib/bareos/scripts/bareos-config initialize_passwords - chown root:bareos /etc/bareos/bareos-sd.conf - chown root:bareos /etc/bareos/bareos-sd.d - chown root:bareos /var/lib/bareos/storage/ - chmod 640 /etc/bareos/bareos-sd.conf + chown -R bareos:bareos /etc/bareos/bareos-sd.d + chmod -R 750 /etc/bareos/bareos-sd.d + + chown bareos:bareos /var/lib/bareos/storage/ + chmod 750 /var/lib/bareos/storage/ /usr/lib/bareos/scripts/bareos-config setup_sd_user } |