[Pkg-bareos-devel] Bug#771870: Bug#771870: bareos-database-common: fails to install: bareos-database-common.config: /usr/sbin/bareos-dbcheck: not found

Evgeni Golov evgeni at debian.org
Fri Dec 5 11:19:12 UTC 2014


[ CCing -release@ whether this should be treated as a bug in
bareos-database-common or dbconfig-common or not-at-all ]

On 12/05/2014 09:58 AM, Evgeni Golov wrote:
> The funny part is: there is no database at all, so dbconfig-common
> should have just silently died in a corner. Chasing this now.

Yeah, should...

dbconfig-common ships with an example: db-test-multidbtype-2.0, which
behaves fine if no databases are installed and install is called with
DEBIAN_FRONTEND=noninteractive:

root at nana:~# DEBIAN_FRONTEND=noninteractive dpkg -i
/tmp/db-test-multidbtype_2.0_all.deb
Selecting previously unselected package db-test-multidbtype.
(Reading database ... 254799 files and directories currently installed.)
Preparing to unpack .../db-test-multidbtype_2.0_all.deb ...
Unpacking db-test-multidbtype (2.0) ...
Setting up db-test-multidbtype (2.0) ...
dbconfig-common: writing config to
/etc/dbconfig-common/db-test-multidbtype.conf

Creating config file /etc/dbconfig-common/db-test-multidbtype.conf with
new version
warning: database package not installed?
sanity check failed for createuser.
error encountered creating user:
No pgsql createuser to execute. (have you installed postgresql-client?
dbconfig-common: db-test-multidbtype configure: noninteractive fail.
dbconfig-common: db-test-multidbtype configure: ignoring errors from
here forwards
populating database via sql...  done.
dbconfig-common: flushing administrative password

However, if I modify its config file like this:
--- a/debian/config
+++ b/debian/config
@@ -6,7 +6,10 @@ set -e
 . /usr/share/debconf/confmodule

 if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
-       dbc_dbtypes="mysql, pgsql"
+       dbc_dbtypes=""
+       # let's assume we try to populate dbc_dbtypes dynamically here
+       # e.g. by looking for files from recommended packages or something
+       # but we come empty in the end
        dbc_authmethod_user="password"
        . /usr/share/dbconfig-common/dpkg/config
        dbc_go db-test-multidbtype $@

It will fail the very same way bareos-database-common fails:

root at nana:~# DEBIAN_FRONTEND=noninteractive dpkg -i
/tmp/db-test-multidbtype_2.1_all.deb
Selecting previously unselected package db-test-multidbtype.
(Reading database ... 254799 files and directories currently installed.)
Preparing to unpack .../db-test-multidbtype_2.1_all.deb ...
Unpacking db-test-multidbtype (2.1) ...
Setting up db-test-multidbtype (2.1) ...
dpkg: error processing package db-test-multidbtype (--install):
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
 db-test-multidbtype

I can't find a real answer in the dbconfig-common documentation, but the
variables overview says:
"database types supported by the package, in order of maintainers'
preference (defaults to: empty)"
So I would think having an empty dbc_dbtypes sometimes is valid.

Not sure how to continue from here, the real fix seems to be reverting
the "dependency loop" fix, which is not my favorite right now. Let's ask
the RT:

Dear RT, do you think this is a RC bug in bareos and should be fixed by
reverting the previous fix (or restructuring the package, but that is
probably out of scope at this time of the freeze)? Or is this something
we could ignore for jessie (the package is not designed to be installed
by itself anyways)? Or should we move the can of worms over to
dbconfig-common?

Regards
Evgeni



More information about the Pkg-bareos-devel mailing list