From b5d09dc79a0d689391757a44b7114dbf8a03e03c Mon Sep 17 00:00:00 2001 From: Matthias Fulz Date: Thu, 9 Feb 2017 00:04:35 +0100 Subject: [PATCH] New package: bacula-common-7.4.7 Closes: #5701 [via git-merge-pr] --- common/shlibs | 5 + srcpkgs/bacula-common-mariadb | 1 + srcpkgs/bacula-common-postgresql | 1 + srcpkgs/bacula-common/files/bacula-dir/run | 3 + srcpkgs/bacula-common/files/bacula-fd/run | 3 + srcpkgs/bacula-common/files/bacula-sd/run | 3 + srcpkgs/bacula-common/patches/fix-cross.patch | 48 +++++++ srcpkgs/bacula-common/patches/fix-musl.patch | 12 ++ srcpkgs/bacula-common/template | 119 ++++++++++++++++++ srcpkgs/bacula-console | 1 + srcpkgs/bacula-dir | 1 + srcpkgs/bacula-fd | 1 + srcpkgs/bacula-sd | 1 + 13 files changed, 199 insertions(+) create mode 120000 srcpkgs/bacula-common-mariadb create mode 120000 srcpkgs/bacula-common-postgresql create mode 100755 srcpkgs/bacula-common/files/bacula-dir/run create mode 100755 srcpkgs/bacula-common/files/bacula-fd/run create mode 100755 srcpkgs/bacula-common/files/bacula-sd/run create mode 100644 srcpkgs/bacula-common/patches/fix-cross.patch create mode 100644 srcpkgs/bacula-common/patches/fix-musl.patch create mode 100644 srcpkgs/bacula-common/template create mode 120000 srcpkgs/bacula-console create mode 120000 srcpkgs/bacula-dir create mode 120000 srcpkgs/bacula-fd create mode 120000 srcpkgs/bacula-sd diff --git a/common/shlibs b/common/shlibs index b0e27533249..c89b9121b95 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2837,3 +2837,8 @@ libPocoXML.so.48 poco-1.7.8p2_1 libPocoUtil.so.48 poco-1.7.8p2_1 libopenblas.so.0 openblas-0.2.19_1 librtmidi.so.3 rtmidi-2.1.1_1 +libbac-7.4.7.so bacula-common-7.4.7_1 +libbaccfg-7.4.7.so bacula-common-7.4.7_1 +libbacfind-7.4.7.so bacula-common-7.4.7_1 +libbacsql-7.4.7.so bacula-common-7.4.7_1 +libbaccats-7.4.7.so bacula-common-7.4.7_1 diff --git a/srcpkgs/bacula-common-mariadb b/srcpkgs/bacula-common-mariadb new file mode 120000 index 00000000000..df0fa22f12d --- /dev/null +++ b/srcpkgs/bacula-common-mariadb @@ -0,0 +1 @@ +bacula-common \ No newline at end of file diff --git a/srcpkgs/bacula-common-postgresql b/srcpkgs/bacula-common-postgresql new file mode 120000 index 00000000000..df0fa22f12d --- /dev/null +++ b/srcpkgs/bacula-common-postgresql @@ -0,0 +1 @@ +bacula-common \ No newline at end of file diff --git a/srcpkgs/bacula-common/files/bacula-dir/run b/srcpkgs/bacula-common/files/bacula-dir/run new file mode 100755 index 00000000000..be89aac6078 --- /dev/null +++ b/srcpkgs/bacula-common/files/bacula-dir/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ ! -d /run/bacula ] && mkdir /run/bacula +exec bacula-dir -f -c /etc/bacula/bacula-dir.conf diff --git a/srcpkgs/bacula-common/files/bacula-fd/run b/srcpkgs/bacula-common/files/bacula-fd/run new file mode 100755 index 00000000000..6f3765f1fa7 --- /dev/null +++ b/srcpkgs/bacula-common/files/bacula-fd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ ! -d /run/bacula ] && mkdir /run/bacula +exec bacula-fd -f -c /etc/bacula/bacula-fd.conf diff --git a/srcpkgs/bacula-common/files/bacula-sd/run b/srcpkgs/bacula-common/files/bacula-sd/run new file mode 100755 index 00000000000..6ef1480466f --- /dev/null +++ b/srcpkgs/bacula-common/files/bacula-sd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ ! -d /run/bacula ] && mkdir /run/bacula +exec bacula-sd -f -c /etc/bacula/bacula-sd.conf diff --git a/srcpkgs/bacula-common/patches/fix-cross.patch b/srcpkgs/bacula-common/patches/fix-cross.patch new file mode 100644 index 00000000000..52c03d014f4 --- /dev/null +++ b/srcpkgs/bacula-common/patches/fix-cross.patch @@ -0,0 +1,48 @@ +--- configure 2016-09-29 15:59:30.000000000 +0200 ++++ configure 2017-02-14 01:48:10.874916913 +0100 +@@ -23873,6 +23873,14 @@ + POSTGRESQL_LIBDIR=/usr/lib/postgresql + fi + POSTGRESQL_BINDIR=/usr/bin ++ elif test -f ${XBPS_CROSS_BASE}/usr/include/libpq-fe.h; then ++ POSTGRESQL_INCDIR=${XBPS_CROSS_BASE}/usr/include ++ if test -d ${XBPS_CROSS_BASE}/usr/lib64; then ++ POSTGRESQL_LIBDIR=${XBPS_CROSS_BASE}/usr/lib64 ++ else ++ POSTGRESQL_LIBDIR=${XBPS_CROSS_BASE}/usr/lib ++ fi ++ POSTGRESQL_BINDIR=${XBPS_CROSS_BASE}/usr/bin + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +@@ -24182,6 +24190,15 @@ + MYSQL_LIBDIR=/usr/local/lib + fi + MYSQL_BINDIR=/usr/local/bin ++ elif test -f ${XBPS_CROSS_BASE}/usr/include/mysql.h; then ++ MYSQL_INCDIR=${XBPS_CROSS_BASE}/usr/include ++ if test -f ${XBPS_CROSS_BASE}/usr/lib64/libmysqlclient_r.a \ ++ -o -f ${XBPS_CROSS_BASE}/usr/lib64/libmysqlclient_r.so; then ++ MYSQL_LIBDIR=${XBPS_CROSS_BASE}/usr/lib64 ++ else ++ MYSQL_LIBDIR=${XBPS_CROSS_BASE}/usr/lib ++ fi ++ MYSQL_BINDIR=${XBPS_CROSS_BASE}/usr/bin + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +@@ -24587,6 +24604,14 @@ + SQLITE_LIBDIR=$prefix/lib + fi + SQLITE_BINDIR=$prefix/bin ++ elif test -f ${XBPS_CROSS_BASE}/usr/include/sqlite3.h; then ++ SQLITE_INCDIR=${XBPS_CROSS_BASE}/usr/include ++ if test -d ${XBPS_CROSS_BASE}/usr/lib64; then ++ SQLITE_LIBDIR=${XBPS_CROSS_BASE}/usr/lib64 ++ else ++ SQLITE_LIBDIR=${XBPS_CROSS_BASE}/usr/lib ++ fi ++ SQLITE_BINDIR=${XBPS_CROSS_BASE}/usr/bin + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } diff --git a/srcpkgs/bacula-common/patches/fix-musl.patch b/srcpkgs/bacula-common/patches/fix-musl.patch new file mode 100644 index 00000000000..4710bc9435a --- /dev/null +++ b/srcpkgs/bacula-common/patches/fix-musl.patch @@ -0,0 +1,12 @@ +--- src/findlib/fstype.c 2016-09-29 15:59:30.000000000 +0200 ++++ src/findlib/fstype.c 2017-02-19 19:24:02.050639457 +0100 +@@ -162,6 +162,9 @@ + + #include + #include ++#ifndef _PATH_MOUNTED ++#include ++#endif + + /* + * Linux statfs() does not return the filesystem name type. It diff --git a/srcpkgs/bacula-common/template b/srcpkgs/bacula-common/template new file mode 100644 index 00000000000..d943dbb1e6a --- /dev/null +++ b/srcpkgs/bacula-common/template @@ -0,0 +1,119 @@ +# Template file for 'bacula-common' +pkgname="bacula-common" +version="7.4.7" +revision=1 +build_style=gnu-configure +_common_desc="Bacula - A Network Backup Tool " +short_desc="${_common_desc} (common libs)" +maintainer="Matthias Fulz " +license="AGPL-3" +homepage="http://www.bacula.org" +distfiles="${SOURCEFORGE_SITE}/bacula/bacula-${version}.tar.gz" +checksum="6f6075c2ca90a63cdeeca39b0b82a3ea07ce9999dedc68951d88bed7fbc0be40" +configure_args=" + --with-openssl --with-sqlite3 --with-mysql --with-postgresql + --enable-smartalloc --sysconfdir=/etc/bacula + --with-scriptdir=/etc/bacula/scripts + --with-working-dir=/run/bacula" +makedepends="sqlite-devel libmariadbclient-devel postgresql-libs-devel + libressl-devel ncurses-devel zlib-devel acl-devel" +wrksrc="${pkgname%-*}-${version}" +shlib_provides="libbaccats-${version}.so" +alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-sqlite3-${version}.so" + +post_install() { + rm "${DESTDIR}/usr/bin/bacula" + rm -rf "${DESTDIR}/usr/share/doc" + rm "${DESTDIR}/usr/share/man/man1/bat.1.gz" +} + +bacula-console_package() { + short_desc="Bacula - A Network Backup Tool (management cli)" + conf_files="/etc/${pkgname%-*}/bconsole.conf" + depends="bacula-common" + pkg_install() { + vmove "etc/${pkgname%-*}/bconsole.conf" + vmove "etc/${pkgname%-*}/scripts/bconsole" + vmove "usr/bin/bconsole" + vmove "usr/share/man/man8/bconsole.8.gz" + } +} + +bacula-fd_package() { + short_desc="Bacula - A Network Backup Tool (file daemon)" + conf_files="/etc/${pkgname%-*}/${pkgname}.conf" + depends="bacula-common" + pkg_install() { + vmove "etc/${pkgname%-*}/${pkgname}.conf" + vmove "usr/bin/${pkgname}" + vmove "usr/lib/bpipe-fd.so" + vmove "usr/share/man/man8/${pkgname}.8.gz" + vsv "${pkgname}" + } +} + +bacula-sd_package() { + short_desc="Bacula - A Network Backup Tool (storage daemon)" + conf_files="/etc/${pkgname%-*}/${pkgname}.conf" + depends="bacula-common" + pkg_install() { + vmove "etc/${pkgname%-*}/${pkgname}.conf" + for x in ${pkgname} bextract bls bcopy bscan btape; do + vmove "usr/bin/$x" + vmove "usr/share/man/man8/$x.8.gz" + done + vsv "${pkgname}" + } +} + +bacula-dir_package() { + short_desc="Bacula - A Network Backup Tool (director daemon)" + conf_files="/etc/${pkgname%-*}/${pkgname}.conf" + depends="bacula-common" + pkg_install() { + vmove "etc/${pkgname%-*}/${pkgname}.conf" + vmove "etc/${pkgname%-*}/scripts/query.sql" + vmove "etc/${pkgname%-*}/scripts/create_${pkgname%-*}_database" + vmove "etc/${pkgname%-*}/scripts/delete_catalog_backup" + vmove "etc/${pkgname%-*}/scripts/drop_${pkgname%-*}_database" + vmove "etc/${pkgname%-*}/scripts/drop_${pkgname%-*}_tables" + vmove "etc/${pkgname%-*}/scripts/grant_${pkgname%-*}_privileges" + vmove "etc/${pkgname%-*}/scripts/make_${pkgname%-*}_tables" + vmove "etc/${pkgname%-*}/scripts/make_catalog_backup.pl" + vmove "etc/${pkgname%-*}/scripts/make_catalog_backup" + vmove "etc/${pkgname%-*}/scripts/update_${pkgname%-*}_tables" + vmove "usr/bin/bsmtp" + vmove "usr/share/man/man1/bsmtp.1.gz" + for x in ${pkgname} bregex bwild dbcheck; do + vmove "usr/bin/$x" + vmove "usr/share/man/man8/$x.8.gz" + done + vsv "${pkgname}" + } +} + +bacula-common-mariadb_package() { + short_desc="${_common_desc} (MariaDB support)" + depends="bacula-common" + alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-mysql-${version}.so" + pkg_install() { + vmove "usr/lib/libbaccats-mysql-${version}.so" + vmove "usr/lib/libbaccats-mysql.so" + for file in etc/bacula/scripts/*mysql*; do + vmove "$file" + done + } +} + +bacula-common-postgresql_package() { + short_desc="${_common_desc} (PostgreSQL support)" + depends="bacula-common" + alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-postgresql-${version}.so" + pkg_install() { + vmove "usr/lib/libbaccats-postgresql-${version}.so" + vmove "usr/lib/libbaccats-postgresql.so" + for file in etc/bacula/scripts/*postgresql*; do + vmove "$file" + done + } +} diff --git a/srcpkgs/bacula-console b/srcpkgs/bacula-console new file mode 120000 index 00000000000..df0fa22f12d --- /dev/null +++ b/srcpkgs/bacula-console @@ -0,0 +1 @@ +bacula-common \ No newline at end of file diff --git a/srcpkgs/bacula-dir b/srcpkgs/bacula-dir new file mode 120000 index 00000000000..df0fa22f12d --- /dev/null +++ b/srcpkgs/bacula-dir @@ -0,0 +1 @@ +bacula-common \ No newline at end of file diff --git a/srcpkgs/bacula-fd b/srcpkgs/bacula-fd new file mode 120000 index 00000000000..df0fa22f12d --- /dev/null +++ b/srcpkgs/bacula-fd @@ -0,0 +1 @@ +bacula-common \ No newline at end of file diff --git a/srcpkgs/bacula-sd b/srcpkgs/bacula-sd new file mode 120000 index 00000000000..df0fa22f12d --- /dev/null +++ b/srcpkgs/bacula-sd @@ -0,0 +1 @@ +bacula-common \ No newline at end of file