From f6b8a1ab88f62052a6a222a501d2a9f38cec4fe4 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 9 Nov 2021 13:44:16 +0100 Subject: [PATCH] sys-fs/lvm2: Fix detection of systemd util directory There usually exists a way to tell the configure script to use certain path, so the script won't try to autodetect things. This is a case for the systemd system unit directory, but apparently not for systemd util directory. So for the system unit directory, we can forward the path we received from systemd.eclass' `systemd_get_systemunitdir`, but for the util directory, we need to hack the script with `sed`. The reason for this is that autodetected directory will have the sysroot path prepended twice. The systemd eclass has a workaround for this issue. --- .../src/third_party/coreos-overlay/sys-fs/lvm2/README.md | 5 +++++ .../coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md index cfb0a6ca81..379916ebf0 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md +++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md @@ -13,3 +13,8 @@ systemd[1]: lvm2-activation-early.service: Failed with result 'start-limit-hit'. Set RemainAfterExit=yes as done for the other oneshot services to prevent the unit from running multiple times in a row and hitting the restart limit. + + + +We also patch the configure script to use the correct path for systemd +util directory. diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild index fde27a9249..4a646e65df 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild @@ -123,6 +123,13 @@ src_prepare() { sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die fi + # Flatcar: The configure script tries to detect the systemd + # util dir without providing a way for us to override it, so + # modify the script. + sed -i \ + -e "s#^\(systemdutildir=\).*#\1$(systemd_get_utildir)#" \ + configure{.ac,} || die + eautoreconf }