Debian Bug report logs - #476946
dbconfig-common does not honor preseeded values, if priority is too low

version graph

Package: dbconfig-common; Maintainer for dbconfig-common is Sean Finney <seanius@debian.org>; Source for dbconfig-common is src:dbconfig-common.

Reported by: Michael Tautschnig <mt@debian.org>

Date: Sat, 19 Apr 2008 09:57:05 UTC

Severity: important

Tags: d-i, patch

Merged with 619362, 625710

Found in versions dbconfig-common/1.8.38, dbconfig-common/1.8.46+squeeze.0

Blocking fix for 516562: dbc: leaves debconf database in inconsistent state

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>:
Bug#476803; Package roundcube. Full text and rfc822 format available.

Acknowledgement sent to Michael Tautschnig <mt@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Michael Tautschnig <mt@debian.org>
To: bugs@debian.org
Subject: Debconf use is utterly broken
Date: Sat, 19 Apr 2008 11:47:01 +0200
[Message part 1 (text/plain, inline)]
Package: roundcube
Version: 0.1.1-1

Roundcube uses debconf to fetch proper database settings. This is broken in
several ways:
- The questions do not make use of preseeded values. In fact it seems that only
  roundcube/hosts is honored, all others are ignored (including
  roundcube/language)
- If, in contrast to the defaults, mysql over tcp/ip is configured (this may
  apply to other non-defaults as well) via debconf answers entered by the users,
  this is completely ignored, the options never end up in
  /etc/roundcube/debian-db.php

It would be cool if you could fix this, it would make a very nice package a bit
easier to administrate.

Thanks,
Michael

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>:
Bug#476803; Package roundcube. Full text and rfc822 format available.

Acknowledgement sent to Vincent Bernat <bernat@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 476803@bugs.debian.org (full text, mbox):

From: Vincent Bernat <bernat@debian.org>
To: Michael Tautschnig <mt@debian.org>
Cc: 476803@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#476803: Debconf use is utterly broken
Date: Sat, 19 Apr 2008 16:46:14 +0200
[Message part 1 (text/plain, inline)]
tags 476803 + moreinfo unreproducible
thanks

OoO  En cette  fin de  matinée radieuse  du samedi  19 avril  2008, vers
11:47, Michael Tautschnig <mt@debian.org> disait:

> Package: roundcube
> Version: 0.1.1-1

> Roundcube uses debconf to fetch proper database settings. This is broken in
> several ways:
> - The questions do not make use of preseeded values. In fact it seems that only
>   roundcube/hosts is honored, all others are ignored (including
>   roundcube/language)
> - If, in contrast to the defaults, mysql over tcp/ip is configured (this may
>   apply to other non-defaults as well) via debconf answers entered by the users,
>   this is completely ignored, the options never end up in
>   /etc/roundcube/debian-db.php

Hi Michael!

Thanks  for your report.  I have  used a  clean sid  chroot to  do those
tests. Here is my preseed file:

8<-----------------------------------------------------------------
roundcube-core	roundcube/mysql/method	select	tcp/ip
roundcube-core	roundcube/dbconfig-reinstall	boolean	false
roundcube-core	roundcube/purge	boolean	false
roundcube-core	roundcube/language	select	de_DE
roundcube-core	roundcube/db/dbname	string	roundcube
roundcube-core	roundcube/remote/newhost	string	127.0.0.2
roundcube-core	roundcube/remote/port	string	3319
roundcube-core	roundcube/restart-webserver	boolean	false
roundcube-core	roundcube/install-error	select	ignore
roundcube-core	roundcube/mysql/admin-user	string	root
roundcube-core	roundcube/hosts	string	ssl://dummy.test:993
roundcube-core	roundcube/database-type	select	mysql
roundcube-core	roundcube/remote/host	select	127.0.0.2
roundcube-core	roundcube/db/app-user	string	roundcube
8<-----------------------------------------------------------------

I  load the  preseed  file with  debconf-set-selections  then I  install
roundcube   with  "apt-get  install   -y  -q   roundcube  roundcube-core
roundcube-mysql". I get the following debian-db.php :

8<-----------------------------------------------------------------
$dbuser='roundcube';
$dbpass='ZvWD4IbQJHt6';
$basepath='';
$dbname='roundcube';
$dbserver='127.0.0.2';
$dbport='3319';
$dbtype='mysql';
8<-----------------------------------------------------------------

This seems to work fine for me. What is your preseed file?

Because of  some black magic in config,  roundcube/language gets ignored
when preseeded. I will try to fix this one.
-- 
MY NAME IS NOT DR. DEATH
MY NAME IS NOT DR. DEATH
MY NAME IS NOT DR. DEATH
-+- Bart Simpson on chalkboard in episode 8F18
[Message part 2 (application/pgp-signature, inline)]

Tags added: moreinfo, unreproducible Request was from Vincent Bernat <bernat@debian.org> to control@bugs.debian.org. (Sat, 19 Apr 2008 14:48:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>:
Bug#476803; Package roundcube. Full text and rfc822 format available.

Acknowledgement sent to Vincent Bernat <bernat@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #17 received at 476803@bugs.debian.org (full text, mbox):

From: Vincent Bernat <bernat@debian.org>
To: Michael Tautschnig <mt@debian.org>
Cc: 476803@bugs.debian.org
Subject: Re: Bug#476803: Debconf use is utterly broken
Date: Sat, 19 Apr 2008 16:57:13 +0200
[Message part 1 (text/plain, inline)]
OoO  En cette  fin de  matinée radieuse  du samedi  19 avril  2008, vers
11:47, Michael Tautschnig <mt@debian.org> disait:

> Roundcube uses debconf to fetch proper database settings. This is broken in
> several ways:
> - The questions do not make use of preseeded values. In fact it seems that only
>   roundcube/hosts is honored, all others are ignored (including
>   roundcube/language)

Hi again Michael!

I have fixed the roundcube/language problem  in the SVN. I wait for your
feedback about other problems before uploading.
-- 
die_if_kernel("Whee... Hello Mr. Penguin", current->tss.kregs);
	2.2.16 /usr/src/linux/arch/sparc/kernel/traps.c
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>:
Bug#476803; Package roundcube. Full text and rfc822 format available.

Acknowledgement sent to Michael Tautschnig <mt@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #22 received at 476803@bugs.debian.org (full text, mbox):

From: Michael Tautschnig <mt@debian.org>
To: Vincent Bernat <bernat@debian.org>
Cc: 476803@bugs.debian.org
Subject: Re: Bug#476803: Debconf use is utterly broken
Date: Sun, 20 Apr 2008 12:07:32 +0200
[Message part 1 (text/plain, inline)]
Hi Vincent,

Thanks for your really quick reply.

> 
> Thanks  for your report.  I have  used a  clean sid  chroot to  do those
> tests. Here is my preseed file:
> 
[...]

I'm missing one important answer in this preseeding: 

# Configure database for roundcube with dbconfig-common?
roundcube-core roundcube/dbconfig-install boolean

The answer must obviously be yes, because otherwise it doesn't put any useful
information into debian-db.php at all (only dbuser and dbname will be set).
Actually I would have guessed that I don't want to use dbconfig because I'd
prefer to set up the database myself, but anyway:

=================================================================
corn:/# debconf-get-selections | grep roundcube
corn:/# cat bla
roundcube-core  roundcube/mysql/method  select  tcp/ip
roundcube-core  roundcube/dbconfig-reinstall    boolean false
roundcube-core  roundcube/purge boolean false
roundcube-core  roundcube/language      select  de_DE
roundcube-core  roundcube/db/dbname     string  roundcube
roundcube-core  roundcube/remote/newhost        string  127.0.0.2
roundcube-core  roundcube/remote/port   string  3319
roundcube-core  roundcube/restart-webserver     boolean false
roundcube-core  roundcube/install-error select  ignore
roundcube-core  roundcube/mysql/admin-user      string  root
roundcube-core  roundcube/hosts string  ssl://dummy.test:993
roundcube-core  roundcube/database-type select  mysql
roundcube-core  roundcube/remote/host   select  127.0.0.2
roundcube-core  roundcube/db/app-user   string  roundcube

corn:/# debconf-set-selections < bla
corn:/# apt-get -y -q install roundcube-mysql roundcube-core roundcube
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libneon26 libace5.4.7ldbl python2.4-minimal libcwidget1 python2.4
Use 'apt-get autoremove' to remove them.
Suggested packages:
  mysql-server
The following NEW packages will be installed:
  roundcube roundcube-core roundcube-mysql
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/601kB of archives.
After this operation, 3449kB of additional disk space will be used.
Preconfiguring packages ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Selecting previously deselected package roundcube-mysql.
(Reading database ... 69249 files and directories currently installed.)
Unpacking roundcube-mysql (from .../roundcube-mysql_0.1.1-1_all.deb) ...
Selecting previously deselected package roundcube-core.
Unpacking roundcube-core (from .../roundcube-core_0.1.1-1_all.deb) ...
Selecting previously deselected package roundcube.
Unpacking roundcube (from .../roundcube_0.1.1-1_all.deb) ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up roundcube-mysql (0.1.1-1) ...
Setting up roundcube-core (0.1.1-1) ...
dbconfig-common: writing config to /etc/dbconfig-common/roundcube.conf

Creating config file /etc/dbconfig-common/roundcube.conf with new version

Creating config file /etc/roundcube/debian-db.php with new version
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
unable to connect to mysql server.
error encountered creating user:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dbconfig-common: roundcube configure: ignoring errors from here forwards
populating database via sql...  done.
dbconfig-common: flushing administrative password

Creating config file /etc/roundcube/main.inc.php with new version
Lighttpd not installed, skipping
Setting up roundcube (0.1.1-1) ...
corn:/# cat /etc/roundcube/debian-db.php 
<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/roundcube.conf
## by /usr/sbin/dbconfig-generate-include
## Sun, 20 Apr 2008 09:25:10 +0000
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='roundcube';
$dbpass='Wwb66E5nDGNx';
$basepath='';
$dbname='roundcube';
$dbserver='';
$dbport='';
$dbtype='mysql';
corn:/# 
=================================================================

> 
> This seems to work fine for me. What is your preseed file?
> 
So, even using your preseeding on an up-to-date sid system, it doesn't really
work. Of course I don't actually have a server named dummy.test and the like,
but dbconfig is not really making use of this, but rather attempts to connect to
the local socket, which doesn't exist (because I don't have a local mysqld
here).

> Because of  some black magic in config,  roundcube/language gets ignored
> when preseeded. I will try to fix this one.

So, well, let me try to refine my report:
- Preseeding does work, apart from the language, which you have fixed in SVN
  already.
- The configuration of a remote mysql server, however, seems not to work.

Then, this is not actually the work of roundcube, but rather dbconfig-common,
which is doing this work. I will thus clone and reassign this bug, leaving the
original bug for the locale-reconfiguration problem.

Thanks again for your quick response,
Michael

[Message part 2 (application/pgp-signature, inline)]

Bug 476803 cloned as bug 476946. Request was from Michael Tautschnig <mt@debian.org> to control@bugs.debian.org. (Sun, 20 Apr 2008 10:15:05 GMT) Full text and rfc822 format available.

Bug reassigned from package `roundcube' to `dbconfig-common'. Request was from Michael Tautschnig <mt@debian.org> to control@bugs.debian.org. (Sun, 20 Apr 2008 10:15:10 GMT) Full text and rfc822 format available.

Changed Bug title to `dbconfig-common does not honor preseeded values, if priority is too low' from `Debconf use is utterly broken'. Request was from Michael Tautschnig <mt@debian.org> to control@bugs.debian.org. (Sun, 20 Apr 2008 10:15:11 GMT) Full text and rfc822 format available.

Tags removed: moreinfo, unreproducible Request was from Michael Tautschnig <mt@debian.org> to control@bugs.debian.org. (Sun, 20 Apr 2008 10:27:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. Full text and rfc822 format available.

Acknowledgement sent to Michael Tautschnig <mt@debian.org>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. Full text and rfc822 format available.

Message #35 received at 476946@bugs.debian.org (full text, mbox):

From: Michael Tautschnig <mt@debian.org>
To: 476946@bugs.debian.org
Subject: Preseeding and priorities
Date: Sun, 20 Apr 2008 12:28:55 +0200
[Message part 1 (text/plain, inline)]
As shown in the above report, in my case roundcube fails to configure, because
it seems to ignore the preseeded values. In fact, it is dbconfig-common that
ignores these values.

This seems to be related to the priority of the question being too low, as I
need to run dpkg-reconfigure -p low roundcube-core to get around to all the
questions, in which case configuration finally succeeds. If I omit the "-p low",
I don't get asked the questions (that might be ok), and defaults are used
instead (which is not ok, as I had provided the answers via preseeding).

Best,
Michael

[Message part 2 (application/pgp-signature, inline)]

Blocking bugs of 516562 added: 476946 Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Mon, 23 Feb 2009 15:45:10 GMT) Full text and rfc822 format available.

Forcibly Merged 476946 516562. Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Fri, 08 Jan 2010 11:06:09 GMT) Full text and rfc822 format available.

Added indication that 476946 affects phpmyadmin Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Fri, 08 Jan 2010 11:06:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Thu, 11 Nov 2010 23:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Stephen J. Smith" <stsmith@manta.com>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Thu, 11 Nov 2010 23:21:03 GMT) Full text and rfc822 format available.

Message #46 received at 476946@bugs.debian.org (full text, mbox):

From: "Stephen J. Smith" <stsmith@manta.com>
To: 476946@bugs.debian.org
Subject: also affects phpbb
Date: Thu, 11 Nov 2010 18:06:18 -0500
This bug also affects phpbb, which uses dbconfig-common.

Thanks,
Stephen




Forcibly Merged 476946 516562 619362. Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Wed, 23 Mar 2011 08:03:04 GMT) Full text and rfc822 format available.

Added indication that 476946 affects phpmyadmin Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Wed, 23 Mar 2011 08:03:06 GMT) Full text and rfc822 format available.

Forcibly Merged 476946 516562 619362 625710. Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Thu, 05 May 2011 10:36:49 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Thu, 05 May 2011 11:12:56 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Eriksson <stefan@glesys.se>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Thu, 05 May 2011 11:12:57 GMT) Full text and rfc822 format available.

Message #57 received at 476946@bugs.debian.org (full text, mbox):

From: Stefan Eriksson <stefan@glesys.se>
To: 476946@bugs.debian.org
Subject: still breaks phpmyadmin using dbconfig-common 1.8.46+squeeze.0
Date: Thu, 5 May 2011 13:04:05 +0200
> Hi I'm trying to automate the installation of PhpMyAdmin, I add:
> 
> echo phpmyadmin phpmyadmin/dbconfig-install boolean false | debconf-set-
selections
> echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2 | 
debconf-set-selections
> 
> So the two questions I get, should be automatically run through, but even 
with "phpmyadmin/dbconfig-install boolean false"
> I end up with a question about setting admin password.
> 
> "This can be optionally handled with dbconfig-common. 
> Configure database for phpmyadmin with dbconfig-common? "
> 
> The answer should be "no" here as I've set boolean false but it goes with 
yes and tries to configure the database which I dont want :(
> 
> Is there a way through this problem? How do I autoconfigure it to say no to 
the dbconfig-common question in the installation script?

This is known bug in dbconfig-common that it ignores preseed. See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476946 for more
information. Merging bug accordingly.




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Thu, 05 May 2011 13:00:51 GMT) Full text and rfc822 format available.

Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Thu, 05 May 2011 13:00:52 GMT) Full text and rfc822 format available.

Message #62 received at 476946@bugs.debian.org (full text, mbox):

From: sean finney <seanius@debian.org>
To: Stefan Eriksson <stefan@glesys.se>, 476946@bugs.debian.org
Subject: Re: Bug#476946: still breaks phpmyadmin using dbconfig-common 1.8.46+squeeze.0
Date: Thu, 5 May 2011 15:00:11 +0200
Hi,

On Thu, May 05, 2011 at 01:04:05PM +0200, Stefan Eriksson wrote:
> > The answer should be "no" here as I've set boolean false but it goes with 
> yes and tries to configure the database which I dont want :(
> > 
> > Is there a way through this problem? How do I autoconfigure it to say no to 
> the dbconfig-common question in the installation script?
> 
> This is known bug in dbconfig-common that it ignores preseed. See
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476946 for more
> information. Merging bug accordingly.

I haven't read the full reports, but I've gotten similar questions from
users before about this.  I think the problem is that you shouldn't be
relying on debconf to do th work for you in the first place (i.e. "debconf
is not a registry").  dbconfig-common is internally stateless, so it goes
out of its way to always use the local config rather than the transient
data in the debconf cache.

Instead of (or in addition to, guess it wouldn't hurt...) pre-seeding
debconf, have you tried just plopping in a config file at
/etc/dbconfig-common/<pkg>.conf ?  The rest of the process (creating
tables/users/custom config files) should then honor that configuration.


	sean

-- 




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Wed, 25 May 2011 21:29:24 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Anthony L. Awtrey" <tony@awtrey.com>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Wed, 25 May 2011 21:29:29 GMT) Full text and rfc822 format available.

Message #67 received at 476946@bugs.debian.org (full text, mbox):

From: "Anthony L. Awtrey" <tony@awtrey.com>
To: 476946@bugs.debian.org
Subject: Re: Bug#476946: still breaks phpmyadmin using dbconfig-common
Date: Wed, 25 May 2011 17:17:24 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Sean,

When I investigated using your configuration file suggestion, I
discovered a slew of debconf messages requesting that I select which
version of the config file to keep, confirmations about overwriting the
file, etc. If you are going for simple package installs for end users,
this doesn't appear to be the answer either.

You and I emailed recently discussing preseed options so packages using
dbconfig-common can be installed during a hands-free installation
(remote box, cloud instance, etc.). I was able to get it to work, but I
had to do a combination of preseeding and scripting in the packages
config script to get it functional. While it works for now, it is far
from elegant and I keep running into edge case bugs where the package is
previously installed, or partially installed or removed but not purged.

It would be nice to have the ability to preseed all dbconfig-common
messages away or at the very least be able to provide dbconfig-common a
starting default configuration that is *not* in the same location as the
one it generates itself.

Thanks for the hard work on this package!

Tony
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJN3XHkAAoJEAPVzrg8Oofb5G4H/jctNp8cUgy8tHkw9nUjPqys
7F5wucyPrB8h+lN3egstCuJCMujJ7K0W5o/Cd1w9oBEjwZFU6TtVFTR/KUBzI5h8
Tfs/n3af1B918kYoh9i+oxRTWk9gR0bENgkd7c7eZ8X9QCHtvNtU0vZZM7XpX1fI
1ZRc+UinXK6hDGkKPV/9ktYoNVIm3zd97FZFJH9y5bFbZsRTtuJBVFqtOpxMhwhQ
OndaJ6Qa/KkVSvkyaBx+mxqYdgKOF6sz3HhDSn16VZvxVTzbeI1GbH+Xtn2uPCMJ
YVNjph2IM5pLjr1VV506PYiVQW5BVRMFKiF6fF5jYNnjPm+qUcy/iNSVsfX/4lg=
=YC0T
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Sat, 04 Feb 2012 00:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clint Byrum <clint@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Sat, 04 Feb 2012 00:57:03 GMT) Full text and rfc822 format available.

Message #72 received at 476946@bugs.debian.org (full text, mbox):

From: Clint Byrum <clint@ubuntu.com>
To: 476946 <476946@bugs.debian.org>
Subject: Also reported in Ubuntu
Date: Fri, 03 Feb 2012 16:53:43 -0800
Just an FYI, this was also reported in Ubuntu here:

https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/807038




Severity set to 'serious' from 'normal' Request was from Thomas Goirand <zigo@debian.org> to control@bugs.debian.org. (Thu, 23 Feb 2012 20:39:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Tue, 28 Feb 2012 12:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Tue, 28 Feb 2012 12:39:05 GMT) Full text and rfc822 format available.

Message #79 received at 476946@bugs.debian.org (full text, mbox):

From: Thomas Goirand <thomas@goirand.fr>
To: 476946 <476946@bugs.debian.org>
Subject: Affecting a lot of other packages
Date: Tue, 28 Feb 2012 20:19:52 +0800
Hi,

We really would like this to be solved. This bug affects *a lot* of
packages, and is really annoying.

Any clue why this is happening? I probably will have a look into it.

Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Fri, 09 Mar 2012 17:57:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Bazik <jsb@cs.brown.edu>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Fri, 09 Mar 2012 17:57:07 GMT) Full text and rfc822 format available.

Message #84 received at 476946@bugs.debian.org (full text, mbox):

From: John Bazik <jsb@cs.brown.edu>
To: 476946@bugs.debian.org
Subject: unattended installs
Date: Fri, 9 Mar 2012 12:47:12 -0500
This bug makes unattended installs extremely difficult.  I have a
remote postgresql server, and I cannot find a workable combination
of debconf settings that allows the sympa package (which uses
dbconfig-common) to install without error.

Without the ability to preseed the dbc answers, sympa fails to
install.  Even preseeding dbconfig-common this way:

* dbconfig-common/dbconfig-install: false
* dbconfig-common/dbconfig-remove: false
* dbconfig-common/dbconfig-upgrade: false
* dbconfig-common/missing-db-package-error: ignore

Does not stop this package from attempting to contact the database
server, and create a database admin user:

Setting up sympa (6.1.4~dfsg-1~bpo60+1) ...
dbconfig-common: writing config to /etc/dbconfig-common/sympa.conf
warning: database package not installed?
chown: invalid user: `postgres'
unable to connect to postgresql server.
error encountered creating user:
Unknown id: postgres
dbconfig-common: sympa configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing sympa (--configure):
 subprocess installed post-installation script returned error exit status 1

John




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#476946; Package dbconfig-common. (Fri, 16 Mar 2012 18:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Finney <seanius@debian.org>:
Extra info received and forwarded to list. (Fri, 16 Mar 2012 18:57:03 GMT) Full text and rfc822 format available.

Message #89 received at 476946@bugs.debian.org (full text, mbox):

From: Sean Finney <seanius@debian.org>
To: Thomas Goirand <zigo@debian.org>
Cc: 476946@bugs.debian.org
Subject: Re: dbconfig-common: #476946 affecting so many packages
Date: Fri, 16 Mar 2012 20:20:00 +0100
Hi Thomas,

(adding the bug to CC as there's no reason to contact me personally).

On Thu, Mar 15, 2012 at 08:38:56PM +0800, Thomas Goirand wrote:
> I am very concerned by #476946. It's affecting a lot of packages:
> - phpmyadmin
> - roundcube
> - keystone
> - etc.
> 
> I had a look, and I can't really find how dbconfig works. As I
> understand, everything is in dpkg/*, right? But then, how does it work?
> Can you describe it a bit, so that I can find faster where the issue is?
> Or maybe you can try to find the reason why there is #476946?

For starters, I suggest you read through the documentation.  There is
a design document shipped in the package :)


The problem in this case is that, by design, dbconfig-common is nuking
all debconf settings before each run because "Debconf is not a registry",
and Really Bad Things can happen to other people who are *not* pre-seeding
if we allow the debconf settings to persist between installs/upgrades/etc.

If you want to make pre-seeding work, without dropping the files in place
ahead of time (which seemed to have unrelated problems, though my memory
is pretty hazy on this topic by now), I think you'll have to patch
dbconfig-common to:

 * accept a new debconf flag (let's call it
   "dbconfig-common/debconf_is_a_registry").
 * find the portions of the code where the debconf settings are nuked, and;
   * make it conditional based on this new debconf value.
   * nuke the value of this new debconf setting immediately afterwards.
 * add mention of this behavior to the design document.
 * add mention of this feature to the developer "using" guide.

If you or someone else is feeling particularly adventurous I'm happy to
review a proposed change that does the above (or if you can motivate a
better way to do it by all means be my guest).  If you want bonus l33t
points, there is a shunit based test framework which could use a test
case for the same, though I wouldn't be so mean as to force you to figure
that out as a pre-condition :)



	sean




Information forwarded to debian-bugs-dist@lists.debian.org, elbrus@debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Sat, 13 Oct 2012 15:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Gevers <elbrus@debian.org>:
Extra info received and forwarded to list. Copy sent to elbrus@debian.org, Sean Finney <seanius@debian.org>. (Sat, 13 Oct 2012 15:09:06 GMT) Full text and rfc822 format available.

Message #94 received at 476946@bugs.debian.org (full text, mbox):

From: Paul Gevers <elbrus@debian.org>
To: Debian Bug Tracking System <476946@bugs.debian.org>
Subject: dbconfig-common: Instead of adding debconf flag, shouldn't we parse the configure file?
Date: Sat, 13 Oct 2012 16:59:01 +0200
Package: dbconfig-common
Followup-For: Bug #476946

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Discussing this bug on the BSP in Utrecht [1], we were wondering if this issue could
not be fixed by parsing the configuration file if it exists (and using that with higher)
priority than the debconf values). If the file does not exist you can then just use the
debconf values, regardless of whether they come from preseeding or not.

An example of such a scheme is in the pioneers-meta-server package.

We will file a wishlist bug on debconf to offer parsing of configuration files, similar
to the functionality in pioneers-meta-server.

[1] http://wiki.debian.org/BSP/2012/10/nl/Utrecht
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlB5gbUACgkQHNUte6r+CGqbmgCfbOsaqWHw27F0kmjLFdl+7Vdb
5/cAnin8hu0wY75LxByLG9FbmqwSCqHr
=A/a9
-----END PGP SIGNATURE-----



Severity set to 'important' from 'serious' Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Sat, 29 Dec 2012 17:33:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Sean Finney <seanius@debian.org>:
Bug#476946; Package dbconfig-common. (Tue, 16 Jul 2013 21:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Gevers <elbrus@debian.org>:
Extra info received and forwarded to list. Copy sent to Sean Finney <seanius@debian.org>. (Tue, 16 Jul 2013 21:21:03 GMT) Full text and rfc822 format available.

Message #101 received at 476946@bugs.debian.org (full text, mbox):

From: Paul Gevers <elbrus@debian.org>
To: 476946@bugs.debian.org
Subject: Re: Re: dbconfig-common: #476946 affecting so many packages
Date: Tue, 16 Jul 2013 23:18:36 +0200
[Message part 1 (text/plain, inline)]
I was digging into this issue for some time now and I think that I can
get it to work (at least in the pre-seed before installation case).

As a test, I just pre-seeded my package cacti successfully (full
pre-seed at the bottom) by adding
cacti cacti/mysql/admin-pass password here_my_admin_passwd_for_mysql
to the pre-seed file. dbconfig-common than just does the right thing.

However, if I don't want the database to be configured, but still I want
the proper config file, i.e. cacti/dbconfig-install=false,
dbconfig-common does not use the pre-seeded values for the configuration
file unless I specify cacti/internal/skip-preseed=true and disable line
347 of /usr/share/dbconfig-common/dpkg/common.

>  * accept a new debconf flag (let's call it
>    "dbconfig-common/debconf_is_a_registry").

I believe that this flag already exist per package. It is
<package>/internal/skip-preseed=true.

This skip-preseed works because of line 233 in
/usr/share/dbconfig-common/dpkg/common which needs to store the
dbc_install value, which is otherwise overwritten with the hardcoded
dbc_install=true on line 202.

Of course that skip-preseed variable was meant as an internal of
dbconfig-common, but I would say that this bug shows that there is great
need for pre-seeding of packages managed by dbconfig-common. So my
proposal would be to remove line 347 in dpkg/common and document the
rest of this behavior.

I still have to check if/how dpkg-reconfigure works in this respect and
will follow up later on that.

Paul

Full working pre-seed for cacti at default priority:
cacti	cacti/db/app-user       string  cacti
cacti	cacti/db/dbname 	string  cacti
cacti	cacti/dbconfig-install  boolean true
cacti	cacti/mysql/admin-pass	password here_root_passwd
cacti	cacti/mysql/admin-user  string  root
cacti	cacti/mysql/app-pass	password blablabla
cacti	cacti/webserver		select  apache2

Full working (with line 347 disabled) pre-seed for cacti if I don't want
to configure the database:
cacti	cacti/db/app-user       string  cacti
cacti	cacti/db/dbname 	string  cacti
cacti	cacti/dbconfig-install  boolean false
cacti	cacti/internal/skip-preseed	boolean	true
cacti	cacti/mysql/app-pass	password blablabla
cacti	cacti/webserver		select  apache2
[allow_debconf_preseeding_in_case_of_no_install.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Disconnected #516562 from all other report(s). Request was from Paul Gevers <elbrus@debian.org> to control@bugs.debian.org. (Sat, 20 Jul 2013 21:06:08 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Paul Gevers <elbrus@debian.org> to control@bugs.debian.org. (Sat, 20 Jul 2013 21:18:07 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 02:02:58 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.