From: Luca Boccassi Date: Sun, 23 May 2021 12:43:38 +0000 (+0100) Subject: meson: look for bpftool in /usr/sbin too X-Git-Tag: v249-rc1~156^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=936cfad7e570f23655c18e29f82901bd42cc442a;p=thirdparty%2Fsystemd.git meson: look for bpftool in /usr/sbin too On Debian, bpftool is installed in /usr/sbin, which is not in $PATH for non-root users by default, so finding it fails. Add a secondary, hard-coded '/usr/sbin/bpftool' after 'bpftool' so that meson can find it. https://packages.debian.org/sid/amd64/bpftool/filelist --- diff --git a/meson.build b/meson.build index ebdbc539c11..9d486b9e4e0 100644 --- a/meson.build +++ b/meson.build @@ -909,7 +909,9 @@ if want_bpf_framework == 'false' else clang = find_program('clang', required : bpf_framework_required) llvm_strip = find_program('llvm-strip', required : bpf_framework_required) - bpftool = find_program('bpftool', required : bpf_framework_required) + # Debian installs this in /usr/sbin/ which is not in $PATH + # FIXME: use the 'dirs' parameter once we bump Meson version to >= 0.53 + bpftool = find_program('bpftool', '/usr/sbin/bpftool', required : bpf_framework_required) bpf_arches = ['x86_64'] deps_found = libbpf.found() and clang.found() and llvm_strip.found() and bpftool.found() # Can build BPF program from source code in restricted C