summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Fulz2019-10-23 02:28:50 +0200
committerMatthias Fulz2019-10-23 02:28:50 +0200
commitbd9f654b768874c7e79348af5b5d2945bfbb02f7 (patch)
tree9f7ea5dc686201fcc338f13ccac68e206a640928
parent0b2d49c69dca5a15bf95b44ae838f2719f7d06e3 (diff)
downloadaur-bd9f654b768874c7e79348af5b5d2945bfbb02f7.tar.gz
Update to 18.2.6
-rw-r--r--PKGBUILD190
-rw-r--r--gfapi_device-detect-glfs_ftruncate-API-change.patch77
-rw-r--r--plattforms-archlinux.patch11
3 files changed, 201 insertions, 77 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cc8d4a1552e..37b4b259b3d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Michael Spradling <mike@mspradling.com>
+# Maintainer: Matthias Fulz <mfulz@olznet.net>
# Contributor: Michael Spradling <mike@mspradling.com>
pkgbase='bareos'
@@ -21,62 +21,96 @@ pkgname=("${pkgbase}-common"
"${pkgbase}-filedaemon-python-plugin"
"${pkgbase}-storage-python-plugin")
-pkgver=17.2.7
+pkgmajor=18
+pkgver=18.2.6
pkgrel=1
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')
+makedepends=('libmariadbclient' 'postgresql-libs' 'sqlite3' 'python2' 'cmake' 'rpcsvc-proto')
source=("git+https://github.com/bareos/bareos.git#tag=Release/$pkgver")
md5sums=('SKIP')
prepare() {
cd $pkgbase
- sed -i "s/python-config/python2-config/g" configure
+ patch --forward --strip=1 --input="../../plattforms-archlinux.patch"
+ patch --forward --strip=1 --input="../../gfapi_device-detect-glfs_ftruncate-API-change.patch"
}
build() {
cd $pkgbase
- # 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-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
+ #cmake .\
+ #-DCMAKE_INSTALL_PREFIX=/usr \
+ #-DCMAKE_INSTALL_SBINDIR=/usr/bin \
+ #-DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ #-DCMAKE_INSTALL_LOCALSTATEDIR=/ \
+ #-DCMAKE_INSTALL_LIBDIR=/usr/lib/$pkgbase \
+ #-Dconio=no \
+ #-Ddynamic-cats-backends=yes \
+ #-Ddynamic-storage-backends=yes \
+ #-Drpath=no \
+ #-Dpostgresql=yes \
+ #-Dmysql=yes \
+ #-Dpython=yes \
+ #-Dopenssl=yes \
+ #-Dsqlite3=yes \
+ #-Dlogdir=/var/log/$pkgbase \
+ #-Ddir-user=$pkgbase \
+ #-Ddir-group=$pkgbase \
+ #-Dsd-user=$pkgbase \
+ #-Dsd-group=$pkgbase \
+ #-Dfd-user=root \
+ #-Dfd-group=root \
+ #-Dpid-dir=/run/bareos \
+ #-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 \
+ #-Dsystemd=yes \
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SBINDIR=/usr/bin -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/ -DCMAKE_INSTALL_LIBDIR=/usr/lib/$pkgbase -Dlibdir=/usr/lib/$pkgbase -Dconio=no -Ddynamic-cats-backends=yes -Ddynamic-storage-backends=yes -Drpath=no -Dpostgresql=yes -Dmysql=yes -Dpython=yes -Dopenssl=yes -Dsqlite3=yes -Dlogdir=/var/log/$pkgbase -Ddir-user=$pkgbase -Ddir-group=$pkgbase -Dsd-user=$pkgbase -Dsd-group=$pkgbase -Dfd-user=root -Dfd-group=root -Dpiddir=/run/bareos -Dsubsysdir=/run/bareos -Dconfdir=/etc/$pkgbase -Dconfigtemplatedir=/usr/share/$pkgbase/config -Dworkingdir=/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 -Dsystemd=yes .
+
+ make DESTDIR="$srcdir/install" install
+ #./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-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
}
@@ -92,19 +126,25 @@ package_bareos-common() {
install=bareos-common.install
for f in \
- usr/lib/bareos/libbareos-$pkgver.so \
+ usr/lib/bareos/libbareos.so.$pkgver \
+ usr/lib/bareos/libbareos.so.$pkgmajor \
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/libbareosfind.so.$pkgver \
+ usr/lib/bareos/libbareosfind.so.$pkgmajor \
usr/lib/bareos/libbareosfind.so \
+ usr/lib/bareos/libbareoslmdb.so.$pkgver \
+ usr/lib/bareos/libbareoslmdb.so.$pkgmajor \
+ usr/lib/bareos/libbareoslmdb.so \
+ usr/lib/bareos/libbareosndmp.so.$pkgver \
+ usr/lib/bareos/libbareosndmp.so.$pkgmajor \
+ usr/lib/bareos/libbareosndmp.so \
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
@@ -123,7 +163,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
@@ -134,9 +174,11 @@ 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.$pkgver \
+ usr/lib/bareos/libbareoscats.so.$pkgmajor \
usr/lib/bareos/libbareoscats.so \
- usr/lib/bareos/libbareossql-$pkgver.so \
+ usr/lib/bareos/libbareossql.so.$pkgver \
+ usr/lib/bareos/libbareossql.so.$pkgmajor \
usr/lib/bareos/libbareossql.so \
usr/lib/bareos/scripts/create_bareos_database \
usr/lib/bareos/scripts/drop_bareos_database \
@@ -157,10 +199,10 @@ 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 \
+ usr/lib/bareos/scripts/ddl/grants/mysql-readonly.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 \
@@ -182,7 +224,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 \
@@ -209,7 +250,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 \
@@ -232,8 +272,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
@@ -279,8 +319,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 ' ' '_'`
@@ -288,15 +328,14 @@ package_bareos-director() {
done
# Currently upstream systemd file does not automatically create run directory
- sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos/platforms/systemd/bareos-dir.service
- _cp $srcdir/bareos/platforms/systemd/bareos-dir.service $pkgdir/usr/lib/systemd/system/bareos-dir.service
+ sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos/core/platforms/systemd/bareos-dir.service
+ _cp $srcdir/bareos/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 \
@@ -316,12 +355,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
@@ -340,14 +379,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/platforms/systemd/bareos-fd.service
- _cp $srcdir/bareos/platforms/systemd/bareos-fd.service $pkgdir/usr/lib/systemd/system/bareos-fd.service
+ sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos/core/platforms/systemd/bareos-fd.service
+ _cp $srcdir/bareos/core/platforms/systemd/bareos-fd.service $pkgdir/usr/lib/systemd/system/bareos-fd.service
}
package_bareos-storage() {
@@ -364,8 +403,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
@@ -373,8 +411,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/platforms/systemd/bareos-sd.service
- _cp $srcdir/bareos/platforms/systemd/bareos-sd.service $pkgdir/usr/lib/systemd/system/bareos-sd.service
+ sed -i '/\[Service\]/a RuntimeDirectory=bareos' $srcdir/bareos/core/platforms/systemd/bareos-sd.service
+ _cp $srcdir/bareos/core/platforms/systemd/bareos-sd.service $pkgdir/usr/lib/systemd/system/bareos-sd.service
}
package_bareos-storage-tape() {
@@ -387,13 +425,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/gfapi_device-detect-glfs_ftruncate-API-change.patch b/gfapi_device-detect-glfs_ftruncate-API-change.patch
new file mode 100644
index 00000000000..22fd7646ad6
--- /dev/null
+++ b/gfapi_device-detect-glfs_ftruncate-API-change.patch
@@ -0,0 +1,77 @@
+From 2ce2c58782840efbc33db029add4aba4611096f5 Mon Sep 17 00:00:00 2001
+From: Philipp Storz <philipp.storz@bareos.com>
+Date: Wed, 10 Jul 2019 21:21:49 +0200
+Subject: [PATCH] gfapi_device: detect glfs_ftruncate API change (Fedora 30)
+
+... and redefine glfs_ftruncate() to fix the problem
+---
+ core/cmake/BareosCheckSymbols.cmake | 16 ++++++++++++++++
+ core/src/include/config.h.in | 3 +++
+ core/src/stored/backends/gfapi_device.h | 6 +++++-
+ 3 files changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/core/cmake/BareosCheckSymbols.cmake b/core/cmake/BareosCheckSymbols.cmake
+index 7ddb95d..53023a1 100644
+--- a/core/cmake/BareosCheckSymbols.cmake
++++ b/core/cmake/BareosCheckSymbols.cmake
+@@ -47,3 +47,19 @@ CHECK_SYMBOL_EXISTS(rados_ioctx_set_namespace rados/librados.h HAVE_RADOS_NAMES
+ CHECK_SYMBOL_EXISTS(rados_nobjects_list_open rados/librados.h HAVE_RADOS_NOBJECTS_LIST)
+ cmake_pop_check_state()
+
++
++IF(HAVE_GLUSTERFS_API_GLFS_H)
++cmake_push_check_state()
++set (CMAKE_REQUIRED_LIBRARIES ${GFAPI_LIBRARIES})
++check_cxx_source_compiles("
++#include <glusterfs/api/glfs.h>
++int main(void)
++{
++ /* new glfs_ftruncate() passes two additional args */
++ return glfs_ftruncate(NULL, 0, NULL, NULL);
++}
++"
++GLFS_FTRUNCATE_HAS_FOUR_ARGS)
++
++endif()
++cmake_pop_check_state()
+diff --git a/core/src/include/config.h.in b/core/src/include/config.h.in
+index 5a14cbc..d5a8810 100644
+--- a/core/src/include/config.h.in
++++ b/core/src/include/config.h.in
+@@ -391,6 +391,9 @@
+ /* Define to 1 if you have gfapi lib */
+ #cmakedefine HAVE_GFAPI @HAVE_GFAPI@
+
++/* Define to 1 if the `glfs_ftruncate' function has four arguments. */
++#cmakedefine GLFS_FTRUNCATE_HAS_FOUR_ARGS @GLFS_FTRUNCATE_HAS_FOUR_ARGS@
++
+ /* Define to 1 if you have the `glfs_readdirplus' function. */
+ #cmakedefine HAVE_GLFS_READDIRPLUS @HAVE_GLFS_READDIRPLUS@
+
+diff --git a/core/src/stored/backends/gfapi_device.h b/core/src/stored/backends/gfapi_device.h
+index 841895d..adfe08e 100644
+--- a/core/src/stored/backends/gfapi_device.h
++++ b/core/src/stored/backends/gfapi_device.h
+@@ -2,7 +2,7 @@
+ BAREOSĀ® - Backup Archiving REcovery Open Sourced
+
+ Copyright (C) 2014-2014 Planets Communications B.V.
+- Copyright (C) 2014-2014 Bareos GmbH & Co. KG
++ Copyright (C) 2014-2019 Bareos GmbH & Co. KG
+
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version three of the GNU Affero General Public
+@@ -30,6 +30,10 @@
+
+ #include <api/glfs.h>
+
++#if defined GLFS_FTRUNCATE_HAS_FOUR_ARGS
++#define glfs_ftruncate(fd, offset) glfs_ftruncate(fd, offset, NULL, NULL)
++#endif
++
+ namespace storagedaemon {
+
+ class gfapi_device: public Device {
+--
+2.9.3
+
diff --git a/plattforms-archlinux.patch b/plattforms-archlinux.patch
new file mode 100644
index 00000000000..db5a414a092
--- /dev/null
+++ b/plattforms-archlinux.patch
@@ -0,0 +1,11 @@
+--- bareos/core/platforms/CMakeLists.txt 2019-10-23 00:04:57.740580637 +0200
++++ bareosb/core/platforms/CMakeLists.txt 2019-10-23 00:54:08.225875749 +0200
+@@ -27,6 +27,8 @@
+ add_subdirectory(debian)
+ elseif (${DISTNAME} STREQUAL hpux)
+ MESSAGE( STATUS "DISTNAME: " ${DISTNAME} )
++ elseif (${DISTNAME} STREQUAL archlinux)
++ MESSAGE( STATUS "DISTNAME: " ${DISTNAME} )
+ else()
+ add_subdirectory(${DISTNAME})
+ endif()