[pkg-bacula-commits] [bacula] 01/01: Fix MySQL database creation via dbconfig-common (Closes: #830999)

Carsten Leonhardt leo at moszumanska.debian.org
Wed Jul 13 23:16:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

leo pushed a commit to branch master
in repository bacula.

commit 71ade9594013fd3cc228d2b195f85b2a02518d55
Author: Carsten Leonhardt <leo at debian.org>
Date:   Thu Jul 14 01:13:09 2016 +0200

    Fix MySQL database creation via dbconfig-common (Closes: #830999)
---
 debian/changelog                                   |  6 ++++++
 .../remove-use-statement-in-make-mysql-tables      | 22 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 29 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8b9fbfa..6b3938d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+bacula (7.4.2+dfsg-2) unstable; urgency=medium
+
+  * Fix MySQL database creation via dbconfig-common (Closes: #830999)
+
+ --
+
 bacula (7.4.2+dfsg-1) unstable; urgency=low
 
   * New upstream release
diff --git a/debian/patches/remove-use-statement-in-make-mysql-tables b/debian/patches/remove-use-statement-in-make-mysql-tables
new file mode 100644
index 0000000..dfa3c71
--- /dev/null
+++ b/debian/patches/remove-use-statement-in-make-mysql-tables
@@ -0,0 +1,22 @@
+Description: Fix MySQL database creation via dbconfig-common
+ dbconfig-common uses its own scheme for telling MySQL which database
+ name is to be used, so we switch from using "USE" to passing -D to
+ the call to mysql. This way the USE statement does not end up in the
+ data for dbconfig-common.
+ This fix is specific to Debian packaging and could also be solved by
+ improving/replacing debian/scripts/install-dbconfig
+Author: Carsten Leonhardt <leo at debian.org>
+Bug-Debian: 830999
+Last-Update: 2016-07-14
+--- a/src/cats/make_mysql_tables.in
++++ b/src/cats/make_mysql_tables.in
+@@ -13,8 +13,7 @@
+ PATH="$bindir:$PATH"
+ db_name=${db_name:- at db_name@}
+ 
+-if mysql $* -f <<END-OF-DATA
+-USE ${db_name};
++if mysql -D ${db_name} $* -f <<END-OF-DATA
+ --
+ -- Note, we use BLOB rather than TEXT because in MySQL,
+ --  BLOBs are identical to TEXT except that BLOB is case
diff --git a/debian/patches/series b/debian/patches/series
index fda1104..7cac875 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ remove-upstream-autoconf-log.patch
 fix-libbaccats-rpath.patch
 fix-scriptdir-examples-devices.patch
 enable-hardening-for-bat.patch
+remove-use-statement-in-make-mysql-tables

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git



More information about the pkg-bacula-commits mailing list