> Patch attached. Unit193 noted that while I drop override_dh_link, I failed to remove it from .PHONY. As a result dh_link is skipped. Thanks for the review! Updated patch attached.
Helmut
diff -Nru fuse3-3.14.0/debian/NEWS fuse3-3.14.0/debian/NEWS --- fuse3-3.14.0/debian/NEWS 1970-01-01 01:00:00.000000000 +0100 +++ fuse3-3.14.0/debian/NEWS 2024-06-12 13:37:25.000000000 +0200 @@ -0,0 +1,9 @@ +fuse3 (3.14.0-5.1) unstable; urgency=medium + + The fuse3 package honours a dpkg-statoverride of /bin/fusermount3 installed + by a system administrator (e.g. to remove the setuid binary installed by + default). The path to this file according to the package manager is + transitioned to /usr/bin/fusermount3. If you installed a statoverride, + please move it to the new path and verify the permissions. + + -- Helmut Grohne <hel...@subdivi.de> Wed, 12 Jun 2024 13:41:27 +0200 diff -Nru fuse3-3.14.0/debian/changelog fuse3-3.14.0/debian/changelog --- fuse3-3.14.0/debian/changelog 2024-01-12 16:46:21.000000000 +0100 +++ fuse3-3.14.0/debian/changelog 2024-06-12 13:37:25.000000000 +0200 @@ -1,3 +1,10 @@ +fuse3 (3.14.0-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Move aliased files to /usr (DEP17). (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 12 Jun 2024 13:37:25 +0200 + fuse3 (3.14.0-5) unstable; urgency=medium * Fix 99-fuse3.rules path (closes: #1060067). diff -Nru fuse3-3.14.0/debian/control fuse3-3.14.0/debian/control --- fuse3-3.14.0/debian/control 2024-01-12 01:21:04.000000000 +0100 +++ fuse3-3.14.0/debian/control 2024-06-12 13:37:25.000000000 +0200 @@ -25,7 +25,7 @@ sed (>= 4) Provides: fuse (= ${source:Version}) Breaks: fuse -Replaces: fuse +Conflicts: fuse Description: Filesystem in Userspace (3.x version) Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a diff -Nru fuse3-3.14.0/debian/fuse3-udeb.install fuse3-3.14.0/debian/fuse3-udeb.install --- fuse3-3.14.0/debian/fuse3-udeb.install 2018-07-21 16:11:44.000000000 +0200 +++ fuse3-3.14.0/debian/fuse3-udeb.install 2024-06-12 13:32:27.000000000 +0200 @@ -1,2 +1,2 @@ -usr/bin/fusermount3 bin -usr/sbin/mount.fuse3 sbin +usr/bin/fusermount3 +usr/sbin/mount.fuse3 diff -Nru fuse3-3.14.0/debian/fuse3.install fuse3-3.14.0/debian/fuse3.install --- fuse3-3.14.0/debian/fuse3.install 2018-12-25 17:57:44.000000000 +0100 +++ fuse3-3.14.0/debian/fuse3.install 2024-06-12 13:32:16.000000000 +0200 @@ -1,3 +1,3 @@ -usr/bin/fusermount3 bin -usr/sbin/mount.fuse3 sbin +usr/bin/fusermount3 +usr/sbin/mount.fuse3 etc/fuse.conf diff -Nru fuse3-3.14.0/debian/fuse3.links fuse3-3.14.0/debian/fuse3.links --- fuse3-3.14.0/debian/fuse3.links 2018-12-25 17:57:44.000000000 +0100 +++ fuse3-3.14.0/debian/fuse3.links 2024-06-12 13:37:25.000000000 +0200 @@ -1,4 +1,4 @@ -/bin/fusermount3 /bin/fusermount -/sbin/mount.fuse3 /sbin/mount.fuse +/usr/bin/fusermount3 /usr/bin/fusermount +/usr/sbin/mount.fuse3 /usr/sbin/mount.fuse /usr/share/man/man1/fusermount3.1.gz /usr/share/man/man1/fusermount.1.gz /usr/share/man/man8/mount.fuse3.8.gz /usr/share/man/man8/mount.fuse.8.gz diff -Nru fuse3-3.14.0/debian/fuse3.postinst fuse3-3.14.0/debian/fuse3.postinst --- fuse3-3.14.0/debian/fuse3.postinst 2021-06-20 15:45:33.000000000 +0200 +++ fuse3-3.14.0/debian/fuse3.postinst 2024-06-12 13:37:25.000000000 +0200 @@ -12,11 +12,21 @@ return 0 } +# begin-remove-after: released:trixie +# protective diversion of files moved from / to /usr, to avoid file loss. +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then + for f in /bin/fusermount /sbin/mount.fuse; do + dpkg-divert --package #PACKAGE# --no-rename --divert "$f.usr-is-merged" --remove "$f" + done +fi +# end-remove-after + case "${1}" in configure) - if ! dpkg-statoverride --list /bin/fusermount3 > /dev/null 2>&1 + if ! dpkg-statoverride --list /bin/fusermount3 > /dev/null 2>&1 && + ! dpkg-statoverride --list /usr/bin/fusermount3 > /dev/null 2>&1 then - chmod 4755 /bin/fusermount3 + chmod 4755 /usr/bin/fusermount3 fi modprobe fuse > /dev/null 2>&1 || true diff -Nru fuse3-3.14.0/debian/fuse3.preinst fuse3-3.14.0/debian/fuse3.preinst --- fuse3-3.14.0/debian/fuse3.preinst 1970-01-01 01:00:00.000000000 +0100 +++ fuse3-3.14.0/debian/fuse3.preinst 2024-06-12 13:37:25.000000000 +0200 @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +# begin-remove-after: released:trixie +# protective diversion of files moved from / to /usr, to avoid file loss. +if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then + for f in /bin/fusermount /sbin/mount.fuse; do + dpkg-divert --package #PACKAGE# --no-rename --divert "$f.usr-is-merged" --add "$f" + done +fi +# end-remove-after + +#DEBHELPER# + +exit 0 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-06-12 13:32:33.000000000 +0200 @@ -1 +1 @@ -usr/lib/*/*.so.* lib +usr/lib/*/*.so.* diff -Nru fuse3-3.14.0/debian/libfuse3-3.install fuse3-3.14.0/debian/libfuse3-3.install --- fuse3-3.14.0/debian/libfuse3-3.install 2014-06-20 08:23:50.000000000 +0200 +++ fuse3-3.14.0/debian/libfuse3-3.install 2024-06-12 13:32:42.000000000 +0200 @@ -1 +1 @@ -usr/lib/*/*.so.* lib +usr/lib/*/*.so.* diff -Nru fuse3-3.14.0/debian/not-installed fuse3-3.14.0/debian/not-installed --- fuse3-3.14.0/debian/not-installed 1970-01-01 01:00:00.000000000 +0100 +++ fuse3-3.14.0/debian/not-installed 2024-06-12 13:35:58.000000000 +0200 @@ -0,0 +1,2 @@ +debian/tmp/etc/init.d/fuse3 +debian/tmp/usr/lib/udev/rules.d/99-fuse3.rules diff -Nru fuse3-3.14.0/debian/rules fuse3-3.14.0/debian/rules --- fuse3-3.14.0/debian/rules 2024-01-12 01:09:38.000000000 +0100 +++ fuse3-3.14.0/debian/rules 2024-06-12 13:37:25.000000000 +0200 @@ -6,12 +6,7 @@ SHELL := sh -e -DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) - -ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) - DEB_CONFIGURE_EXTRA_FLAGS = -Dudevrulesdir=/lib/udev/rules.d -endif +include /usr/share/dpkg/architecture.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all @@ -30,25 +25,11 @@ dh_fixperms chmod a-x debian/libfuse3-dev/usr/share/doc/libfuse3-dev/examples/cuse_client.c -ifeq ($(DEB_BUILD_ARCH),linux) +ifeq ($(DEB_HOST_ARCH),linux) chmod 0755 debian/fuse3/bin/fusermount3 endif -override_dh_install: - # remove unused files - rm -f debian/tmp/etc/init.d/fuse3 - rm -f debian/tmp/usr/lib/udev/rules.d/99-fuse3.rules - - dh_install - - # adjusting /lib for multiarch - mkdir -p debian/libfuse3-3/lib/$(DEB_HOST_MULTIARCH) - mv debian/libfuse3-3/lib/*.so* debian/libfuse3-3/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 - +execute_after_dh_install: # adding initramfs-tools integration install -D -m 0755 debian/local/fuse.hook debian/fuse3/usr/share/initramfs-tools/hooks/fuse @@ -60,15 +41,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 @@ -76,5 +48,5 @@ dh ${@} --buildsystem=meson .PHONY: override_dh_auto_configure override_dh_compress \ - override_dh_fixperms override_dh_install \ - override_dh_link override_dh_missing + override_dh_fixperms execute_after_dh_install \ + override_dh_missing