Skip to content

Commit

Permalink
Adjust usage of bundled libbpf and fix bpf2go install
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 committed Jul 13, 2023
1 parent 30efaac commit ee461d0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bpfd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN dnf config-manager --add-repo \

RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 && \
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 && \
go install github.com/cilium/ebpf/cmd/bpf2go@master
go install github.com/cilium/ebpf/cmd/bpf2go@main

RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | \
sh -s -- -y --no-modify-path && \
Expand Down
1 change: 1 addition & 0 deletions falco-libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ docker-deploy: build docker-teardown
-e CMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-e HOST_ROOT="/host" \
-e FALCO_DIR="${HOME}/go/src/github.com/falcosecurity/libs" \
-e FALCO_BUILDER_FLAVOR="${FALCO_BUILDER_FLAVOR}" \
-w ${HOME}/go/src/github.com/falcosecurity/libs \
-v ${HOME}/go/src/github.com/falcosecurity/libs:${HOME}/go/src/github.com/falcosecurity/libs \
-v /usr/src:/usr/src \
Expand Down
11 changes: 9 additions & 2 deletions falco-libs/compile-falco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@ function clean () {
}

function configure () {
sanitizers="-fsanitize=address -fsanitize=undefined"
# sanitizers="-fsanitize=address -fsanitize=undefined"
use_bundled_libbpf="OFF"

if [[ "${FALCO_BUILDER_FLAVOR:-fedora}" != "fedora" ]] ; then
# Platform dependent adjustments
use_bundled_libbpf="ON"
fi

mkdir -p "${FALCO_DIR}/build"
cmake \
-DBUILD_BPF=ON \
-DUSE_BUNDLED_DEPS=OFF \
-DUSE_BUNDLED_VALIJSON=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_LIBSCAP_MODERN_BPF=ON \
-DUSE_BUNDLED_LIBBPF=OFF \
-DUSE_BUNDLED_LIBBPF="${use_bundled_libbpf}" \
-DUSE_BUNDLED_ZLIB=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCREATE_TEST_TARGETS=ON \
Expand Down
1 change: 1 addition & 0 deletions falco-libs/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN apt-get update && \
linux-tools-"$(uname -r)" \
libbpf-dev \
libcap-dev \
vim \
python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit ee461d0

Please # to comment.