Your message dated Thu, 16 Jan 2025 06:04:54 +0000
with message-id <e1tyizu-00cegc...@fasolo.debian.org>
and subject line Bug#1092956: fixed in progress-linux-metapackages 20221002-21
has caused the Debian Bug report #1092956,
regarding progress-linux-container: incorrect --rename flags in duplicated
diversions (DEP17)
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.)
--
1092956: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092956
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: progress-linux-metapackages
Version: 20221002-20
Severity: serious
Tags: patch
User: helm...@debian.org
Usertags: dep17
Hi,
I'm sorry to tell you that I still got the duplicated diversions wrong.
The full story is at
https://lists.debian.org/debian-devel/2025/01/msg00125.html. In any
case, I managed to reproduce bad scenarios for progress-linux-container
whilst it is not part of bookworm. The main issue here is that --rename
may be specified for the canonicalized diversion when the actual file is
aliased and then it may be renamed in a bad way making dpkg unhappy.
Theoretically (affecting upgrades from bullseye to trixie), the order of
diversions was wrong as diversion targets must not overlap. Adding the
canonicalized diversion was failing as the aliased diversion had not yet
changed its target.
I'm attaching a patch that fixes both and also attaching my test cases
(that are all passing now). I added more comments such that the mess
becomes easier to understand by my future self and others.
Helmut
diff --minimal -Nru progress-linux-metapackages-20221002/debian/changelog
progress-linux-metapackages-20221002/debian/changelog
--- progress-linux-metapackages-20221002/debian/changelog 2024-12-12
18:04:29.000000000 +0100
+++ progress-linux-metapackages-20221002/debian/changelog 2025-01-13
16:34:35.000000000 +0100
@@ -1,3 +1,10 @@
+progress-linux-metapackages (20221002-20.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix --rename flags on duplicated diversions (DEP17 M18, Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de> Mon, 13 Jan 2025 16:34:35 +0100
+
progress-linux-metapackages (20221002-20) sid; urgency=medium
* Uploading to sid.
diff --minimal -Nru
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
---
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
2024-12-12 18:01:20.000000000 +0100
+++
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
2025-01-13 16:34:31.000000000 +0100
@@ -8,26 +8,22 @@
for FILE in halt poweroff reboot shutdown coldreboot
do
- TRUENAME_USR="$(dpkg-divert --truename
"/usr/sbin/${FILE}")"
- TRUENAME_ALIAS="$(dpkg-divert --truename
"/sbin/${FILE}")"
+ # DEP17 M18 duplicated diversion, can be removed after
trixie.
RENAME_FLAG="--no-rename"
+ TRUENAME_ALIAS="$(dpkg-divert --truename
"/sbin/${FILE}")"
- if [ "${TRUENAME_USR}" = "/usr/sbin/${FILE}" ]
+ if [ "${TRUENAME_ALIAS}" = "/sbin/${FILE}" ]
then
- if [ "${TRUENAME_ALIAS}" = "/sbin/${FILE}" ]
+ # Rename if the file is presently installed as
aliased.
+ if dpkg -S "/sbin/${FILE}" 2>/dev/null | grep
-q "^[^ ]*: /sbin/${FILE}\$"
then
RENAME_FLAG="--rename"
fi
- dpkg-divert --package progress-linux-container
--quiet --add "${RENAME_FLAG}" --divert
"/usr/lib/container/divert/${FILE}.orig" "/usr/sbin/${FILE}"
- fi
-
- # DEP17 M18 duplicated diversion, can be removed after
trixie.
- if [ "${TRUENAME_ALIAS}" = "/sbin/${FILE}" ]
- then
dpkg-divert --package progress-linux-container
--quiet --add "${RENAME_FLAG}" --divert
"/lib/container/divert/${FILE}.orig.usr-is-merged" "/sbin/${FILE}"
elif [ "${TRUENAME_ALIAS}" !=
"/lib/container/divert/${FILE}.orig.usr-is-merged" ]
then
+ # Change the diversion target. Must be done
before adding the canonicalized diversion below.
dpkg-divert --package progress-linux-container
--quiet --remove --no-rename "/sbin/${FILE}"
dpkg-divert --package progress-linux-container
--quiet --add --no-rename --divert
"/lib/container/divert/${FILE}.orig.usr-is-merged" "/sbin/${FILE}"
@@ -36,6 +32,10 @@
mv "${TRUENAME_ALIAS}"
"/lib/container/divert/${FILE}.orig.usr-is-merged"
fi
fi
+
+ # We may rename unconditionally here. If the file is
aliased, the earlier --rename will have moved it.
+ dpkg-divert --package progress-linux-container --quiet
--add --rename --divert "/usr/lib/container/divert/${FILE}.orig"
"/usr/sbin/${FILE}"
+
done
for FILE in pm-hibernate pm-suspend pm-suspend-hybrid
@@ -44,6 +44,7 @@
if [ "${TRUENAME_USR}" =
"/lib/container/divert/${FILE}.orig" ]
then
+ # Update diversion target from aliased to
canonical.
dpkg-divert --package progress-linux-container
--quiet --remove --no-rename "/usr/sbin/${FILE}"
dpkg-divert --package progress-linux-container
--quiet --add --no-rename --divert "/usr/lib/container/divert/${FILE}.orig"
"/usr/sbin/${FILE}"
else
test-pl.sh
Description: Bourne shell script
--- End Message ---
--- Begin Message ---
Source: progress-linux-metapackages
Source-Version: 20221002-21
Done: Daniel Baumann <daniel.baum...@progress-linux.org>
We believe that the bug you reported is fixed in the latest version of
progress-linux-metapackages, 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 1092...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Daniel Baumann <daniel.baum...@progress-linux.org> (supplier of updated
progress-linux-metapackages 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: SHA256
Format: 1.8
Date: Thu, 16 Jan 2025 06:44:15 +0100
Source: progress-linux-metapackages
Architecture: source
Version: 20221002-21
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <daniel.baum...@progress-linux.org>
Changed-By: Daniel Baumann <daniel.baum...@progress-linux.org>
Closes: 1092956
Changes:
progress-linux-metapackages (20221002-21) sid; urgency=medium
.
* Uploading to sid.
* Applying patch from Helmut Grohne <hel...@subdivi.de> to fix --rename
flags on duplicated diversions (DEP17 M18, Closes: #1092956).
Checksums-Sha1:
5939cd7c99e56c618fd499eb9f029f10ce0849ce 2167
progress-linux-metapackages_20221002-21.dsc
a032754a751df977acaf857a16f042b8a91913e9 8412
progress-linux-metapackages_20221002-21.debian.tar.xz
1beb8d9df4f8a37a0f3fad0849926924213b8443 8066
progress-linux-metapackages_20221002-21_amd64.buildinfo
Checksums-Sha256:
a12fe81ac74b777656744ce7a708fcb0224a1542d1a3a572aae97f9862c4bd0d 2167
progress-linux-metapackages_20221002-21.dsc
30fe4ca47763017e51db076321f6f71f4367805a7e636c3569c430e97c8f119a 8412
progress-linux-metapackages_20221002-21.debian.tar.xz
21f134ea71e12eb3c0bf7da4c57eb9e028a7ba10dddb0cca893a839eedeec69b 8066
progress-linux-metapackages_20221002-21_amd64.buildinfo
Files:
b94ec41b7d1a6ede07c9f6a5706e2536 2167 metapackages optional
progress-linux-metapackages_20221002-21.dsc
9c0f1317b43094abd0450d1fff6127af 8412 metapackages optional
progress-linux-metapackages_20221002-21.debian.tar.xz
f87b97ff60d3cdb0fbbede3abf64f687 8066 metapackages optional
progress-linux-metapackages_20221002-21_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQQmmGg4gLaoSj0ERgL7tPDoCoAiLwUCZ4ic6QAKCRD7tPDoCoAi
L2+wAPwPpdGfLqkWPhXNvCccknNsvgby0972xiqm9LZ8ESIvCAEA13sgypQYAAQN
3ITB0Q3Xpw28lJtGs2QNg+JAmKwWpgo=
=ogR1
-----END PGP SIGNATURE-----
pgpM5IhbL_fxy.pgp
Description: PGP signature
--- End Message ---