Skip to content

Commit

Permalink
Build bpftool from source (#1954)
Browse files Browse the repository at this point in the history
Downstream builds with ubi 8, which ships a bpftool that is old and
doesn't work with the latest Falco changes on Arm and Z. In order to
circumvent this, we can simply build from source.
  • Loading branch information
Molter73 committed Nov 15, 2024
1 parent 4483b3e commit 6abd6bf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@
[submodule "third_party/uthash"]
path = builder/third_party/uthash
url = https://github.com/troydhanson/uthash.git
[submodule "builder/third_party/bpftool"]
path = builder/third_party/bpftool
url = https://github.com/libbpf/bpftool
branch = v7.3.0
2 changes: 1 addition & 1 deletion builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN dnf -y update \
bison \
ca-certificates \
clang-17.0.6 \
llvm-17.0.6 \
cmake \
cracklib-dicts \
diffutils \
Expand Down Expand Up @@ -42,7 +43,6 @@ RUN dnf -y update \
valgrind \
wget \
which \
bpftool \
# for USDT support
systemtap-sdt-devel \
&& dnf clean all
Expand Down
12 changes: 12 additions & 0 deletions builder/install/90-bpftool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e

cd third_party/bpftool

# Replace libbpf with our submodule
rm -rf libbpf/
ln -s ../libbpf libbpf

mkdir src/build
make V=1 -C src ${NPROCS:+-j ${NPROCS}} all install
1 change: 1 addition & 0 deletions builder/third_party/bpftool
Submodule bpftool added at 687e7f
2 changes: 1 addition & 1 deletion collector/container/konflux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN /tmp/.konflux/scripts/subscription-manager-bro.sh register /mnt && \
wget \
unzip \
clang \
bpftool \
llvm \
cmake-3.18.2-9.el8 \
gcc-c++ \
openssl-devel \
Expand Down

0 comments on commit 6abd6bf

Please sign in to comment.