Package: libiio0
Version: 0.25-6
Severity: serious
Tags: patch
User: helm...@debian.org
Usertags: dep17p7

Hi,

I am sorry to tell you that your /usr-move upload did not go well.
libiio0 formerly installed /lib/udev/rules.d/90-libiio0.rules and now
installs the same file to /usr. Since the path is both formerly aliased
and shared between multiple instances, this file can be lost in an
upgrade (DEP17 P7). The recommended solution is protecting it from loss
using a diversion for the duration of the upgrade (M10). After the
upgrade has been completed, the protective diversion is gone again. I am
attaching a patch for your convenience. Users affected by the file loss
in unstable will fix their systems when upgrading to the next version of
libiio0.

Helmut
diff --minimal -Nru libiio-0.25/debian/changelog libiio-0.25/debian/changelog
--- libiio-0.25/debian/changelog        2024-08-15 12:12:23.000000000 +0200
+++ libiio-0.25/debian/changelog        2024-08-19 16:12:17.000000000 +0200
@@ -1,3 +1,11 @@
+libiio (0.25-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Mitigate M-A:same shared file loss due to /usr-move. (DEP17 P7 M10,
+    Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 19 Aug 2024 16:12:17 +0200
+
 libiio (0.25-6) unstable; urgency=medium
 
   * UsrMerge build: /lib/systemd/... -> /usr/lib/systemd/... (Closes: #1073610)
diff --minimal -Nru libiio-0.25/debian/libiio0.postinst 
libiio-0.25/debian/libiio0.postinst
--- libiio-0.25/debian/libiio0.postinst 1970-01-01 01:00:00.000000000 +0100
+++ libiio-0.25/debian/libiio0.postinst 2024-08-19 16:12:17.000000000 +0200
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+# DEP17 P7 M10
+if [ "$1" = "configure" ]; then
+       dpkg-divert --package usr-is-merged --no-rename \
+               --divert /lib/udev/rules.d/90-libiio0.rules.usr-is-merged \
+               --remove /lib/udev/rules.d/90-libiio0.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff --minimal -Nru libiio-0.25/debian/libiio0.postrm 
libiio-0.25/debian/libiio0.postrm
--- libiio-0.25/debian/libiio0.postrm   1970-01-01 01:00:00.000000000 +0100
+++ libiio-0.25/debian/libiio0.postrm   2024-08-19 16:12:17.000000000 +0200
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+# DEP17 P7 M10
+if [ "$1" = "remove" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT" = "1" ]; then
+       dpkg-divert --package usr-is-merged --no-rename \
+               --divert /lib/udev/rules.d/90-libiio0.rules.usr-is-merged \
+               --remove /lib/udev/rules.d/90-libiio0.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff --minimal -Nru libiio-0.25/debian/libiio0.preinst 
libiio-0.25/debian/libiio0.preinst
--- libiio-0.25/debian/libiio0.preinst  1970-01-01 01:00:00.000000000 +0100
+++ libiio-0.25/debian/libiio0.preinst  2024-08-19 16:12:17.000000000 +0200
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+# DEP17 P7 M10
+if [ "$1" = "upgrade" ]; then
+       dpkg-divert --package usr-is-merged --no-rename \
+               --divert /lib/udev/rules.d/90-libiio0.rules.usr-is-merged \
+               --add /lib/udev/rules.d/90-libiio0.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0

Reply via email to