mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
mkosi: Make sure bpf-framework works on CentOS Stream 8 as well
This commit is contained in:
parent
afd22e3219
commit
6afeac1dd6
16
mkosi.build
16
mkosi.build
@ -56,6 +56,22 @@ for bpftool in /usr/lib/linux-tools/*/bpftool; do
|
||||
break
|
||||
done
|
||||
|
||||
# CentOS Stream 8 includes bpftool 4.18.0 which is lower than what we need. However, they've backported the
|
||||
# specific feature we need ("gen skeleton") to this version, so we replace bpftool with a script that reports
|
||||
# version 5.6.0 to satisfy meson which makes bpf work on CentOS Stream 8 as well.
|
||||
if [ "$(grep '^ID=' /etc/os-release)" = "ID=\"centos\"" ] && [ "$(grep '^VERSION=' /etc/os-release)" = "VERSION=\"8\"" ]; then
|
||||
cp /usr/sbin/bpftool /usr/sbin/bpftool.real
|
||||
cat > /usr/sbin/bpftool <<EOF
|
||||
#!/bin/sh
|
||||
if [ "\$1" = --version ]; then
|
||||
echo 5.6.0
|
||||
else
|
||||
exec /usr/sbin/bpftool.real \$@
|
||||
fi
|
||||
EOF
|
||||
chmod +x /usr/sbin/bpftool
|
||||
fi
|
||||
|
||||
if [ ! -f "$BUILDDIR"/build.ninja ] ; then
|
||||
sysvinit_path=$(realpath /etc/init.d)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user