Package: libfuse3-3t64
Version: 3.14.0-5.1~exp1
Severity: important
Tags: patch
X-Debbugs-Cc: Lukas Märdian <sl...@debian.org>, vor...@debian.org
User: helm...@debian.org
Usertags: dep17p1 dep17m2
Control: affects -1 + libfuse3-3

Hi Laszlo and Lukas,

Lukas' time64 upload introduces a latent /usr-move problem. It's not a
problem just yet, because libfuse3-3 didn't move yet, but it makes
dh-sequence-movetousr unsafe. Hence, I'm attaching a patch to move the
library and mitigate the file loss. In this patch I am deliberately not
moving the binaries to avoid interference with #1060229.

I've tested the patch with piuparts and attempted manually triggering
the loss:
mmdebstrap trixie /dev/null --variant apt --include libfuse3-dev 
--customize-hook='echo "deb http://deb.debian.org/debian sid main" > 
"$1/etc/apt/sources.list.d/sid.list"' --chrooted-customize-hook="apt-get 
update" --customize-hook="upload libfuse3-3t64_3.14.0-5.1~exp2_amd64.deb 
/l.deb" --customize-hook="upload libfuse3-dev_3.14.0-5.1~exp2_amd64.deb /d.deb" 
--chrooted-customize-hook="dpkg --auto-deconfigure --unpack /l.deb /d.deb && 
apt-get -y install /l.deb /d.deb && dpkg --verify"

Note that the patch (and the time64 migration) must not be uploaded to
bookworm-backports. fuse3 has never been backported, so that likely
isn't a problem. If you are in need of backporting it, please get in
touch with me.

Lukas, can you include this patch in your unstable upload?

Helmut
diff -Nru fuse3-3.14.0/debian/changelog fuse3-3.14.0/debian/changelog
--- fuse3-3.14.0/debian/changelog       2024-01-31 11:29:25.000000000 +0100
+++ fuse3-3.14.0/debian/changelog       2024-03-27 08:35:49.000000000 +0100
@@ -1,3 +1,10 @@
+fuse3 (3.14.0-5.1~exp2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move library to /usr and mitigate file loss (DEP17 P1 M8) (closes: #-1).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 27 Mar 2024 08:35:49 +0100
+
 fuse3 (3.14.0-5.1~exp1) experimental; urgency=medium
 
   * Non-maintainer upload.
diff -Nru fuse3-3.14.0/debian/control fuse3-3.14.0/debian/control
--- fuse3-3.14.0/debian/control 2024-01-31 11:29:25.000000000 +0100
+++ fuse3-3.14.0/debian/control 2024-03-27 08:35:49.000000000 +0100
@@ -35,7 +35,7 @@
 Package: libfuse3-3t64
 Provides: ${t64:Provides}
 Replaces: libfuse3-3
-Breaks: libfuse3-3 (<< ${source:Version})
+Conflicts: libfuse3-3 (<< ${source:Version})
 Section: libs
 Architecture: linux-any kfreebsd-any
 Multi-Arch: same
diff -Nru fuse3-3.14.0/debian/libfuse3-3-udeb.install 
fuse3-3.14.0/debian/libfuse3-3-udeb.install
--- fuse3-3.14.0/debian/libfuse3-3-udeb.install 2014-06-20 08:23:50.000000000 
+0200
+++ fuse3-3.14.0/debian/libfuse3-3-udeb.install 2024-03-27 08:35:49.000000000 
+0100
@@ -1 +1 @@
-usr/lib/*/*.so.*       lib
+usr/lib/*/*.so.*
diff -Nru fuse3-3.14.0/debian/libfuse3-3t64.install 
fuse3-3.14.0/debian/libfuse3-3t64.install
--- fuse3-3.14.0/debian/libfuse3-3t64.install   2024-01-31 11:29:25.000000000 
+0100
+++ fuse3-3.14.0/debian/libfuse3-3t64.install   2024-03-27 08:35:40.000000000 
+0100
@@ -1 +1 @@
-usr/lib/*/*.so.*       lib
+usr/lib/*/*.so.*
diff -Nru fuse3-3.14.0/debian/libfuse3-3t64.postinst 
fuse3-3.14.0/debian/libfuse3-3t64.postinst
--- fuse3-3.14.0/debian/libfuse3-3t64.postinst  1970-01-01 01:00:00.000000000 
+0100
+++ fuse3-3.14.0/debian/libfuse3-3t64.postinst  2024-03-27 08:35:49.000000000 
+0100
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = configure; then
+       # Remove DEP17 P1 M8 protective diversions
+       for f in libfuse3.so.3 libfuse3.so.3.14.0; do
+               dpkg-divert --no-rename --package libfuse3-3t64 --divert 
"/lib/#DEB_HOST_MULTIARCH#/$f.usr-is-merged" --remove 
"/lib/#DEB_HOST_MULTIARCH#/$f"
+       done
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru fuse3-3.14.0/debian/libfuse3-3t64.preinst 
fuse3-3.14.0/debian/libfuse3-3t64.preinst
--- fuse3-3.14.0/debian/libfuse3-3t64.preinst   1970-01-01 01:00:00.000000000 
+0100
+++ fuse3-3.14.0/debian/libfuse3-3t64.preinst   2024-03-27 08:35:49.000000000 
+0100
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = upgrade || test "$1" = install; then
+       # Add DEP17 P1 M8 protective diversions
+       for f in libfuse3.so.3 libfuse3.so.3.14.0; do
+               dpkg-divert --no-rename --package libfuse3-3t64 --divert 
"/lib/#DEB_HOST_MULTIARCH#/$f.usr-is-merged" --add 
"/lib/#DEB_HOST_MULTIARCH#/$f"
+       done
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru fuse3-3.14.0/debian/rules fuse3-3.14.0/debian/rules
--- fuse3-3.14.0/debian/rules   2024-01-31 11:29:25.000000000 +0100
+++ fuse3-3.14.0/debian/rules   2024-03-27 08:35:49.000000000 +0100
@@ -41,14 +41,6 @@
 
        dh_install
 
-       # adjusting /lib for multiarch
-       mkdir -p debian/libfuse3-3t64/lib/$(DEB_HOST_MULTIARCH)
-       mv debian/libfuse3-3t64/lib/*.so* 
debian/libfuse3-3t64/lib/$(DEB_HOST_MULTIARCH)
-ifeq ($(with_udeb),yes)
-       mkdir -p debian/libfuse3-3-udeb/lib/$(DEB_HOST_MULTIARCH)
-       mv debian/libfuse3-3-udeb/lib/*.so* 
debian/libfuse3-3-udeb/lib/$(DEB_HOST_MULTIARCH)
-endif
-
        # adding initramfs-tools integration
        install -D -m 0755 debian/local/fuse.hook 
debian/fuse3/usr/share/initramfs-tools/hooks/fuse
 
@@ -60,15 +52,6 @@
 endif
 endif
 
-override_dh_link:
-       # correcting symlink targets
-       for LIB in debian/tmp/usr/lib/*/*.so; \
-       do \
-               dh_link -plibfuse3-dev lib/$(DEB_HOST_MULTIARCH)/$$(basename 
$$(readlink $${LIB})) usr/lib/$(DEB_HOST_MULTIARCH)/$$(basename $${LIB}); \
-       done
-
-       dh_link --remaining-packages
-
 override_dh_missing:
        dh_missing --fail-missing
 

Reply via email to