Control: tags -1 + pending I've prepared a NMU fixing these long-standing bugs with patches. Thanks to all the contributors. I've uploaded it to delayed/15. Please let me know if I should defer it any longer. I'm attaching a .debdiff of the proposed changes.
Helmut
diff --minimal -Nru lvm2-2.03.07/debian/.gitignore lvm2-2.03.07/debian/.gitignore --- lvm2-2.03.07/debian/.gitignore 2020-01-07 14:46:03.000000000 +0100 +++ lvm2-2.03.07/debian/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -/autoreconf.* -/debhelper* -/files -/*.debhelper -/*.log -/*.substvars -/*/ -!/bin/ diff --minimal -Nru lvm2-2.03.07/debian/changelog lvm2-2.03.07/debian/changelog --- lvm2-2.03.07/debian/changelog 2020-01-07 14:46:03.000000000 +0100 +++ lvm2-2.03.07/debian/changelog 2020-07-18 21:07:15.000000000 +0200 @@ -1,3 +1,22 @@ +lvm2 (2.03.07-1.1) unstable; urgency=medium + + * Non-maintainer upload. + + [ Kevin Locke ] + * blkdeactivate: Change /bin/sort to sort. (closes: #859388) + + [ Helmut Grohne ] + * Turn lvm2-dbusd Architecture: all. (closes: #908908) + + [ Vincent Danjean ] + * Add missing epoch to dmsetup dependency. (closes: #928700) + + [ Julian Andres Klode ] + * Fix location of systemd-run. (closes: #929437) + * Detect systemd at run-time in 69-dm-lvm-metad.rules. (closes: #933011) + + -- Helmut Grohne <hel...@subdivi.de> Sat, 18 Jul 2020 21:07:15 +0200 + lvm2 (2.03.07-1) unstable; urgency=medium * New upstream release. diff --minimal -Nru lvm2-2.03.07/debian/control lvm2-2.03.07/debian/control --- lvm2-2.03.07/debian/control 2020-01-07 14:46:03.000000000 +0100 +++ lvm2-2.03.07/debian/control 2020-07-18 20:53:01.000000000 +0200 @@ -5,7 +5,6 @@ Uploaders: Bastian Blank <wa...@debian.org> Build-Depends: debhelper (>= 10.9.2), - dh-python, autoconf-archive, automake, libaio-dev, @@ -21,11 +20,13 @@ libselinux1-dev, libsystemd-dev, libudev-dev, + pkg-config, + systemd +Build-Depends-Indep: + dh-python, python3-dev, python3-dbus, python3-pyudev, - pkg-config, - systemd Standards-Version: 4.1.1 Homepage: http://sources.redhat.com/lvm2/ Vcs-Git: https://salsa.debian.org/lvm-team/lvm2.git @@ -33,7 +34,7 @@ Package: lvm2 Architecture: linux-any -Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, dmsetup (>= 1.02.145-2~), dmeventd +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, dmsetup (>= 2:1.02.145-2~), dmeventd Recommends: thin-provisioning-tools Conflicts: clvm Multi-Arch: foreign @@ -59,8 +60,8 @@ regular block devices. Package: lvm2-dbusd -Architecture: linux-any -Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends}, lvm2 (= ${binary:Version}), dbus, +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, lvm2 (>= ${source:Version}), lvm2 (<< ${source:Version}.1), dbus, python3-dbus, python3-gi, python3-pyudev, diff --minimal -Nru lvm2-2.03.07/debian/patches/bug-859388.patch lvm2-2.03.07/debian/patches/bug-859388.patch --- lvm2-2.03.07/debian/patches/bug-859388.patch 1970-01-01 01:00:00.000000000 +0100 +++ lvm2-2.03.07/debian/patches/bug-859388.patch 2020-07-18 20:54:45.000000000 +0200 @@ -0,0 +1,32 @@ +From ba6cfde40b8386b1a2630653cdbb99fd87cfeea7 Mon Sep 17 00:00:00 2001 +Message-Id: <ba6cfde40b8386b1a2630653cdbb99fd87cfeea7.1491190631.git.ke...@kevinlocke.name> +From: Kevin Locke <ke...@kevinlocke.name> +Date: Sun, 2 Apr 2017 21:20:31 -0600 +Subject: [PATCH] blkdeactivate: Change /bin/sort to sort + +Debian ships sort from GNU Coreutils as /usr/bin/sort rather than +/bin/sort. This causes blkdeactivate to fail with the following: + + Deactivating block devices: + /sbin/blkdeactivate: line 320: /bin/sort: No such file or directory + +To fix this in a portable way, remove the path from sort. Since all +options used are specified by POSIX any builtin would have to provide +them, so this does not pose any risk that I am aware of. + +Signed-off-by: Kevin Locke <ke...@kevinlocke.name> +--- + scripts/blkdeactivate.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- lvm2-2.03.07.orig/scripts/blkdeactivate.sh.in ++++ lvm2-2.03.07/scripts/blkdeactivate.sh.in +@@ -58,7 +58,7 @@ + LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" + LSBLK_VARS="local devtype local kname local name local mnt" + LSBLK_READ="read -r devtype kname name mnt" +-SORT_MNT="/bin/sort -r -u -k 4" ++SORT_MNT="sort -r -u -k 4" + + # Do not show tool errors by default (only done/skipping summary + # message provided by this script) and no verbose mode by default. diff --minimal -Nru lvm2-2.03.07/debian/patches/bug-929437.patch lvm2-2.03.07/debian/patches/bug-929437.patch --- lvm2-2.03.07/debian/patches/bug-929437.patch 1970-01-01 01:00:00.000000000 +0100 +++ lvm2-2.03.07/debian/patches/bug-929437.patch 2020-07-18 20:54:42.000000000 +0200 @@ -0,0 +1,19 @@ +Description: Fix location of systemd-run + systemd-run is installed into /usr/bin, not BINDIR aka /bin. +Author: Julian Andres Klode <julian.kl...@canonical.com> +Origin: vendor +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1830169 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- lvm2-2.03.07.orig/udev/69-dm-lvm-metad.rules.in ++++ lvm2-2.03.07/udev/69-dm-lvm-metad.rules.in +@@ -113,7 +113,7 @@ + # MD | | X | X* | | + # loop | | X | X* | | + # other | X | X | X | | X +-ACTION!="remove", ENV{LVM_PV_GONE}=="1", RUN+="(BINDIR)/systemd-run (LVM_EXEC)/lvm pvscan --cache $major:$minor", GOTO="lvm_end" ++ACTION!="remove", ENV{LVM_PV_GONE}=="1", RUN+="/usr/bin/systemd-run (LVM_EXEC)/lvm pvscan --cache $major:$minor", GOTO="lvm_end" + ENV{SYSTEMD_ALIAS}="/dev/block/$major:$minor" + ENV{SYSTEMD_WANTS}+="lvm2-pvscan@$major:$minor.service" + GOTO="lvm_end" diff --minimal -Nru lvm2-2.03.07/debian/patches/bug-933011.patch lvm2-2.03.07/debian/patches/bug-933011.patch --- lvm2-2.03.07/debian/patches/bug-933011.patch 1970-01-01 01:00:00.000000000 +0100 +++ lvm2-2.03.07/debian/patches/bug-933011.patch 2020-07-18 20:54:36.000000000 +0200 @@ -0,0 +1,104 @@ +From b59270bc579cc89816a56756def3acdabfff4a07 Mon Sep 17 00:00:00 2001 +From: Julian Andres Klode <julian.kl...@canonical.com> +Date: Thu, 25 Jul 2019 15:40:42 -0300 +Subject: [PATCH] Detect systemd at run-time in 69-dm-lvm-metad.rules + +systems might have systemd as their normal init systems, but +might not be using it in their initramfs; or like Debian, support +different init systems. + +Detect whether we are running on systemd by checking for /run/systemd/system +and then change the behavior accordingly. + +This effectively breaks compatibility with systemd versions prior to +205, as 205 was the minimum version for the feature. + +Bug-Debian: https://bugs.debian.org/933011 +--- + configure.ac | 24 ------------------------ + udev/69-dm-lvm-metad.rules.in | 6 ++++-- + udev/Makefile.in | 10 +--------- + 3 files changed, 5 insertions(+), 35 deletions(-) + +--- lvm2-2.03.07.orig/configure.ac ++++ lvm2-2.03.07/configure.ac +@@ -1057,29 +1057,6 @@ + [Use blkid wiping by default.]) + + ################################################################################ +-dnl -- Enable udev-systemd protocol to instantiate a service for background jobs +-dnl -- Requires systemd version 205 at least (including support for systemd-run) +-AC_ARG_ENABLE(udev-systemd-background-jobs, +- AC_HELP_STRING([--disable-udev-systemd-background-jobs], +- [disable udev-systemd protocol to instantiate a service for background job]), +- UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval, +- UDEV_SYSTEMD_BACKGROUND_JOBS=maybe) +- +-if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != no; then +- pkg_config_init +- PKG_CHECK_MODULES(SYSTEMD, systemd >= 205, +- [UDEV_SYSTEMD_BACKGROUND_JOBS=yes], +- [if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe; then +- UDEV_SYSTEMD_BACKGROUND_JOBS=no +- else +- AC_MSG_ERROR([bailing out... systemd >= 205 is required]) +- fi]) +-fi +- +-AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background) +-AC_MSG_RESULT($UDEV_SYSTEMD_BACKGROUND_JOBS) +- +-################################################################################ + dnl -- Enable udev synchronisation + AC_MSG_CHECKING(whether to enable synchronisation with udev processing) + AC_ARG_ENABLE(udev_sync, +@@ -1715,7 +1692,6 @@ + AC_SUBST(UDEV_PC) + AC_SUBST(UDEV_RULES) + AC_SUBST(UDEV_SYNC) +-AC_SUBST(UDEV_SYSTEMD_BACKGROUND_JOBS) + AC_SUBST(UDEV_RULE_EXEC_DETECTION) + AC_SUBST(UDEV_HAS_BUILTIN_BLKID) + AC_SUBST(USE_TRACKING) +--- lvm2-2.03.07.orig/udev/69-dm-lvm-metad.rules.in ++++ lvm2-2.03.07/udev/69-dm-lvm-metad.rules.in +@@ -78,7 +78,8 @@ + # For "systemd_background" mode, systemd takes care of this by activating + # the lvm2-pvscan@.service only once. + LABEL="next" +-ACTION!="(PVSCAN_ACTION)", GOTO="lvm_end" ++TEST!="/run/systemd/system", ACTION!="add", GOTO="lvm_end" ++TEST=="/run/systemd/system", ACTION!="add|change", GOTO="lvm_end" + + LABEL="lvm_scan" + +@@ -88,7 +89,8 @@ + # --(enable|disable)-udev-systemd-background-jobs to "configure". + # On modern distributions with recent systemd, it's "systemd_background"; + # on others, "direct_pvscan". +-GOTO="(PVSCAN_RULE)" ++TEST!="/run/systemd/system", GOTO="direct_pvscan" ++TEST=="/run/systemd/system", GOTO="systemd_background" + + LABEL="systemd_background" + +--- lvm2-2.03.07.orig/udev/Makefile.in ++++ lvm2-2.03.07/udev/Makefile.in +@@ -43,16 +43,8 @@ + BLKID_RULE=IMPORT{program}=\"${SBIN}\/blkid -o udev -p \$$tempnode\" + endif + +-ifeq ("@UDEV_SYSTEMD_BACKGROUND_JOBS@", "yes") +-PVSCAN_RULE=systemd_background +-PVSCAN_ACTION=add|change +-else +-PVSCAN_RULE=direct_pvscan +-PVSCAN_ACTION=add +-endif +- + %.rules: $(srcdir)/%.rules.in +- $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(PVSCAN_RULE)+$(PVSCAN_RULE)+;s+(PVSCAN_ACTION)+$(PVSCAN_ACTION)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@ ++ $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@ + + 55-dm.rules: 10-dm.rules + ln -s $< $@ diff --minimal -Nru lvm2-2.03.07/debian/patches/series lvm2-2.03.07/debian/patches/series --- lvm2-2.03.07/debian/patches/series 2020-01-07 14:46:03.000000000 +0100 +++ lvm2-2.03.07/debian/patches/series 2020-07-18 20:54:03.000000000 +0200 @@ -1 +1,4 @@ debian-changes +bug-859388.patch +bug-929437.patch +bug-933011.patch diff --minimal -Nru lvm2-2.03.07/debian/rules lvm2-2.03.07/debian/rules --- lvm2-2.03.07/debian/rules 2020-01-07 14:46:03.000000000 +0100 +++ lvm2-2.03.07/debian/rules 2020-07-18 20:53:01.000000000 +0200 @@ -27,7 +27,8 @@ endif %: - dh $@ --parallel --with python3 + dh $@ --parallel $(DH_ADDONS) +build binary %-indep: DH_ADDONS+=--with=python3 override_dh_auto_configure: SOURCE_FILES = $(filter-out debian, $(wildcard * .[^.]*)) override_dh_auto_configure: @@ -56,7 +57,7 @@ --enable-blkid_wiping \ --enable-cmdlib \ --enable-dmeventd \ - --enable-dbus-service \ + --$(if $(filter lvm2-dbusd,$(shell dh_listpackages)),en,dis)able-dbus-service \ --enable-lvmlockd-dlm \ --enable-lvmlockd-sanlock \ --enable-lvmpolld \