1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 08:55:18 +03:00

mkosi: configure multiarch libdir in debian/ubuntu builds

Debian/Ubuntu use /usr/lib/<triplet> instead of /usr/lib64, so configure it
accordingly. This is especially important for cryptsetup token plugins,
as cryptsetup comes from the distro and is configured to look into those
directories.

(cherry picked from commit bbb40c4e6f)
This commit is contained in:
Luca Boccassi 2023-02-15 22:06:26 +00:00 committed by Zbigniew Jędrzejewski-Szmek
parent 51b7acfcef
commit 3168bda640
3 changed files with 14 additions and 0 deletions

View File

@ -86,7 +86,19 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then
rootprefix=/${rootprefix#/}
fi
# On debian-like systems the library directory is not /usr/lib64 but /usr/lib/<arch-triplet>/.
# It is important to use the right one especially for cryptsetup plugins, otherwise they will be
# installed in the wrong directory and not be found by cryptsetup. Assume native build.
if grep -q -e "ID=debian" -e "ID_LIKE=debian" /etc/os-release && command -v dpkg 2>/dev/null; then
LIBDIR="-Drootlibdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
PAMDIR="-Dpamlibdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security"
fi
# Cannot quote $LIBDIR and $PAMDIR, because they may be empty, and meson will fail.
# shellcheck disable=SC2086
meson setup "$BUILDDIR" \
${LIBDIR:-} \
${PAMDIR:-} \
-D "sysvinit-path=$sysvinit_path" \
-D "rootprefix=$rootprefix" \
-D man=false \

View File

@ -44,6 +44,7 @@ Packages=
BuildPackages=
bpftool
docbook-xsl
dpkg-dev
g++
gcc-multilib
libacl1-dev

View File

@ -45,6 +45,7 @@ Packages=
BuildPackages=
docbook-xsl
dpkg-dev
g++
gcc-multilib
libacl1-dev