Your message dated Mon, 12 May 2025 17:04:15 +0000
with message-id <e1uewzb-005ogy...@fasolo.debian.org>
and subject line Bug#1105163: fixed in zutils 1.14-5
has caused the Debian Bug report #1105163,
regarding zutils: -4 upload breaks piuparts
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1105163: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1105163
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: zutils
Version: 1.14-4
Severity: serious
Justification: piuparts failure breaks testing migration
Tags: patch
X-Debbugs-Cc: jspri...@debian.org
User: helm...@debian.org
Usertags: dep17

Hi,

Jochen made me aware that zutils didn't pass piuparts. When I came up
with the previous patch, I foolishly concluded that I'd be better than
piuparts at coming up with tests and wrote tests that didn't cover the
obvious. I ran everything through my tests and didn't bother running
piuparts in the end. Now piuparts fails.

I introduced a logic inversion. When moving the diverted files on a
fresh installation, the .usr-is-merged suffix is appended whenever it
should not be and vice versa. It is the ${GZIP_PREFIX:+.usr-is-merged}
interpolation that is wrong.

For some reason beyond my comprehension, I ruled out dpkg --verify as a
tool for testing. Don't task me why. It finds this issue. Additionally,
I've also implemented manual verification of diverted files. The updated
tools now also fail with current unstable.

I'm attaching updated test cases as well as another patch. Let me know
if you prefer me to handle the upload. The patch now also handles
upgrading from the broken -4 version that never reached trixie. This
scenario is not covered by the attached tests, but I manually verified
that the wrongly moved files get corrected.

Last but not least, the attached version passes piuparts this time.

I'll also follow up with the unblock request.

I really hope that this is the last iteration for zutils.

Helmut
diff --minimal -Nru zutils-1.14/debian/changelog zutils-1.14/debian/changelog
--- zutils-1.14/debian/changelog        2025-05-02 04:32:33.000000000 +0200
+++ zutils-1.14/debian/changelog        2025-05-12 12:45:18.000000000 +0200
@@ -1,3 +1,10 @@
+zutils (1.14-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix moving of diverted files again. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 12 May 2025 12:45:18 +0200
+
 zutils (1.14-4) sid; urgency=medium
 
   * Applying patch from Helmut Grohne <hel...@subdivi.de> to fix broken
diff --minimal -Nru zutils-1.14/debian/zutils.preinst 
zutils-1.14/debian/zutils.preinst
--- zutils-1.14/debian/zutils.preinst   2025-05-02 04:30:28.000000000 +0200
+++ zutils-1.14/debian/zutils.preinst   2025-05-12 12:45:18.000000000 +0200
@@ -25,7 +25,11 @@
                # We cannot run between gzip.preinst and gzip unpack.
                GZIP_VERSION=$(dpkg-query -f '${Version}' -W gzip)
                GZIP_PREFIX=/usr
-               dpkg --compare-versions "$GZIP_VERSION" lt 1.12-1.1~ && 
GZIP_PREFIX=
+               GZIP_SUFFIX=
+               dpkg --compare-versions "$GZIP_VERSION" lt 1.12-1.1~ && {
+                       GZIP_PREFIX=
+                       GZIP_SUFFIX=.usr-is-merged
+               }
                for FILE in zcat zcmp zdiff zegrep zfgrep zgrep
                do
                        TRUENAME=$(dpkg-divert --truename "/usr/bin/${FILE}")
@@ -42,7 +46,7 @@
                        # on the gzip version.
                        dpkg-divert --package zutils --quiet --add --no-rename 
--divert "/usr/bin/${FILE}.gzip" "/usr/bin/${FILE}"
                        dpkg-divert --package zutils --quiet --add --no-rename 
--divert "/bin/${FILE}.gzip.usr-is-merged" "/bin/${FILE}"
-                       mv "${DPKG_ROOT:-}${TRUENAME}" 
"${DPKG_ROOT:-}${GZIP_PREFIX}/bin/${FILE}.gzip${GZIP_PREFIX:+.usr-is-merged}"
+                       mv "${DPKG_ROOT:-}${TRUENAME}" 
"${DPKG_ROOT:-}${GZIP_PREFIX}/bin/${FILE}.gzip${GZIP_SUFFIX}"
                        dpkg-divert --package zutils --quiet --add --rename 
--divert /usr/share/man/man1/${FILE}.gzip.1.gz /usr/share/man/man1/${FILE}.1.gz
                done
                ;;
@@ -85,8 +89,14 @@
                                                mv "${DPKG_ROOT}${TRUENAME}" 
"${DPKG_ROOT}/bin/${FILE}.gzip.usr-is-merged"
                                        fi
                                fi
-                       elif [ "${TRUENAME}" != "/usr/bin/${FILE}.gzip" ]
+                       elif [ "${TRUENAME}" = "/usr/bin/${FILE}.gzip" ]
                        then
+                               # 1.14-4 wrongly moved files. Fix.
+                               if [ -e 
"${DPKG_ROOT:-}/usr/bin/${FILE}.gzip.usr-is-merged" ] && ! [ -e 
"${DPKG_ROOT:-}/usr/bin/${FILE}.gzip" ]
+                               then
+                                       mv 
"${DPKG_ROOT:-}/usr/bin/${FILE}.gzip.usr-is-merged" 
"${DPKG_ROOT:-}/usr/bin/${FILE}.gzip"
+                               fi
+                       else
                                die "unexpected diversion of /usr/bin/${FILE} 
to ${TRUENAME}"
                        fi
                done

Attachment: testcase.sh
Description: Bourne shell script

TESTS= \
        unpgzip-confgzip-unpzutils-confzutils-rmzutils \
        unpgzip-confgzip-unpzutils-rmzutils \
        unpgzip-unpzutils-confgzip-confzutils-rmzutils \
        unpgzip-unpzutils-confgzip-rmzutils \
        unpgzip-unpzutils-confzutils-confgzip-rmzutils \
        unpgzip-unpzutils-confzutils-rmzutils-confgzip \
        unpgzip-unpzutils-rmzutils-confgzip \
        unpzutils-unpgzip-confgzip-confzutils-rmzutils \
        unpzutils-unpgzip-confgzip-rmzutils \
        unpzutils-unpgzip-confzutils-confgzip-rmzutils \
        unpzutils-unpgzip-confzutils-rmzutils-confgzip \
        unpzutils-unpgzip-rmzutils-confgzip \
        unpzutils-confzutils-unpgzip-confgzip-rmzutils \
        unpzutils-confzutils-rmzutils \
        unpzutils-rmzutils-unpgzip-confgzip \
        withzutils-deinstzutils-unpgzip-rmzutils-confgzip \
        
withzutils-deinstzutils-unpgzip-rmzutils-unpzutils-confgzip-confzutils-rmzutils 
\
        
withzutils-deinstzutils-unpgzip-rmzutils-unpzutils-confzutils-confgzip-rmzutils 
\
        withzutils-unpzutils-unpgzip-confgzip-confzutils-rmzutils \
        withzutils-unpzutils-unpgzip-confzutils-confgzip-rmzutils \
        withzutils-unpzutils-unpgzip-rmzutils-confgzip \
        withzutils-unpzutils-confzutils-unpgzip-confgzip-rmzutils \


all: $(foreach t,$(TESTS),testout/$(t))

testout/%:
        ./testcase.sh "$*" >"$@" 2>&1; echo $$? >> "$@"

--- End Message ---
--- Begin Message ---
Source: zutils
Source-Version: 1.14-5
Done: Daniel Baumann <dan...@debian.org>

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 1105...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <dan...@debian.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 ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 12 May 2025 18:52:03 +0200
Source: zutils
Architecture: source
Version: 1.14-5
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <dan...@debian.org>
Changed-By: Daniel Baumann <dan...@debian.org>
Closes: 1105163
Changes:
 zutils (1.14-5) sid; urgency=medium
 .
   * Applying patch from Helmut Grohne <hel...@subdivi.de> to fix moving of
     diverted files again (Closes: #1105163).
Checksums-Sha1:
 03496f29d950d356d8a68d8f9df8b2ec2eb3208c 1203 zutils_1.14-5.dsc
 2366d9b7bdbbb12d8ee7cce01497ab687fef47fe 8492 zutils_1.14-5.debian.tar.xz
 80dbc1a5a0cddb64c329045a56bc7be44cfdbe5c 5669 zutils_1.14-5_amd64.buildinfo
Checksums-Sha256:
 1634d82752a3b0a2b903ecc1c2f155334ba976396d80690b8513f0186e919e21 1203 
zutils_1.14-5.dsc
 6ceb29a22a878aef9f7c097bd6569d8cb53b62ed3582b79a2a05797e6097c755 8492 
zutils_1.14-5.debian.tar.xz
 69c668abb276e434401314b8ce7e8f2b530c069e52fc6e4842a3b41aa69458e4 5669 
zutils_1.14-5_amd64.buildinfo
Files:
 29e5193be02828366fc1ca117b718f4f 1203 utils optional zutils_1.14-5.dsc
 c6491d429cde21b74d697f9edee0af91 8492 utils optional 
zutils_1.14-5.debian.tar.xz
 1179f8acfcc0ec1ac01797e750f3f93f 5669 utils optional 
zutils_1.14-5_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQQmmGg4gLaoSj0ERgL7tPDoCoAiLwUCaCInkwAKCRD7tPDoCoAi
L6DeAQDDSVM2R1UtOcWuM5iA8x6IylgOYPEDHf1TE7uJBTbrEwEAuf1r7vwmjZDL
khRQUdrbWJfCOIbCPbHRBt3x00+NTwQ=
=9NXD
-----END PGP SIGNATURE-----

Attachment: pgp3otPARMOu0.pgp
Description: PGP signature


--- End Message ---

Reply via email to