On Mon, Sep 25, 2023 at 10:29:14PM +0200, Helmut Grohne wrote: > We want to change the value of systemdsystemunitdir in systemd.pc to > point below /usr. lvm2's upstream build system consumes this variable, > but its packaging hard codes the current value. Consequently, lvm2 FTBFS > when it is changed. Consider applying the attached patch to avoid that > failure.
The earlier patch no longer works. In the patch, I mistakenly assumed that lvm2 would also consider udevdir and "fixed" that as well. It really does not and now that udevdir has been moved, the patch makes lvm2 FTBFS. I propose honoring udevdir as well and attach an updated patch. The only difference to the earlier patch is the hunk changing configure arguments. Helmut
diff --minimal -Nru lvm2-2.03.16/debian/dmeventd.install lvm2-2.03.16/debian/dmeventd.install --- lvm2-2.03.16/debian/dmeventd.install 2022-10-19 21:37:31.000000000 +0200 +++ lvm2-2.03.16/debian/dmeventd.install 2024-01-01 22:34:41.000000000 +0100 @@ -1,5 +1,5 @@ lib/*/libdevmapper-event-* lib/*/device-mapper/libdevmapper-event-* -lib/systemd/system/dm-event* +${env:systemdsystemunitdir}/dm-event* sbin/dmeventd usr/share/man/man8/dmeventd.8 diff --minimal -Nru lvm2-2.03.16/debian/dmsetup.install lvm2-2.03.16/debian/dmsetup.install --- lvm2-2.03.16/debian/dmsetup.install 2022-10-19 21:37:31.000000000 +0200 +++ lvm2-2.03.16/debian/dmsetup.install 2024-01-01 22:34:41.000000000 +0100 @@ -1,5 +1,5 @@ ../../initramfs-tools/dmsetup/* usr/share/initramfs-tools -lib/udev/rules.d/*-dm*.rules +${env:udevdir}/rules.d/*-dm*.rules sbin/blkdeactivate sbin/dmsetup sbin/dmstats diff --minimal -Nru lvm2-2.03.16/debian/lvm2-dbusd.install lvm2-2.03.16/debian/lvm2-dbusd.install --- lvm2-2.03.16/debian/lvm2-dbusd.install 2022-10-19 21:37:31.000000000 +0200 +++ lvm2-2.03.16/debian/lvm2-dbusd.install 2024-01-01 22:34:41.000000000 +0100 @@ -1,5 +1,5 @@ etc/dbus-1/system.d/com.redhat.lvmdbus1.conf -lib/systemd/system/lvm2-lvmdbusd.service +${env:systemdsystemunitdir}/lvm2-lvmdbusd.service sbin/lvmdbusd usr/lib/python*/*-packages/lvmdbusd/ usr/share/dbus-1/system-services/com.redhat.lvmdbus1.service diff --minimal -Nru lvm2-2.03.16/debian/lvm2-lockd.install lvm2-2.03.16/debian/lvm2-lockd.install --- lvm2-2.03.16/debian/lvm2-lockd.install 2022-10-19 21:37:31.000000000 +0200 +++ lvm2-2.03.16/debian/lvm2-lockd.install 2024-01-01 22:34:41.000000000 +0100 @@ -1,5 +1,5 @@ -lib/systemd/system/lvmlockd.service -lib/systemd/system/lvmlocks.service +${env:systemdsystemunitdir}/lvmlockd.service +${env:systemdsystemunitdir}/lvmlocks.service sbin/lvmlockctl sbin/lvmlockd usr/share/man/man8/lvmlockctl.8 diff --minimal -Nru lvm2-2.03.16/debian/lvm2.install lvm2-2.03.16/debian/lvm2.install --- lvm2-2.03.16/debian/lvm2.install 2022-10-19 21:37:31.000000000 +0200 +++ lvm2-2.03.16/debian/lvm2.install 2024-01-01 22:34:41.000000000 +0100 @@ -1,9 +1,9 @@ ../../initramfs-tools/lvm2/* usr/share/initramfs-tools etc/lvm -lib/systemd/system/blk-availability* -lib/systemd/system/lvm2-lvmpolld* -lib/systemd/system/lvm2-monitor* -lib/udev/rules.d/*-lvm*.rules +${env:systemdsystemunitdir}/blk-availability* +${env:systemdsystemunitdir}/lvm2-lvmpolld* +${env:systemdsystemunitdir}/lvm2-monitor* +${env:udevdir}/rules.d/*-lvm*.rules sbin/fsadm sbin/lvchange sbin/lvconvert diff --minimal -Nru lvm2-2.03.16/debian/rules lvm2-2.03.16/debian/rules --- lvm2-2.03.16/debian/rules 2022-10-19 21:37:31.000000000 +0200 +++ lvm2-2.03.16/debian/rules 2024-01-01 22:35:58.000000000 +0100 @@ -16,6 +16,9 @@ DEVMAPPER_VERSION_DEBIAN = $(DEVMAPPER_VERSION)-$(VERSION_DEBIAN) DEVMAPPER_VERSION_FILE = $(DEVMAPPER_VERSION_PLAIN)-$(VERSION_DEBIAN) +export systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,) +export udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,) + GENCONTROL_ARGS = -Vdevmapper:Version=$(DEVMAPPER_VERSION_DEBIAN) ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -39,7 +42,7 @@ --with-thin-check=/usr/sbin/thin_check --with-thin-dump=/usr/sbin/thin_dump --with-thin-repair=/usr/sbin/thin_repair - --with-udev-prefix=/ + --with-udevdir=/$(udevdir)/rules.d --enable-applib --enable-blkid_wiping --enable-cmdlib