Source: ntfs-3g Version: 1:2022.10.3-1 Severity: normal Tags: patch User: helm...@debian.org Usertags: dep17m2
Hi! Your package installs files into /. For the ongoing Debian UsrMerge effort [1] these files should move to /usr in the trixie cycle. I'm attaching a patch to implement such a move. It is quite involved, but mostly undoes the move /usr -> /. The upstream Makefiles ignore --exec-prefix/rootsbindir for the mount.* symlinks, so I've chosen to re-create them using dh_link instead. However, please still read the wiki page on moving files, especially if you intend to backport to bookworm or earlier. The patch has already been checked by a local dumat copy. If during the trixie cycle your package will undergo structural changes or any other file moves, please also see the wiki and upload to experimental first when these changes are done. Chris [1] https://wiki.debian.org/UsrMerge
diff -Nru ntfs-3g-2022.10.3/debian/changelog ntfs-3g-2022.10.3/debian/changelog --- ntfs-3g-2022.10.3/debian/changelog 2022-10-31 15:14:06.000000000 +0100 +++ ntfs-3g-2022.10.3/debian/changelog 2023-12-24 21:16:13.000000000 +0100 @@ -1,3 +1,10 @@ +ntfs-3g (1:2022.10.3-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Install files into /usr instead of /. (Closes: #-1) + + -- Chris Hofstaedtler <z...@debian.org> Sun, 24 Dec 2023 21:16:13 +0100 + ntfs-3g (1:2022.10.3-1) unstable; urgency=high * New upstream release: diff -Nru ntfs-3g-2022.10.3/debian/libntfs-3g89.install ntfs-3g-2022.10.3/debian/libntfs-3g89.install --- ntfs-3g-2022.10.3/debian/libntfs-3g89.install 2015-10-24 09:41:03.000000000 +0200 +++ ntfs-3g-2022.10.3/debian/libntfs-3g89.install 2023-12-24 21:16:13.000000000 +0100 @@ -1 +1 @@ -lib/*/*.so.* +usr/lib/*/*.so.* diff -Nru ntfs-3g-2022.10.3/debian/local/ntfs-3g.hook ntfs-3g-2022.10.3/debian/local/ntfs-3g.hook --- ntfs-3g-2022.10.3/debian/local/ntfs-3g.hook 2014-04-25 20:44:28.000000000 +0200 +++ ntfs-3g-2022.10.3/debian/local/ntfs-3g.hook 2023-12-24 21:16:13.000000000 +0100 @@ -17,9 +17,9 @@ . /usr/share/initramfs-tools/hook-functions -copy_exec /bin/ntfs-3g /bin +copy_exec /usr/bin/ntfs-3g /usr/bin -ln -s /bin/ntfs-3g "${DESTDIR}/sbin/mount.ntfs-3g" -ln -s /bin/ntfs-3g "${DESTDIR}/sbin/mount.ntfs" +ln -s /usr/bin/ntfs-3g "${DESTDIR}/usr/sbin/mount.ntfs-3g" +ln -s /usr/bin/ntfs-3g "${DESTDIR}/usr/sbin/mount.ntfs" exit 0 diff -Nru ntfs-3g-2022.10.3/debian/ntfs-3g.install ntfs-3g-2022.10.3/debian/ntfs-3g.install --- ntfs-3g-2022.10.3/debian/ntfs-3g.install 2015-10-24 09:40:42.000000000 +0200 +++ ntfs-3g-2022.10.3/debian/ntfs-3g.install 2023-12-24 21:16:13.000000000 +0100 @@ -1,4 +1,3 @@ -bin -sbin usr/bin +usr/sbin usr/share diff -Nru ntfs-3g-2022.10.3/debian/ntfs-3g.links ntfs-3g-2022.10.3/debian/ntfs-3g.links --- ntfs-3g-2022.10.3/debian/ntfs-3g.links 2014-04-25 20:44:28.000000000 +0200 +++ ntfs-3g-2022.10.3/debian/ntfs-3g.links 2023-12-24 21:16:13.000000000 +0100 @@ -1,4 +1,6 @@ -/sbin/mount.ntfs-3g /sbin/mount.ntfs +/usr/sbin/mount.ntfs-3g /usr/sbin/mount.ntfs +/usr/bin/ntfs-3g /usr/sbin/mount.ntfs-3g +/usr/bin/lowntfs-3g /usr/sbin/mount.lowntfs-3g /usr/share/man/man8/ntfs-3g.8.gz /usr/share/man/man8/mount.ntfs.8.gz /usr/share/man/man8/ntfs-3g.8.gz /usr/share/man/man8/lowntfs-3g.8.gz diff -Nru ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.install ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.install --- ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.install 2015-10-24 09:42:19.000000000 +0200 +++ ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.install 2023-12-24 21:16:13.000000000 +0100 @@ -1,4 +1,3 @@ -bin/ntfs-3g -lib/*/*.so.* -sbin/mount.* -sbin/ntfsresize +usr/bin/ntfs-3g +usr/lib/*/*.so.* +usr/sbin/ntfsresize diff -Nru ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.links ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.links --- ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.links 2014-04-25 20:44:28.000000000 +0200 +++ ntfs-3g-2022.10.3/debian/ntfs-3g-udeb.links 2023-12-24 21:16:13.000000000 +0100 @@ -1 +1,2 @@ -/sbin/mount.ntfs-3g /sbin/mount.ntfs +/usr/sbin/mount.ntfs-3g /usr/sbin/mount.ntfs +/usr/bin/ntfs-3g /usr/sbin/mount.ntfs-3g diff -Nru ntfs-3g-2022.10.3/debian/rules ntfs-3g-2022.10.3/debian/rules --- ntfs-3g-2022.10.3/debian/rules 2022-10-31 15:14:06.000000000 +0100 +++ ntfs-3g-2022.10.3/debian/rules 2023-12-24 21:16:13.000000000 +0100 @@ -11,7 +11,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all -SONAME = $(shell objdump -p debian/tmp/lib/*/libntfs-3g.so.*.* | awk -Fso. '/SONAME/ { print $$2 }') +SONAME = $(shell objdump -p debian/tmp/usr/lib/*/libntfs-3g.so.*.* | awk -Fso. '/SONAME/ { print $$2 }') ifeq ($(DEB_HOST_ARCH_OS), linux) CONFIGURE_FLAGS = --enable-posix-acls @@ -24,7 +24,7 @@ dh ${@} override_dh_auto_configure: - dh_auto_configure -- --exec-prefix=/ --enable-crypto \ + dh_auto_configure -- --exec-prefix=/usr --enable-crypto \ --enable-extras --enable-xattr-mappings \ --enable-quarantined --disable-ldconfig \ --enable-mount-helper --with-fuse=internal \ @@ -33,13 +33,10 @@ override_dh_auto_install: dh_auto_install - # moving shlib to / - mkdir -p debian/tmp/lib/$(DEB_HOST_MULTIARCH) - mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so.* debian/tmp/lib/$(DEB_HOST_MULTIARCH) - - # moving ntfsdecrypt, depends on /usr - mkdir -p debian/tmp/usr/bin - mv debian/tmp/bin/ntfsdecrypt debian/tmp/usr/bin + # remove symlinks, will recreate them in /usr/sbin using dh_link + rm debian/tmp/sbin/mount.ntfs-3g + rm debian/tmp/sbin/mount.lowntfs-3g + rmdir debian/tmp/sbin # adding initramfs-tools integration install -D -m 0755 debian/local/ntfs-3g.hook debian/ntfs-3g/usr/share/initramfs-tools/hooks/ntfs_3g @@ -55,29 +52,29 @@ # removing rpath for _PROGRAM in \ - bin/lowntfs-3g \ - bin/ntfs-3g \ - bin/ntfs-3g.probe \ - bin/ntfscat \ - bin/ntfscluster \ - bin/ntfscmp \ - bin/ntfsck \ - bin/ntfsdump_logfile \ - bin/ntfsfix \ - bin/ntfsinfo \ - bin/ntfsls \ - bin/ntfsmftalloc \ - bin/ntfsmove \ - bin/ntfssecaudit \ - bin/ntfstruncate \ - bin/ntfsusermap \ - bin/ntfswipe \ - sbin/mkntfs \ - sbin/ntfsclone \ - sbin/ntfscp \ - sbin/ntfslabel \ - sbin/ntfsresize \ - sbin/ntfsundelete \ + usr/bin/lowntfs-3g \ + usr/bin/ntfs-3g \ + usr/bin/ntfs-3g.probe \ + usr/bin/ntfscat \ + usr/bin/ntfscluster \ + usr/bin/ntfscmp \ + usr/bin/ntfsck \ + usr/bin/ntfsdump_logfile \ + usr/bin/ntfsfix \ + usr/bin/ntfsinfo \ + usr/bin/ntfsls \ + usr/bin/ntfsmftalloc \ + usr/bin/ntfsmove \ + usr/bin/ntfssecaudit \ + usr/bin/ntfstruncate \ + usr/bin/ntfsusermap \ + usr/bin/ntfswipe \ + usr/sbin/mkntfs \ + usr/sbin/ntfsclone \ + usr/sbin/ntfscp \ + usr/sbin/ntfslabel \ + usr/sbin/ntfsresize \ + usr/sbin/ntfsundelete \ usr/bin/ntfsdecrypt; \ do \ echo $${_PROGRAM}; \ @@ -86,9 +83,9 @@ # moving undocumented programs to ntfs-3g-dev mkdir -p debian/ntfs-3g-dev/usr/bin - mv debian/tmp/bin/ntfsdump_logfile debian/ntfs-3g-dev/usr/bin - mv debian/tmp/bin/ntfsmftalloc debian/ntfs-3g-dev/usr/bin - mv debian/tmp/bin/ntfsck debian/ntfs-3g-dev/usr/bin + mv debian/tmp/usr/bin/ntfsdump_logfile debian/ntfs-3g-dev/usr/bin + mv debian/tmp/usr/bin/ntfsmftalloc debian/ntfs-3g-dev/usr/bin + mv debian/tmp/usr/bin/ntfsck debian/ntfs-3g-dev/usr/bin #override_dh_gencontrol: # dh_gencontrol -- -Vntfs-3g:Provides="libntfs-3g$(SONAME)" -Vntfs-3g-udeb:Provides="libntfs-3g-udeb$(SONAME)" @@ -99,9 +96,6 @@ override_dh_link: rm -rf debian/ntfs-3g-dev/usr/share/doc - # correcting symlink target - dh_link -pntfs-3g-dev lib/$(DEB_HOST_MULTIARCH)/$$(basename $$(readlink debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libntfs-3g.so)) usr/lib/$(DEB_HOST_MULTIARCH)/libntfs-3g.so - dh_link --remaining-packages override_dh_makeshlibs: