summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bareos/PKGBUILD176
-rw-r--r--bareos/nullify-os-specifics.patch11
2 files changed, 97 insertions, 90 deletions
diff --git a/bareos/PKGBUILD b/bareos/PKGBUILD
index ce31f1270..1f16945a5 100644
--- a/bareos/PKGBUILD
+++ b/bareos/PKGBUILD
@@ -21,71 +21,76 @@ pkgname=("${pkgbase}-common"
"${pkgbase}-filedaemon-python-plugin"
"${pkgbase}-storage-python-plugin")
-pkgver=17.2.7
-pkgrel=3
+pkgver=18.2.6
+pkgrel=2
arch=(i686 x86_64 armv7h aarch64)
groups=('bareos')
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
url="http://www.bareos.org"
license=('AGPL3')
-makedepends=('libmariadbclient' 'postgresql-libs' 'sqlite3' 'python2')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/$pkgbase/$pkgbase/archive/Release/$pkgver.tar.gz")
-md5sums=('SKIP')
+makedepends=('cmake' 'ceph' 'libmariadbclient' 'postgresql-libs' 'sqlite3' 'python2')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/$pkgbase/$pkgbase/archive/Release/$pkgver.tar.gz"
+'nullify-os-specifics.patch')
+sha512sums=('b6618173a803db4cfc3fe7edfe8c9e4e4128195f44383cd7df5b9866da4290686ed7cb42499edec957a5d9ab8bbd92d26258ce58f13fba84fb569167956768c3'
+ '0d6683bb21e06e005b4d5f7dd31d24adac0001ab202ccd806d31af1fda48a1a78156a18e8cc8847b80a7de01c0b58fa6ab7a1ba7f8f056d0de414c472db11643')
prepare() {
- cd $pkgbase-Release-$pkgver
- sed -i "s/python-config/python2-config/g" configure
+ cd "${srcdir}/${pkgbase}-Release-${pkgver}"
+ patch -p1 -i "${srcdir}/nullify-os-specifics.patch"
}
build() {
cd $pkgbase-Release-$pkgver
-
- # Disable cephfs, broken
- sed -i 's/have_cephfs=\"yes\"/have_cephfs=\"no\"/' ./configure
-
- ./configure \
- --prefix=/usr \
- --sbindir=/usr/bin \
- --sysconfdir=/etc \
- --localstatedir=/ \
- --libdir=/usr/lib/$pkgbase \
- --disable-conio \
- --enable-dynamic-cats-backends \
- --enable-dynamic-storage-backends \
- --with-python \
- --with-openssl \
- --with-mysql \
- --disable-rpath \
- --with-postgresql \
- --with-sqlite3 \
- --with-hostname='XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX' \
- --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
- --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
- --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
- --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
- --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
- --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
- --with-basename="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \
- --with-hostname="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \
- --with-logdir=/var/log/$pkgbase \
- --with-dir-user=$pkgbase \
- --with-dir-group=$pkgbase \
- --with-sd-user=$pkgbase \
- --with-sd-group=$pkgbase \
- --with-fd-user=root \
- --with-pid-dir=/run/bareos \
- --with-fd-group=root \
- --with-configtemplatedir=/usr/share/$pkgbase/config \
- --with-working-dir=/var/lib/$pkgbase \
- --with-plugindir=/usr/lib/$pkgbase/plugins \
- --with-scriptdir=/usr/lib/$pkgbase/scripts \
- --with-backenddir=/usr/lib/$pkgbase/backends \
- --with-archivedir=/var/lib/$pkgbase/storage \
- --with-bsrdir=/var/lib/$pkgbase \
- --with-subsys-dir=/run/$pkgbase \
- --with-systemd && make
-
- make DESTDIR="$srcdir/install" install install-autostart
+ mkdir build
+ cd build
+
+ cmake .. \
+ -Dprefix=/usr \
+ -Dsbindir=/usr/bin \
+ -Dsysconfdir=/etc \
+ -Dconfdir=/etc/$pkgbase \
+ -Dworkingdir=/etc/$pkgbase \
+ -Dlocalstatedir=/ \
+ -Dlibdir=/usr/lib/$pkgbase \
+ -Dmandir=/usr/share/man \
+ -Ddisable-conio=yes \
+ -Ddynamic-cats-backends=yes \
+ -Ddynamic-storage-backends=yes \
+ -Dpython=yes \
+ -Dopenssl=yes \
+ -Dmysql=yes \
+ -Ddisable-rpath=yes \
+ -Dpostgresql=yes \
+ -Dsqlite3=yes \
+ -Dndmp=no \
+ -Dhostname='XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX' \
+ -Ddir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
+ -Dfd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
+ -Dsd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
+ -Dmon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
+ -Dmon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
+ -Dmon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
+ -Dbasename="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \
+ -Dlogdir=/var/log/$pkgbase \
+ -Ddir-user=$pkgbase \
+ -Ddir-group=$pkgbase \
+ -Dsd-user=$pkgbase \
+ -Dsd-group=$pkgbase \
+ -Dfd-user=root \
+ -Dpid-dir=/run/bareos \
+ -Dfd-group=root \
+ -Dconfigtemplatedir=/usr/share/$pkgbase/config \
+ -Dworking-dir=/var/lib/$pkgbase \
+ -Dplugindir=/usr/lib/$pkgbase/plugins \
+ -Dscriptdir=/usr/lib/$pkgbase/scripts \
+ -Dbackenddir=/usr/lib/$pkgbase/backends \
+ -Darchivedir=/var/lib/$pkgbase/storage \
+ -Dbsrdir=/var/lib/$pkgbase \
+ -Dsubsys-dir=/run/$pkgbase \
+ -Dsystemd=yes
+
+ make
+ make DESTDIR="$srcdir/install" install
}
@@ -101,19 +106,17 @@ package_bareos-common() {
install=bareos-common.install
for f in \
- usr/lib/bareos/libbareos-$pkgver.so \
usr/lib/bareos/libbareos.so \
- usr/lib/bareos/libbareoscfg-$pkgver.so \
- usr/lib/bareos/libbareoscfg.so \
- usr/lib/bareos/libbareosfind-$pkgver.so \
+ usr/lib/bareos/libbareos.so.$pkgver \
usr/lib/bareos/libbareosfind.so \
+ usr/lib/bareos/libbareosfind.so.$pkgver \
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.gz \
- usr/share/man/man8/btraceback.8.gz \
+ usr/share/man/man1/bsmtp.1 \
+ usr/share/man/man8/btraceback.8 \
; do
_cp $srcdir/install/$f $pkgdir/$f
done
@@ -132,7 +135,7 @@ package_bareos-bconsole() {
for f in \
usr/share/bareos/config/bconsole.conf \
usr/bin/bconsole \
- usr/share/man/man1/bconsole.1.gz \
+ usr/share/man/man1/bconsole.1 \
; do
_cp $srcdir/install/$f $pkgdir/$f
done
@@ -143,10 +146,10 @@ package_bareos-database-common() {
depends=("bareos-common=$pkgver" 'libcap' 'lzo' 'zlib' 'openssl' 'bash' 'jansson')
for f in \
- usr/lib/bareos/libbareoscats-$pkgver.so \
usr/lib/bareos/libbareoscats.so \
- usr/lib/bareos/libbareossql-$pkgver.so \
+ usr/lib/bareos/libbareoscats.so.$pkgver \
usr/lib/bareos/libbareossql.so \
+ usr/lib/bareos/libbareossql.so.$pkgver \
usr/lib/bareos/scripts/create_bareos_database \
usr/lib/bareos/scripts/drop_bareos_database \
usr/lib/bareos/scripts/drop_bareos_tables \
@@ -166,7 +169,6 @@ package_bareos-database-mysql() {
install=bareos-database-mysql.install
for f in \
- usr/lib/bareos/backends/libbareoscats-mysql-$pkgver.so \
usr/lib/bareos/backends/libbareoscats-mysql.so \
usr/lib/bareos/scripts/ddl/drops/mysql.sql \
usr/lib/bareos/scripts/ddl/grants/mysql.sql \
@@ -191,7 +193,6 @@ package_bareos-database-postgresql() {
install='bareos-database-postgresql.install'
for f in \
- usr/lib/bareos/backends/libbareoscats-postgresql-$pkgver.so \
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 \
@@ -218,7 +219,6 @@ package_bareos-database-sqlite3() {
depends=("bareos-database-common=$pkgver" "sqlite3")
for f in \
- usr/lib/bareos/backends/libbareoscats-sqlite3-$pkgver.so \
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 \
@@ -241,8 +241,8 @@ package_bareos-database-tools() {
for f in \
usr/bin/bareos-dbcheck \
usr/bin/bscan \
- usr/share/man/man8/bareos-dbcheck.8.gz \
- usr/share/man/man8/bscan.8.gz \
+ usr/share/man/man8/bareos-dbcheck.8 \
+ usr/share/man/man8/bscan.8 \
; do
_cp $srcdir/install/$f $pkgdir/$f
done
@@ -288,8 +288,8 @@ package_bareos-director() {
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.gz \
- usr/share/man/man8/bareos.8.gz \
+ 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 ' ' '_'`
@@ -297,15 +297,14 @@ package_bareos-director() {
done
# Currently upstream systemd file does not automatically create run directory
- sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos-Release-$pkgver/platforms/systemd/bareos-dir.service
- _cp $srcdir/bareos-Release-$pkgver/platforms/systemd/bareos-dir.service $pkgdir/usr/lib/systemd/system/bareos-dir.service
+ 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
}
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-$pkgver.so \
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 \
@@ -325,12 +324,12 @@ package_bareos-tools() {
usr/bin/bextract \
usr/bin/bls \
usr/bin/bpluginfo \
- usr/share/man/man1/bwild.1.gz \
- usr/share/man/man1/bregex.1.gz \
- usr/share/man/man8/bcopy.8.gz \
- usr/share/man/man8/bextract.8.gz \
- usr/share/man/man8/bls.8.gz \
- usr/share/man/man8/bpluginfo.8.gz \
+ 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
@@ -349,14 +348,14 @@ package_bareos-filedaemon() {
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.gz \
+ usr/share/man/man8/bareos-fd.8 \
; do
_cp $srcdir/install/$f $pkgdir/$f
done
# Currently upstream systemd file does not automatically create run directory
- sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos-Release-$pkgver/platforms/systemd/bareos-fd.service
- _cp $srcdir/bareos-Release-$pkgver/platforms/systemd/bareos-fd.service $pkgdir/usr/lib/systemd/system/bareos-fd.service
+ 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
}
package_bareos-storage() {
@@ -373,8 +372,7 @@ package_bareos-storage() {
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.gz \
- usr/lib/bareos/libbareossd-$pkgver.so \
+ usr/share/man/man8/bareos-sd.8 \
usr/lib/bareos/libbareossd.so \
; do
_cp $srcdir/install/$f $pkgdir/$f
@@ -382,8 +380,8 @@ package_bareos-storage() {
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/platforms/systemd/bareos-sd.service
- _cp $srcdir/bareos-Release-$pkgver/platforms/systemd/bareos-sd.service $pkgdir/usr/lib/systemd/system/bareos-sd.service
+ 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
}
package_bareos-storage-tape() {
@@ -396,13 +394,11 @@ package_bareos-storage-tape() {
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-$pkgver.so \
usr/lib/bareos/backends/libbareossd-gentape.so \
- usr/lib/bareos/backends/libbareossd-tape-$pkgver.so \
usr/lib/bareos/backends/libbareossd-tape.so \
usr/lib/bareos/scripts/mtx-changer \
- usr/share/man/man8/bscrypto.8.gz \
- usr/share/man/man8/btape.8.gz \
+ usr/share/man/man8/bscrypto.8 \
+ usr/share/man/man8/btape.8 \
usr/bin/bscrypto \
usr/bin/btape \
; do
diff --git a/bareos/nullify-os-specifics.patch b/bareos/nullify-os-specifics.patch
new file mode 100644
index 000000000..9f3b79eca
--- /dev/null
+++ b/bareos/nullify-os-specifics.patch
@@ -0,0 +1,11 @@
+--- a/core/platforms/CMakeLists.txt 2019-03-06 15:59:09.475369845 +0100
++++ b/core/platforms/CMakeLists.txt 2019-03-06 15:59:09.475369845 +0100
+@@ -27,8 +27,6 @@
+ add_subdirectory(debian)
+ elseif (${DISTNAME} STREQUAL hpux)
+ MESSAGE( STATUS "DISTNAME: " ${DISTNAME} )
+- else()
+- add_subdirectory(${DISTNAME})
+ endif()
+
+ if (${systemd})