mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-12 08:58:20 +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.
This commit is contained in:
parent
0d7009d35d
commit
bbb40c4e6f
12
mkosi.build
12
mkosi.build
@ -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 \
|
||||
|
@ -44,6 +44,7 @@ Packages=
|
||||
BuildPackages=
|
||||
bpftool
|
||||
docbook-xsl
|
||||
dpkg-dev
|
||||
g++
|
||||
gcc-multilib
|
||||
libacl1-dev
|
||||
|
@ -45,6 +45,7 @@ Packages=
|
||||
|
||||
BuildPackages=
|
||||
docbook-xsl
|
||||
dpkg-dev
|
||||
g++
|
||||
gcc-multilib
|
||||
libacl1-dev
|
||||
|
Loading…
x
Reference in New Issue
Block a user