From: Daan De Meyer Date: Fri, 14 Oct 2022 12:53:41 +0000 (+0200) Subject: mkosi: Make sure bpf-framework works on CentOS Stream 8 as well X-Git-Tag: v252-rc2~22^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6afeac1dd69bedbdbc8b1364a1002264a2b232f3;p=thirdparty%2Fsystemd.git mkosi: Make sure bpf-framework works on CentOS Stream 8 as well --- diff --git a/mkosi.build b/mkosi.build index 7a32673bb48..f02a15ad4d2 100755 --- a/mkosi.build +++ b/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 <