aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-23 16:23:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-26 08:55:19 +0000
commit9320a0d70945da5469a01285fd5587c5ac026c39 (patch)
tree81a31286d92de6b8c7f4b6f6bf5da2cbc5690031 /community/bareos
parente7ed74af5ee4e491cd13aa8f1c7edca107e1e02d (diff)
downloadaports-9320a0d70945da5469a01285fd5587c5ac026c39.tar.bz2
aports-9320a0d70945da5469a01285fd5587c5ac026c39.tar.xz
community/bareos: rebuild against mariadb-connector-c
Diffstat (limited to 'community/bareos')
-rw-r--r--community/bareos/APKBUILD13
-rw-r--r--community/bareos/mariadb.patch21
2 files changed, 29 insertions, 5 deletions
diff --git a/community/bareos/APKBUILD b/community/bareos/APKBUILD
index 4fbb886c3a..3cc2ace133 100644
--- a/community/bareos/APKBUILD
+++ b/community/bareos/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=bareos
pkgver=17.2.4
-pkgrel=0
+pkgrel=1
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
url="http://www.bareos.org"
arch="all"
@@ -11,7 +11,7 @@ options="!check"
license="AGPL-3.0"
depends="perl"
makedepends="file libtool libintl libpcap-dev lzo-dev \
- sqlite-dev postgresql-dev gnutls-dev mariadb-dev acl-dev \
+ sqlite-dev postgresql-dev gnutls-dev mariadb-connector-c-dev acl-dev \
qt-dev python-dev readline-dev ncurses-dev jansson-dev"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-trayicon"
@@ -21,7 +21,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/Re
$pkgname-dir.initd
$pkgname-sd.initd
$pkgname-fd.initd
- path-mounted.patch"
+ path-mounted.patch
+ mariadb.patch
+ "
builddir="$srcdir"/${pkgname}-Release-${pkgver}
prepare() {
@@ -84,7 +86,7 @@ package() {
make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir"/usr/sbin
mkdir -p "$pkgdir"/usr/bin
-
+
local daemon; for daemon in dir sd fd; do
install -Dm755 "$srcdir"/$pkgname-$daemon.initd \
"$pkgdir"/etc/init.d/$pkgname-$daemon
@@ -119,4 +121,5 @@ sha512sums="165bee4dcfabac7e72839831de7067b4dafd1f82dd1615d7fa08ca331b1b3efa5165
eb1e7072b579bf9ae21f2e351d6900abb277db64e373f4760bac8188b82929376e4a196d2c935cefe1ae4cc2c396f2fcba1a25642b26e2f92a0d008fbdc4b5f2 bareos-dir.initd
c770b1d041fafef93d4eb0269ba8d9733e85ef465657fe8dd5d5c68a27ec773cec9c5c582d4a16596d95bbf6dbd3f7194dc9c0d8ed73138e9fb438fba9aa9445 bareos-sd.initd
c6347079dbcef5f4a69ec0c4ecc31803520d715d599d89c6bbfbb3741a86c50d7295c30432889b13ee9c16f2feaa84b1c6ae992cfee6505d569c6493d7e85a5b bareos-fd.initd
-eac4614c1b29ff0f12061837e425ae495890076021b6d1b0f1beb93501cfb905170342dac5dab69b09f825d5b9416eea25fa02e2174b5a704315c7feb08ff3d3 path-mounted.patch"
+eac4614c1b29ff0f12061837e425ae495890076021b6d1b0f1beb93501cfb905170342dac5dab69b09f825d5b9416eea25fa02e2174b5a704315c7feb08ff3d3 path-mounted.patch
+fd4b06cc8f118c05afbc03238376c7c6bedaf3f564090819e3fb1ab01320c79e1515ea7a81a307648015cc98a2a14aceb67684a166b986c5314bfd23b1e5ebde mariadb.patch"
diff --git a/community/bareos/mariadb.patch b/community/bareos/mariadb.patch
new file mode 100644
index 0000000000..6a207ea00e
--- /dev/null
+++ b/community/bareos/mariadb.patch
@@ -0,0 +1,21 @@
+diff --git a/src/cats/mysql.c b/src/cats/mysql.c
+index be910fb..7675cd4 100644
+--- a/src/cats/mysql.c
++++ b/src/cats/mysql.c
+@@ -156,6 +156,7 @@ bool B_DB_MYSQL::open_database(JCR *jcr)
+ {
+ bool retval = false;
+ int errstat;
++ my_bool reconnect = 1;
+
+ P(mutex);
+ if (m_connected) {
+@@ -200,7 +201,7 @@ bool B_DB_MYSQL::open_database(JCR *jcr)
+ bmicrosleep(5,0);
+ }
+
+- m_instance.reconnect = 1; /* so connection does not timeout */
++ mysql_options(&m_instance, MYSQL_OPT_RECONNECT, &reconnect); /* so connection does not timeout */
+ Dmsg0(50, "mysql_real_connect done\n");
+ Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", m_db_user, m_db_name,
+ (m_db_password == NULL) ? "(NULL)" : m_db_password);