tools: bpftool: Make libcap dependency optional
authorQuentin Monnet <quentin@isovalent.com>
Wed, 29 Apr 2020 14:45:06 +0000 (15:45 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 Apr 2020 21:25:11 +0000 (23:25 +0200)
commit0b3b9ca3d154486baa08a41cbc62fde67ba8c6c3
treeec30b445def82778746dca7a9f5ad752abaf7112
parentcf9bf714523dbbc97953be6de6ca14d57d4f8a21
tools: bpftool: Make libcap dependency optional

The new libcap dependency is not used for an essential feature of
bpftool, and we could imagine building the tool without checks on
CAP_SYS_ADMIN by disabling probing features as an unprivileged users.

Make it so, in order to avoid a hard dependency on libcap, and to ease
packaging/embedding of bpftool.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200429144506.8999-4-quentin@isovalent.com
tools/bpf/bpftool/Documentation/bpftool-feature.rst
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/feature.c