Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597666 - app-backup/bacula[postgres] needs rebuilding when dev-db/postgresql slot changes
Summary: app-backup/bacula[postgres] needs rebuilding when dev-db/postgresql slot changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Beierlein
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-21 07:21 UTC by Karl-Johan Karlsson
Modified: 2016-11-10 16:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Johan Karlsson 2016-10-21 07:21:33 UTC
After upgrading dev-db/postgresql from 9.5 to 9.6, but before depcleaning 9.5, app-backup/bacula-7.4.4 stopped being able to back up its own catalog, giving the following error message:

  shell command: run BeforeJob "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"
  BeforeJob: pg_dump: server version: 9.6.0; pg_dump version: 9.5.4
  BeforeJob: pg_dump: aborting because of server version mismatch
  Error: Runscript: BeforeJob returned non-zero status=1. ERR=Child exited with code 1

This turned out to be because Bacula hard-codes the path to the binaries from the currently active PostgreSQL version at build time. See e.g. http://www.bacula.org/git/cgit.cgi/bacula/tree/bacula/src/cats/make_catalog_backup.pl.in#n120

Interestingly, app-backup/bacula-7.4.4 explicitly suppresses any rebuilds when PostgreSQL changes slots, by having this dependency:

  postgres? ( dev-db/postgresql:*[threads] )

I think the slot operator should be ":=" instead, to force a rebuild.
Comment 1 Thomas Beierlein gentoo-dev 2016-10-26 13:05:54 UTC
(In reply to Karl-Johan Karlsson from comment #0)
> After upgrading dev-db/postgresql from 9.5 to 9.6, but before depcleaning
> 9.5, app-backup/bacula-7.4.4 stopped being able to back up its own catalog,
> giving the following error message:
> 
>   shell command: run BeforeJob "/usr/libexec/bacula/make_catalog_backup.pl
> MyCatalog"
>   BeforeJob: pg_dump: server version: 9.6.0; pg_dump version: 9.5.4
>   BeforeJob: pg_dump: aborting because of server version mismatch
>   Error: Runscript: BeforeJob returned non-zero status=1. ERR=Child exited
> with code 1
> 
Thanks for pointing that out. Good catch.

> This turned out to be because Bacula hard-codes the path to the binaries
> from the currently active PostgreSQL version at build time. See e.g.
> http://www.bacula.org/git/cgit.cgi/bacula/tree/bacula/src/cats/
> make_catalog_backup.pl.in#n120

That is not quite the file that is distributed with 7.4.4 (please check yourself) but similar. 

> 
> Interestingly, app-backup/bacula-7.4.4 explicitly suppresses any rebuilds
> when PostgreSQL changes slots, by having this dependency:
> 
>   postgres? ( dev-db/postgresql:*[threads] )
> 
> I think the slot operator should be ":=" instead, to force a rebuild.

I will prepare a -r1 version soon.
Comment 2 Thomas Beierlein gentoo-dev 2016-11-10 16:11:26 UTC
Fixed in 7.4.4-r1.

>    app-backup/bacula: Update init.d service scripts bug #595044
>    and fix slot operator for dev-db/postgresql bug #597666