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.
This commit is contained in:
Krzesimir Nowak 2021-11-09 13:44:16 +01:00
parent 2cc885be59
commit f6b8a1ab88
2 changed files with 12 additions and 0 deletions

View File

@ -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.

View File

@ -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
}