summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2021-01-23 16:48:21 +0100
committerThomas Beierlein <tomjbe@gentoo.org>2021-01-23 16:48:21 +0100
commit465b334f163a88f6e045202c23c93cd36637e99a (patch)
tree38ccd6d3c6b73cc943baf849cc76494e51730d0c /app-backup/bacula
parentsci-mathematics/flint: add myself and François Bissey as maintainers. (diff)
downloadgentoo-465b334f163a88f6e045202c23c93cd36637e99a.tar.gz
gentoo-465b334f163a88f6e045202c23c93cd36637e99a.tar.bz2
gentoo-465b334f163a88f6e045202c23c93cd36637e99a.zip
app-backup/bacula: Fix database locking bug (bug #766195)
Reported-by: Phil Stracchino <phils@caerllewys.net> Closes: https://bugs.gentoo.org/766195 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
Diffstat (limited to 'app-backup/bacula')
-rw-r--r--app-backup/bacula/bacula-9.6.5.ebuild5
-rw-r--r--app-backup/bacula/bacula-9.6.6.ebuild5
-rw-r--r--app-backup/bacula/bacula-9.6.7.ebuild5
-rw-r--r--app-backup/bacula/files/bacula-9.6.x-fix-race-condition.patch15
4 files changed, 27 insertions, 3 deletions
diff --git a/app-backup/bacula/bacula-9.6.5.ebuild b/app-backup/bacula/bacula-9.6.5.ebuild
index d2d04673ea7d..13290a4abf99 100644
--- a/app-backup/bacula/bacula-9.6.5.ebuild
+++ b/app-backup/bacula/bacula-9.6.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -171,6 +171,9 @@ src_prepare() {
# correct installation for plugins to mode 0755 (bug #725946)
sed -i -e "s/(INSTALL_PROGRAM) /(INSTALL_LIB) /" src/plugins/fd/Makefile.in ||die
+ # fix database locking code for bacula-9.6.4 ... -9.6.x (bug #766195)
+ eapply -p0 "${FILESDIR}"/${PN}-9.6.x-fix-race-condition.patch
+
# fix bundled libtool (bug 466696)
# But first move directory with M4 macros out of the way.
# It is only needed by autoconf and gives errors during elibtoolize.
diff --git a/app-backup/bacula/bacula-9.6.6.ebuild b/app-backup/bacula/bacula-9.6.6.ebuild
index 8b6104a81e97..aaffa58674b0 100644
--- a/app-backup/bacula/bacula-9.6.6.ebuild
+++ b/app-backup/bacula/bacula-9.6.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -171,6 +171,9 @@ src_prepare() {
# correct installation for plugins to mode 0755 (bug #725946)
sed -i -e "s/(INSTALL_PROGRAM) /(INSTALL_LIB) /" src/plugins/fd/Makefile.in ||die
+ # fix database locking code for bacula-9.6.4 ... -9.6.x (bug #766195)
+ eapply -p0 "${FILESDIR}"/${PN}-9.6.x-fix-race-condition.patch
+
# fix bundled libtool (bug 466696)
# But first move directory with M4 macros out of the way.
# It is only needed by autoconf and gives errors during elibtoolize.
diff --git a/app-backup/bacula/bacula-9.6.7.ebuild b/app-backup/bacula/bacula-9.6.7.ebuild
index 8b6104a81e97..aaffa58674b0 100644
--- a/app-backup/bacula/bacula-9.6.7.ebuild
+++ b/app-backup/bacula/bacula-9.6.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -171,6 +171,9 @@ src_prepare() {
# correct installation for plugins to mode 0755 (bug #725946)
sed -i -e "s/(INSTALL_PROGRAM) /(INSTALL_LIB) /" src/plugins/fd/Makefile.in ||die
+ # fix database locking code for bacula-9.6.4 ... -9.6.x (bug #766195)
+ eapply -p0 "${FILESDIR}"/${PN}-9.6.x-fix-race-condition.patch
+
# fix bundled libtool (bug 466696)
# But first move directory with M4 macros out of the way.
# It is only needed by autoconf and gives errors during elibtoolize.
diff --git a/app-backup/bacula/files/bacula-9.6.x-fix-race-condition.patch b/app-backup/bacula/files/bacula-9.6.x-fix-race-condition.patch
new file mode 100644
index 000000000000..4862bcece0ef
--- /dev/null
+++ b/app-backup/bacula/files/bacula-9.6.x-fix-race-condition.patch
@@ -0,0 +1,15 @@
+--- src/dird/dird.c.orig 2021-01-19 15:25:16.233573546 -0500
++++ src/dird/dird.c 2021-01-19 15:26:23.884070798 -0500
+@@ -1263,11 +1263,11 @@
+ }
+ if (catalog->db_driver) {
+ /* To copy dbdriver field into "CAT" catalog resource class (local)
+ * from dbdriver in "BDB" catalog DB Interface class (global)
+ */
+- bstrncpy(catalog->db_driver, BDB_db_driver, db_driver_len);
++ bstrncpy(catalog->db_driver, BDB_db_driver, db_driver_len+1);
+ }
+ }
+
+ if (!db || !db_open_database(NULL, db)) {
+ Pmsg2(000, _("Could not open Catalog \"%s\", database \"%s\".\n"),