Source: reiserfsprogs Source-Version: 1:3.6.27-9 Severity: normal Tags: patch
Hi! Here are several patches that fix or improve the packaging. I'm not sure whether you want to keep the package automatically backportable, in which case last two patches could perhaps take a different form. (Such as using absolute names for the files shipped by the package, instead of looking them up in PATH, and/or keeping the dh-sequence-movetousr part). Let me know, and I'm happy to rework them. Thanks, Guillem
From 7f81050fc475b8eb881633a0a32a57d5ba453af7 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sat, 24 Aug 2024 23:57:14 +0200 Subject: [PATCH 1/7] Install manual pages through dh_installman program Remove manual page entries from the .install fragment file, and replace the entries in the .manpages one with explicit pathnames from the staging directory, so that we are sure to use the files that got installed, in case they get processed at build time. We need to keep the symlinks to manual pages in the .install fragment file, otherwise dh_installman currently duplicates the manual page instead of preserving the symlink. --- debian/reiserfsprogs.install | 5 ++++- debian/reiserfsprogs.manpages | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/debian/reiserfsprogs.install b/debian/reiserfsprogs.install index cf205e2..0b9317b 100644 --- a/debian/reiserfsprogs.install +++ b/debian/reiserfsprogs.install @@ -7,4 +7,7 @@ usr/sbin/reiserfsck sbin/ usr/sbin/reiserfstune sbin/ usr/sbin/resize_reiserfs sbin/ usr/sbin/tunefs.reiserfs sbin/ -usr/share/man/man8/* usr/share/man/man8/ +usr/share/man/man8/debugfs.reiserfs.8 +usr/share/man/man8/fsck.reiserfs.8 +usr/share/man/man8/mkfs.reiserfs.8 +usr/share/man/man8/tunefs.reiserfs.8 diff --git a/debian/reiserfsprogs.manpages b/debian/reiserfsprogs.manpages index 89e9348..57379c5 100644 --- a/debian/reiserfsprogs.manpages +++ b/debian/reiserfsprogs.manpages @@ -1,5 +1,5 @@ -debugreiserfs/debugreiserfs.8 -fsck/reiserfsck.8 -mkreiserfs/mkreiserfs.8 -resize_reiserfs/resize_reiserfs.8 -tune/reiserfstune.8 +usr/share/man/man8/debugreiserfs.8 +usr/share/man/man8/mkreiserfs.8 +usr/share/man/man8/reiserfsck.8 +usr/share/man/man8/reiserfstune.8 +usr/share/man/man8/resize_reiserfs.8 -- 2.45.2
From 29774ea507f4fbebdb0978bf3afad2fd877b2861 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 00:03:00 +0200 Subject: [PATCH 2/7] Do not list sbin as a directory to create in the .dirs fragment file This is already handled automatically by dh_install, so we do not need to list it explicitly. --- debian/reiserfsprogs.dirs | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/reiserfsprogs.dirs b/debian/reiserfsprogs.dirs index 5f81fd3..52c8c74 100644 --- a/debian/reiserfsprogs.dirs +++ b/debian/reiserfsprogs.dirs @@ -1,2 +1 @@ -sbin usr/share/initramfs-tools/hooks -- 2.45.2
From 5a06c59e6d56654bdd37e31c7e91690fa72effff Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 00:01:24 +0200 Subject: [PATCH 3/7] Move hook installation from debian/rules to an .initramfs-hook fragment file We can let debhelper automatically install the hook for us, if we place it as a fragment file for dh_installinitramfs. --- debian/reiserfsprogs.dirs | 1 - .../{hooks/reiserfsprogs => reiserfsprogs.initramfs-hook} | 0 debian/rules | 6 ------ 3 files changed, 7 deletions(-) delete mode 100644 debian/reiserfsprogs.dirs rename debian/{hooks/reiserfsprogs => reiserfsprogs.initramfs-hook} (100%) diff --git a/debian/reiserfsprogs.dirs b/debian/reiserfsprogs.dirs deleted file mode 100644 index 52c8c74..0000000 --- a/debian/reiserfsprogs.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/share/initramfs-tools/hooks diff --git a/debian/hooks/reiserfsprogs b/debian/reiserfsprogs.initramfs-hook similarity index 100% rename from debian/hooks/reiserfsprogs rename to debian/reiserfsprogs.initramfs-hook diff --git a/debian/rules b/debian/rules index 9b38cd5..2ed7fde 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,5 @@ #! /usr/bin/make -f -DEB=reiserfsprogs - %: dh $@ @@ -12,7 +10,3 @@ override_dh_auto_install: rm debian/tmp/usr/lib/*/*.la # rm -r debian/tmp/usr/lib/*/pkgconfig/ # rm -r debian/tmp/usr/include/ - -override_dh_install: - dh_install - install -m 755 debian/hooks/reiserfsprogs debian/$(DEB)/usr/share/initramfs-tools/hooks -- 2.45.2
From dba26c2bd572ab7b833f1d9277669bfb7c060280 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 05:51:20 +0200 Subject: [PATCH 4/7] Remove unnecessary imperative update-initramfs trigger activation This is now handled automatically by an activation declared in a trigger control file generated by dh_installinitramfs. So we do not need the maintainer script anymore. --- debian/reiserfsprogs.postinst | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 debian/reiserfsprogs.postinst diff --git a/debian/reiserfsprogs.postinst b/debian/reiserfsprogs.postinst deleted file mode 100644 index e9d9ad8..0000000 --- a/debian/reiserfsprogs.postinst +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - configure) - if which update-initramfs > /dev/null && [ -e /etc/initramfs-tools/initramfs.conf ] - then - update-initramfs -u - fi - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 -- 2.45.2
From 51b97dcd83c1912ca1b541ed922918c558c3a363 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 00:06:08 +0200 Subject: [PATCH 5/7] Use debian/not-installed instead of explicitly removing *.la files With new debhelper compatibility levels, we can list the files that we are not going to be installing, so that dh_missing knows about them, and does not fail. Instead of removing them from the installation staging directory. This removes the last dh override in debian/rules. --- debian/not-installed | 1 + debian/rules | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) create mode 100644 debian/not-installed diff --git a/debian/not-installed b/debian/not-installed new file mode 100644 index 0000000..f403946 --- /dev/null +++ b/debian/not-installed @@ -0,0 +1 @@ +usr/lib/*/*.la diff --git a/debian/rules b/debian/rules index 2ed7fde..a5e0d78 100755 --- a/debian/rules +++ b/debian/rules @@ -2,11 +2,3 @@ %: dh $@ - -override_dh_auto_install: - dh_auto_install - # Do not ship development files -# rm debian/tmp/usr/lib/*/*.a - rm debian/tmp/usr/lib/*/*.la -# rm -r debian/tmp/usr/lib/*/pkgconfig/ -# rm -r debian/tmp/usr/include/ -- 2.45.2
From daa361105f800a150c1ad67125cad7d44c4b3575 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 00:07:59 +0200 Subject: [PATCH 6/7] Use relative pathnames to locate programs Instead of hardcoding absolute pathnames in files, use PATH, so that we do not need to care about the end pathname. --- debian/fsck.reiserfs | 4 +++- debian/mkfs.reiserfs | 4 +++- debian/reiserfsprogs.initramfs-hook | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/fsck.reiserfs b/debian/fsck.reiserfs index 8d8817b..b515e56 100644 --- a/debian/fsck.reiserfs +++ b/debian/fsck.reiserfs @@ -1,5 +1,7 @@ #! /bin/sh +PATH="$PATH:/usr/sbin:/sbin:/usr/bin:/bin" + # Treat the -y flag the same way other fsck.* instances do ADD_OPTS="" for opt @@ -15,4 +17,4 @@ do done # Be sure to invoke reiserfsck quitely for booting over slow consoles -exec /sbin/reiserfsck -q $ADD_OPTS "$@" +exec reiserfsck -q $ADD_OPTS "$@" diff --git a/debian/mkfs.reiserfs b/debian/mkfs.reiserfs index 162fbd4..2fdd586 100644 --- a/debian/mkfs.reiserfs +++ b/debian/mkfs.reiserfs @@ -1,4 +1,6 @@ #! /bin/sh +PATH="$PATH:/usr/sbin:/sbin:/usr/bin:/bin" + # Be sure to invoke mkreiserfs noninteractively for the debian-installer -exec /sbin/mkreiserfs -q "$@" +exec mkreiserfs -q "$@" diff --git a/debian/reiserfsprogs.initramfs-hook b/debian/reiserfsprogs.initramfs-hook index ba84fa9..41d3927 100755 --- a/debian/reiserfsprogs.initramfs-hook +++ b/debian/reiserfsprogs.initramfs-hook @@ -3,5 +3,5 @@ . /usr/share/initramfs-tools/hook-functions if command -v reiserfsck >/dev/null 2>&1; then - copy_exec /sbin/reiserfsck + copy_exec $(command -v reiserfsck) fi -- 2.45.2
From 3a13313e030e8b9cd58c18ae1c9d7584ae67dbb6 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 04:53:55 +0200 Subject: [PATCH 7/7] Install files in their canonical locations Instead of using dh-sequence-movetousr, which is a temporary workaround, do the full move, which will be needed eventually anyway. This simplifies the packaging, and makes it more obvious and explicit about what is going on. --- debian/control | 1 - debian/reiserfsprogs.install | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/debian/control b/debian/control index a226d75..d328414 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,6 @@ Priority: optional Maintainer: Felix Zielcke <fziel...@z-51.de> Build-Depends: comerr-dev, debhelper-compat (= 13), - dh-sequence-movetousr, dpkg-dev (>= 1.22.5), libacl1-dev, uuid-dev diff --git a/debian/reiserfsprogs.install b/debian/reiserfsprogs.install index 0b9317b..2990969 100644 --- a/debian/reiserfsprogs.install +++ b/debian/reiserfsprogs.install @@ -1,12 +1,12 @@ -usr/sbin/debugfs.reiserfs sbin/ -usr/sbin/debugreiserfs sbin/ -usr/sbin/fsck.reiserfs sbin/ -usr/sbin/mkfs.reiserfs sbin/ -usr/sbin/mkreiserfs sbin/ -usr/sbin/reiserfsck sbin/ -usr/sbin/reiserfstune sbin/ -usr/sbin/resize_reiserfs sbin/ -usr/sbin/tunefs.reiserfs sbin/ +usr/sbin/debugfs.reiserfs +usr/sbin/debugreiserfs +usr/sbin/fsck.reiserfs +usr/sbin/mkfs.reiserfs +usr/sbin/mkreiserfs +usr/sbin/reiserfsck +usr/sbin/reiserfstune +usr/sbin/resize_reiserfs +usr/sbin/tunefs.reiserfs usr/share/man/man8/debugfs.reiserfs.8 usr/share/man/man8/fsck.reiserfs.8 usr/share/man/man8/mkfs.reiserfs.8 -- 2.45.2