mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-01 13:40:04 +00:00
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>
This commit is contained in:
@@ -1,38 +0,0 @@
|
|||||||
From 3d076ea588eb3c7f334133b4c31172a14beadf5b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
|
||||||
Date: Thu, 2 Feb 2023 20:18:27 -0800
|
|
||||||
Subject: [PATCH] Add <cstdint> for uintXX_t types
|
|
||||||
|
|
||||||
gcc 13 moved some includes around and as a result <cstdint> is no
|
|
||||||
longer transitively included [1]. Explicitly include it
|
|
||||||
for uintXX_t.
|
|
||||||
|
|
||||||
[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
|
|
||||||
|
|
||||||
Upstream-Status: Submitted [https://github.com/falcosecurity/libs/pull/862]
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
---
|
|
||||||
userspace/libsinsp/filter/parser.h | 1 +
|
|
||||||
userspace/libsinsp/filter_value.h | 1 +
|
|
||||||
2 files changed, 2 insertions(+)
|
|
||||||
|
|
||||||
--- a/userspace/libsinsp/filter/parser.h
|
|
||||||
+++ b/userspace/libsinsp/filter/parser.h
|
|
||||||
@@ -18,6 +18,7 @@ limitations under the License.
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "ast.h"
|
|
||||||
+#include <cstdint>
|
|
||||||
|
|
||||||
//
|
|
||||||
// Context-free Grammar for Sinsp Filters
|
|
||||||
--- a/userspace/libsinsp/filter_value.h
|
|
||||||
+++ b/userspace/libsinsp/filter_value.h
|
|
||||||
@@ -18,6 +18,7 @@ limitations under the License.
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
// Used for CO_IN/CO_PMATCH filterchecks using PT_CHARBUFs to allow
|
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
From 74dec208d95821855130f6ed7b167327f1247e99 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Liu Yiding <liuyd.fnst@fujitsu.com>
|
||||||
|
Date: Thu, 5 Mar 2026 09:28:03 +0000
|
||||||
|
Subject: [PATCH] Avoid duplicate operations of add_library.
|
||||||
|
|
||||||
|
To fix following configure error
|
||||||
|
| -- 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
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [oe-specific]
|
||||||
|
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
|
||||||
|
---
|
||||||
|
cmake/modules/libscap.cmake | 2 +-
|
||||||
|
cmake/modules/libsinsp.cmake | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/modules/libscap.cmake b/cmake/modules/libscap.cmake
|
||||||
|
index b41b12ff3..1753598e9 100644
|
||||||
|
--- a/cmake/modules/libscap.cmake
|
||||||
|
+++ b/cmake/modules/libscap.cmake
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#
|
||||||
|
|
||||||
|
if(NOT HAVE_LIBSCAP)
|
||||||
|
- set(HAVE_LIBSCAP On)
|
||||||
|
+ set(HAVE_LIBSCAP On CACHE INTERNAL "Flag to indicate libscap has been processed")
|
||||||
|
|
||||||
|
if(NOT LIBS_DIR)
|
||||||
|
get_filename_component(LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
|
||||||
|
diff --git a/cmake/modules/libsinsp.cmake b/cmake/modules/libsinsp.cmake
|
||||||
|
index ff336e27f..0fdd2d4a9 100644
|
||||||
|
--- a/cmake/modules/libsinsp.cmake
|
||||||
|
+++ b/cmake/modules/libsinsp.cmake
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#
|
||||||
|
|
||||||
|
if(NOT HAVE_LIBSINSP)
|
||||||
|
- set(HAVE_LIBSINSP On)
|
||||||
|
+ set(HAVE_LIBSINSP On CACHE INTERNAL "Flag to indicate libsinsp has been processed")
|
||||||
|
|
||||||
|
if(NOT LIBS_DIR)
|
||||||
|
get_filename_component(LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001
|
From 6ff4114dcbb87f34751064249967aa96c7b8b030 Mon Sep 17 00:00:00 2001
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
From: Liu Yiding <liuyd.fnst@fujitsu.com>
|
||||||
Date: Mon, 21 Mar 2022 19:35:48 -0700
|
Date: Wed, 4 Mar 2026 10:02:10 +0000
|
||||||
Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS
|
Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS
|
||||||
|
|
||||||
This helps compliation of driver code where its calling modprobe on the
|
This helps compliation of driver code where its calling modprobe on the
|
||||||
@@ -8,22 +8,25 @@ given kernel module via system() API
|
|||||||
|
|
||||||
Upstream-Status: Pending
|
Upstream-Status: Pending
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
|
||||||
|
Update for 0.39.0
|
||||||
|
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 1 +
|
CMakeLists.txt | 1 +
|
||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 7dceb7ae..e156c36f 100644
|
index 8e8850dbe..c6d725c05 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -149,6 +149,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
@@ -174,6 +174,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
if(NOT DEFINED PROBE_NAME)
|
if(NOT DEFINED DRIVER_NAME)
|
||||||
set(PROBE_NAME "scap")
|
set(DRIVER_NAME "scap")
|
||||||
endif()
|
endif()
|
||||||
+ add_definitions(-DPROBE_NAME="${PROBE_NAME}")
|
+ add_definitions(-DPROBE_NAME="${PROBE_NAME}")
|
||||||
|
|
||||||
set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers")
|
set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers")
|
||||||
|
|
||||||
--
|
--
|
||||||
2.35.1
|
2.43.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
From 47a86dabd065096ffc8818a1cffca96964d18120 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Jansa <martin.jansa@gmail.com>
|
|
||||||
Date: Tue, 22 Apr 2025 18:43:46 +0200
|
|
||||||
Subject: [PATCH] libsinsp: fix build with gcc-15
|
|
||||||
|
|
||||||
fixes:
|
|
||||||
http://errors.yoctoproject.org/Errors/Details/852848/
|
|
||||||
|
|
||||||
In file included from TOPDIR/tmp/work/core2-64-oe-linux/sysdig/0.28.0/git/falcosecurity-libs/userspace/chisel/lua_parser.cpp:20:
|
|
||||||
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
|
|
||||||
87 | virtual uint64_t get_ts() const = 0;
|
|
||||||
| ^~~~~~~~
|
|
||||||
|
|
||||||
Upstream-Status: Pending [gen_filter is removed in newer version with https://github.com/falcosecurity/libs/commit/47e245f3d343eff27ed178ec2449caa3a01faabb]
|
|
||||||
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
|
||||||
---
|
|
||||||
userspace/libsinsp/gen_filter.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/userspace/libsinsp/gen_filter.h b/userspace/libsinsp/gen_filter.h
|
|
||||||
index f4cfa08b1..79ac30dc3 100644
|
|
||||||
--- a/userspace/libsinsp/gen_filter.h
|
|
||||||
+++ b/userspace/libsinsp/gen_filter.h
|
|
||||||
@@ -16,6 +16,7 @@ along with Falco. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <set>
|
|
||||||
#include <list>
|
|
||||||
#include <map>
|
|
||||||
+36
-7
@@ -19,21 +19,30 @@ JIT:powerpc64le = ""
|
|||||||
JIT:powerpc64 = ""
|
JIT:powerpc64 = ""
|
||||||
|
|
||||||
DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \
|
DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \
|
||||||
tbb jq openssl elfutils protobuf protobuf-native jq-native valijson"
|
tbb jq openssl elfutils protobuf protobuf-native jq-native valijson \
|
||||||
|
uthash libbpf clang-native bpftool-native yaml-cpp nlohmann-json"
|
||||||
RDEPENDS:${PN} = "bash"
|
RDEPENDS:${PN} = "bash"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \
|
SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \
|
||||||
git://github.com/falcosecurity/libs;protocol=https;branch=master;name=falco;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/falcosecurity-libs \
|
git://github.com/falcosecurity/libs;protocol=https;branch=release/0.18.x;name=falco;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/falcosecurity-libs \
|
||||||
|
git://github.com/falcosecurity/libs;protocol=https;branch=release/0.18.x;name=driver;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/driver \
|
||||||
file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
|
file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
|
||||||
file://0001-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \
|
file://0001-Avoid-duplicate-operations-of-add_library.patch;patchdir=./falcosecurity-libs \
|
||||||
file://0001-libsinsp-fix-build-with-gcc-15.patch;patchdir=./falcosecurity-libs \
|
|
||||||
file://0001-update-cmake-Only-add-dependencies-when-we-bundle.patch;patchdir=./falcosecurity-libs \
|
|
||||||
"
|
"
|
||||||
SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b"
|
SRCREV_sysdig = "6ef29110cf1add746e10ab5b38957e22730b7349"
|
||||||
SRCREV_falco = "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9"
|
SRCREV_falco = "e1999d079880d10800c57e004fca794a03cd060a"
|
||||||
|
SRCREV_driver = "d4efc80ece48174a71c1a420cb52d233fa94f946"
|
||||||
|
|
||||||
SRCREV_FORMAT = "sysdig_falco"
|
SRCREV_FORMAT = "sysdig_falco"
|
||||||
|
|
||||||
|
#Add this function to generate driver_config.h
|
||||||
|
do_configure:prepend() {
|
||||||
|
mkdir -p ${WORKDIR}/driver_Make
|
||||||
|
cd ${WORKDIR}/driver_Make
|
||||||
|
cmake ${S}/driver -DMINIMAL_BUILD=ON -DCREATE_TEST_TARGETS=OFF
|
||||||
|
cd -
|
||||||
|
}
|
||||||
|
do_configure[cleandirs] = "${WORKDIR}/driver_Make"
|
||||||
|
|
||||||
EXTRA_OECMAKE = "\
|
EXTRA_OECMAKE = "\
|
||||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||||
@@ -44,11 +53,31 @@ EXTRA_OECMAKE = "\
|
|||||||
-DDIR_ETC=${sysconfdir} \
|
-DDIR_ETC=${sysconfdir} \
|
||||||
-DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \
|
-DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \
|
||||||
-DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \
|
-DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \
|
||||||
|
-DDRIVER_SOURCE_DIR=${S}/driver \
|
||||||
-DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \
|
-DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \
|
||||||
|
-DUSE_BUNDLED_RE2=OFF \
|
||||||
|
-DUSE_BUNDLED_TBB=OFF \
|
||||||
|
-DUSE_BUNDLED_JSONCPP=OFF \
|
||||||
|
-DBUILD_SYSDIG_MODERN_BPF=OFF \
|
||||||
|
-DCREATE_TEST_TARGETS=OFF \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
#Add include dir to find driver_config.h
|
||||||
|
CXXFLAGS:append = " -I${WORKDIR}/driver_Make/driver/src"
|
||||||
|
CFLAGS:append = " -I${WORKDIR}/driver_Make/driver/src"
|
||||||
|
|
||||||
|
#To fix do_package QA Issue
|
||||||
|
do_compile:append() {
|
||||||
|
sed -i -e "s,${WORKDIR},,g" ${B}/libsinsp/libsinsp.pc
|
||||||
|
sed -i -e "s,${WORKDIR},,g" ${B}/driver/libscap/libscap.pc
|
||||||
|
mkdir -p ${B}/driver/libsinsp
|
||||||
|
cp ${B}/libsinsp/libsinsp.pc ${B}/driver/libsinsp/
|
||||||
|
}
|
||||||
|
do_compile[cleandirs] = "${B}/driver/libsinsp"
|
||||||
|
|
||||||
#CMAKE_VERBOSE = "VERBOSE=1"
|
#CMAKE_VERBOSE = "VERBOSE=1"
|
||||||
|
|
||||||
|
|
||||||
FILES:${PN} += " \
|
FILES:${PN} += " \
|
||||||
${DIR_ETC}/* \
|
${DIR_ETC}/* \
|
||||||
${datadir}/zsh/* \
|
${datadir}/zsh/* \
|
||||||
Reference in New Issue
Block a user