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

Carsten Leonhardt leo at debian.org
Wed Aug 13 07:57:59 BST 2025


Sven Hartge <sven at svenhartge.de> writes:

> I build both branches and diffoscoped the debs. Resulting report is
> attached.
>
> In the mysql script the only change is in both
> ./usr/share/dbconfig-common/data/bacula-director-mysql/install/mysql
> and ./usr/share/bacula-director/make_mysql_tables
>
> │ │ │ │ -   `MinValue` INTEGER DEFAULT 0,
> │ │ │ │ -   `MaxValue` INTEGER DEFAULT 0,
> │ │ │ │ +   \`MinValue\` INTEGER DEFAULT 0,
> │ │ │ │ +   \`MaxValue\` INTEGER DEFAULT 0,
>
>
> And for Postgres this looks like this
> in./usr/share/bacula-director/update_postgresql_tables,
> /usr/share/bacula-director/make_postgresql_tables AND
> ./usr/share/dbconfig-common/data/bacula-director-pgsql/install/pgsql
>
> │ │ │ │ -do $$
> │ │ │ │ +do \$\$
> │ │ │ │  declare
> │ │ │ │    selected_ext pg_extension%rowtype;
> │ │ │ │  begin
> │ │ │ │
> │ │ │ │    select 1 from pg_extension
> │ │ │ │      into selected_ext
> │ │ │ │    where extname = 'pg_trgm';
> │ │ │ │
> │ │ │ │    if not found then
> │ │ │ │       CREATE EXTENSION pg_trgm;
> │ │ │ │    end if;
> │ │ │ │ -end $$;
> │ │ │ │ +end \$\$;
>
> For Postgres is does not affect the special upgrade-dbadmin/ script,
> because that was a manual addition.
>
> So it for MySQL and Postgres affects the dbconfig snippets and the
> manual upgrade scripts.
>
> I wonder of the change to the dbconfig ones will break them.

For some reason I only changed one instance in the db extractor. It
should be good now, diffoscope looks good too.

Next, I'm planning to merge your flip_db_upgrade_question, add a
message on abort and upload.

 - Carsten



More information about the pkg-bacula-devel mailing list