sysdig: Allow to build with CMake 4+

The latest release seems to have support to build with CMake 4+, but updating
requires major changes to the recipe and so far I haven't managed to get a build
passing. Thus, apply the 'minimum policy version' override instead and backport
one patch to unblock builds with CMake 4.

Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Moritz Haase 2025-07-14 14:09:41 +02:00 committed by Khem Raj
parent b72fb993b3
commit cafce95171
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From ed35037e3ba575d9b0d1ef4cd5b6ab9111136922 Mon Sep 17 00:00:00 2001
From: Moritz Haase <Moritz.Haase@bmw.de>
Date: Mon, 14 Jul 2025 13:57:30 +0200
Subject: [PATCH] update(cmake): Only add dependencies when we bundle
Only add dependencies for valijson when we're using the bundled version.
Fixes
| CMake Error at falcosecurity-libs/userspace/libsinsp/CMakeLists.txt:184 (add_dependencies):
| The dependency target "valijson" of target "sinsp" does not exist.
when building with CMake 4.
Upstream-Status: Backport [7d850bad002b56ca5e85fffb1f69b4b1cfeddd91]
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
---
userspace/libsinsp/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt
index 9794a697c..a82f8c0c1 100644
--- a/userspace/libsinsp/CMakeLists.txt
+++ b/userspace/libsinsp/CMakeLists.txt
@@ -181,7 +181,9 @@ set(SINSP_LIBRARIES
"${JSONCPP_LIB}"
"${CARES_LIB}")
-add_dependencies(sinsp valijson)
+if(USE_BUNDLED_VALIJSON)
+ add_dependencies(sinsp valijson)
+endif()
if(WITH_CHISEL AND USE_BUNDLED_LUAJIT)
add_dependencies(sinsp luajit)

View File

@ -24,9 +24,10 @@ RDEPENDS:${PN} = "bash"
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 \
file://0001-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \
file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
file://0001-Add-cstdint-for-uintXX_t-types.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_falco = "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9"
@ -35,6 +36,7 @@ SRCREV_FORMAT = "sysdig_falco"
EXTRA_OECMAKE = "\
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DBUILD_DRIVER=OFF \
-DMINIMAL_BUILD=ON \
-DUSE_BUNDLED_DEPS=OFF \