Your message dated Fri, 03 Jan 2025 14:44:17 +0000
with message-id <e1ttiup-003wja...@fasolo.debian.org>
and subject line Bug#1078130: fixed in dash 0.5.12-10
has caused the Debian Bug report #1078130,
regarding dash: refuse upgrade if /bin/sh is ineffectively diverted (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.)
--
1078130: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078130
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dash
Version: 0.5.12-9
Severity: serious
Justification: all dep17 bugs are have become rc since 2024-08-06
User: helm...@debian.org
Usertags: dep17p3
X-Debbugs-Cc: Thorsten Glaser <t...@mirbsd.de>
Hi Andrew and Thorsten,
in my conversion of dash I slightly neglected the fact that /bin/sh is a
relatively common thing to divert. It was and still is planned to add a
note to the release-notes asking administrators to review their local
diversions before proceeding the upgrade, but diversions of /bin/sh are
quite delicate, so it is better to be safe here.
The upgrade of dash may render a diversion of /bin/sh by an
administrator ineffective and thus revert from a prior choice of e.g.
lksh from the mksh package back to dash. This is not resolvable on the
dash side, but dash may support here by aborting the upgrade and giving
the administrator guidance on how to resolve the situation.
I am attaching a patch that adds a dash.preinst checking for affected
upgrade scenarios and aborting those that require manual changes. I also
attach a script for testing various upgrade scenarios and ran it locally
to verify the correctness of the proposed change.
Note that the rc-severity merely indicates that this needs to be fixed
for trixie but does not otherwise imply urgency.
Helmut
diff --minimal -Nru dash-0.5.12/debian/changelog dash-0.5.12/debian/changelog
--- dash-0.5.12/debian/changelog 2024-06-05 10:08:31.000000000 +0200
+++ dash-0.5.12/debian/changelog 2024-08-07 11:13:50.000000000 +0200
@@ -1,3 +1,10 @@
+dash (0.5.12-9.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Notify users about ineffective diversions of /bin/sh (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de> Wed, 07 Aug 2024 11:13:50 +0200
+
dash (0.5.12-9) unstable; urgency=medium
[ Helmut Grohne ]
diff --minimal -Nru dash-0.5.12/debian/dash.preinst
dash-0.5.12/debian/dash.preinst
--- dash-0.5.12/debian/dash.preinst 1970-01-01 01:00:00.000000000 +0100
+++ dash-0.5.12/debian/dash.preinst 2024-08-07 11:13:50.000000000 +0200
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 0.5.12-9~; then
+ # Upgrading from pre-/usr-move DEP17
+ truename=$(dpkg-divert --truename /bin/sh)
+ if [ "$truename" != /bin/sh ] &&
+ [ "$(dpkg-divert --listpackage /bin/sh)_$truename" !=
"dash_/bin/sh.distrib" ] &&
+ [ "$(dpkg-divert --truename /usr/bin/sh)" = "/usr/bin/sh" ];
then
+ # There is a diversion of /bin/sh and it is not our own
+ # diversion to /bin/sh.distrib that will be removed in
+ # postinst and there is no matching diversion of /usr/bin/sh.
+ cat <<EOF
+A diversion of /bin/sh was detected with the following details:
+
+$(dpkg-divert --list /bin/sh)
+
+Since this update of dash moves /bin/sh to /usr/bin/sh in the dpkg database,
+the aforementioned diversion will no longer apply. No diversion of the new
+location /usr/bin/sh has been found.
+
+Please either remove the diversion of /bin/sh or create another diversion for
+/usr/bin/sh to retry the upgrade. After successful upgrade, the diversion of
+/bin/sh is no longer required.
+
+Aborting upgrade.
+EOF
+ exit 1
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
test.sh
Description: Bourne shell script
--- End Message ---
--- Begin Message ---
Source: dash
Source-Version: 0.5.12-10
Done: Andrej Shadura <andre...@debian.org>
We believe that the bug you reported is fixed in the latest version of
dash, 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 1078...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andrej Shadura <andre...@debian.org> (supplier of updated dash 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: Fri, 03 Jan 2025 15:13:44 +0100
Source: dash
Architecture: source
Version: 0.5.12-10
Distribution: unstable
Urgency: medium
Maintainer: Andrej Shadura <andre...@debian.org>
Changed-By: Andrej Shadura <andre...@debian.org>
Closes: 558989 1078130
Changes:
dash (0.5.12-10) unstable; urgency=medium
.
[ Dominik Viererbe ]
* d/t/mmdebstrap: remove unused parsing of distribution from changelog
* Incorporate Ubuntu DEP-17 /usr merge changes:
[ Julian Andres Klode ]
- debian/shells.d/dash: move files to /usr
- debian/tests/smoke: add /bin/dash link tests
.
[ Helmut Grohne ]
* Warn the user if /bin/sh is ineffectively diverted (DEP-17)
(Closes: #1078130)
.
[ Andrej Shadura ]
* Apply upstream patch to align test -nt and -ot with POSIX.1-2024
(Closes: #558989)
* Apply upstream patch to fix here-doc handling.
* Add Belarusian and Slovak translations for debconf templates.
Checksums-Sha1:
89bf42985df09954abf43d78a043d253498b0028 1460 dash_0.5.12-10.dsc
b2f117b69223c79ffddda2d25001859b0d6accac 43144 dash_0.5.12-10.debian.tar.xz
Checksums-Sha256:
10b41615e100781d12df4a023299b3df11485947cf83b2f4bc5935f850205673 1460
dash_0.5.12-10.dsc
9665d374c5da6730f39d617f0aadc58466cd198ccf95e818eba6f17a570c24ff 43144
dash_0.5.12-10.debian.tar.xz
Files:
d6093266eec74639eaba8f27f36befc4 1460 shells optional dash_0.5.12-10.dsc
a9a853fea75f530c236761b324104eaf 43144 shells optional
dash_0.5.12-10.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCZ3fxDQAKCRDoRGtKyMdy
YT8fAQDlM11N3nx53G1j+A1IfbVOM8uW/3Zo1dl7XEkOSUm5UAD/TAbrdCOFKoIk
LIOuhoTRf3f3uwB8zcF80Np34QeZ3As=
=Ip+n
-----END PGP SIGNATURE-----
pgpWhueJYpzsk.pgp
Description: PGP signature
--- End Message ---