Re: Bug#1109499: bacula-director-sqlite3: fails to dist-upgrade from bookworm to trixie

Niels Thykier <[email protected]> Sun, 20 Jul 2025 09:45:37 +0200
Newsgroups gmane.linux.debian.devel.dpkg.general
Message-ID <[email protected]>
clone 1109499 -1
clone 1109499 -2
retitle 1109499 bacula-common: preinst intentionally breaks upgrade
retitle -1 dpkg: Silent on invoking postinst abort-upgrade
reassign -1 dpkg
# Annoying to debug but not RC in itself
severity -1 important
retitle -2 bacula-common: Silent when aborting the upgrade
severity -2 important

thanks

On Sat, 19 Jul 2025 11:40:14 +0200 Chris Hofstaedtler <[email protected]> 
wrote:
> On Sat, Jul 19, 2025 at 11:06:17AM +0200, Niels Thykier wrote:
> > FWIW, I checked the stable version of bacula-common and it has the same
> > story. The `systemd-tmpfiles` call only appears in the `postinst`, so there
> > is no way I can find that a `bacula-common.preinst` call would trigger
> > `systemd-tmpfiles` 
> 
> It turns out multiple issues are involved here:
> 
> 1) bacula-common's preinst fails
> 
> 2) because of the preinst failure, dpkg calls abort-upgrade; in 
> this step systemd-tmpfiles fails. This is because libc6 did not get 
> upgraded yet, which is caused by #1108193
> 
> 3) dpkg does not inform us that it calls abort-upgrade.
> 
> Looking at 1) closer, it appears bacula-common intentionally 
> defaults to breaking upgrades, by means of defaulting a debconf 
> question of "Do you want to continue with the upgrade?" to <No>.
> 
> I doubt this is acceptable. bacula-common already skips the question 
> under piuparts, which seems to me like a hack. Other automated tools 
> (QA or configuration management tools) are not considered.
> 
> IMO the default needs to become <Yes>.
> 
> Best,
> Chris
> 



Thanks for debugging this.

I have cloned and reassign a bug for `dpkg` to make it announce postinst 
abort-upgrade, so this becomes less of a problem in the future. 
@Guillem: Concretely, the issue is we were only informed about `preinst` 
failing but in reality `preinst` failed and then `postinst 
abort-upgrade` failed as well. The output we saw from the maintscript 
itself was from `postinst` (the preinst failure was silent, so the 
postinst failure was the only output we had to go from).


@Bacula team: I have split this into two bugs for you.

  - #1109499 remains RC and is about preinst defaulting to fail on a
    non-interactive upgrade test.

  - A new bug (important) about the preinst being silent on aborting
    the upgrade. It would have helped a lot of the preinst had explicitly
    echo'ed "Aborting upgrade as requested" (or something along those
    lines), as it would have been easier to identify the root cause
    here

Thanks to Lucas and Chris for their work identifying the bug and finding 
the root cause.

Best regards,
Niels
OpenPGP_signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE9ecZmu9eXGflVYc/dA1oiINl0okFAmh8nqEACgkQdA1oiINl
0om8MAgAoXqIZ86+nOpRX4fXV6CvMTD2JL97ttyIC36aZ8DBI2FZXa20sW9GCFPm
3uu1dSfVdcJejKepr/ov3pPRdvNeNCEZqtpNzrYekA9dCn1V5bsilOVVCchz1zs7
NPU0FgMrG2dnF2VOz22SPuksQgp+qBsIewTq1tlpMvgCTeu/upy9P1RewR7uMoOF
0XrFZ1aGZJKkZMo4FrL6O6vrDj7rCNVZ4LrA1EytUzD0FarWFYPIr8rLZXzHlEIo
mqgWeGr90zQIv/OE0oIXJCmWXaSdc7m+nXpOqQSuwARoTV40WxW+mA8hBKJv2CmH
JTyUgEy3I/NcNXbf/Gh7/s1xAAnnTQ==
=tBY+
-----END PGP SIGNATURE-----