bacula-dir.conf shows syntax error when mysql dbname is left blank

Bug #689327 reported by kenchan on 2010-12-12
18
This bug affects 5 people
Affects Status Importance Assigned to Milestone
bacula (Debian)
Fix Released
Unknown
bacula (Ubuntu)
Undecided
Unassigned
dbconfig-common (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: bacula

????

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: bacula-director-mysql 5.0.1-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-27.49-generic 2.6.32.26+drm33.12
Uname: Linux 2.6.32-27-generic i686
Architecture: i386
Date: Mon Dec 13 02:13:26 2010
ErrorMessage: サブプロセス installed post-installation script はエラー終了ステータス 1 を返しました
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
SourcePackage: bacula
Title: package bacula-director-mysql 5.0.1-1ubuntu1 failed to install/upgrade: サブプロセス installed post-installation script はエラー終了ステータス 1 を返しました

Related branches

kenchan (kenchan-sun) wrote :
Clint Byrum (clint-fewbar) wrote :

Hello kenchan, thanks for filing this (separate) bug report and working with us to make Ubuntu better.

The relevant error message is here:

dbconfig-common: writing config to /etc/dbconfig-common/bacula-director-mysql.conf

Creating config file /etc/dbconfig-common/bacula-director-mysql.conf with new version
Processing configuration...Ok.
 * Starting Bacula Director...
13-12月 02:13 bacula-dir: ERROR TERMINATION at lex.c:784
Config error: expected a string, got T_EOL: =
            : line 236, col 12 of file /etc/bacula/bacula-dir.conf
  dbname = ; DB Address = ""; dbuser = ""; dbpassword = ""

   ...fail!

This happened because you did not enter any configuration value for 'dbname'. There may be db backends where that is ok (I think pgsql will put user here if it is empty), but it should surround the value in quotes like the address/user/password.

This occurs because of the way the file is generated in debian/bacula-director-mysql.postinst and could be corrected by simply wrapping the dbname in quotes. Marking this Triaged.

I'm also going to add dbconfig-common because it should never allow an empty dbname for mysql, as this is never actually a valid situation.

summary: - package bacula-director-mysql 5.0.1-1ubuntu1 failed to install/upgrade:
- サブプロセス installed post-installation script はエラー終了ステータス 1 を返しました
+ bacula-dir.conf shows syntax error when dbname is left blank
Changed in bacula (Ubuntu):
status: New → Triaged
summary: - bacula-dir.conf shows syntax error when dbname is left blank
+ bacula-dir.conf shows syntax error when mysql dbname is left blank
Chuck Short (zulcss) on 2011-01-03
Changed in dbconfig-common (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Changed in bacula (Debian):
status: Unknown → Fix Committed
Changed in bacula (Debian):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bacula - 5.0.3-0ubuntu2

---------------
bacula (5.0.3-0ubuntu2) natty; urgency=low

  * debian/bacula-directory-{mysql,pgsql}.postinst: Wrap $dbc_dbname
    in quotes in postinst. (LP: #689327)
 -- Chuck Short <email address hidden> Mon, 07 Mar 2011 10:00:03 -0500

Changed in bacula (Ubuntu):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbconfig-common - 2.0.6

---------------
dbconfig-common (2.0.6) unstable; urgency=medium

  * Fix dbc_dbname preseeding regression caused by the fix for LP#689327
    (Closes: #835987)
  * [tests] Fixed failure on CI.d.n and autopkgtest.u.c (Closes: #835981)
  * Update lintian overrides for recent PostgreSQL upgrade example package

 -- Paul Gevers <email address hidden> Thu, 01 Sep 2016 22:33:34 +0200

Changed in dbconfig-common (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.