From cf39d87ec0dd1bcd7f03f5b78fbb0be289498e8e Mon Sep 17 00:00:00 2001 From: Andrea Terzolo Date: Tue, 13 Dec 2022 22:45:50 +0100 Subject: [PATCH] update(ci): support modern bpf with musl build Signed-off-by: Andrea Terzolo --- .circleci/config.yml | 6 +++--- cmake/modules/driver.cmake | 4 ++-- cmake/modules/falcosecurity-libs.cmake | 4 ++-- test/CMakeLists.txt | 6 ++++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d13306662c..920eb595b6d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ jobs: # This build is 100% static, there are no host dependencies "build-musl": docker: - - image: alpine:3.12 + - image: alpine:3.17 steps: - checkout: path: /source-static/falco @@ -64,13 +64,13 @@ jobs: command: apk update - run: name: Install build dependencies - command: apk add g++ gcc cmake make git bash perl linux-headers autoconf automake m4 libtool elfutils-dev libelf-static patch binutils + command: apk add g++ gcc cmake make git bash perl linux-headers autoconf automake m4 libtool elfutils-dev libelf-static patch binutils bpftool clang - run: name: Prepare project command: | mkdir -p /build-static/release cd /build-static/release - cmake -DCPACK_GENERATOR=TGZ -DBUILD_BPF=Off -DBUILD_DRIVER=Off -DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DMUSL_OPTIMIZED_BUILD=On -DFALCO_ETC_DIR=/etc/falco /source-static/falco + cmake -DCPACK_GENERATOR=TGZ -DBUILD_BPF=Off -DBUILD_DRIVER=Off -DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On -DFALCO_ETC_DIR=/etc/falco /source-static/falco - run: name: Build command: | diff --git a/cmake/modules/driver.cmake b/cmake/modules/driver.cmake index d15702d52f2..cbc023ca597 100644 --- a/cmake/modules/driver.cmake +++ b/cmake/modules/driver.cmake @@ -26,8 +26,8 @@ else() # In case you want to test against another driver version (or branch, or commit) just pass the variable - # ie., `cmake -DDRIVER_VERSION=dev ..` if(NOT DRIVER_VERSION) - set(DRIVER_VERSION "090f4f08c341ef1bb866170deef1c6b72e7e5d43") - set(DRIVER_CHECKSUM "SHA256=8b24b8ebb83c5d0a323e5ab0d8b8858ec2ffa5b6d0496c9eab9b5c796f7ced3b") + set(DRIVER_VERSION "4.0.0+driver") + set(DRIVER_CHECKSUM "SHA256=0f71a4e4492847ce6ca35fe6f9ecdf682f603c878397e57d7628a0cd60a29aed") endif() # cd /path/to/build && cmake /path/to/source diff --git a/cmake/modules/falcosecurity-libs.cmake b/cmake/modules/falcosecurity-libs.cmake index 0d110742338..926e86223a1 100644 --- a/cmake/modules/falcosecurity-libs.cmake +++ b/cmake/modules/falcosecurity-libs.cmake @@ -27,8 +27,8 @@ else() # In case you want to test against another falcosecurity/libs version (or branch, or commit) just pass the variable - # ie., `cmake -DFALCOSECURITY_LIBS_VERSION=dev ..` if(NOT FALCOSECURITY_LIBS_VERSION) - set(FALCOSECURITY_LIBS_VERSION "090f4f08c341ef1bb866170deef1c6b72e7e5d43") - set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=8b24b8ebb83c5d0a323e5ab0d8b8858ec2ffa5b6d0496c9eab9b5c796f7ced3b") + set(FALCOSECURITY_LIBS_VERSION "0.10.0") + set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=08863e345668e984e5d00db4ff02540a52d739a8b2792046615dff4bfbc0459d") endif() # cd /path/to/build && cmake /path/to/source diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bfc5c268755..980a2dfffe6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,6 @@ add_subdirectory(trace_files) -add_subdirectory(plugins) -add_subdirectory(confs/plugins) +if(NOT MUSL_OPTIMIZED_BUILD) + add_subdirectory(plugins) + add_subdirectory(confs/plugins) +endif()