On Sun, 12 Dec 2010 09:41:28 -0600, John Goerzen wrote: > Hi Gregor,
Hi John!
> It looks like something got confused in your NMU.
First of all, I'm really sorry for this mess.
> Can you investigate?
I think Marc's analysis is correct. A bit more details:
BINDIR is set in various places by replacing @SQL_BINDIR@ which is
determined (for the postgresql variant) at configure time by calling
`pg_config --bindir'. pg_config is in libpq-dev and returns
/usr/lib/postgresql/$VERSION/bin where $VERSION is different for the
different versions of postgresql/libpq-dev.
Since libpq-dev is at 9.0.1-2 in sid it will always return
/usr/lib/postgresql/9.0/bin if bacula is built in sid.
Looking throught debian/patches and debian/changelog I see that there
is a patch (debian/patches/fix_scripts.sed) that replaced
"@SQL_BINDIR@" with "/usr/bin" in various scripts until 1.38.9; then
the patch was not applied anymore and the result of pkg_config used.
From what I see using /usr/bin is probably still the only way to go
in order to make sure that the postgresql scripts work for different
postgresql versions. And as far as I can see only psql and pg_dump
are used, which are available in /usr/bin/.
Now the question is how to proceed:
- Apply a similar patch like fix_scripts.sed again; I have to admit
that the magic in the old debian/rules seems a bit complicated :)
- Directly patch the path in configure (and maybe
autoconf/bacula-macros/db.m4?)
- An easy ways seems to be to call ./configure with
"--with-postgresql=/usr". That leads to
SQL binaries Directory /usr/bin
in config.out [0] and BINDIR in make_catalog_backup is set to
/usr/bin (and $ENV{PATH} in make_catalog_backup.pl doesn't contain
/usr/lib/postgresql/9.0/bin any more).
The third option looks quite promising; the only thing that concerns
me is that the batch insert support seems to get turned off?! But
this only happens on i386 and not on amd64 so it is probably
unrelated. -- I'm attaching the trivial diff for this possible
solution.
> You have my permission to prepare a 0-day NMU to fix
> it.
Thanks for the permission and your trust; but I admit that I'd prefer
a review before messing up this package again.
> Thanks, by the way, for preparing that NMU.
You're welcome!
Cheers,
gregor
[0]
https://buildd.debian.org/fetch.cgi?pkg=bacula;ver=5.0.2-2.1;arch=amd64;stamp=1291052525
e.g. shows
SQL binaries Directory /usr/lib/postgresql/9.0/bin
--
.''`. http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
: :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
`- NP: [DKP]: Lied der Partisanen (Frankreich)
diff -u bacula-5.0.2/debian/rules bacula-5.0.2/debian/rules --- bacula-5.0.2/debian/rules +++ bacula-5.0.2/debian/rules @@ -74,7 +74,7 @@ CONF_sqlite3 = --with-sqlite3 --without-mysql --without-postgresql --without-sqlite \ --enable-tray-monitor --enable-bat CONF_mysql = --with-mysql --without-sqlite --without-postgresql --without-sqlite3 $(CONF_common) -CONF_pgsql = --with-postgresql --without-sqlite --without-mysql --without-sqlite3 $(CONF_common) +CONF_pgsql = --with-postgresql=/usr --without-sqlite --without-mysql --without-sqlite3 $(CONF_common) ###########################################################################
signature.asc
Description: Digital signature

