Bump sysdig to 0.29.1
v4 cover Bump sysdig to 0.29.1
Hi.
In this contribution, I bumped sysdig version to 0.29.1.
Indeed, following this discussion [1], Arnout Vandecappelle noted sysdig 0.27.1 cannot be cross-compiled to, e.g., aarch64 because it uses the open() syscall.
To fix this, I bumped sysdig to 0.29.1.
Sadly, some components of sysdig, like libsinsp, libscap and the kernel modules, were moved to falcosecurity/libs.
So, I added the falcosecurity-libs package.
A new patch was added to sysdig recipe to avoid compiling again falcosecurity-libs.
Nonetheless, this patch is a bit big, so I prefered to keep the RFC tag to gather your opinion about it.
I was nonetheless able to build and run sysdig with start-qemu.sh:
Welcome to Buildroot
buildroot login: root
# scap: loading out-of-tree module taints kernel.
scap: driver loading, scap 0.1.1dev
scap: adding new consumer (____ptrval____)
scap: initializing ring buffer for CPU 0
scap: CPU buffer initialized, size=8388608
scap: starting capture
2 14:29:14.500045202 0 <NA> (113) > switch next=10 pgft_maj=212 pgft_min=1175 vm_size=45204 vm_rss=18256 vm_swap=0
...
97 14:29:14.514272929 0 <NA> (113) > switch next=114 pgft_maj=213 pgft_min=1180 vm_size=45204 vm_rss=18256 vm_swap=
scap: deallocating consumer (____ptrval____)
scap: no more consumers, stopping capture
So, if you see a particular way to fix the problem I described above or any problem with this contribution, feel free to share it!
Changes since:
v3:
- Make falcosecurity-libs a generic-package and a kernel-package. The generic-package will download us the libraries (libscap and libsinsp) which will be built by sysdig.mk.
The kernel-package will build the kernel module.
This permitted to simplify the overall contribution architecture by removing some patches.
v2:
- Add linux CONFIG_ option to execute falcosecurity-libs kernel module.
- falcosecurity-libs driver name was set so sysdig automatically loads it.
Francis Laniel (2):
falcosecurity-libs: add new package
package/sysdig: bump to 0.29.1
DEVELOPERS | 1 + package/Config.in | 1 + ...cmake-Permit-setting-GRPC_CPP_PLUGIN.patch | 34 ++++++++ package/falcosecurity-libs/Config.in | 38 +++++++++ .../falcosecurity-libs.hash | 5 ++ .../falcosecurity-libs/falcosecurity-libs.mk | 75 +++++++++++++++++ ...BUNDLED_DEPS-before-getting-nlohmann.patch | 51 ++++++++++++ ...ATCH_COMMAND-to-fix-lua-types-and-fu.patch | 82 ------------------- ...gainst-libabseil-cpp-which-grpc-uses.patch | 47 ----------- ...e-Add-libsinsp.a-as-IMPORTED-library.patch | 59 +++++++++++++ package/sysdig/Config.in | 31 ++----- package/sysdig/sysdig.hash | 4 +- package/sysdig/sysdig.mk | 55 ++++++------- 13 files changed, 295 insertions(+), 188 deletions(-) create mode 100644 package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch create mode 100644 package/falcosecurity-libs/Config.in create mode 100644 package/falcosecurity-libs/falcosecurity-libs.hash create mode 100644 package/falcosecurity-libs/falcosecurity-libs.mk create mode 100644 package/sysdig/0001-cmake-Check-USE_BUNDLED_DEPS-before-getting-nlohmann.patch delete mode 100644 package/sysdig/0001-libsinsp-Apply-PATCH_COMMAND-to-fix-lua-types-and-fu.patch delete mode 100644 package/sysdig/0002-Link-against-libabseil-cpp-which-grpc-uses.patch create mode 100644 package/sysdig/0002-cmake-Add-libsinsp.a-as-IMPORTED-library.patch
Best regards and thank you in advance.
---
[1] https://marc.info/?l=buildroot&m=164951521629400
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
RFC PATCH v4 1/2 falcosecurity-libs: add new package
--- DEVELOPERS | 1 + package/Config.in | 1 + ...cmake-Permit-setting-GRPC_CPP_PLUGIN.patch | 34 ++++++++ package/falcosecurity-libs/Config.in | 30 +++++++ .../falcosecurity-libs.hash | 5 ++ .../falcosecurity-libs/falcosecurity-libs.mk | 80 +++++++++++++++++++ 6 files changed, 151 insertions(+) create mode 100644 package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch create mode 100644 package/falcosecurity-libs/Config.in create mode 100644 package/falcosecurity-libs/falcosecurity-libs.hash create mode 100644 package/falcosecurity-libs/falcosecurity-libs.mk
DEVELOPERS +1 -0
@@ -969,6 +969,7 @@ F: package/ipmitool/ F: package/odhcploc/ N: Francis Laniel <[email protected]> +F: package/falcosecurity-libs F: package/pahole/ F: package/sysdig/ F: package/tbb/
package/Config.in +1 -0
@@ -1935,6 +1935,7 @@ menu "Other" source "package/eigen/Config.in" source "package/elfutils/Config.in" source "package/ell/Config.in" + source "package/falcosecurity-libs/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in" source "package/flatbuffers/Config.in"
package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 2e8a50cd4975df3ab60ee07c9675831cd5ad397f Mon Sep 17 00:00:00 2001 +From: Francis Laniel <[email protected]> +Date: Tue, 12 Apr 2022 19:54:11 +0100 +Subject: [PATCH] cmake: Permit setting GRPC_CPP_PLUGIN. + +This patch enables users to set GRPC_CPP_PLUGIN while calling cmake with: +cmake -DGRPC_CPP_PLUGIN=/path + +Signed-off-by: Francis Laniel <[email protected]> +--- + cmake/modules/grpc.cmake | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/cmake/modules/grpc.cmake b/cmake/modules/grpc.cmake +index e5fd16b8..9d8f5934 100644 +--- a/cmake/modules/grpc.cmake ++++ b/cmake/modules/grpc.cmake +@@ -12,9 +12,11 @@ elseif(NOT USE_BUNDLED_GRPC) + set(GRPCPP_LIB gRPC::grpc++) + + # gRPC C++ plugin +- get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION) + if(NOT GRPC_CPP_PLUGIN) +- message(FATAL_ERROR "System grpc_cpp_plugin not found") ++ get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION) ++ if(NOT GRPC_CPP_PLUGIN) ++ message(FATAL_ERROR "System grpc_cpp_plugin not found") ++ endif() + endif() + + # gRPC include dir + properly handle grpc{++,pp} +-- +2.25.1 +
package/falcosecurity-libs/Config.in new file +30 -0
@@ -0,0 +1,30 @@ +config BR2_PACKAGE_FALCOSECURITY_LIBS + bool + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf + depends on BR2_LINUX_KERNEL + depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf + depends on BR2_TOOLCHAIN_HAS_THREADS # jq, protobuf, tbb + depends on !BR2_STATIC_LIBS # protobuf, tbb + depends on BR2_TOOLCHAIN_USES_GLIBC # tbb + depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + select BR2_PACKAGE_C_ARES + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_GRPC + select BR2_PACKAGE_GTEST + select BR2_PACKAGE_HOST_GRPC + select BR2_PACKAGE_HOST_PROTOBUF + select BR2_PACKAGE_JQ + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_LIBB64 + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_TBB + select BR2_PACKAGE_VALIJSON + select BR2_PACKAGE_ZLIB + help + falcosecurity/libs provides libsinsp, libscap, the kernel + module driver and the eBPF driver sources. + + https://github.com/falcosecurity/libs
package/falcosecurity-libs/falcosecurity-libs.hash new file +5 -0
@@ -0,0 +1,5 @@ +# sha256 locally computed +sha256 80903bc57b7f9c5f24298ecf1531cf66ef571681b4bd1e05f6e4db704ffb380b falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz +sha256 a88fbf820b38b1c7fabc6efe291b8259e02ae21326f56fe31c6c9adf374b2702 COPYING +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 driver/GPL2.txt +sha256 e3f6a43d097ed68176e9738de925d98b938e1bccf6d6bd1bcd79395eca8f76ed driver/MIT.txt
package/falcosecurity-libs/falcosecurity-libs.mk new file +80 -0
80 lines not on this page · raw message
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedRe: [Buildroot] [RFC PATCH v4 1/2] falcosecurity-libs: add new package
Quoted 1 line · Francis Laniel
Signed-off-by Francis Laniel <[email protected]>
I've added a bit of explanation both in the commit message and in the .mk file
itself that we're not building the userspace components and why.
Quoted 43 lines
--- DEVELOPERS | 1 + package/Config.in | 1 + ...cmake-Permit-setting-GRPC_CPP_PLUGIN.patch | 34 ++++++++ package/falcosecurity-libs/Config.in | 30 +++++++ .../falcosecurity-libs.hash | 5 ++ .../falcosecurity-libs/falcosecurity-libs.mk | 80 +++++++++++++++++++ 6 files changed, 151 insertions(+)create mode 100644
package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patchcreate mode 100644 package/falcosecurity-libs/Config.in
create mode 100644 package/falcosecurity-libs/falcosecurity-libs.hash
create mode 100644package/falcosecurity-libs/falcosecurity-libs.mkDEVELOPERS +1
-0@@ -969,6 +969,7 @@ F: package/ipmitool/ F: package/odhcploc/ N: Francis Laniel <[email protected]> +F: package/falcosecurity-libs F: package/pahole/ F: package/sysdig/ F: package/tbb/package/Config.in +1
-0@@ -1935,6 +1935,7 @@ menu "Other" source "package/eigen/Config.in" source "package/elfutils/Config.in" source "package/ell/Config.in" + source "package/falcosecurity-libs/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in" source "package/flatbuffers/Config.in"package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch new file +0
-0
package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch line 9
Quoted 9 lines
package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch new file +9
-0@@ -0,0 +1,34 @@ +From 2e8a50cd4975df3ab60ee07c9675831cd5ad397f Mon Sep 17 00:00:00 2001 +From: Francis Laniel <[email protected]> +Date: Tue, 12 Apr 2022 19:54:11 +0100 +Subject: [PATCH] cmake: Permit setting GRPC_CPP_PLUGIN. + +This patch enables users to set GRPC_CPP_PLUGIN while calling cmake with: +cmake -DGRPC_CPP_PLUGIN=/path + +Signed-off-by: Francis Laniel <[email protected]>
Could you send this patch upstream?
Applied to master, thanks.
Regards,
Arnout
[snip]
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RFC PATCH v4 1/2] falcosecurity-libs: add new package
Hi!
Quoted 66 lines · Le samedi 30 avril 2022, 18:57:04 BST Arnout Vandecappelle a écrit :
Quoted 1 line · Francis Laniel
Signed-off-by Francis Laniel <[email protected]>I've added a bit of explanation both in the commit message and in the .mk
file itself that we're not building the userspace components and why.Quoted 60 lines
---
DEVELOPERS | 1 + package/Config.in | 1 + ...cmake-Permit-setting-GRPC_CPP_PLUGIN.patch | 34 ++++++++ package/falcosecurity-libs/Config.in | 30 +++++++ .../falcosecurity-libs.hash | 5 ++ .../falcosecurity-libs/falcosecurity-libs.mk | 80 +++++++++++++++++++ 6 files changed, 151 insertions(+)create mode 100644 package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.pa tch create mode 100644 package/falcosecurity-libs/Config.in create mode 100644 package/falcosecurity-libs/falcosecurity-libs.hash create mode 100644
package/falcosecurity-libs/falcosecurity-libs.mkDEVELOPERS +1
-0@@ -969,6 +969,7 @@ F: package/ipmitool/ F: package/odhcploc/ N: Francis Laniel <[email protected]> +F: package/falcosecurity-libsF: package/pahole/
F: package/sysdig/
F: package/tbb/package/Config.in +1
-0@@ -1935,6 +1935,7 @@ menu "Other" source "package/eigen/Config.in" source "package/elfutils/Config.in" source "package/ell/Config.in" + source "package/falcosecurity-libs/Config.in"source "package/fftw/Config.in"
source "package/flann/Config.in"
source "package/flatbuffers/Config.in"diff --git a/package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.pa tch b/package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.pa tch new file mode 100644
index 0000000000..6141d8ef72
---/dev/null
+++
b/package/falcosecurity-libs/0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.pa tch @@ -0,0 +1,34 @@package/Config.in +3
-0+From 2e8a50cd4975df3ab60ee07c9675831cd5ad397f Mon Sep 17 00:00:00 2001 +From: Francis Laniel <[email protected]> +Date: Tue, 12 Apr 2022 19:54:11 +0100
Quoted 8 lines
package/Config.in
Quoted 6 lines
package/Config.in +6
-0+Subject: [PATCH] cmake: Permit setting GRPC_CPP_PLUGIN. + +This patch enables users to set GRPC_CPP_PLUGIN while calling cmake with: +cmake -DGRPC_CPP_PLUGIN=/path + +Signed-off-by: Francis Laniel <[email protected]>Could you send this patch upstream?
Oh sorry, I sent the nlohmann-json one but forgot about it! I will try to upstream it!
Quoted 2 lines
Applied to master, thanks.
Thank you!
Quoted 4 lines
Regards,
Arnout[snip]
Best regards.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
RFC PATCH v4 2/2 package/sysdig: bump to 0.29.1
In reply to Francis Lanielsysdig 0.27.1 cannot be cross-compiled to, e.g., aarch64 because it uses open() syscall [1].
This patch bumps its version to enable cross-compilation.
By doing so, we can remove the previous patches.
But this commit introduces new patches.
Indeed, libsinsp (lib system inspection), libscap (lib system capture) and the kernel module were moved to falcosecurity/libs.
Sadly, it is not possible to compile sysdig with pre-compiled libs (like we do in buildroot).
So, this contribution introduces a new patch to build sysdig with already built falcosecurity/libs.
[1] https://marc.info/?l=buildroot&m=164951521629400
--- ...BUNDLED_DEPS-before-getting-nlohmann.patch | 52 ++++++++++++ ...ATCH_COMMAND-to-fix-lua-types-and-fu.patch | 82 ------------------- ...gainst-libabseil-cpp-which-grpc-uses.patch | 47 ----------- package/sysdig/Config.in | 18 ++-- package/sysdig/sysdig.hash | 4 +- package/sysdig/sysdig.mk | 55 +++++-------- 6 files changed, 79 insertions(+), 179 deletions(-) create mode 100644 package/sysdig/0001-cmake-Check-USE_BUNDLED_DEPS-before-getting-nlohmann.patch delete mode 100644 package/sysdig/0001-libsinsp-Apply-PATCH_COMMAND-to-fix-lua-types-and-fu.patch delete mode 100644 package/sysdig/0002-Link-against-libabseil-cpp-which-grpc-uses.patch
package/sysdig/0001-cmake-Check-USE_BUNDLED_DEPS-before-getting-nlohmann.patch new file +52 -0
@@ -0,0 +1,52 @@ +From 0dbebd008c04d266dc41c4bec8280a0744fd5130 Mon Sep 17 00:00:00 2001 +From: Francis Laniel <[email protected]> +Date: Wed, 13 Apr 2022 18:01:11 +0100 +Subject: [PATCH] cmake: Check USE_BUNDLED_DEPS before getting + nlohmann-json. + +Upstream: https://github.com/draios/sysdig/pull/1869 +Signed-off-by: Francis Laniel <[email protected]> +--- + cmake/modules/nlohmann-json.cmake | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) + +diff --git a/cmake/modules/nlohmann-json.cmake b/cmake/modules/nlohmann-json.cmake +index bb1279d7..feb0f071 100644 +--- a/cmake/modules/nlohmann-json.cmake ++++ b/cmake/modules/nlohmann-json.cmake +@@ -16,13 +16,22 @@ + # limitations under the License. + # + +-set(NJSON_SRC "${PROJECT_BINARY_DIR}/njson-prefix/src/njson") +-message(STATUS "Using bundled nlohmann-json in '${NJSON_SRC}'") +-set(NJSON_INCLUDE_DIR "${NJSON_SRC}/single_include") +-ExternalProject_Add( +- njson +- URL "https://github.com/nlohmann/json/archive/v3.3.0.tar.gz" +- URL_HASH "SHA256=2fd1d207b4669a7843296c41d3b6ac5b23d00dec48dba507ba051d14564aa801" +- CONFIGURE_COMMAND "" +- BUILD_COMMAND "" +- INSTALL_COMMAND "") ++if(NOT USE_BUNDLED_DEPS) ++ find_path(NJSON_INCLUDE_DIR NAMES nlohmann/json.hpp) ++ if(NJSON_INCLUDE_DIR) ++ message(STATUS "Found njson: include: ${NJSON_INCLUDE_DIR}") ++ else() ++ message(FATAL_ERROR "Couldn't find system njson") ++ endif() ++else() ++ set(NJSON_SRC "${PROJECT_BINARY_DIR}/njson-prefix/src/njson") ++ message(STATUS "Using bundled nlohmann-json in '${NJSON_SRC}'") ++ set(NJSON_INCLUDE_DIR "${NJSON_SRC}/single_include") ++ ExternalProject_Add( ++ njson ++ URL "https://github.com/nlohmann/json/archive/v3.3.0.tar.gz" ++ URL_HASH "SHA256=2fd1d207b4669a7843296c41d3b6ac5b23d00dec48dba507ba051d14564aa801" ++ CONFIGURE_COMMAND "" ++ BUILD_COMMAND "" ++ INSTALL_COMMAND "") ++endif() +-- +2.25.1 +
package/sysdig/0001-libsinsp-Apply-PATCH_COMMAND-to-fix-lua-types-and-fu.patch deleted +0 -82
82 lines not on this page · raw message
package/sysdig/0002-Link-against-libabseil-cpp-which-grpc-uses.patch deleted +0 -47
47 lines not on this page · raw message
package/sysdig/Config.in +5 -13
@@ -2,25 +2,17 @@ config BR2_PACKAGE_SYSDIG bool "sysdig" depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf depends on BR2_LINUX_KERNEL - depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb + depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb, yaml-cpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, jq, protobuf, tbb depends on !BR2_STATIC_LIBS # elfutils, protobuf, tbb depends on BR2_USE_WCHAR # elfutils depends on BR2_TOOLCHAIN_USES_GLIBC # elfutils depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 - select BR2_PACKAGE_C_ARES - select BR2_PACKAGE_ELFUTILS - select BR2_PACKAGE_GRPC - select BR2_PACKAGE_JQ - select BR2_PACKAGE_JSONCPP - select BR2_PACKAGE_LIBB64 - select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_FALCOSECURITY_LIBS select BR2_PACKAGE_NCURSES - select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_PROTOBUF - select BR2_PACKAGE_TBB - select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_JSON_FOR_MODERN_CPP + select BR2_PACKAGE_YAML_CPP help Sysdig is open source, system-level exploration: capture system state and activity from a running Linux
@@ -36,4 +28,4 @@ comment "sysdig needs a glibc toolchain w/ C++, threads, gcc >= 4.8, dynamic lib || !BR2_TOOLCHAIN_HAS_THREADS \ || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS \ || !BR2_TOOLCHAIN_USES_GLIBC \ - || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
package/sysdig/sysdig.hash +1 -3
@@ -1,5 +1,3 @@ # sha256 locally computed -sha256 b9d05854493d245a7a7e75f77fc654508f720aab5e5e8a3a932bd8eb54e49bda sysdig-0.27.1.tar.gz +sha256 3721c97f0da43c1a68d2962d30363525d8532ab5f2534dfefc86d175e17e423e sysdig-0.29.1.tar.gz sha256 a88fbf820b38b1c7fabc6efe291b8259e02ae21326f56fe31c6c9adf374b2702 COPYING -sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 driver/GPL2.txt -sha256 e3f6a43d097ed68176e9738de925d98b938e1bccf6d6bd1bcd79395eca8f76ed driver/MIT.txt
package/sysdig/sysdig.mk +21 -34
70 lines not on this page · raw message
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedRe: [Buildroot] [RFC PATCH v4 2/2] package/sysdig: bump to 0.29.1
Quoted 16 lines · Francis Laniel
sysdig 0.27.1 cannot be cross-compiled to, e.g., aarch64 because it uses
open()syscall [1].
This patch bumps its version to enable cross-compilation.By doing so, we can remove the previous patches.
But this commit introduces new patches.
Indeed, libsinsp (lib system inspection), libscap (lib system capture) and the kernel module were moved to falcosecurity/libs.
Sadly, it is not possible to compile sysdig with pre-compiled libs (like we do in buildroot).
So, this contribution introduces a new patch to build sysdig with already built falcosecurity/libs.[1] https://marc.info/?l=buildroot&m=164951521629400
Signed-off-by Francis Laniel <[email protected]>
[snip]
package/sysdig/Config.in config BR2_PACKAGE_SYSDIG · line 7
Quoted 12 lines
package/sysdig/Config.in +1
-1@@ -2,25 +2,17 @@ config BR2_PACKAGE_SYSDIG bool "sysdig" depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf depends on BR2_LINUX_KERNEL - depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb + depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb, yaml-cpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, jq, protobuf, tbb
This is now an indirect dependency. We normally show that as
... # falcosecurity-libs -> elfutils, jq, protobuf, tbb
but that would get really long, so I changed all of them to just mention falcosecurity-libs.
package/sysdig/Config.in config BR2_PACKAGE_SYSDIG · line 9
Quoted 2 lines
package/sysdig/Config.in +0
-0depends on !BR2_STATIC_LIBS # elfutils, protobuf, tbb depends on BR2_USE_WCHAR # elfutils
This one is not present in falcosecurity-libs (anyway implied by glibc), so I
removed it.
Quoted 81 lines
package/sysdig/Config.in +4
-12depends on BR2_TOOLCHAIN_USES_GLIBC # elfutils depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 - select BR2_PACKAGE_C_ARES - select BR2_PACKAGE_ELFUTILS - select BR2_PACKAGE_GRPC - select BR2_PACKAGE_JQ - select BR2_PACKAGE_JSONCPP - select BR2_PACKAGE_LIBB64 - select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_FALCOSECURITY_LIBS select BR2_PACKAGE_NCURSES - select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_PROTOBUF - select BR2_PACKAGE_TBB - select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_JSON_FOR_MODERN_CPP + select BR2_PACKAGE_YAML_CPP help Sysdig is open source, system-level exploration: capture system state and activity from a running Linux@@ -36,4 +28,4 @@ comment "sysdig needs a glibc toolchain w/ C++, threads, gcc >= 4.8, dynamic lib || !BR2_TOOLCHAIN_HAS_THREADS \ || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS \ || !BR2_TOOLCHAIN_USES_GLIBC \ - || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1package/sysdig/sysdig.hash +1
-3@@ -1,5 +1,3 @@ # sha256 locally computed -sha256 b9d05854493d245a7a7e75f77fc654508f720aab5e5e8a3a932bd8eb54e49bda sysdig-0.27.1.tar.gz +sha256 3721c97f0da43c1a68d2962d30363525d8532ab5f2534dfefc86d175e17e423e sysdig-0.29.1.tar.gz sha256 a88fbf820b38b1c7fabc6efe291b8259e02ae21326f56fe31c6c9adf374b2702 COPYING -sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 driver/GPL2.txt -sha256 e3f6a43d097ed68176e9738de925d98b938e1bccf6d6bd1bcd79395eca8f76ed driver/MIT.txtpackage/sysdig/sysdig.mk +6
-20@@ -4,10 +4,10 @@ # ################################################################################ -SYSDIG_VERSION = 0.27.1 +SYSDIG_VERSION = 0.29.1 SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION)) -SYSDIG_LICENSE = Apache-2.0 (userspace), MIT or GPL-2.0 (driver) -SYSDIG_LICENSE_FILES = COPYING driver/MIT.txt driver/GPL2.txt +SYSDIG_LICENSE = Apache-2.0 +SYSDIG_LICENSE_FILE = COPYING SYSDIG_CPE_ID_VENDOR = sysdig SYSDIG_CONF_OPTS = \ -DENABLE_DKMS=OFF \@@ -16,39 +16,26 @@ SYSDIG_CONF_OPTS = \ SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO SYSDIG_DEPENDENCIES = \ - c-ares \ - elfutils \ - grpc \ - jq \ - jsoncpp \ - libb64 \ - libcurl \ - luainterpreter \ + falcosecurity-libs \ ncurses \ - openssl \ - protobuf \ - tbb \ - zlib + json-for-modern-cpp \ + yaml-cpp -# sysdig creates the module Makefile from a template, which contains a -# single place-holder, KBUILD_FLAGS, wich is only replaced with two -# things: -# - debug flags, which we don't care about here, -# - 'sysdig-feature' flags, which are never set, so always empty
package/sysdig/sysdig.mk SYSDIG_CONF_OPTS = \ · line 26
Quoted 10 lines
package/sysdig/sysdig.mk +3
-7-# So, just replace the place-holder with the only meaningful value: nothing. -define SYSDIG_MODULE_GEN_MAKEFILE - $(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile - $(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile - $(SED) 's/@PROBE_NAME@/sysdig-probe/;' $(@D)/driver/Makefile -endef -SYSDIG_POST_PATCH_HOOKS += SYSDIG_MODULE_GEN_MAKEFILE +# For sysdig to automatically loads the driver, SYSDIG_DRIVER_NAME should be +# the same than FALCOSECURITY_LIBS_DRIVER_NAME. +SYSDIG_DRIVER_NAME = scap
It's a bit silly to have this huge comment and then define a variable that is
used only once. So I removed all that and directly used FALCOSECURITY_LIBS_DRIVER_NAME below.
Applied to master, thanks.
Regards,
Arnout
Quoted 12 lines
package/sysdig/sysdig.mk +5
-6-# Don't build the driver as part of the 'standard' procedure, we'll -# build it on our own with the kernel-module infra. -SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF - -SYSDIG_MODULE_SUBDIRS = driver -SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR) +# Don't build the driver as part of the 'standard' procedure, it has been built +# by falcosecurity-libs.mk. +# grpc_cpp_plugin is needed to build falcosecurity libs, so we give the host +# one there. +SYSDIG_CONF_OPTS += -DFALCOSECURITY_LIBS_SOURCE_DIR=$(FALCOSECURITY_LIBS_SRCDIR) \
package/sysdig/sysdig.mk SYSDIG_CONF_OPTS = \ · line 41
Quoted 10 lines
package/sysdig/sysdig.mk +7
-1+ -DBUILD_DRIVER=OFF \ + -DGRPC_CPP_PLUGIN=$(HOST_DIR)/bin/grpc_cpp_plugin \ + -DDRIVER_NAME=$(SYSDIG_DRIVER_NAME) \ + -DENABLE_DKMS=OFF \ + -DUSE_BUNDLED_DEPS=OFF \ + -DWITH_CHISEL=ON \ + -DVALIJSON_INCLUDE=$(BUILD_DIR)/valijson-0.6/include/valijson -$(eval $(kernel-module)) $(eval $(cmake-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RFC PATCH v4 2/2] package/sysdig: bump to 0.29.1
Hi!
Quoted 168 lines · Le samedi 30 avril 2022, 19:07:41 BST Arnout Vandecappelle a écrit :
Quoted 16 lines · Francis Laniel
sysdig 0.27.1 cannot be cross-compiled to, e.g., aarch64 because it uses
open()syscall [1].
This patch bumps its version to enable cross-compilation.By doing so, we can remove the previous patches.
But this commit introduces new patches.
Indeed, libsinsp (lib system inspection), libscap (lib system capture) and the kernel module were moved to falcosecurity/libs.
Sadly, it is not possible to compile sysdig with pre-compiled libs (like we do in buildroot).
So, this contribution introduces a new patch to build sysdig with already built falcosecurity/libs.[1] https://marc.info/?l=buildroot&m=164951521629400
Signed-off-by Francis Laniel <[email protected]>[snip]
Quoted 5 lines
package/sysdig/Config.in +0
-0package/sysdig/Config.in config BR2_PACKAGE_SYSDIG · line 10
Quoted 10 lines
package/sysdig/Config.in +1
-1@@ -2,25 +2,17 @@ config BR2_PACKAGE_SYSDIG bool "sysdig" depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf depends on BR2_LINUX_KERNEL - depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb + depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb, yaml-cpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, jq, protobuf, tbbThis is now an indirect dependency. We normally show that as
... # falcosecurity-libs -> elfutils, jq, protobuf, tbb
but that would get really long, so I changed all of them to just mention falcosecurity-libs.package/sysdig/Config.in config BR2_PACKAGE_SYSDIG · line 9
Quoted 2 lines
package/sysdig/Config.in +0
-0depends on !BR2_STATIC_LIBS # elfutils, protobuf, tbb depends on BR2_USE_WCHAR # elfutilsThis one is not present in falcosecurity-libs (anyway implied by glibc),
so I removed it.Quoted 114 lines
package/sysdig/Config.in +3
-11depends on BR2_TOOLCHAIN_USES_GLIBC # elfutils depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 - select BR2_PACKAGE_C_ARES - select BR2_PACKAGE_ELFUTILS - select BR2_PACKAGE_GRPC - select BR2_PACKAGE_JQ - select BR2_PACKAGE_JSONCPP - select BR2_PACKAGE_LIBB64 - select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_FALCOSECURITY_LIBS select BR2_PACKAGE_NCURSES - select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_PROTOBUF - select BR2_PACKAGE_TBB - select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_JSON_FOR_MODERN_CPP + select BR2_PACKAGE_YAML_CPP help Sysdig is open source, system-level exploration: capture system state and activity from a running Linux@@ -36,4 +28,4 @@ comment "sysdig needs a glibc toolchain w/ C++, threads,gcc >= 4.8, dynamic lib>
|| !BR2_TOOLCHAIN_HAS_THREADS \ || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS \ || !BR2_TOOLCHAIN_USES_GLIBC \package/sysdig/Config.in +1
-1- || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1package/sysdig/sysdig.hash +0
-1@@ -1,5 +1,3 @@ # sha256 locally computed -sha256 b9d05854493d245a7a7e75f77fc654508f720aab5e5e8a3a932bd8eb54e49bdasysdig-0.27.1.tar.gz +sha256
3721c97f0da43c1a68d2962d30363525d8532ab5f2534dfefc86d175e17e423esysdig-0.29.1.tar.gz>
sha256a88fbf820b38b1c7fabc6efe291b8259e02ae21326f56fe31c6c9adf374b2702
COPYING>
-sha2568177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643driver/GPL2.txt-sha256e3f6a43d097ed68176e9738de925d98b938e1bccf6d6bd1bcd79395eca8f76eddriver/MIT.txtdiff --gita/package/sysdig/sysdig.mkb/package/sysdig/sysdig.mk
index9a9aaa35c3..3ce5d0bb79100644package/sysdig/sysdig.mk +3
-3@@ -4,10 +4,10 @@ # ######################################################################## ########> -SYSDIG_VERSION = 0.27.1 +SYSDIG_VERSION = 0.29.1 SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION)) -SYSDIG_LICENSE = Apache-2.0 (userspace), MIT or GPL-2.0 (driver) -SYSDIG_LICENSE_FILES = COPYING driver/MIT.txt driver/GPL2.txt +SYSDIG_LICENSE = Apache-2.0 +SYSDIG_LICENSE_FILE = COPYINGSYSDIG_CPE_ID_VENDOR = sysdig SYSDIG_CONF_OPTS = \ -DENABLE_DKMS=OFF \package/sysdig/sysdig.mk +3
-18@@ -16,39 +16,26 @@ SYSDIG_CONF_OPTS = \ SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO SYSDIG_DEPENDENCIES = \ - c-ares \ - elfutils \ - grpc \ - jq \ - jsoncpp \ - libb64 \ - libcurl \ - luainterpreter \ + falcosecurity-libs \ ncurses \ - openssl \ - protobuf \ - tbb \ - zlib + json-for-modern-cpp \ + yaml-cpp -# sysdig creates the module Makefile from a template, which contains a -# single place-holder, KBUILD_FLAGS, wich is only replaced with two -# things: -# - debug flags, which we don't care about here, -# - 'sysdig-feature' flags, which are never set, so always empty -# So, just replace the place-holder with the only meaningful value:nothing. -define
SYSDIG_MODULE_GEN_MAKEFILEpackage/sysdig/sysdig.mk +1
-5- $(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile - $(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile - $(SED) 's/@PROBE_NAME@/sysdig-probe/;' $(@D)/driver/Makefile -endef -SYSDIG_POST_PATCH_HOOKS += SYSDIG_MODULE_GEN_MAKEFILE +# For sysdig to automatically loads the driver, SYSDIG_DRIVER_NAME shouldQuoted 2 lines
be +# the same than
FALCOSECURITY_LIBS_DRIVER_NAME. +SYSDIG_DRIVER_NAME = scapIt's a bit silly to have this huge comment and then define a variable that
is used only once. So I removed all that and directly usedFALCOSECURITY_LIBS_DRIVER_NAMEbelow.
Quoted 1 line
Applied to master, thanks.
Thank you for it!
I actually did a small mistake when sending this patch...
I will send a new series which corrects the problem and bump to 0.29.2 before end of the day!
Quoted 23 lines
Regards,
ArnoutQuoted 20 lines
package/sysdig/sysdig.mk +1
-6-# Don't build the driver as part of the 'standard' procedure, we'll -# build it on our own with the kernel-module infra. -SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF - -SYSDIG_MODULE_SUBDIRS = driver -SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR) +# Don't build the driver as part of the 'standard' procedure, it has beenbuilt +# by falcosecurity-libs.mk.
+#grpc_cpp_pluginis needed to build falcosecurity libs, so we give the host +# one there.package/sysdig/sysdig.mk +8
-1+SYSDIG_CONF_OPTS += -DFALCOSECURITY_LIBS_SOURCE_DIR=$(FALCOSECURITY_LIBS_SRCDIR) \ + -DBUILD_DRIVER=OFF \ + -DGRPC_CPP_PLUGIN=$(HOST_DIR)/bin/grpc_cpp_plugin \ + -DDRIVER_NAME=$(SYSDIG_DRIVER_NAME) \ + -DENABLE_DKMS=OFF \ + -DUSE_BUNDLED_DEPS=OFF \ + -DWITH_CHISEL=ON \ + -DVALIJSON_INCLUDE=$(BUILD_DIR)/valijson-0.6/include/valijson
Quoted 3 lines
Quoted 3 lines
-$(eval $(kernel-module))
$(eval $(cmake-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot