diff options
| author | Liu Yiding <liuyd.fnst@fujitsu.com> | 2026-03-20 13:11:36 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-03-19 22:27:08 -0700 |
| commit | 30ad3a50250945a9a1d50cc8f7e6089c807ffd82 (patch) | |
| tree | 761fded7679056ee2c1f76da4d0a0d7c9873c5b4 | |
| parent | 604b37953dddcd3d348ebcf9f83804c25a9aae72 (diff) | |
| download | meta-openembedded-30ad3a50250945a9a1d50cc8f7e6089c807ffd82.tar.gz | |
sysdig: upgrade 0.28.0 -> 0.39.0
Upgrade sysdig to solve build failure after upgrading valijson to 1.1.0.
1.Changelog
https://github.com/draios/sysdig/releases/tag/0.39.0
2.Update 0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch for 0.39.0
3.Remove following patches as merged upstream
0001-Add-cstdint-for-uintXX_t-types.patch
0001-libsinsp-fix-build-with-gcc-15.patch
4.Add 0001-Avoid-duplicate-operations-of-add_library.patch to fix do_configure errors
-- Existing strlcat found, will *not* use local definition
CMake Error at falcosecurity-libs/userspace/libscap/CMakeLists.txt:64 (add_library):
add_library cannot create target "scap_error" because another target with
the same name already exists. The existing target is a static library
5.Add CMAKE option -DBUILD_SYSDIG_MODERN_BPF=OFF to fix bpf header file not found issue
sysdig/0.39.0/recipe-sysroot/usr/include/bits/syscall.h:23:10: fatal error: 'bits/syscall-32.h' file not found
| 23 | #include <bits/syscall-32.h>
6.Add do_configure:prepend() function and CFLAGS/CXXFLAGS to fix header file not found issue
sysdig/0.39.0/sources/sysdig-0.39.0/falcosecurity-libs/userspace/libscap/engine/kmod/scap_kmod.c:30:10: fatal error: driver_config.h: No such file or directory
| 30 | #include <driver_config.h>
7.Add do_compile:append() function to fix do_package QA Issue
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/sysdig/sysdig/0001-Add-cstdint-for-uintXX_t-types.patch | 38 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/sysdig/sysdig/0001-Avoid-duplicate-operations-of-add_library.patch | 47 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch | 21 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-fix-build-with-gcc-15.patch | 31 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/sysdig/sysdig_0.39.0.bb (renamed from meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb) | 43 |
5 files changed, 95 insertions, 85 deletions
diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-Add-cstdint-for-uintXX_t-types.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-Add-cstdint-for-uintXX_t-types.patch deleted file mode 100644 index e564958dad..0000000000 --- a/meta-oe/recipes-extended/sysdig/sysdig/0001-Add-cstdint-for-uintXX_t-types.patch +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | From 3d076ea588eb3c7f334133b4c31172a14beadf5b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 2 Feb 2023 20:18:27 -0800 | ||
| 4 | Subject: [PATCH] Add <cstdint> for uintXX_t types | ||
| 5 | |||
| 6 | gcc 13 moved some includes around and as a result <cstdint> is no | ||
| 7 | longer transitively included [1]. Explicitly include it | ||
| 8 | for uintXX_t. | ||
| 9 | |||
| 10 | [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [https://github.com/falcosecurity/libs/pull/862] | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | userspace/libsinsp/filter/parser.h | 1 + | ||
| 16 | userspace/libsinsp/filter_value.h | 1 + | ||
| 17 | 2 files changed, 2 insertions(+) | ||
| 18 | |||
| 19 | --- a/userspace/libsinsp/filter/parser.h | ||
| 20 | +++ b/userspace/libsinsp/filter/parser.h | ||
| 21 | @@ -18,6 +18,7 @@ limitations under the License. | ||
| 22 | #pragma once | ||
| 23 | |||
| 24 | #include "ast.h" | ||
| 25 | +#include <cstdint> | ||
| 26 | |||
| 27 | // | ||
| 28 | // Context-free Grammar for Sinsp Filters | ||
| 29 | --- a/userspace/libsinsp/filter_value.h | ||
| 30 | +++ b/userspace/libsinsp/filter_value.h | ||
| 31 | @@ -18,6 +18,7 @@ limitations under the License. | ||
| 32 | #pragma once | ||
| 33 | |||
| 34 | #include <string.h> | ||
| 35 | +#include <cstdint> | ||
| 36 | #include <utility> | ||
| 37 | |||
| 38 | // Used for CO_IN/CO_PMATCH filterchecks using PT_CHARBUFs to allow | ||
diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-Avoid-duplicate-operations-of-add_library.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-Avoid-duplicate-operations-of-add_library.patch new file mode 100644 index 0000000000..b8ca7dd38b --- /dev/null +++ b/meta-oe/recipes-extended/sysdig/sysdig/0001-Avoid-duplicate-operations-of-add_library.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From 74dec208d95821855130f6ed7b167327f1247e99 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
| 3 | Date: Thu, 5 Mar 2026 09:28:03 +0000 | ||
| 4 | Subject: [PATCH] Avoid duplicate operations of add_library. | ||
| 5 | |||
| 6 | To fix following configure error | ||
| 7 | | -- Existing strlcat found, will *not* use local definition | ||
| 8 | | CMake Error at falcosecurity-libs/userspace/libscap/CMakeLists.txt:64 (add_library): | ||
| 9 | | add_library cannot create target "scap_error" because another target with | ||
| 10 | | the same name already exists. The existing target is a static library | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate [oe-specific] | ||
| 13 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
| 14 | --- | ||
| 15 | cmake/modules/libscap.cmake | 2 +- | ||
| 16 | cmake/modules/libsinsp.cmake | 2 +- | ||
| 17 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/cmake/modules/libscap.cmake b/cmake/modules/libscap.cmake | ||
| 20 | index b41b12ff3..1753598e9 100644 | ||
| 21 | --- a/cmake/modules/libscap.cmake | ||
| 22 | +++ b/cmake/modules/libscap.cmake | ||
| 23 | @@ -14,7 +14,7 @@ | ||
| 24 | # | ||
| 25 | |||
| 26 | if(NOT HAVE_LIBSCAP) | ||
| 27 | - set(HAVE_LIBSCAP On) | ||
| 28 | + set(HAVE_LIBSCAP On CACHE INTERNAL "Flag to indicate libscap has been processed") | ||
| 29 | |||
| 30 | if(NOT LIBS_DIR) | ||
| 31 | get_filename_component(LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE) | ||
| 32 | diff --git a/cmake/modules/libsinsp.cmake b/cmake/modules/libsinsp.cmake | ||
| 33 | index ff336e27f..0fdd2d4a9 100644 | ||
| 34 | --- a/cmake/modules/libsinsp.cmake | ||
| 35 | +++ b/cmake/modules/libsinsp.cmake | ||
| 36 | @@ -14,7 +14,7 @@ | ||
| 37 | # | ||
| 38 | |||
| 39 | if(NOT HAVE_LIBSINSP) | ||
| 40 | - set(HAVE_LIBSINSP On) | ||
| 41 | + set(HAVE_LIBSINSP On CACHE INTERNAL "Flag to indicate libsinsp has been processed") | ||
| 42 | |||
| 43 | if(NOT LIBS_DIR) | ||
| 44 | get_filename_component(LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE) | ||
| 45 | -- | ||
| 46 | 2.43.0 | ||
| 47 | |||
diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch index 903ccdf36a..bcf5da4f2c 100644 --- a/meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch +++ b/meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001 | 1 | From 6ff4114dcbb87f34751064249967aa96c7b8b030 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Liu Yiding <liuyd.fnst@fujitsu.com> |
| 3 | Date: Mon, 21 Mar 2022 19:35:48 -0700 | 3 | Date: Wed, 4 Mar 2026 10:02:10 +0000 |
| 4 | Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS | 4 | Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS |
| 5 | 5 | ||
| 6 | This helps compliation of driver code where its calling modprobe on the | 6 | This helps compliation of driver code where its calling modprobe on the |
| @@ -8,22 +8,25 @@ given kernel module via system() API | |||
| 8 | 8 | ||
| 9 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | |||
| 12 | Update for 0.39.0 | ||
| 13 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
| 11 | --- | 14 | --- |
| 12 | CMakeLists.txt | 1 + | 15 | CMakeLists.txt | 1 + |
| 13 | 1 file changed, 1 insertion(+) | 16 | 1 file changed, 1 insertion(+) |
| 14 | 17 | ||
| 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 18 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 16 | index 7dceb7ae..e156c36f 100644 | 19 | index 8e8850dbe..c6d725c05 100644 |
| 17 | --- a/CMakeLists.txt | 20 | --- a/CMakeLists.txt |
| 18 | +++ b/CMakeLists.txt | 21 | +++ b/CMakeLists.txt |
| 19 | @@ -149,6 +149,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") | 22 | @@ -174,6 +174,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") |
| 20 | if(NOT DEFINED PROBE_NAME) | 23 | if(NOT DEFINED DRIVER_NAME) |
| 21 | set(PROBE_NAME "scap") | 24 | set(DRIVER_NAME "scap") |
| 22 | endif() | 25 | endif() |
| 23 | + add_definitions(-DPROBE_NAME="${PROBE_NAME}") | 26 | + add_definitions(-DPROBE_NAME="${PROBE_NAME}") |
| 24 | 27 | ||
| 25 | set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers") | 28 | set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers") |
| 26 | 29 | ||
| 27 | -- | 30 | -- |
| 28 | 2.35.1 | 31 | 2.43.0 |
| 29 | 32 | ||
diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-fix-build-with-gcc-15.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-fix-build-with-gcc-15.patch deleted file mode 100644 index 9a81f1c74c..0000000000 --- a/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-fix-build-with-gcc-15.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | From 47a86dabd065096ffc8818a1cffca96964d18120 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
| 3 | Date: Tue, 22 Apr 2025 18:43:46 +0200 | ||
| 4 | Subject: [PATCH] libsinsp: fix build with gcc-15 | ||
| 5 | |||
| 6 | fixes: | ||
| 7 | http://errors.yoctoproject.org/Errors/Details/852848/ | ||
| 8 | |||
| 9 | In file included from TOPDIR/tmp/work/core2-64-oe-linux/sysdig/0.28.0/git/falcosecurity-libs/userspace/chisel/lua_parser.cpp:20: | ||
| 10 | TOPDIR/tmp/work/core2-64-oe-linux/sysdig/0.28.0/git/falcosecurity-libs/userspace/libsinsp/./gen_filter.h:87:17: error: 'uint64_t' does not name a type | ||
| 11 | 87 | virtual uint64_t get_ts() const = 0; | ||
| 12 | | ^~~~~~~~ | ||
| 13 | |||
| 14 | Upstream-Status: Pending [gen_filter is removed in newer version with https://github.com/falcosecurity/libs/commit/47e245f3d343eff27ed178ec2449caa3a01faabb] | ||
| 15 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 16 | --- | ||
| 17 | userspace/libsinsp/gen_filter.h | 1 + | ||
| 18 | 1 file changed, 1 insertion(+) | ||
| 19 | |||
| 20 | diff --git a/userspace/libsinsp/gen_filter.h b/userspace/libsinsp/gen_filter.h | ||
| 21 | index f4cfa08b1..79ac30dc3 100644 | ||
| 22 | --- a/userspace/libsinsp/gen_filter.h | ||
| 23 | +++ b/userspace/libsinsp/gen_filter.h | ||
| 24 | @@ -16,6 +16,7 @@ along with Falco. If not, see <http://www.gnu.org/licenses/>. | ||
| 25 | |||
| 26 | #pragma once | ||
| 27 | |||
| 28 | +#include <cstdint> | ||
| 29 | #include <set> | ||
| 30 | #include <list> | ||
| 31 | #include <map> | ||
diff --git a/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb b/meta-oe/recipes-extended/sysdig/sysdig_0.39.0.bb index c988b0af59..6d754b9bd0 100644 --- a/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb +++ b/meta-oe/recipes-extended/sysdig/sysdig_0.39.0.bb | |||
| @@ -19,21 +19,30 @@ JIT:powerpc64le = "" | |||
| 19 | JIT:powerpc64 = "" | 19 | JIT:powerpc64 = "" |
| 20 | 20 | ||
| 21 | DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \ | 21 | DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \ |
| 22 | tbb jq openssl elfutils protobuf protobuf-native jq-native valijson" | 22 | tbb jq openssl elfutils protobuf protobuf-native jq-native valijson \ |
| 23 | uthash libbpf clang-native bpftool-native yaml-cpp nlohmann-json" | ||
| 23 | RDEPENDS:${PN} = "bash" | 24 | RDEPENDS:${PN} = "bash" |
| 24 | 25 | ||
| 25 | SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \ | 26 | SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \ |
| 26 | git://github.com/falcosecurity/libs;protocol=https;branch=master;name=falco;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/falcosecurity-libs \ | 27 | git://github.com/falcosecurity/libs;protocol=https;branch=release/0.18.x;name=falco;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/falcosecurity-libs \ |
| 28 | git://github.com/falcosecurity/libs;protocol=https;branch=release/0.18.x;name=driver;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/driver \ | ||
| 27 | file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \ | 29 | file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \ |
| 28 | file://0001-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \ | 30 | file://0001-Avoid-duplicate-operations-of-add_library.patch;patchdir=./falcosecurity-libs \ |
| 29 | file://0001-libsinsp-fix-build-with-gcc-15.patch;patchdir=./falcosecurity-libs \ | ||
| 30 | file://0001-update-cmake-Only-add-dependencies-when-we-bundle.patch;patchdir=./falcosecurity-libs \ | ||
| 31 | " | 31 | " |
| 32 | SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b" | 32 | SRCREV_sysdig = "6ef29110cf1add746e10ab5b38957e22730b7349" |
| 33 | SRCREV_falco = "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9" | 33 | SRCREV_falco = "e1999d079880d10800c57e004fca794a03cd060a" |
| 34 | SRCREV_driver = "d4efc80ece48174a71c1a420cb52d233fa94f946" | ||
| 34 | 35 | ||
| 35 | SRCREV_FORMAT = "sysdig_falco" | 36 | SRCREV_FORMAT = "sysdig_falco" |
| 36 | 37 | ||
| 38 | #Add this function to generate driver_config.h | ||
| 39 | do_configure:prepend() { | ||
| 40 | mkdir -p ${WORKDIR}/driver_Make | ||
| 41 | cd ${WORKDIR}/driver_Make | ||
| 42 | cmake ${S}/driver -DMINIMAL_BUILD=ON -DCREATE_TEST_TARGETS=OFF | ||
| 43 | cd - | ||
| 44 | } | ||
| 45 | do_configure[cleandirs] = "${WORKDIR}/driver_Make" | ||
| 37 | 46 | ||
| 38 | EXTRA_OECMAKE = "\ | 47 | EXTRA_OECMAKE = "\ |
| 39 | -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ | 48 | -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ |
| @@ -44,11 +53,31 @@ EXTRA_OECMAKE = "\ | |||
| 44 | -DDIR_ETC=${sysconfdir} \ | 53 | -DDIR_ETC=${sysconfdir} \ |
| 45 | -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \ | 54 | -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \ |
| 46 | -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \ | 55 | -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \ |
| 56 | -DDRIVER_SOURCE_DIR=${S}/driver \ | ||
| 47 | -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \ | 57 | -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \ |
| 58 | -DUSE_BUNDLED_RE2=OFF \ | ||
| 59 | -DUSE_BUNDLED_TBB=OFF \ | ||
| 60 | -DUSE_BUNDLED_JSONCPP=OFF \ | ||
| 61 | -DBUILD_SYSDIG_MODERN_BPF=OFF \ | ||
| 62 | -DCREATE_TEST_TARGETS=OFF \ | ||
| 48 | " | 63 | " |
| 49 | 64 | ||
| 65 | #Add include dir to find driver_config.h | ||
| 66 | CXXFLAGS:append = " -I${WORKDIR}/driver_Make/driver/src" | ||
| 67 | CFLAGS:append = " -I${WORKDIR}/driver_Make/driver/src" | ||
| 68 | |||
| 69 | #To fix do_package QA Issue | ||
| 70 | do_compile:append() { | ||
| 71 | sed -i -e "s,${WORKDIR},,g" ${B}/libsinsp/libsinsp.pc | ||
| 72 | sed -i -e "s,${WORKDIR},,g" ${B}/driver/libscap/libscap.pc | ||
| 73 | mkdir -p ${B}/driver/libsinsp | ||
| 74 | cp ${B}/libsinsp/libsinsp.pc ${B}/driver/libsinsp/ | ||
| 75 | } | ||
| 76 | do_compile[cleandirs] = "${B}/driver/libsinsp" | ||
| 77 | |||
| 50 | #CMAKE_VERBOSE = "VERBOSE=1" | 78 | #CMAKE_VERBOSE = "VERBOSE=1" |
| 51 | 79 | ||
| 80 | |||
| 52 | FILES:${PN} += " \ | 81 | FILES:${PN} += " \ |
| 53 | ${DIR_ETC}/* \ | 82 | ${DIR_ETC}/* \ |
| 54 | ${datadir}/zsh/* \ | 83 | ${datadir}/zsh/* \ |
