Re: md5sum diversion: patches which restore sanity
On Fri, May 05, 2006 at 05:31:05PM +0100, Ian Jackson wrote:
> Below you'll find my patches for dpkg and coreutils which I'm about to
> upload into Ubuntu Dapper right now. I think these same changes
> should be applied in sid's coreutils and dpkg. (I'm afraid that the
> patch to coreutils will reject due to me having backported one of the
> changes already made in sid, but the reject should be easy to fix up
> and I can provide a cleaner patch if that would be helpful.)
For the record, since I prepared it anyway, here a clean patch against
Debian's 5.94-1:
diff -aur coreutils-5.94/debian/changelog coreutils-5.94.new/debian/changelog
--- coreutils-5.94/debian/changelog 2006-05-15 11:10:26.000000000 -0500
+++ coreutils-5.94.new/debian/changelog 2006-05-15 11:11:48.000000000 -0500
@@ -1,3 +1,11 @@
+coreutils (5.94-2) unstable; urgency=low
+
+ * Only remove dpkg's mad md5sum diversion `once' (ie, on upgrade from
+ non-/usr/bin/md5sum-supplying corutils). This preserves any later
+ sysadmin-installed diversions of md5sum.textutils.
+
+ -- Ian Jackson <iwj@ubuntu.com> Fri, 5 May 2006 16:39:05 +0100
+
coreutils (5.94-1) unstable; urgency=low
* New upstream version (Closes: #349530, #273781, #332779, #341912)
diff -aur coreutils-5.94/debian/coreutils.preinst coreutils-5.94.new/debian/coreutils.preinst
--- coreutils-5.94/debian/coreutils.preinst 2006-05-15 11:10:26.000000000 -0500
+++ coreutils-5.94.new/debian/coreutils.preinst 2006-05-15 11:01:58.000000000 -0500
@@ -19,10 +19,23 @@
# work around stupid dpkg diversion of md5sum
# get rid of this for etch+1, I don't think there's a better solution until then
-rm -f /usr/bin/md5sum.textutils
-rm -f /usr/share/man/man1/md5sum.textutils
-dpkg-divert --remove /usr/share/man/man1/md5sum.textutils.1.gz
-dpkg-divert --remove /usr/bin/md5sum.textutils
+# Debian #340119, #289369, #313258; Ubuntu (Malone) #26886
+ case "$2" in
+ '' | 4.* | 5.?.*)
+ # coreutils 5.93-1 onwards do this, so we can avoid doing
+ # it if we know it's already been done. That avoids trashing
+ # any real local diversion subsequently introduced by the sysadmin.
+ # (There are no coreutils versions between 5.2.1 and 5.93.)
+ rm -f /usr/bin/md5sum.textutils
+ rm -f /usr/share/man/man1/md5sum.textutils
+ dpkg-divert --remove /usr/share/man/man1/md5sum.textutils.1.gz
+ dpkg-divert --remove /usr/bin/md5sum.textutils
+ # Possibly this can be removed at some distant point, when we're
+ # sure that all of the systems infected with the diversion (ie,
+ # systems which were running the wrong version of sid, breezy or
+ # dapper) have been fixed.
+ ;;
+ esac
#DEBHELPER#
Gruesse,
--
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/
Reply to: