crash on multiple db install with dbc_dbpass in config

Bug #252882 reported by Sylvain Garcia
Affects Status Importance Assigned to Milestone
dbconfig-common (Debian)
Fix Released
dbconfig-common (Ubuntu)
Declined for Intrepid by Mathias Gug

Bug Description

Binary package hint: dbconfig-common

using dbconfig-common we can set variables on config script like:

When I use dbconfig, with hardcoded_dbtype, like /usr/share/dbconfig-common/dpkg/config.mysql or /usr/share/dbconfig-common/dpkg/config.pgsql there are no problem.

Now I want use multiple db config, so I use /usr/share/dbconfig-common/dpkg/config with in my config script dbc_dbname, dbc_dbuser, dbc_dbpass; and I have an error:

debconf (developer): <-- SET obm-storage/pgsql/authmethod-admin ident
debconf (developer): --> 0 value set
debconf (developer): <-- SET obm-storage/pgsql/authmethod-user password
debconf (developer): --> 0 value set
debconf (developer): <-- SET obm-storage/db/app-user obm
debconf (developer): --> 0 value set
debconf (developer): <-- SET obm-storage//app-pass mypassword
debconf (developer): --> 10 obm-storage//app-pass doesn't exist

Now, multiple db config without dbc_dbpass in my config script all works well.

In fact in /usr/share/dbconfig-common/dpkg/common line 261, this script try to set debconf variable but $dbc_dbtype is not yet set.

I attach this patch which verify that $dbc_dbtype is set

Revision history for this message
Sylvain Garcia (sylvain-garcia) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

The patch still applies.

Changed in dbconfig-common (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in dbconfig-common (Ubuntu):
assignee: nobody → Charlie_Smotherman (porthose) (cjsmo)
status: Triaged → In Progress
Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Here is Sylvain Garcia's patch ready for Karmic. Subscribing Universe sponsors.

Changed in dbconfig-common (Ubuntu):
assignee: Charlie_Smotherman (porthose) (cjsmo) → nobody
status: In Progress → New
Changed in dbconfig-common (Ubuntu):
status: New → Confirmed
Revision history for this message
Soren Hansen (soren) wrote :

Something here does not completely add up:

  # for authenticated-only dbtypes. also catches empty (multidb) type.
- if echo "$dbc_authenticated_dbtypes" | grep -q "$dbc_dbtype"; then
+ if [$dbc_dbtype ] && echo "$dbc_authenticated_dbtypes" | grep -q "$dbc_dbtype"; then

The comment above the changed line says: "also catches empty (multidb) type."
a) Applying the change will make that comment untrue and quite confusing.
b) The original developer clearly meant for the conditional to match an empty (multidb) dbc_dbtype.

It also seems to me that if this patch is applied, the password will not be set based on the values in /etc/dbconfig-common/*?

Revision history for this message
Soren Hansen (soren) wrote :

How about something like this?

I've not tested it at all, so please take it with a grain of salt.

Revision history for this message
Soren Hansen (soren) wrote :

I strongly recommend taking this up with upstream, though. This also affects Debian and I would prefer not to have to maintain a diff for something like this.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thanks for the patch. Please forward the patch to the upstream bug tracker to get upstream advice. Unsubscribing the sponsorship team for now. Please subscribe it again once a final patch has been acknowledged by upstream.

Revision history for this message
Paul Gevers (paul-climbing) wrote : alternative solution for bug 252882: "crash on multiple db install"

Sorry that it took so long to follow up on this bug, but dbconfig-common
has been rather unmaintained last couple of years. I am taking over the
maintainership of dbconfig-common in Debian and will upload a new
version to debian/experimental in the next couple of days/weeks.

Although I think the solution by Soren is correct, I rather have a
solution that still works when $dbc_authenticated_dbtypes is expended. I
am thinking of the attached solution, but I would appreciate it when
somebody could verify that it works for the multiple db path. Otherwise,
giving me a use case example (does anybody know a package that uses this
scenario?) would be extremely helpful.


Revision history for this message
Paul Gevers (paul-climbing) wrote :

Changelog from 1.8.48:
  * Fix multiple db support install. Thanks to Sylvain Garcia and Soren
    Hansen (LP: #252882)

Changed in dbconfig-common (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

dbconfig-common (1.8.52) unstable; urgency=medium

  * Forgot to install dbconfig-common for the CI tests
  * Update French translation by Julien Patriarca (Closes: #789908)

 -- Paul Gevers <email address hidden> Fri, 26 Jun 2015 13:42:50 +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.

Other bug subscribers