From e31cfd5aefcf3fe77ccbbcf265b259e3998f559b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 24 Feb 2025 06:05:21 +0100 Subject: [PATCH] Applying patch from Helmut Grohne to fix installation on bookworm causing file loss (Closes: #1092737). Signed-off-by: Daniel Baumann --- debian/control | 5 +++++ debian/zutils.preinst | 2 ++ 2 files changed, 7 insertions(+) diff --git a/debian/control b/debian/control index 93cea68..bb449e2 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,11 @@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, +Breaks: +# We must ensure that gzip is upgraded before zutils.postinst runs. As it is +# essential, Breaks is sufficient here and the janitor may propose dropping +# this relation eventually. + gzip (<< 1.12-1.1~), Suggests: bzip2, lzip, diff --git a/debian/zutils.preinst b/debian/zutils.preinst index 557bdba..0b242e6 100755 --- a/debian/zutils.preinst +++ b/debian/zutils.preinst @@ -8,6 +8,8 @@ case "${1}" in install) for FILE in zcat zcmp zdiff zegrep zfgrep zgrep do + # We may move $FILE to $FILE.gzip when we expected $FILE.gzip.usr-is-merged here. + # This is ok, because gzip will be upgraded and overwrite $FILE.gzip. dpkg-divert --package zutils --quiet --add --rename --divert "/usr/bin/${FILE}.gzip" "/usr/bin/${FILE}" dpkg-divert --package zutils --quiet --add --rename --divert "/bin/${FILE}.gzip.usr-is-merged" "/bin/${FILE}" dpkg-divert --package zutils --quiet --add --rename --divert /usr/share/man/man1/${FILE}.gzip.1.gz /usr/share/man/man1/${FILE}.1.gz