Package: bacula-director-mysql Severity: important Dear Maintainer,
Ubuntu 16.10 is currently in-sync with Debian unstable's packaging and I am seeing an installation failure with bacula-director-mysql. In partciular, I believe the following to be true: /usr/share/dbconfig-common/data/bacula-director-mysql/install/mysql: USE ${db_name}; -- -- Note, we use BLOB rather than TEXT because in MySQL, -- BLOBs are identical to TEXT except that BLOB is case -- sensitive in sorts, which is what we want, and TEXT -- is case insensitive. -- CREATE TABLE Filename ( FilenameId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name BLOB NOT NULL, PRIMARY KEY(FilenameId), INDEX (Name(255)) ); ... This comes from debian/rules: $(foreach db,$(VARIANTS),$(shell debian/scripts/install-dbconfig $(db))) # new installs which in turn calls debian/scripts/install-dbconfig: sub install { make_path("debian/bacula-director-$db/$DBC/bacula-director-$db/install"); extract_here("src/cats/make_".$longdb."_tables", "debian/bacula-director-$db/$DBC/bacula-director-$db/install/$db"); } ... sub extract_here { my $input = shift; my $output = shift; my $found = 0; open (INPUT, '<', $input); open (OUTPUT, '>', $output); while (<INPUT>) { if (m/END.OF.DATA/ && !$found) {$found = 1; next;}; last if (m/END.OF.DATA/); print OUTPUT $_ if $found; } close (INPUT); } which in turn ends up chomping on src/cats/make_mysql_tables: bindir=@MYSQL_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} if mysql $* -f <<END-OF-DATA USE ${db_name}; -- -- Note, we use BLOB rather than TEXT because in MySQL, -- BLOBs are identical to TEXT except that BLOB is case -- sensitive in sorts, which is what we want, and TEXT -- is case insensitive. ... So the issue is that the 'USE ' line in the MySQL script assumes the db_name variable is usable, but just (effectively) c&p a part of the script out does not do this. I think this might be a packaging regression, as upstream did change this in 2012 http://www.bacula.org/git/cgit.cgi/bacula/commit/?h=Branch-7.4&id=074419ac0c9dbbde2e4d2f5ccb6d4ca85c6ec8a9 which maybe let Debian drop it's USE sed lines from debian/rules. But then, at least since 2015, http://www.bacula.org/git/cgit.cgi/bacula/commit/bacula/src/cats/make_mysql_tables.in?h=Branch-7.4&id=4d2b94fa3e8018d1a462756ad6e1df7e12a29d20 caused it to revert back? Talking to Kern offlist, they mentioned that this was from the normal syncing of enterprise to the community version. Note, the Ubuntu bug I've filed is at: https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/1596034 Historical Debian bugs that seem related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679855 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489578 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=441995 Thanks, Nish -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-28-generic (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- Nishanth Aravamudan Ubuntu Server Canonical Ltd