Package: rear Version: 2.7+dfsg-1 Severity: important Tags: patch User: helm...@debian.org Usertags: dep17p7 X-Debbugs-Cc: helm...@debian.org
Dear Maintainer, rear contains udev files which are installed to /lib; these files need to be moved to /usr/lib as part of Debian's usr-merge effort. Because your package is Multi-Arch: same, an unfortunate corner-case can occur whereby shared files (such as the udev files) may be erroneously removed on upgrades (please see DEP17[1] P7: Shared multiarch file loss). You will find a patch attached to move the udev files, including the mitigation for the file loss scenario. Please consider applying this patch at your earliest convenience. This bug will be upgraded to release critical soon, as it blocks the overall usr-merge effort which is being undertaken for the trixie release. Many thanks, Chris 1. https://subdivi.de/~helmut/dep17.html
diff -Nru rear-2.7+dfsg/debian/changelog rear-2.7+dfsg/debian/changelog --- rear-2.7+dfsg/debian/changelog 2023-01-11 15:33:42.000000000 +0100 +++ rear-2.7+dfsg/debian/changelog 2023-11-27 01:36:54.000000000 +0100 @@ -1,3 +1,11 @@ +rear (2.7+dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Move udev files from /lib to /usr/lib, including protective diversion + against Multi-Arch: same file loss scenario (DEP17 P7 M10). (Closes: #-1) + + -- Chris Hofstaedtler <z...@debian.org> Mon, 27 Nov 2023 01:36:54 +0100 + rear (2.7+dfsg-1) unstable; urgency=medium * Update to new upstream version 2.7. diff -Nru rear-2.7+dfsg/debian/rear.lintian-overrides rear-2.7+dfsg/debian/rear.lintian-overrides --- rear-2.7+dfsg/debian/rear.lintian-overrides 2023-01-11 15:33:42.000000000 +0100 +++ rear-2.7+dfsg/debian/rear.lintian-overrides 2023-11-27 01:36:54.000000000 +0100 @@ -7,6 +7,10 @@ rear: package-contains-documentation-outside-usr-share-doc usr/share/rear/restore/readme rear: package-contains-documentation-outside-usr-share-doc usr/share/rear/wrapup/readme +# begin-remove-after: released:forky +rear: diversion-for-unknown-file lib/udev/rules.d/60-rear.rules [*] +# end-remove-after + package-contains-empty-directory package-supports-alternative-init-but-no-init.d-script systemd-service-file-missing-documentation-key diff -Nru rear-2.7+dfsg/debian/rear.postinst rear-2.7+dfsg/debian/rear.postinst --- rear-2.7+dfsg/debian/rear.postinst 2023-01-11 15:33:42.000000000 +0100 +++ rear-2.7+dfsg/debian/rear.postinst 2023-11-27 01:34:11.000000000 +0100 @@ -10,6 +10,16 @@ chmod 0600 /etc/rear/local.conf echo "[Done]" fi + + # begin-remove-after: released:forky + # protective diversion of files moved from / to /usr, to avoid file loss. + # Only for upgrades. + # At this point, the package will have installed the same file in */usr*. + dpkg-divert --package usr-is-merged --no-rename \ + --divert /lib/udev/rules.d/60-rear.rules.usr-is-merged \ + --remove /lib/udev/rules.d/60-rear.rules + # end-remove-after + ;; abort-upgrade|abort-remove|abort-deconfigure) diff -Nru rear-2.7+dfsg/debian/rear.postrm rear-2.7+dfsg/debian/rear.postrm --- rear-2.7+dfsg/debian/rear.postrm 1970-01-01 01:00:00.000000000 +0100 +++ rear-2.7+dfsg/debian/rear.postrm 2023-11-27 01:33:01.000000000 +0100 @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# begin-remove-after: released:forky +# protective diversion of files moved from / to /usr, to avoid file loss. +# Only for upgrades. +if [ "$1" = "remove" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT" = "1" ]; then + # Cleanup in case package is removed before upgrade is finished (postinst ran). + dpkg-divert --package usr-is-merged --no-rename \ + --divert /lib/udev/rules.d/60-rear.rules.usr-is-merged \ + --remove /lib/udev/rules.d/60-rear.rules +fi +# end-remove-after + +#DEBHELPER# + diff -Nru rear-2.7+dfsg/debian/rear.preinst rear-2.7+dfsg/debian/rear.preinst --- rear-2.7+dfsg/debian/rear.preinst 1970-01-01 01:00:00.000000000 +0100 +++ rear-2.7+dfsg/debian/rear.preinst 2023-11-27 01:33:01.000000000 +0100 @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +# begin-remove-after: released:forky +# protective diversion of files moved from / to /usr, to avoid file loss. +# Only for upgrades. +if [ "$1" = "upgrade" ]; then + dpkg-divert --package usr-is-merged --no-rename \ + --divert /lib/udev/rules.d/60-rear.rules.usr-is-merged \ + --add /lib/udev/rules.d/60-rear.rules +fi +# end-remove-after + +#DEBHELPER# + diff -Nru rear-2.7+dfsg/debian/rules rear-2.7+dfsg/debian/rules --- rear-2.7+dfsg/debian/rules 2023-01-11 15:33:42.000000000 +0100 +++ rear-2.7+dfsg/debian/rules 2023-11-27 01:36:37.000000000 +0100 @@ -22,6 +22,12 @@ rm -fr debian/tmp/usr/share/rear/conf/examples dh_install +override_dh_installudev: + dh_installudev + # This should become harmless when dh_installudev changes the install location. + set -e; if test -d debian/rear/lib/udev/rules.d; then mv debian/rear/lib/udev debian/rear/usr/lib; fi + set -e; if test -d debian/rear/lib; then rmdir debian/rear/lib; fi + override_dh_fixperms: # Stick to install-config permissions dh_fixperms --exclude debian/rear/etc/rear