Source: lvm2 Source-Version: 2.03.22-1 Severity: serious Tags: patch Hi!
This is an assortment of some packaging and build system fixes, one of them fixes a current FTBFS, as the upstream Makefiles are left with @GREP@ and @EGREP@ substitution placeholders due to the now missing autoconf checks. Attached the patches. The first one, I guess will need to be adapted to whatever workflow the package is using, but the quilt patch is a proper git formatted patch so can be applied as is wherever. Thanks, Guillem
From d5926716ac62c4cf506f17c0393397642081562a Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 19:57:57 +0200 Subject: [PATCH 1/4] Check for grep and egrep explicitly in configure These macros were being pulled out transitively from other projects, but that has stopped happening now, and the build fails. As we explicitly use both the GREP and EGREP make substitution variables, we need to make sure we check for what we need. --- debian/patches/autoconf-grep.patch | 24 ++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 25 insertions(+) create mode 100644 debian/patches/autoconf-grep.patch create mode 100644 debian/patches/series diff --git a/debian/patches/autoconf-grep.patch b/debian/patches/autoconf-grep.patch new file mode 100644 index 000000000..0cb5802c1 --- /dev/null +++ b/debian/patches/autoconf-grep.patch @@ -0,0 +1,24 @@ +From 739278f8557b18837804173958209430837818b8 Mon Sep 17 00:00:00 2001 +From: Guillem Jover <guil...@hadrons.org> +Date: Sun, 25 Aug 2024 19:57:57 +0200 +Subject: [PATCH] Check for grep and egrep explicitly in configure + These macros were being pulled out transitively from other projects, but + that has stopped happening now, and the build fails. As we explicitly use + both the GREP and EGREP make substitution variables, we need to make sure + we check for what we need. + +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,8 @@ AS_CASE(["$host_os"], + + ################################################################################ + dnl -- Checks for programs. ++AC_PROG_GREP ++AC_PROG_EGREP + AC_PROG_SED + AC_PROG_AWK + save_CFLAGS=$CFLAGS diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..0836c06bf --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +autoconf-grep.patch -- 2.45.2
From a45a91162a90c7145f6ea6bc3a65797b40a83d44 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 15:53:18 +0200 Subject: [PATCH 2/4] Turn initramfs hooks into debhelper fragment files The dh_installinitramfs command takes care of installing the initramfs hooks automatically if they are named as pkgname.initramfs-hook, this way we do not need to handle their installation ourselves. --- .../dmsetup/hooks/dmsetup => dmsetup.initramfs-hook} | 0 debian/dmsetup.install | 1 - debian/{initramfs-tools/lvm2/hooks/lvm2 => lvm2.initramfs-hook} | 0 debian/lvm2.install | 1 - 4 files changed, 2 deletions(-) rename debian/{initramfs-tools/dmsetup/hooks/dmsetup => dmsetup.initramfs-hook} (100%) mode change 100755 => 100644 rename debian/{initramfs-tools/lvm2/hooks/lvm2 => lvm2.initramfs-hook} (100%) mode change 100755 => 100644 diff --git a/debian/initramfs-tools/dmsetup/hooks/dmsetup b/debian/dmsetup.initramfs-hook old mode 100755 new mode 100644 similarity index 100% rename from debian/initramfs-tools/dmsetup/hooks/dmsetup rename to debian/dmsetup.initramfs-hook diff --git a/debian/dmsetup.install b/debian/dmsetup.install index 92b630233..aa9e7afb9 100644 --- a/debian/dmsetup.install +++ b/debian/dmsetup.install @@ -1,4 +1,3 @@ -../../initramfs-tools/dmsetup/* usr/share/initramfs-tools usr/lib/udev/rules.d/*-dm*.rules usr/sbin/blkdeactivate usr/sbin/dmsetup diff --git a/debian/initramfs-tools/lvm2/hooks/lvm2 b/debian/lvm2.initramfs-hook old mode 100755 new mode 100644 similarity index 100% rename from debian/initramfs-tools/lvm2/hooks/lvm2 rename to debian/lvm2.initramfs-hook diff --git a/debian/lvm2.install b/debian/lvm2.install index f5f5ee412..243ce3c1a 100644 --- a/debian/lvm2.install +++ b/debian/lvm2.install @@ -1,4 +1,3 @@ -../../initramfs-tools/lvm2/* usr/share/initramfs-tools etc/lvm usr/lib/systemd/system/blk-availability* usr/lib/systemd/system/lvm2-lvmpolld* -- 2.45.2
From b3cc1a9502675cb5fdde21e9a98150212d3ee152 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 15:53:20 +0200 Subject: [PATCH 3/4] Remove imperative activation of update-initramfs trigger This is handled automatically by dh_installinitramfs by installing a triggers control file that activates the trigger, on all relevant package actions, not just configuration. --- debian/dmsetup.postinst | 13 ------------- debian/lvm2.postinst | 1 - 2 files changed, 14 deletions(-) delete mode 100644 debian/dmsetup.postinst diff --git a/debian/dmsetup.postinst b/debian/dmsetup.postinst deleted file mode 100644 index a61cca642..000000000 --- a/debian/dmsetup.postinst +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - configure) - dpkg-trigger --no-await update-initramfs - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/lvm2.postinst b/debian/lvm2.postinst index 08e23c93f..37685cd3e 100644 --- a/debian/lvm2.postinst +++ b/debian/lvm2.postinst @@ -5,7 +5,6 @@ set -e case "$1" in configure) vgcfgbackup >/dev/null 2>&1 || : - dpkg-trigger --no-await update-initramfs if dpkg --compare-versions "$2" lt "2.02.133~"; then deb-systemd-helper purge lvm2-activation-early.service lvm2-activation.service >/dev/null deb-systemd-helper unmask lvm2-activation-early.service lvm2-activation.service >/dev/null -- 2.45.2
From b4048020e1186656d34e5e87ccaf1b265adb01f3 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 25 Aug 2024 15:53:21 +0200 Subject: [PATCH 4/4] Perform full /usr-move on all absolute paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes all file references use their canonical location both from the packaging and on disk point of view, which avoids pointless indirection via symlinks, and when confronted with such pathnames passing them to stuff like «dpkg -S» will work properly. --- debian/dmsetup.initramfs-hook | 10 +++++----- debian/lvm2.initramfs-hook | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/debian/dmsetup.initramfs-hook b/debian/dmsetup.initramfs-hook index c9b5a4938..b417d2cd6 100644 --- a/debian/dmsetup.initramfs-hook +++ b/debian/dmsetup.initramfs-hook @@ -9,17 +9,17 @@ esac . /usr/share/initramfs-tools/hook-functions -mkdir -p $DESTDIR/lib/udev/rules.d/ +mkdir -p $DESTDIR/usr/lib/udev/rules.d/ for rules in 55-dm.rules 60-persistent-storage-dm.rules 95-dm-notify.rules; do if [ -e /etc/udev/rules.d/$rules ]; then - cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/ - elif [ -e /lib/udev/rules.d/$rules ]; then - cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/ + cp -p /etc/udev/rules.d/$rules $DESTDIR/usr/lib/udev/rules.d/ + elif [ -e /usr/lib/udev/rules.d/$rules ]; then + cp -p /usr/lib/udev/rules.d/$rules $DESTDIR/usr/lib/udev/rules.d/ else exit 1 fi done -copy_exec /sbin/dmsetup +copy_exec /usr/sbin/dmsetup manual_add_modules dm_mod diff --git a/debian/lvm2.initramfs-hook b/debian/lvm2.initramfs-hook index b28901a01..8971b3231 100644 --- a/debian/lvm2.initramfs-hook +++ b/debian/lvm2.initramfs-hook @@ -18,20 +18,20 @@ esac cp -a /etc/lvm/ ${DESTDIR}/etc/lvm/ -mkdir -p $DESTDIR/lib/udev/rules.d/ +mkdir -p $DESTDIR/usr/lib/udev/rules.d/ for rules in 56-lvm.rules 69-lvm.rules; do if [ -e /etc/udev/rules.d/$rules ]; then - cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/ - elif [ -e /lib/udev/rules.d/$rules ]; then - cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/ + cp -p /etc/udev/rules.d/$rules $DESTDIR/usr/lib/udev/rules.d/ + elif [ -e /usr/lib/udev/rules.d/$rules ]; then + cp -p /usr/lib/udev/rules.d/$rules $DESTDIR/usr/lib/udev/rules.d/ else exit 1 fi done -copy_exec /sbin/dmsetup -copy_exec /sbin/lvm -ln -s lvm ${DESTDIR}/sbin/vgchange +copy_exec /usr/sbin/dmsetup +copy_exec /usr/sbin/lvm +ln -s lvm ${DESTDIR}/usr/sbin/vgchange for x in dm_mod dm_snapshot dm_mirror dm_raid raid0 raid1 raid10 raid456; do manual_add_modules ${x} -- 2.45.2