#1092737 zutils: may delete gzip files when installed on bookworm (DEP17)

Package:
zutils
Source:
zutils
Description:
utilities for dealing with compressed files transparently
Submitter:
Helmut Grohne
Date:
2025-01-14 12:45:01 UTC
Severity:
normal
Tags:
#1092737#5
Date:
2025-01-11 07:40:36 UTC
From:
To:
Hi,

I noticed that my understanding of dpkg-divert's --rename flag was wrong
when I wrote the DEP17 patch for zutils. Details at
https://lists.debian.org/debian-devel/2025/01/msg00125.html. This
happens to affect zutils. If you install trixie's zutils on bookworm, it
will wrongly rename gzip's tools causing them to subsequently get lost.
You may reproduce the broken behaviour as follows:

mmdebstrap bookworm /dev/null http://deb.debian.org/debian --verbose --variant=apt --customize-hook='sed -i -e s/bookworm/sid/ "$1/etc/apt/sources.list"' --chrooted-customize-hook="apt-get update" --chrooted-customize-hook="apt-get -y install zutils" --chrooted-customize-hook="ls -l /usr/bin/z*" --chrooted-customize-hook='dpkg --verify; test -z "$(dpkg --verify)"'

What I learned hints that there is a relatively simple way out of this
situation. If zutils were to depend on a moved gzip, the unpack of the
moved gzip would "heal" the loss of files. A side benefit is that this
reduces the test matrix as zutils.postinst may no longer run with an
aliased gzip being unpacked.

Ideally, we'd not want zutils to depend on gzip (as it has no reason
otherwise). We may turn this into a Breaks relation as gzip is essential
and remains essential. Such a Breaks relation can automatically be
garbage collected by the Debian janitor. With an updated package, the
failure is no longer reproducible:

mmdebstrap bookworm /dev/null http://deb.debian.org/debian --verbose --variant=apt --customize-hook='sed -i -e s/bookworm/sid/ "$1/etc/apt/sources.list"' --chrooted-customize-hook="apt-get update" --customize-hook="upload zutils_1.14~rc1-2.1_amd64.deb /z.deb" --chrooted-customize-hook="apt-get -y install /z.deb" --chrooted-customize-hook="ls -l /usr/bin/z*" --chrooted-customize-hook='dpkg --verify; test -z "$(dpkg --verify)"'

Patch attached.

Helmut

#1092737#10
Date:
2025-01-14 12:41:39 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
zutils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1092737@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel.baumann@progress-linux.org> (supplier of updated zutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 14 Jan 2025 11:00:14 +0100
Source: zutils
Architecture: source
Version: 1.14-1
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
Changed-By: Daniel Baumann <daniel.baumann@progress-linux.org>
Closes: 1092737
Changes:
 zutils (1.14-1) sid; urgency=medium
 .
   * Uploading to sid.
   * Merging upstream version 1.14.
   * Applying patch from Helmut Grohne <helmut@subdivi.de> to fix
     installation on bookworm causing file loss (Closes: #1092737).
Checksums-Sha1:
 6f91d1aebfb97eebddae81f15b3f9f2258688b9e 1291 zutils_1.14-1.dsc
 4921a7ce6384b6e79c95f4a38ac24378ae8a8aae 66060 zutils_1.14.orig.tar.xz
 b0f5578c5c45081ab8442a9b1e17efd775922d35 7952 zutils_1.14-1.debian.tar.xz
 6032bd6a1cc74484fd20ee2029296610a98eb470 5676 zutils_1.14-1_amd64.buildinfo
Checksums-Sha256:
 68e77249ae82f4574af3fd011535b5eea7db2fcdb5afaf85dd8ed44989dfe756 1291 zutils_1.14-1.dsc
 8fe3c2bd8944363e5f2c0df8fc6a2166085c1a552981802512681968ddc8e95c 66060 zutils_1.14.orig.tar.xz
 1ff5fae4e67375df50790ba0e32aa136102d7396fbc17f1bb260c65a7ef2d897 7952 zutils_1.14-1.debian.tar.xz
 3a78fdf96cc732766ffdc72d9058513e465543ee3afe400b88cfcd39093fd418 5676 zutils_1.14-1_amd64.buildinfo
Files:
 2e08019cd28582e06306893db8555514 1291 utils optional zutils_1.14-1.dsc
 ec114339bcdc8399a64f651043f53f44 66060 utils optional zutils_1.14.orig.tar.xz
 1a60fe3302bcc67098c9908c91679620 7952 utils optional zutils_1.14-1.debian.tar.xz
 d22e17c921122cf813bb9d6207d2a8a6 5676 utils optional zutils_1.14-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQQmmGg4gLaoSj0ERgL7tPDoCoAiLwUCZ4ZU6QAKCRD7tPDoCoAi
L/DRAP9o2WxYZNsullW/j1JG4VgopZKs1ZcgBnwYqDDWYSwA3QEA9kqScBy3syz7
EQ0i6gIDk1rp5PctIEG0bCsy5wfq6w0=
=i5rq
-----END PGP SIGNATURE-----