Package: bareos
Version: 14.2.1+20141017gitc6c5b56-3+deb8u3
Severity: serious
Justification: Policy 10.7.3

I've been happily using the bareos packages on jessie for a bit now (thank
you for maintaining them!)

I attempted to upgrade bareos to 14.2.1+20141017gitc6c5b56-3+deb8u3
(from +deb8u2) this afternoon, and it failed to configure. Here is
trying to configure it again:

root@Bennu:~# dpkg --configure -a
Setting up bareos-database-common (14.2.1+20141017gitc6c5b56-3+deb8u3) ...
Warning: no database version defined for release 14.2.1+20141017gitc6c5b56 
(14.2.1+20141017gitc6c5b56-3+deb8u2). Using default version: 2003
(config) dbc_go() bareos-database-common configure 2003.
dbc_config() bareos-database-common configure 2003.
dbc_set_dbtype_defaults() .
dbc_register_debconf() .
dbc_read_package_config() .
dbc_preseed_package_debconf() .
dbc_detect_supported_dbtype() pgsql.
dbc_detect_installed_dbtype() pgsql.
_dbc_detect_installed_dbtype() pgsql.
dbc_config() bareos-database-common configure 2003.
dbc_set_dbtype_defaults() pgsql.
dbc_get_app_pass() .
Warning: no database version defined for release 14.2.1+20141017gitc6c5b56 
(14.2.1+20141017gitc6c5b56-3+deb8u2). Using default version: 2003
dbconfig-common: writing config to 
/etc/dbconfig-common/bareos-database-common.conf
dbconfig-common: flushing administrative password
FAILED to set Catalog MyCatalog dbdriver = postgresql 
(/etc/bareos/bareos-dir.conf)

... which would make sense because I don't have a catalog called
MyCatalog, except reading /usr/lib/bareos/scripts/bareos-config-lib.sh
it turns out its actually nowhere near that robust; it's just looking
for "dbdriver = ..." and failing to find it. That's broken for at least
three reasons:

   1) The documented parameter name is "DB Driver"; see
      
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#directiveDirCatalogDB%20Driver
      and bareos of course doesn't care about capitalization or spacing
      (which is why dbdriver also works).

   2) Config files can include other config files, so the db config may
      not even be in that file at all.

   3) It blindly overwrites any configuration changes made by the admin,
      which isn't permitted by Debian Policy §10.7.3. (In my case,
      bareos-dir.conf is actually a generated file — directly editing it
      is broken.)

Thankfully, there is a fairly easy approach that solves all these
problems: put the default Debian database config in its own file
(possibly under /var/lib/bareos/) and then @-include it into the shipped
bareos-dir.conf. Then you don't have to touch the configuration file.


(I fixed my system by commenting out the apply_dbconfig_settings line in
/var/lib/dpkg/info/bareos-database-common.postinst).


 -- System Information:
Debian Release: 8.10
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-0.bpo.4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bareos depends on:
ii  bareos-client    14.2.1+20141017gitc6c5b56-3+deb8u3
iu  bareos-director  14.2.1+20141017gitc6c5b56-3+deb8u3
ii  bareos-storage   14.2.1+20141017gitc6c5b56-3+deb8u3

bareos recommends no packages.

bareos suggests no packages.

-- no debconf information

_______________________________________________
Pkg-bareos-devel mailing list
Pkg-bareos-devel@lists.alioth.debian.org
https://lists.alioth.debian.org/mailman/listinfo/pkg-bareos-devel

Reply via email to