diff options
-rw-r--r-- | .SRCINFO | 295 | ||||
-rw-r--r-- | 0001-distver.patch | 10 | ||||
-rw-r--r-- | 0002-logspam.patch | 31 | ||||
-rw-r--r-- | 0003-version.patch | 12 | ||||
-rw-r--r-- | 0004-sqlspam.patch | 12 | ||||
-rw-r--r-- | 0005-httpd.patch | 13 | ||||
-rw-r--r-- | 0006-hostname.patch | 11 | ||||
-rw-r--r-- | 0007-fix-gcc-13.patch | 138 | ||||
-rw-r--r-- | PKGBUILD | 1013 | ||||
-rw-r--r-- | bareos-bconsole.install | 8 | ||||
-rw-r--r-- | bareos-common.install | 24 | ||||
-rw-r--r-- | bareos-database-mysql.install | 12 | ||||
-rw-r--r-- | bareos-database-postgresql.install | 12 | ||||
-rw-r--r-- | bareos-director.install | 21 | ||||
-rw-r--r-- | bareos-filedaemon.install | 6 | ||||
-rw-r--r-- | bareos-storage.install | 18 | ||||
-rw-r--r-- | bareos-traymonitor.install | 11 |
17 files changed, 1183 insertions, 464 deletions
@@ -1,7 +1,7 @@ pkgbase = bareos - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - pkgver = 17.2.5 - pkgrel = 4 + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced + pkgver = 23.0.1 + pkgrel = 2 url = http://www.bareos.org arch = i686 arch = x86_64 @@ -9,15 +9,42 @@ pkgbase = bareos arch = aarch64 groups = bareos license = AGPL3 + makedepends = cmake + makedepends = gcc makedepends = libmariadbclient makedepends = postgresql-libs - makedepends = sqlite3 - makedepends = python2 - source = git+https://github.com/bareos/bareos.git#tag=Release/17.2.5 + makedepends = python + makedepends = python-setuptools + makedepends = rpcsvc-proto + makedepends = git + makedepends = lsb-release + makedepends = qt5-base + makedepends = glusterfs + makedepends = jansson + makedepends = pam_wrapper + source = git+https://github.com/bareos/bareos.git#tag=Release/23.0.1 + source = 0001-distver.patch + source = 0003-version.patch + source = 0004-sqlspam.patch + source = 0005-httpd.patch md5sums = SKIP + md5sums = 419b0c64af750aa3e8ea668edf464d3e + md5sums = 5bf1233d94dfecc9060746bfb39b9d2b + md5sums = ca4c929a2462cafaead8d0b49e3cebed + md5sums = a6a260808e46c20b1c22aa2efebc3fe1 + +pkgname = bareos-bconsole + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Admin Tool (CLI) + install = bareos-bconsole.install + groups = bareos + groups = bareos-client + depends = bareos-common=23.0.1 + depends = readline + depends = jansson + backup = etc/bareos/bconsole.conf pkgname = bareos-common - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Common files + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Common files install = bareos-common.install depends = libcap depends = openssl @@ -27,18 +54,26 @@ pkgname = bareos-common depends = jansson depends = zlib -pkgname = bareos-bconsole - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Admin Tool (CLI) - install = bareos-bconsole.install - groups = bareos - groups = bareos-client - depends = bareos-common=17.2.5 - depends = readline - depends = jansson +pkgname = bareos-contrib-director-python-plugins + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Backup Archiving Recovery Open Sourced - contributed Director plugins + depends = bareos-common=23.0.1 + depends = bareos-director-python-plugin=23.0.1 + +pkgname = bareos-contrib-filedaemon-python-plugins + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Backup Archiving Recovery Open Sourced - contributed File Daemon plugins + depends = bareos-common=23.0.1 + depends = bareos-filedaemon-python-plugin=23.0.1 + +pkgname = bareos-contrib-tools + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Backup Archiving Recovery Open Sourced - contributed tools + arch = any + depends = python-bareos=23.0.1 + depends = bareos-filedaemon=23.0.1 pkgname = bareos-database-common - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Generic abstration libs and tools for sql catalog - depends = bareos-common=17.2.5 + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Backup Archiving Recovery Open Sourced - common catalog files + depends = bareos-common=23.0.1 + depends = bareos-database-postgresql=23.0.1 depends = libcap depends = lzo depends = zlib @@ -46,81 +81,139 @@ pkgname = bareos-database-common depends = bash depends = jansson -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=17.2.5 - depends = libmariadbclient - provides = bareos-database=17.2.5 - pkgname = bareos-database-postgresql - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for postgresql catalog + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Libs and tools for postgresql catalog install = bareos-database-postgresql.install - depends = bareos-database-common=17.2.5 + depends = bareos-database-common=23.0.1 depends = postgresql-libs - provides = bareos-database=17.2.5 - -pkgname = bareos-database-sqlite3 - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for sqlite3 catalog - depends = bareos-database-common=17.2.5 - depends = sqlite3 - provides = bareos-database=17.2.5 + provides = bareos-database=23.0.1 pkgname = bareos-database-tools - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - CLI tools with database dpendencies (dbcheck, bscan) - depends = bareos-database-common=17.2.5 + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - CLI tools with database dpendencies (dbcheck, bscan) + depends = bareos-database-common=23.0.1 depends = openssl depends = jansson -pkgname = bareos-devel - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Devel headers +pkgname = bareos-director-python-plugins-common + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - This package contains the common files for the python 2 and python 3 director plugins arch = any + depends = bareos-director=23.0.1 + +pkgname = bareos-director-python3-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Python plugin for director daemon + depends = bareos-director=23.0.1 + depends = bareos-director-python-plugins-common=23.0.1 + depends = python + depends = libcap + depends = jansson + depends = lzo + conflicts = bareos-director-python-plugin pkgname = bareos-director - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Director daemon + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Director daemon install = bareos-director.install - depends = bareos-common=17.2.5 + depends = bareos-common=23.0.1 depends = openssl depends = bash depends = jansson -pkgname = bareos-storage-fifo - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - FIFO support for storage daemon - depends = bareos-storage=17.2.5 - depends = zlib +pkgname = bareos-filedaemon-glusterfs-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - GlusterFS plugin for Bareos File daemon + depends = bareos-filedaemon=23.0.1 + depends = glusterfs + +pkgname = bareos-filedaemon-ldap-python-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - LDAP Python plugin for Bareos File daemon + arch = any + depends = bareos-filedaemon=23.0.1 + depends = bareos-filedaemon-python3-plugin=23.0.1 + depends = python-ldap + +pkgname = bareos-filedaemon-libcloud-python-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Libcloud Python plugin for Bareos File daemon + arch = any + depends = bareos-filedaemon=23.0.1 + depends = python-apache-libcloud + +pkgname = bareos-filedaemon-mariabackup-python-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - MariaBackup plugin for Bareos File daemon + arch = any + depends = bareos-filedaemon=23.0.1 + depends = mariadb + +pkgname = bareos-filedaemon-percona-xtrabackup-python-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - XtraBackup plugin for Bareos File daemon + arch = any + depends = bareos-filedaemon=23.0.1 + depends = xtrabackup + +pkgname = bareos-filedaemon-postgresql-python-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - PostgreSQL plugin for Bareos File daemon + arch = any + depends = bareos-filedaemon=23.0.1 + depends = postgresql + +pkgname = bareos-filedaemon-python-plugins-common + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - This package contains the common files for the python 2 and python 3 filedaemon plugins + arch = any + depends = bareos-filedaemon=23.0.1 + +pkgname = bareos-filedaemon-python3-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Python plugin for file daemon + depends = bareos-filedaemon=23.0.1 + depends = bareos-filedaemon-python-plugins-common=23.0.1 + depends = python depends = libcap - depends = openssl - depends = jansson depends = lzo - -pkgname = bareos-tools - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - CLI tools (bcopy, bextract, bls, bregeq, bwild) - depends = bareos-common=17.2.5 - depends = glibc + depends = jansson + conflicts = bareos-filedaemon-python-plugin pkgname = bareos-filedaemon - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - File daemon + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - File daemon install = bareos-filedaemon.install groups = bareos groups = bareos-client - depends = bareos-common=17.2.5 + depends = bareos-common=23.0.1 depends = jansson depends = zlib depends = gcc-libs -pkgname = bareos-storage - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Storage daemon - install = bareos-storage.install - depends = bareos-common=17.2.5 +pkgname = bareos-storage-droplet + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Droplet support for storage daemon + depends = bareos-storage=23.0.1 + +pkgname = bareos-storage-fifo + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - FIFO support for storage daemon + depends = bareos-storage=23.0.1 depends = zlib - depends = lzo - depends = jansson + depends = libcap depends = openssl + depends = jansson + depends = lzo + +pkgname = bareos-storage-glusterfs + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - GlusterFS support for storage daemon + depends = bareos-storage=23.0.1 + depends = glusterfs + +pkgname = bareos-storage-python-plugins-common + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - This package contains the common files for the python 2 and python 3 storage plugins + arch = any + depends = bareos-storage=23.0.1 + +pkgname = bareos-storage-python3-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Python plugin for storage daemon + depends = bareos-storage=23.0.1 + depends = bareos-storage-python-plugins-common=23.0.1 + depends = python + depends = lzo depends = libcap + depends = jansson + conflicts = bareos-storage-python-plugin pkgname = bareos-storage-tape - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Tape support for storage daemon - depends = bareos-storage=17.2.5 + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Tape support for storage daemon + depends = bareos-storage=23.0.1 depends = zlib depends = libcap depends = bash @@ -130,30 +223,70 @@ pkgname = bareos-storage-tape depends = mtx 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=17.2.5 - depends = libcap - depends = jansson +pkgname = bareos-storage + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Storage daemon + install = bareos-storage.install + depends = bareos-common=23.0.1 + depends = zlib depends = lzo - depends = python - depends = python2 - -pkgname = bareos-filedaemon-python-plugin - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for file daemon - depends = bareos-filedaemon=17.2.5 - depends = python - depends = python2 + depends = jansson + depends = openssl depends = libcap - depends = lzo + +pkgname = bareos-tools + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - CLI tools (bcopy, bextract, bls, bregeq, bwild, bregex) + depends = bareos-common=23.0.1 + depends = glibc + +pkgname = bareos-traymonitor + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - This package contains the tray monitor (QT based) + install = bareos-traymonitor.install + groups = bareos + groups = bareos-client + depends = bareos-common=23.0.1 + backup = etc/bareos/tray-monitor.d/monitor/bareos-mon.conf + +pkgname = bareos-vmware-plugin + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Bareos VMware plugin + arch = any + depends = bareos-vadp-dumper=23.0.1 + depends = bareos-common=23.0.1 + optdepends = bareos-filedaemon-python3-plugin=23.0.1 + +pkgname = bareos-webui + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Webui (Bareos web administration) + arch = any depends = jansson + backup = etc/bareos-webui/directors.ini + backup = etc/bareos-webui/configuration.ini + backup = etc/bareos/bareos-dir.d/console/admin.conf.example + backup = etc/bareos/bareos-dir.d/profile/webui-admin.conf -pkgname = bareos-storage-python-plugin - pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for storage daemon - depends = bareos-storage=17.2.5 - depends = python2 - depends = lzo +pkgname = bareos-webui-apache + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Webui Apache + arch = any + depends = apache + depends = php-apache + depends = php + depends = php-fpm + depends = php-pgsql + backup = etc/httpd/conf/extra/bareos-webui.conf + +pkgname = bareos-webui-nginx + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Webui nginx + arch = any + depends = nginx + depends = php + depends = php-fpm + depends = php-pgsql + backup = etc/nginx/bareos-webui.conf + +pkgname = bareos-devel + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - Devel headers + arch = any + +pkgname = python-bareos + pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - python-bareos is a Python module to access a backup system. depends = python - depends = libcap + depends = python-sslpsk depends = jansson - diff --git a/0001-distver.patch b/0001-distver.patch new file mode 100644 index 000000000000..855e1520cf2d --- /dev/null +++ b/0001-distver.patch @@ -0,0 +1,10 @@ +--- core/cmake/distname.sh 2021-12-23 02:16:52.596202300 +0100 ++++ core/cmake/distname.sh 2021-12-23 02:18:31.430250149 +0100 +@@ -181,6 +181,7 @@ else + elif test -f /etc/arch-release + then + PLATFORM=archlinux ++ DISTVER="Arch Linux" + elif test "$CYGWIN" = yes + then + PLATFORM=cygwin diff --git a/0002-logspam.patch b/0002-logspam.patch new file mode 100644 index 000000000000..18f6d5b1faa5 --- /dev/null +++ b/0002-logspam.patch @@ -0,0 +1,31 @@ +--- core/src/lib/bsock.cc.orig 2021-12-23 08:56:38.194359400 +0100 ++++ core/src/lib/bsock.cc 2021-12-23 10:22:09.320240831 +0100 +@@ -584,10 +584,10 @@ bool BareosSocket::DoTlsHandshake(TlsPol + if (!initiated_by_remote) { + if (tls_conn) { + tls_conn->TlsLogConninfo(jcr, host(), port(), who()); +- } else { ++ } /* else { + Qmsg(jcr, M_INFO, 0, _("Connected %s at %s:%d, encryption: None\n"), + who(), host(), port()); +- } ++ } */ + } + return true; + } +--- core/src/lib/tls_openssl.cc.orig 2021-12-23 08:56:38.204359200 +0100 ++++ core/src/lib/tls_openssl.cc 2021-12-23 10:22:31.872857179 +0100 +@@ -107,11 +107,11 @@ void TlsOpenSsl::TlsLogConninfo(JobContr + if (!d_->openssl_) { + Qmsg(jcr, M_INFO, 0, _("No openssl to %s at %s:%d established\n"), who, + host, port); +- } else { ++ } /* else { + std::string cipher_name = TlsCipherGetName(); + Qmsg(jcr, M_INFO, 0, _("Connected %s at %s:%d, encryption: %s\n"), who, + host, port, cipher_name.empty() ? "Unknown" : cipher_name.c_str()); +- } ++ } */ + } + + /* diff --git a/0003-version.patch b/0003-version.patch new file mode 100644 index 000000000000..96440ac549db --- /dev/null +++ b/0003-version.patch @@ -0,0 +1,12 @@ +--- core/src/lib/CMakeLists.txt.orig 2021-12-23 11:28:53.968803800 +0100 ++++ core/src/lib/CMakeLists.txt 2021-12-23 11:42:18.538613886 +0100 +@@ -147,6 +147,9 @@ + -DBAREOS_SHORT_DATE="${BAREOS_SHORT_DATE}" + -DBAREOS_PROG_DATE_TIME="${BAREOS_PROG_DATE_TIME}" + -DBAREOS_YEAR="${BAREOS_YEAR}" ++ -DBAREOS_BINARY_INFO="${BAREOS_BINARY_INFO}" ++ -DBAREOS_SERVICES_MESSAGE="${BAREOS_SERVICES_MESSAGE}" ++ -DBAREOS_JOBLOG_MESSAGE="${BAREOS_JOBLOG_MESSAGE}" + ) + set_target_properties(version-obj PROPERTIES POSITION_INDEPENDENT_CODE ON) + diff --git a/0004-sqlspam.patch b/0004-sqlspam.patch new file mode 100644 index 000000000000..1882f0c6b988 --- /dev/null +++ b/0004-sqlspam.patch @@ -0,0 +1,12 @@ +--- core/src/dird/ua_prune.cc.orig 2021-12-23 12:29:52.844307700 +0100 ++++ core/src/dird/ua_prune.cc 2021-12-23 14:58:31.874042423 +0100 +@@ -585,7 +585,9 @@ bail_out: + + static void DropTempTables(UaContext* ua) + { ++ ua->db->SqlQuery("SET client_min_messages = warning"); + ua->db->SqlQuery(BareosDb::SQL_QUERY::drop_deltabs); ++ ua->db->SqlQuery("SET client_min_messages = notice"); + } + + static bool CreateTempTables(UaContext* ua) diff --git a/0005-httpd.patch b/0005-httpd.patch new file mode 100644 index 000000000000..247ba934e6ba --- /dev/null +++ b/0005-httpd.patch @@ -0,0 +1,13 @@ +--- webui/CMakeLists.txt.orig 2023-03-03 21:55:18.000000000 +0200 ++++ webui/CMakeLists.txt 2023-03-03 22:01:47.835425931 +0200 +@@ -66,7 +66,9 @@ + message(" BAREOS_FULL_VERSION: ${BAREOS_FULL_VERSION} ") + message(" LocalBuildDefinitionsFile: ${BareosLocalBuildDefinitionsFile}") + +-if(EXISTS ${sysconfdir}/httpd/conf.d) ++if(EXISTS ${sysconfdir}/httpd/conf/extra ) ++ set(HTTPD_CONF ${sysconfdir}/httpd/conf/extra ) ++elseif(EXISTS ${sysconfdir}/httpd/conf.d) + set(HTTPD_CONF ${sysconfdir}/httpd/conf.d) + elseif(EXISTS ${sysconfdir}/apache2/conf.d) + set(HTTPD_CONF ${sysconfdir}/apache2/conf.d) diff --git a/0006-hostname.patch b/0006-hostname.patch new file mode 100644 index 000000000000..ac9be85634d8 --- /dev/null +++ b/0006-hostname.patch @@ -0,0 +1,11 @@ +--- core/scripts/bareos-config-lib.sh.in.orig 2023-03-03 18:31:34.000000000 +0200 ++++ core/scripts/bareos-config-lib.sh.in 2023-03-03 18:58:35.163665093 +0200 +@@ -998,7 +998,7 @@ + { + # put actual short hostname in configuration files + # try to get short hostname +- hname=$(hostname -s) ++ hname=$(hostnamectl hostname) + if [ -z "${hname}" ]; then + # try to get long hostname + hname=$(hostname|sed 's/\..*//g') diff --git a/0007-fix-gcc-13.patch b/0007-fix-gcc-13.patch new file mode 100644 index 000000000000..a0b32879ccc2 --- /dev/null +++ b/0007-fix-gcc-13.patch @@ -0,0 +1,138 @@ +From 2bb7d74215bf6ae4f350de11bff04b68cf3c82b3 Mon Sep 17 00:00:00 2001 +From: Bruno Friedmann <bruno.friedmann@bareos.com> +Date: Mon, 27 Mar 2023 13:22:11 +0200 +Subject: [PATCH] core: fixes for gcc-13 support + +- add explicit system_error and stdexcept +- console_conf.cc fix std::move warning + +Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com> +--- + core/src/cats/cats.h | 2 ++ + core/src/console/console_conf.cc | 4 ++-- + core/src/lib/thread_list.cc | 3 ++- + core/src/lib/thread_specific_data.cc | 3 ++- + core/src/lib/thread_specific_data.h | 3 ++- + core/src/lib/thread_specific_data_key.h | 4 +++- + 6 files changed, 13 insertions(+), 6 deletions(-) + +diff --git core/src/cats/cats.h.orig core/src/cats/cats.h +index 7a6641b3f72..edb5ecbe38b 100644 +--- core/src/cats/cats.h.orig ++++ core/src/cats/cats.h +@@ -41,6 +41,8 @@ + #include "lib/output_formatter.h" + + #include <string> ++#include <stdexcept> ++#include <system_error> + #include <vector> + template <typename T> class dlist; + +diff --git core/src/console/console_conf.cc.orig core/src/console/console_conf.cc +index 9d3aecead2b..f0c0402744e 100644 +--- core/src/console/console_conf.cc.orig ++++ core/src/console/console_conf.cc +@@ -3,7 +3,7 @@ + + Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + Copyright (C) 2011-2012 Planets Communications B.V. +- Copyright (C) 2013-2022 Bareos GmbH & Co. KG ++ Copyright (C) 2013-2023 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 +@@ -203,7 +203,7 @@ static bool SaveResource(int type, ResourceItem* items, int pass) + res_dir->resource_name_); + } else { + p->tls_cert_.allowed_certificate_common_names_ +- = std::move(p->tls_cert_.allowed_certificate_common_names_); ++ = std::move(res_dir->tls_cert_.allowed_certificate_common_names_); + } + break; + } +diff --git core/src/lib/thread_list.cc.orig core/src/lib/thread_list.cc +index 50aefb8ee2d..05607124a55 100644 +--- core/src/lib/thread_list.cc.orig ++++ core/src/lib/thread_list.cc +@@ -1,7 +1,7 @@ + /* + BAREOSĀ® - Backup Archiving REcovery Open Sourced + +- Copyright (C) 2019-2022 Bareos GmbH & Co. KG ++ Copyright (C) 2019-2023 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 +@@ -32,6 +32,7 @@ + #include <memory> + #include <mutex> + #include <set> ++#include <system_error> + #include <thread> + + static constexpr int debuglevel{800}; +diff --git core/src/lib/thread_specific_data.cc.orig core/src/lib/thread_specific_data.cc +index 0953f5c125a..22a98c4a759 100644 +--- core/src/lib/thread_specific_data.cc.orig ++++ core/src/lib/thread_specific_data.cc +@@ -3,7 +3,7 @@ + + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. + Copyright (C) 2011-2012 Planets Communications B.V. +- Copyright (C) 2019-2019 Bareos GmbH & Co. KG ++ Copyright (C) 2019-2023 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 +@@ -25,6 +25,7 @@ + #include "lib/thread_specific_data.h" + #include "lib/thread_specific_data_key.h" + #include "include/jcr.h" ++#include <system_error> + + JobControlRecord* GetJcrFromThreadSpecificData() + { +diff --git core/src/lib/thread_specific_data.h.orig core/src/lib/thread_specific_data.h +index 4bd4dedafae..4c427d171c0 100644 +--- core/src/lib/thread_specific_data.h.orig ++++ core/src/lib/thread_specific_data.h +@@ -3,7 +3,7 @@ + + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. + Copyright (C) 2011-2012 Planets Communications B.V. +- Copyright (C) 2019-2021 Bareos GmbH & Co. KG ++ Copyright (C) 2019-2023 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 +@@ -24,6 +24,7 @@ + #ifndef BAREOS_LIB_THREAD_SPECIFIC_DATA_H_ + #define BAREOS_LIB_THREAD_SPECIFIC_DATA_H_ + ++ + class JobControlRecord; + + JobControlRecord* GetJcrFromThreadSpecificData(); +diff --git core/src/lib/thread_specific_data_key.h.orig core/src/lib/thread_specific_data_key.h +index 9c02c07f47e..c8c63c757fe 100644 +--- core/src/lib/thread_specific_data_key.h.orig ++++ core/src/lib/thread_specific_data_key.h +@@ -1,7 +1,7 @@ + /* + BAREOSĀ® - Backup Archiving REcovery Open Sourced + +- Copyright (C) 2019-2021 Bareos GmbH & Co. KG ++ Copyright (C) 2019-2023 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 +@@ -22,6 +22,8 @@ + #ifndef BAREOS_LIB_THREAD_SPECIFIC_DATA_KEY_H_ + #define BAREOS_LIB_THREAD_SPECIFIC_DATA_KEY_H_ + ++ ++#include <system_error> + #include "lib/berrno.h" + + #include <mutex> @@ -1,452 +1,823 @@ -# Maintainer: Michael Spradling <mike@mspradling.com> -# Contributor: Daniel Albers <daniel@lbe.rs> +# Maintainer: khvalera <khvalera[at]ukr[dot]net> +# Contributor: Matthias Fulz <mfulz@olznet.net> +# Contributor: Michael Spradling <mike@mspradling.com> pkgbase='bareos' -pkgname=("${pkgbase}-common" - "${pkgbase}-bconsole" - "${pkgbase}-database-common" - "${pkgbase}-database-mysql" - "${pkgbase}-database-postgresql" - "${pkgbase}-database-sqlite3" - "${pkgbase}-database-tools" - "${pkgbase}-devel" - "${pkgbase}-director" - "${pkgbase}-storage-fifo" - "${pkgbase}-tools" - "${pkgbase}-filedaemon" - "${pkgbase}-storage" - "${pkgbase}-storage-tape" - "${pkgbase}-director-python-plugin" - "${pkgbase}-filedaemon-python-plugin" - "${pkgbase}-storage-python-plugin") - -pkgver=17.2.5 -pkgrel=4 +pkgname=("bareos-bconsole" + "bareos-common" + "bareos-contrib-director-python-plugins" + "bareos-contrib-filedaemon-python-plugins" + "bareos-contrib-tools" + "bareos-database-common" + "bareos-database-postgresql" + "bareos-database-tools" + "bareos-director-python-plugins-common" + "bareos-director-python3-plugin" + "bareos-director" + "bareos-filedaemon-glusterfs-plugin" + "bareos-filedaemon-ldap-python-plugin" + "bareos-filedaemon-libcloud-python-plugin" + "bareos-filedaemon-mariabackup-python-plugin" + "bareos-filedaemon-percona-xtrabackup-python-plugin" + "bareos-filedaemon-postgresql-python-plugin" + "bareos-filedaemon-python-plugins-common" + "bareos-filedaemon-python3-plugin" + "bareos-filedaemon" + "bareos-storage-droplet" + "bareos-storage-fifo" + "bareos-storage-glusterfs" + "bareos-storage-python-plugins-common" + "bareos-storage-python3-plugin" + "bareos-storage-tape" + "bareos-storage" + "bareos-tools" + "bareos-traymonitor" + "bareos-vmware-plugin" + "bareos-webui" + "bareos-webui-apache" + "bareos-webui-nginx" + "bareos-devel" + "python-bareos" + ) + +# "bareos-vadp-dumper" +# "bareos-vmware-vix-disklib" + +pkgver=23.0.1 +pkgmajor=${pkgver%%.*} +pkgrel=2 arch=(i686 x86_64 armv7h aarch64) groups=('bareos') -pkgdesc="Bareos - Backup Archiving REcovery Open Sourced" +pkgdesc="Bareos - Backup Archiving Recovery Open Sourced" url="http://www.bareos.org" license=('AGPL3') -makedepends=('libmariadbclient' 'postgresql-libs' 'sqlite3' 'python2') -source=("git+https://github.com/bareos/bareos.git#tag=Release/$pkgver") -md5sums=('SKIP') - +makedepends=('cmake' 'gcc' 'libmariadbclient' 'postgresql-libs' 'python' 'python-setuptools' 'rpcsvc-proto' 'git' 'lsb-release' 'qt5-base' 'glusterfs' 'jansson' 'pam_wrapper') +source=("git+https://github.com/bareos/bareos.git#tag=Release/${pkgver}" + "0001-distver.patch" + "0003-version.patch" + "0004-sqlspam.patch" + "0005-httpd.patch") + +md5sums=('SKIP' + '419b0c64af750aa3e8ea668edf464d3e' + '5bf1233d94dfecc9060746bfb39b9d2b' + 'ca4c929a2462cafaead8d0b49e3cebed' + 'a6a260808e46c20b1c22aa2efebc3fe1' + ) + +python3_ver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))");#" + +#========================================= prepare() { - cd $pkgbase - sed -i "s/python-config/python2-config/g" configure + # Apply maintainer patches + cd "${srcdir}/${pkgbase}" + local _src + local _patch="patch -N -t -p0 -l --no-backup-if-mismatch -i" + for _src in "${source[@]}"; do + _src="${_src%%::*}" + _src="${_src##*/}" + [[ $_src = *.patch ]] || continue + echo "Applying patch $_src..." + $_patch "../$_src" + done } +#========================================= 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 -} - - -_cp() { - mkdir -p "$(dirname $2)" - cp -a "$1" "$2" + cd "${srcdir}/${pkgbase}" + mkdir -p build + cd build + + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_SBINDIR=/usr/bin \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_INSTALL_LOCALSTATEDIR=/ \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib/bareos \ + -Dlibdir=/usr/lib/bareos \ + -Dlogdir=/var/log/bareos \ + -Dpiddir=/run/bareos \ + -Dsubsysdir=/run/bareos \ + -Dconfdir=/etc/bareos \ + -Dconfigtemplatedir=/usr/share/bareos/config \ + -Dworkingdir=/var/lib/bareos \ + -Dplugindir=/usr/lib/bareos/plugins \ + -Dscriptdir=/usr/lib/bareos/scripts \ + -Dbackenddir=/usr/lib/bareos/backends \ + -Darchivedir=/var/lib/bareos/storage \ + -Dbsrdir=/var/lib/bareos \ + -Dwebuiconfdir=/etc/bareos-webui \ + -DBAREOS_BINARY_INFO="Arch Linux" \ + -DBAREOS_JOBLOG_MESSAGE="Arch Linux AUR" \ + -Ddynamic-cats-backends=yes \ + -Ddynamic-storage-backends=yes \ + -Dpostgresql=yes \ + -Dlmdb=yes \ + -Dndmp=yes \ + -Dacl=yes \ + -Dopenssl=yes \ + -Ddir-user=bareos \ + -Ddir-group=bareos \ + -Dsd-user=bareos \ + -Dsd-group=bareos \ + -Dfd-user=root \ + -Dfd-group=root \ + -Dscsi-crypto=yes \ + -Dsystemd=yes \ + -Dtraymonitor=yes \ + -DCMAKE_CXX_FLAGS="-Wno-use-after-free" \ + -DCMAKE_C_FLAGS="-Wno-use-after-free" + + make DESTDIR="${srcdir}/install" install + + cd "${srcdir}/${pkgbase}/python-bareos" + python setup.py build +} + +#========================================= +# + only directory created +# - skip a line +# directory - add recursively an arbitrary directory +cp_pkgdir() { + mkdir -p "$pkgdir" + if [ "${1:0:1}" = "-" ] ; then + return + elif [ "${1:0:1}" = "+" ] ; then + dir_out=$pkgdir/`echo "$1" | sed "s|+||"` + mkdir -p "$dir_out" + return + fi + for n in $1 \ + ; do + echo "Copied: $n" + if [[ "$n" =~ "*" ]]; then + res=1 + ls -l $2/$n > /dev/null 2>&1 && res=0 + if [ ${res} -ne 0 ] ; then + echo -e "\033[41mError:\033[0m missing $2/$n"; + return + fi + files=`find $2/$n -type f,l` + for f in $files \ + ; do + new_dir=$(dirname $pkgdir`echo "$f" | sed "s|$2||"`) + mkdir -p $new_dir + cp -au $f "$new_dir" + done + elif [ -f $2/$n ]; then + # pacman LINT tool currently does not like spaces + #space_removal=`echo $f | tr ' ' '_'` + new_dir=$(dirname $pkgdir/`echo "$n" | sed "s|$2||"`) + new_file=$pkgdir/`echo "${n//\?/_}" | sed "s|$2||"` + mkdir -p $new_dir + cp -au $2/$n $new_file + elif [ -d $2/$n ]; then + new_dir=$(dirname $pkgdir/`echo "$n" | sed "s|$2||"`) + mkdir -p $new_dir + cp -aR $2/$n "$new_dir" + else + echo -e "\033[41mError:\033[0m missing $2/$n"; + return + fi + done +} + +#========================================= +package_bareos-bconsole() { + pkgdesc="${pkgdesc} - Admin Tool (CLI)" + depends=("bareos-common=${pkgver}" 'readline' 'jansson') + groups+=("bareos-client") + install=bareos-bconsole.install + backup=("etc/bareos/bconsole.conf") + + for f in \ + usr/share/bareos/config/bconsole.conf \ + usr/bin/bconsole \ + usr/share/man/man1/bconsole.1* \ + +etc/bareos \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done + install -m640 "${srcdir}/install/usr/share/bareos/config/bconsole.conf" \ + "${pkgdir}/etc/bareos/bconsole.conf" } +#========================================= package_bareos-common() { - # Matches bareos-common.install.in pkgdesc="${pkgdesc} - Common files" depends=('libcap' 'openssl' 'acl' 'bash' 'lzo' 'jansson' 'zlib') 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/libbareosfind.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/lib/bareos/libbareos.so* \ + usr/lib/bareos/libbareosfastlz.so* \ + usr/lib/bareos/libbareosfind.so* \ + usr/lib/bareos/libbareoslmdb.so* \ + usr/lib/bareos/libbareosndmp.so* \ + usr/lib/bareos/libbareossd.so* \ + usr/lib/bareos/scripts/bareos-config \ + usr/lib/bareos/scripts/bareos-config-lib.sh \ + usr/lib/bareos/scripts/bareos-explorer \ + usr/lib/bareos/scripts/btraceback.gdb \ + usr/bin/bsmtp \ + usr/bin/btraceback \ + usr/share/man/man1/bsmtp.1* \ + usr/share/man/man8/btraceback.8* \ + var/lib/bareos \ + +etc/bareos \ + +var/log/bareos \ + +run/bareos \ + +usr/share/licenses/${pkgname} \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done - - install -d $pkgdir/var/lib/bareos - install -d $pkgdir/etc/bareos - install -d $pkgdir/run/bareos + install -Dm644 ${srcdir}/bareos/core/{AGPL-3.0.txt,LICENSE,README.*} "${pkgdir}/usr/share/licenses/${pkgname}/" } -package_bareos-bconsole() { - pkgdesc="${pkgdesc} - Admin Tool (CLI)" - depends=("bareos-common=$pkgver" 'readline' 'jansson') - groups+=('bareos-client') - install=bareos-bconsole.install +#========================================= +package_bareos-contrib-director-python-plugins() { + pkgdesc="${pkgdesc} - Backup Archiving Recovery Open Sourced - contributed Director plugins" + depends=("bareos-common=${pkgver}" "bareos-director-python-plugin=${pkgver}") for f in \ - /usr/share/bareos/config/bconsole.conf \ - usr/bin/bconsole \ - usr/share/man/man1/bconsole.1.gz \ + usr/lib/bareos/plugins/BareosDirPluginNscaSender.py \ + usr/lib/bareos/plugins/bareos-dir-nsca-sender.py \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-database-common() { - pkgdesc="${pkgdesc} - Generic abstration libs and tools for sql catalog" - depends=("bareos-common=$pkgver" 'libcap' 'lzo' 'zlib' 'openssl' 'bash' 'jansson') +#========================================= +package_bareos-contrib-filedaemon-python-plugins() { + pkgdesc="${pkgdesc} - Backup Archiving Recovery Open Sourced - contributed File Daemon plugins" + depends=("bareos-common=${pkgver}" "bareos-filedaemon-python-plugin=${pkgver}") for f in \ - usr/lib/bareos/libbareoscats-$pkgver.so \ - usr/lib/bareos/libbareoscats.so \ - usr/lib/bareos/libbareossql-$pkgver.so \ - usr/lib/bareos/libbareossql.so \ - 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 \ + usr/lib/bareos/plugins/bareos_mysql_dump/* \ + usr/lib/bareos/plugins/bareos_tasks/* \ + usr/lib/bareos/plugins/openvz7/* \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-database-mysql() { - pkgdesc="${pkgdesc} - Libs and tools for mysql catalog" - provides=("bareos-database=$pkgver") - depends=("bareos-database-common=$pkgver" 'libmariadbclient') - install=bareos-database-mysql.install +#========================================= +package_bareos-contrib-tools() { + arch=(any) + pkgdesc="${pkgdesc} - Backup Archiving Recovery Open Sourced - contributed tools" + depends=("python-bareos=${pkgver}" "bareos-filedaemon=${pkgver}") 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/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 \ + usr/bin/bareos-triggerjob.py \ + usr/bin/bsmc \ + etc/bareos/bsmc.conf \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-database-postgresql() { - pkgdesc="${pkgdesc} - Libs and tools for postgresql catalog" - provides=("bareos-database=$pkgver") - depends=("bareos-database-common=$pkgver" "postgresql-libs") - install='bareos-database-postgresql.install' - +#========================================= +package_bareos-database-common() { + pkgdesc="${pkgdesc} - Backup Archiving Recovery Open Sourced - common catalog files" + depends=("bareos-common=${pkgver}" "bareos-database-postgresql=${pkgver}" 'libcap' 'lzo' 'zlib' 'openssl' 'bash' 'jansson') 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 \ - 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 \ + usr/lib/bareos/libbareossql.so* \ + 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 + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-database-sqlite3() { - pkgdesc="${pkgdesc} - Libs and tools for sqlite3 catalog" - provides=("bareos-database=$pkgver") - depends=("bareos-database-common=$pkgver" "sqlite3") +#========================================= +package_bareos-database-postgresql() { + pkgdesc="${pkgdesc} - Libs and tools for postgresql catalog" + provides=("bareos-database=${pkgver}") + depends=("bareos-database-common=${pkgver}" "postgresql-libs") + install=bareos-database-postgresql.install 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 \ - 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 \ + usr/lib/bareos/scripts/ddl/*/postgresql*.sql \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done } +#========================================= package_bareos-database-tools() { pkgdesc="${pkgdesc} - CLI tools with database dpendencies (dbcheck, bscan)" - depends=("bareos-database-common=$pkgver" 'openssl' 'jansson') + depends=("bareos-database-common=${pkgver}" 'openssl' 'jansson') 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/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 + cp_pkgdir "$f" "$srcdir/install" done } +#========================================= package_bareos-devel() { pkgdesc="${pkgdesc} - Devel headers" arch=(any) # TODO - install -d $pkgdir/usr/include/bareos + install -d ${pkgdir}/usr/include/bareos + install -m640 ${srcdir}/bareos/core/src/lib/*.h ${pkgdir}/usr/include/bareos } +#========================================= package_bareos-director() { pkgdesc="${pkgdesc} - Director daemon" - depends=("bareos-common=$pkgver" 'openssl' 'bash' 'jansson') + 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.gz \ - usr/share/man/man8/bareos.8.gz \ - ; do - # pacman LINT tool currently does not like spaces - space_removal=`echo $f | tr ' ' '_'` - _cp "$srcdir/install/$f" "$pkgdir/$space_removal" + etc/logrotate.d/bareos-dir \ + usr/lib/bareos/scripts/delete_catalog_backup \ + usr/lib/bareos/scripts/make_catalog_backup \ + 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/share/bareos/config/bareos-dir.d/user \ + usr/share/bareos/config/tray-monitor.d/director/Director-local*.conf \ + usr/bin/bareos-dir \ + usr/share/man/man8/bareos-dir.8* \ + usr/share/man/man8/bareos.8* \ + usr/lib/systemd/system/bareos-dir.service \ + ; do + cp_pkgdir "$f" "$srcdir/install" 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' ${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') +#========================================= +package_bareos-director-python-plugins-common() { + arch=(any) + pkgdesc="${pkgdesc} - This package contains the common files for the python 2 and python 3 director plugins" + depends=("bareos-director=${pkgver}") + 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 \ + 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 + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-tools() { - pkgdesc="${pkgdesc} - CLI tools (bcopy, bextract, bls, bregeq, bwild)" - depends=("bareos-common=$pkgver" 'glibc') - +#========================================= +package_bareos-director-python3-plugin() { + conflicts=("bareos-director-python-plugin") + pkgdesc="${pkgdesc} - Python plugin for director daemon" + depends=("bareos-director=${pkgver}" + "bareos-director-python-plugins-common=${pkgver}" + 'python' 'libcap' 'jansson' 'lzo') 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.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/lib/bareos/plugins/python3-dir.so \ + usr/lib/python${python3_ver}/site-packages/bareosdir.cpython*.so \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done } +#========================================= package_bareos-filedaemon() { pkgdesc="${pkgdesc} - File daemon" - depends=("bareos-common=$pkgver" 'jansson' 'zlib' 'gcc-libs') + depends=("bareos-common=${pkgver}" 'jansson' 'zlib' 'gcc-libs') 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/share/bareos/config/tray-monitor.d/client/FileDaemon-local*.conf \ + usr/bin/bareos-fd \ + usr/lib/bareos/plugins/bpipe-fd.so \ + usr/share/man/man8/bareos-fd.8* \ + usr/lib/systemd/system/bareos-fd.service \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done + # Currently upstream systemd file does not automatically create run directory + sed -i '/\[Service\]/a RuntimeDirectory=bareos' ${pkgdir}/usr/lib/systemd/system/bareos-fd.service +} +#========================================= +package_bareos-filedaemon-glusterfs-plugin() { + pkgdesc="${pkgdesc} - GlusterFS plugin for Bareos File daemon" + depends=("bareos-filedaemon=${pkgver}" + "glusterfs") 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.gz \ + usr/lib/bareos/plugins/gfapi-fd.so \ + usr/share/bareos/config/bareos-dir.d/fileset/plugin-gfapi.conf.example \ + usr/share/bareos/config/bareos-dir.d/job/BackupGFAPI.conf.example \ + usr/share/bareos/config/bareos-dir.d/job/RestoreGFAPI.conf.example \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" 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 +#========================================= +package_bareos-filedaemon-ldap-python-plugin() { + arch=(any) + pkgdesc="${pkgdesc} - LDAP Python plugin for Bareos File daemon" + depends=("bareos-filedaemon=${pkgver}" + "bareos-filedaemon-python3-plugin=${pkgver}" + 'python-ldap') + #backup=("etc/bareos/bareos-dir.d/plugin-python-ldap.conf") + + for f in \ + usr/lib/bareos/plugins/bareos-fd-ldap.py* \ + usr/share/bareos/config/bareos-dir.d/fileset/plugin-ldap.conf.example \ + usr/share/bareos/config/bareos-dir.d/job/backup-ldap.conf.example \ + usr/share/bareos/config/bareos-dir.d/job/restore-ldap.conf.example \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-filedaemon-libcloud-python-plugin() { + arch=(any) + pkgdesc="${pkgdesc} - Libcloud Python plugin for Bareos File daemon" + depends=("bareos-filedaemon=${pkgver}" + "python-apache-libcloud") + for f in \ + usr/lib/bareos/plugins/bareos-fd-libcloud.py* \ + usr/lib/bareos/plugins/BareosFdPluginLibcloud.py* \ + usr/lib/bareos/plugins/BareosLibcloudApi.py \ + usr/lib/bareos/plugins/bareos_libcloud_api \ + usr/lib/bareos/plugins/bareos_libcloud_api/* \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done } +#========================================= +package_bareos-filedaemon-mariabackup-python-plugin() { + arch=(any) + pkgdesc="${pkgdesc} - MariaBackup plugin for Bareos File daemon" + depends=("bareos-filedaemon=${pkgver}" + "mariadb") + for f in \ + usr/lib/bareos/plugins/bareos-fd-mariabackup.py* \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-filedaemon-percona-xtrabackup-python-plugin() { + arch=(any) + pkgdesc="${pkgdesc} - XtraBackup plugin for Bareos File daemon" + depends=("bareos-filedaemon=${pkgver}" + "xtrabackup") + for f in \ + usr/lib/bareos/plugins/bareos-fd-percona-xtrabackup.py* \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-filedaemon-postgresql-python-plugin() { + arch=(any) + pkgdesc="${pkgdesc} - PostgreSQL plugin for Bareos File daemon" + depends=("bareos-filedaemon=${pkgver}" + "postgresql") + for f in \ + usr/lib/bareos/plugins/bareos-fd-postgres.py* \ + usr/lib/bareos/plugins/bareos-fd-postgresql.py* \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-filedaemon-python-plugins-common() { + arch=(any) + pkgdesc="${pkgdesc} - This package contains the common files for the python 2 and python 3 filedaemon plugins" + depends=("bareos-filedaemon=${pkgver}") + for f in \ + usr/lib/bareos/plugins/bareos-fd-local-fileset.py* \ + usr/lib/bareos/plugins/BareosFdPluginBaseclass.py* \ + usr/lib/bareos/plugins/BareosFdPluginLocalFilesBaseclass.py* \ + usr/lib/bareos/plugins/BareosFdWrapper.py* \ + usr/lib/bareos/scripts/bareos_encode_string.py \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-filedaemon-python3-plugin() { + conflicts=("bareos-filedaemon-python-plugin") + pkgdesc="${pkgdesc} - Python plugin for file daemon" + depends=("bareos-filedaemon=${pkgver}" + "bareos-filedaemon-python-plugins-common=${pkgver}" + 'python' 'libcap' 'lzo' 'jansson') + for f in \ + usr/lib/bareos/plugins/python3-fd.so \ + usr/lib/python${python3_ver}/site-packages/bareosfd.cpython*.so \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= package_bareos-storage() { pkgdesc="${pkgdesc} - Storage daemon" - depends=("bareos-common=$pkgver" 'zlib' 'lzo' 'jansson' 'openssl' 'libcap') + 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.gz \ - usr/lib/bareos/libbareossd-$pkgver.so \ - usr/lib/bareos/libbareossd.so \ + usr/lib/bareos/plugins/autoxflate-sd.so \ + usr/lib/bareos/backends/libbareossd-file.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/share/bareos/config/tray-monitor.d/storage/StorageDaemon-local*.conf \ + usr/bin/bareos-sd \ + usr/share/man/man8/bareos-sd.8* \ + usr/lib/systemd/system/bareos-sd.service \ + +var/lib/bareos/storage \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" 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/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' ${pkgdir}/usr/lib/systemd/system/bareos-sd.service } +#========================================= +package_bareos-storage-droplet() { + pkgdesc="${pkgdesc} - Droplet support for storage daemon" + depends=("bareos-storage=${pkgver}") + for f in \ + usr/lib/bareos/backends/libbareossd-droplet.so* \ + usr/share/bareos/config/bareos-dir.d/storage/S3_Object.conf.example \ + usr/share/bareos/config/bareos-sd.d/device/S3_ObjectStorage.conf.example \ + usr/share/bareos/config/bareos-sd.d/device/droplet \ + usr/share/bareos/config/bareos-sd.d/device/droplet/aws_eu-central-1.profile.example \ + usr/share/bareos/config/bareos-sd.d/device/droplet/ceph-rados-gateway.profile.example \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +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_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-storage-glusterfs() { + pkgdesc="${pkgdesc} - GlusterFS support for storage daemon" + depends=("bareos-storage=${pkgver}" + "glusterfs") + for f in \ + usr/lib/bareos/backends/libbareossd-gfapi.so* \ + usr/share/bareos/config/bareos-dir.d/storage/Gluster.conf.example \ + usr/share/bareos/config/bareos-sd.d/device/GlusterStorage.conf.example \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-storage-python-plugins-common() { + arch=(any) + pkgdesc="${pkgdesc} - This package contains the common files for the python 2 and python 3 storage plugins" + depends=("bareos-storage=${pkgver}") + for f in \ + usr/lib/bareos/plugins/BareosSdPluginBaseclass.py* \ + usr/lib/bareos/plugins/BareosSdWrapper.py* \ + usr/lib/bareos/plugins/bareos-sd-class-plugin.py* \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-storage-python3-plugin() { + conflicts=("bareos-storage-python-plugin") + pkgdesc="${pkgdesc} - Python plugin for storage daemon" + depends=("bareos-storage=${pkgver}" + "bareos-storage-python-plugins-common=${pkgver}" + 'python' 'lzo' 'libcap' 'jansson') + for f in \ + usr/lib/bareos/plugins/python3-sd.so \ + usr/lib/python${python3_ver}/site-packages/bareossd.cpython*.so \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= package_bareos-storage-tape() { pkgdesc="${pkgdesc} - Tape support for storage daemon" - depends=("bareos-storage=$pkgver" 'zlib' 'libcap' 'bash' 'openssl' 'jansson' 'lzo' "mtx") + 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-tape.so* \ + usr/lib/bareos/plugins/scsicrypto-sd.so \ + usr/lib/bareos/plugins/scsitapealert-sd.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_pkgdir "$f" "$srcdir/install" + done +} +#========================================= +package_bareos-tools() { + pkgdesc="${pkgdesc} - CLI tools (bcopy, bextract, bls, bregeq, bwild, bregex)" + depends=("bareos-common=${pkgver}" 'glibc') 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-$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/bin/bscrypto \ - usr/bin/btape \ + usr/bin/bregex \ + usr/bin/bwild \ + usr/bin/bcopy \ + usr/bin/bextract \ + usr/bin/bls \ + usr/bin/bregex \ + usr/bin/bwild \ + 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 + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-director-python-plugin() { - pkgdesc="${pkgdesc} - Python plugin for director daemon" - depends=("bareos-director=$pkgver" 'libcap' 'jansson' 'lzo' 'python' 'python2') +#========================================= +package_bareos-traymonitor() { + groups+=("bareos-client") + pkgdesc="${pkgdesc} - This package contains the tray monitor (QT based)" + depends=("bareos-common=${pkgver}") + backup=("etc/bareos/tray-monitor.d/monitor/bareos-mon.conf") + install=bareos-traymonitor.install 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 \ + +etc/bareos/tray-monitor.d/monitor \ + etc/xdg/autostart/bareos-tray-monitor.desktop \ + usr/share/bareos/config/tray-monitor.d/monitor/bareos-mon.conf \ + usr/bin/bareos-tray-monitor \ + usr/share/man/man1/bareos-tray-monitor.1* \ + usr/share/applications/bareos-tray-monitor.desktop \ + usr/share/pixmaps/bareos-tray-monitor.png \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done + + # tray-monitor needs configuration files to run + install -m640 "${pkgdir}/usr/share/bareos/config/tray-monitor.d/monitor/bareos-mon.conf" "${pkgdir}/etc/bareos/tray-monitor.d/monitor/bareos-mon.conf" } -package_bareos-filedaemon-python-plugin() { - pkgdesc="${pkgdesc} - Python plugin for file daemon" - depends=("bareos-filedaemon=$pkgver" 'python' 'python2' 'libcap' 'lzo' 'jansson') +#========================================= +package_bareos-vadp-dumper() { + pkgdesc="${pkgdesc} - vStorage APIs for Data Protection Dumper program" 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 \ + usr/bin/bareos_vadp_dumper \ + usr/bin/bareos_vadp_dumper_wrapper.sh \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done } -package_bareos-storage-python-plugin() { - pkgdesc="${pkgdesc} - Python plugin for storage daemon" - depends=("bareos-storage=$pkgver" 'python2' 'lzo' 'python' 'libcap' 'jansson') +#========================================= +package_bareos-vmware-vix-disklib() { + pkgdesc="${pkgdesc} - VMware vix disklib distributable libraries" + + for f in \ + usr/lib/vmware-vix-disklib/lib64/* \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-vmware-plugin() { + arch=(any) + pkgdesc="${pkgdesc} - Bareos VMware plugin" + depends=("bareos-vadp-dumper=${pkgver}" "bareos-common=${pkgver}" ) + optdepends=("bareos-filedaemon-python3-plugin=${pkgver}") + for f in \ + usr/lib/bareos/plugins/bareos-fd-vmware.py \ + -usr/bin/vmware_cbt_tool.py \ + +usr/bin \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done + install -m755 "${srcdir}/bareos/core/src/vmware/vmware_cbt_tool/vmware_cbt_tool.py" "${pkgdir}/usr/bin/vmware_cbt_tool.py" +} + +#========================================= +package_bareos-webui() { + arch=(any) + pkgdesc="${pkgdesc} - Webui (Bareos web administration)" + depends=('jansson') + optdepend=( 'bareos-webui-apache' 'bareos-webui-nginx' ) + backup=('etc/bareos-webui/directors.ini' + 'etc/bareos-webui/configuration.ini' + 'etc/bareos/bareos-dir.d/console/admin.conf.example' + 'etc/bareos/bareos-dir.d/profile/webui-admin.conf') 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 \ + etc/bareos/bareos-dir.d/console/admin.conf.example \ + etc/bareos/bareos-dir.d/profile/webui-admin.conf \ + etc/bareos/bareos-dir.d/profile/webui-limited.conf.example \ + etc/bareos/bareos-dir.d/profile/webui-readonly.conf \ + etc/bareos-webui/directors.ini \ + etc/bareos-webui/configuration.ini \ + usr/share/bareos-webui \ + +usr/share/licenses/${pkgname} \ ; do - _cp $srcdir/install/$f $pkgdir/$f + cp_pkgdir "$f" "$srcdir/install" done + install -Dm644 ${srcdir}/bareos/webui/{README.md,LICENSE,doc/README-TRANSLATION.md} "${pkgdir}/usr/share/licenses/${pkgname}/" +} + +#========================================= +package_bareos-webui-apache() { + arch=(any) + pkgdesc="${pkgdesc} - Webui Apache" + depends=('apache' 'php-apache' 'php' 'php-fpm' 'php-pgsql') + backup=('etc/httpd/conf/extra/bareos-webui.conf') + + for f in \ + etc/httpd/conf/extra/bareos-webui.conf \ + ; do + cp_pkgdir "$f" "$srcdir/install" + done +} + +#========================================= +package_bareos-webui-nginx() { + arch=(any) + pkgdesc="${pkgdesc} - Webui nginx" + depends=('nginx' 'php' 'php-fpm' 'php-pgsql') + backup=('etc/nginx/bareos-webui.conf') + + mkdir -p "$pkgdir"/etc/nginx + cp ${srcdir}/bareos/webui/install/nginx/bareos-webui.conf ${pkgdir}/etc/nginx/bareos-webui.conf +} + +#========================================= +package_python-bareos() { + pkgdesc="${pkgdesc} - python-bareos is a Python module to access a backup system." + depends=('python' 'python-sslpsk' 'jansson') + + cd "${srcdir}/${pkgbase}/python-bareos" + python setup.py install --skip-build --root="${pkgdir}" --optimize='1' } diff --git a/bareos-bconsole.install b/bareos-bconsole.install index 0b1c1d30f095..6ed905511cb0 100644 --- a/bareos-bconsole.install +++ b/bareos-bconsole.install @@ -1,10 +1,8 @@ ## arg 1: the new package version post_install() { - /usr/lib/bareos/scripts/bareos-config initialize_local_hostname - /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 + /usr/lib/bareos/scripts/bareos-config initialize_local_hostname + /usr/lib/bareos/scripts/bareos-config initialize_passwords + chown root:bareos /etc/bareos/bconsole.conf } post_upgrade() { diff --git a/bareos-common.install b/bareos-common.install index 42615708110f..0e8b84e07925 100644 --- a/bareos-common.install +++ b/bareos-common.install @@ -1,31 +1,31 @@ # arg 1: the new package version pre_install() { - # Create User/Group - getent group bareos > /dev/null || groupadd --system bareos - getent passwd bareos > /dev/null || useradd --system --gid bareos \ - --home-dir /var/lib/bareos --no-create-home bareos - + # Create User/Group + getent group bareos > /dev/null || groupadd --system bareos + getent passwd bareos > /dev/null || useradd --system --gid bareos \ + --home-dir /var/lib/bareos --no-create-home bareos } # arg 1: the new package version post_install() { - chown bareos:bareos /var/lib/bareos/ - chown bareos:bareos /run/bareos/ - #chown bareos:bareos /var/log/bareos/ + chown bareos:bareos /etc/bareos/ + chown bareos:bareos /var/lib/bareos/ + chown bareos:bareos /run/bareos/ + chown bareos:bareos /var/log/bareos/ } # arg 1: the new package version # arg 2: the old package version pre_upgrade() { - pre_install + pre_install } post_upgrade() { - post_install + post_install } # arg 1: the old package version post_remove() { - getent passwd bareos > /dev/null && userdel bareos - rm -f /etc/bareos/.rndpwd + getent passwd bareos > /dev/null && userdel bareos + rm -f /etc/bareos/.rndpwd } diff --git a/bareos-database-mysql.install b/bareos-database-mysql.install index dcfdf0406c65..d462aced941d 100644 --- a/bareos-database-mysql.install +++ b/bareos-database-mysql.install @@ -3,22 +3,16 @@ coloroff='\e[0m' # arg 0: the new package version post_install() { - echo -e "${yellow}NOTE: Please see documentation (section 2.4.2) to setup database:${coloroff}" - #echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-400002.4.2${coloroff}" - echo -e "${yellow} http://download.bareos.org/bareos/release/17.2/documentation/html/bareos-manual-main-reference.html#QQ2-1-47${coloroff}" - + echo -e "${yellow}NOTE: Please see documentation to setup database${coloroff}" } # arg 0: the new package version # arg 2: the old package version post_upgrade() { - #echo -e "${yellow}NOTE: Please see documentation (section) 3.1.2 to update database${coloroff}" - #echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-450003.1.2${coloroff}" - echo -e "${yellow}NOTE: Please see documentation (section) 4.2.2 to update database${coloroff}" - echo -e "${yellow} http://download.bareos.org/bareos/release/17.2/documentation/html/bareos-manual-main-reference.html#x1-710004.2.2${coloroff}" + echo -e "${yellow}NOTE: Please see documentation to setup database${coloroff}" } # arg 0: the old package version post_remove() { - echo -e "${yellow}NOTE: To remove all traces of bareos please delete the bareos database.${coloroff}" + echo -e "${yellow}NOTE: To remove all traces of bareos please delete the bareos database.${coloroff}" } diff --git a/bareos-database-postgresql.install b/bareos-database-postgresql.install index dcfdf0406c65..d462aced941d 100644 --- a/bareos-database-postgresql.install +++ b/bareos-database-postgresql.install @@ -3,22 +3,16 @@ coloroff='\e[0m' # arg 0: the new package version post_install() { - echo -e "${yellow}NOTE: Please see documentation (section 2.4.2) to setup database:${coloroff}" - #echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-400002.4.2${coloroff}" - echo -e "${yellow} http://download.bareos.org/bareos/release/17.2/documentation/html/bareos-manual-main-reference.html#QQ2-1-47${coloroff}" - + echo -e "${yellow}NOTE: Please see documentation to setup database${coloroff}" } # arg 0: the new package version # arg 2: the old package version post_upgrade() { - #echo -e "${yellow}NOTE: Please see documentation (section) 3.1.2 to update database${coloroff}" - #echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-450003.1.2${coloroff}" - echo -e "${yellow}NOTE: Please see documentation (section) 4.2.2 to update database${coloroff}" - echo -e "${yellow} http://download.bareos.org/bareos/release/17.2/documentation/html/bareos-manual-main-reference.html#x1-710004.2.2${coloroff}" + echo -e "${yellow}NOTE: Please see documentation to setup database${coloroff}" } # arg 0: the old package version post_remove() { - echo -e "${yellow}NOTE: To remove all traces of bareos please delete the bareos database.${coloroff}" + echo -e "${yellow}NOTE: To remove all traces of bareos please delete the bareos database.${coloroff}" } diff --git a/bareos-director.install b/bareos-director.install index 518d7869abf8..d7d6f79c289d 100644 --- a/bareos-director.install +++ b/bareos-director.install @@ -1,22 +1,15 @@ ## arg 1: the new package version post_install() { - /usr/lib/bareos/scripts/bareos-config initialize_local_hostname - /usr/lib/bareos/scripts/bareos-config initialize_passwords + /usr/lib/bareos/scripts/bareos-config initialize_local_hostname + /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 -R bareos:bareos /usr/share/bareos/config/bareos-dir.d + chown bareos:bareos /usr/bin/bareos-dir - chown bareos:bareos /usr/bin/bareos-dir - - /usr/lib/bareos/scripts/bareos-config initialize_database_driver - /usr/lib/bareos/scripts/bareos-config apply_dbconfig_settings - - #for dir in /etc/bareos/bareos-dir-export/ /etc/bareos/bareos-dir-export/client; do - #chown bareos:bareos "$dir" - #chmod 750 "$dir" - #done + /usr/lib/bareos/scripts/bareos-config initialize_database_driver + /usr/lib/bareos/scripts/bareos-config apply_dbconfig_settings } post_upgrade() { - post_install + post_install } diff --git a/bareos-filedaemon.install b/bareos-filedaemon.install index bfd1ca0f15ed..e071d9896ba0 100644 --- a/bareos-filedaemon.install +++ b/bareos-filedaemon.install @@ -1,9 +1,9 @@ ## arg 1: the new package version post_install() { - /usr/lib/bareos/scripts/bareos-config initialize_local_hostname - /usr/lib/bareos/scripts/bareos-config initialize_passwords + /usr/lib/bareos/scripts/bareos-config initialize_local_hostname + /usr/lib/bareos/scripts/bareos-config initialize_passwords } post_upgrade() { - post_install + post_install } diff --git a/bareos-storage.install b/bareos-storage.install index 8026ef6fadec..d4326a0d33e3 100644 --- a/bareos-storage.install +++ b/bareos-storage.install @@ -1,19 +1,17 @@ ## arg 1: the new package version post_install() { - /usr/lib/bareos/scripts/bareos-config initialize_local_hostname - /usr/lib/bareos/scripts/bareos-config initialize_passwords + /usr/lib/bareos/scripts/bareos-config initialize_local_hostname + /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 -R bareos:bareos /usr/share/bareos/config/bareos-sd.d + chown bareos:bareos /usr/bin/bareos-sd - chown bareos:bareos /usr/bin/bareos-sd + chown bareos:bareos /var/lib/bareos/storage/ + chmod 750 /var/lib/bareos/storage/ - chown bareos:bareos /var/lib/bareos/storage/ - chmod 750 /var/lib/bareos/storage/ - - /usr/lib/bareos/scripts/bareos-config setup_sd_user + /usr/lib/bareos/scripts/bareos-config setup_sd_user } post_upgrade() { - post_install + post_install } diff --git a/bareos-traymonitor.install b/bareos-traymonitor.install new file mode 100644 index 000000000000..407370f41049 --- /dev/null +++ b/bareos-traymonitor.install @@ -0,0 +1,11 @@ +post_install() { + /usr/lib/bareos/scripts/bareos-config initialize_local_hostname + /usr/lib/bareos/scripts/bareos-config initialize_passwords + CONFIGDIR="/etc/bareos/tray-monitor.d/" + chown -R root:bareos ${CONFIGDIR} + chmod -R u=rwX,go=rX ${CONFIGDIR} +} + +post_upgrade() { + post_install +} |