Bug#1108272: [pkg-bacula-devel] Bug#1108272: bacula-director-pgsql: update_postgresql_tables script fails due to bad shell quoting

2025-07-28 Thread Carsten Leonhardt
Carsten Leonhardt  writes:

> I've implemented it and it seems much more elegant - just a call to sed
> instead of a patch that needs manual attention when things change. When
> I have time I'll do a binary comparison of the resulting packages.
>
> It's in the branch unescape-shell-quoting.

When we apply this, it also addresses Ubuntu bug 1882032.



Bug#1108272: [pkg-bacula-devel] Bug#1108272: bacula-director-pgsql: update_postgresql_tables script fails due to bad shell quoting

2025-06-30 Thread Carsten Leonhardt
Sven Hartge  writes:

> I can see the correct quotation of $$ in the source for that script,
> but this seems to get mangled during build.

I wonder if I should rework the database stuff so that it will
shell-unquote during the extraction process and not patch the upstream
scripts, so that people can still use them as-is if they want. I think
that would be better overall.

(Some time later)

I've implemented it and it seems much more elegant - just a call to sed
instead of a patch that needs manual attention when things change. When
I have time I'll do a binary comparison of the resulting packages.

It's in the branch unescape-shell-quoting.

 - Carsten



Bug#1108272: [pkg-bacula-devel] Bug#1108272: bacula-director-pgsql: update_postgresql_tables script fails due to bad shell quoting

2025-06-28 Thread Carsten Leonhardt
Hi Wouter,

Wouter Verhelst  writes:

> So debconf-show bacula-director-pgsql shows me this, amongst others:
>
> * bacula-director-pgsql/dbconfig-upgrade: false
>
> Which indicates that perhaps, somehow, it is indeed disabled. This is
> not what I wanted.
>
> I don't remember manually setting this option. When I run
> "dpkg-reconfigure -plow bacula-director-pgsql" to correct it, it asks me
> if I want to *reinstall* the database (which I read as "throw away
> everything in your catalog away and start from scratch", which is a hard
> "no"), but does not ask me the question about upgrading.
>
> This feels wrong on so many levels. I'm not sure whether this is decided
> in dbconfig-common or in bacula, but if the latter, please fix that :-)

I'd recommend that you use an editor to set 

dbc_upgrade='true'

in /etc/dbconfig-common/bacula-director-pgsql.conf. That will make
future upgrades work.

In the debconf information included in the original bug report the
corresponding line starts with an '*'. That probably means that it
was set to deviate from the default via debconf. How that happened is a
question that will be hard to answer. Which version of bacula did you
start your deployment with originally?

Groetjes,

Carsten