Skip to contentSkip to conversation

grpc: Enable cpp plugin for target version too

PATCH New Khem Raj 1 participant 2 messages Mar 22, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 grpc: Enable cpp plugin for target version too

This is needed by packages like sysdig

---
 meta-oe/recipes-devtools/grpc/grpc_1.41.1.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta-oe/recipes-devtools/grpc/grpc_1.41.1.bb +1 -2
index 3fe7993107..315d8eb38c 100644
@@ -13,7 +13,7 @@ DEPENDS:append:class-nativesdk = " grpc-native "
 PACKAGE_BEFORE_PN = "${PN}-compiler"
 
 RDEPENDS:${PN}-compiler = "${PN}"
-RDEPENDS:${PN}-dev:class_native += "${PN}-compiler"
+RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler"
 # Configuration above allows to cross-compile gRPC applications
 # In order to compile applications on the target, use the dependency below
 # Both dependencies are mutually exclusive
@@ -45,7 +45,6 @@ EXTRA_OECMAKE = " \
     "
 
 PACKAGECONFIG ??= "cpp shared"
-PACKAGECONFIG_class-target ?= "shared"
 PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF"
 PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF"
 PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF"
Signature · 1 line
2.35.1
author
#1 lore raw

PATCH 2/2 sysdig: Upgrade to 0.28.0

Drop patches, since they are not needed
Add a patch to define PROBE_NAME for CFLAGS
Disable sysdig for ppc64

---
 .../packagegroups/packagegroup-meta-oe.bb     |   2 +-
 ...001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch |  29 ++
 ...0001-fix-build-with-LuaJIT-2.1-betas.patch |  96 -----
 ...ot-of-Werror-format-security-errors-.patch | 155 --------
 .../sysdig/sysdig/aarch64.patch               | 359 ------------------
 .../{sysdig_git.bb => sysdig_0.28.0.bb}       |  21 +-
 6 files changed, 43 insertions(+), 619 deletions(-)
 create mode 100644 meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch
 delete mode 100644 meta-oe/recipes-extended/sysdig/sysdig/0001-fix-build-with-LuaJIT-2.1-betas.patch
 delete mode 100644 meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch
 delete mode 100644 meta-oe/recipes-extended/sysdig/sysdig/aarch64.patch
 rename meta-oe/recipes-extended/sysdig/{sysdig_git.bb => sysdig_0.28.0.bb} (69%)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -1
index 5992cdd950..52a82e8acd 100644
@@ -446,7 +446,7 @@ RDEPENDS:packagegroup-meta-oe-extended:remove:mipsarch = "upm mraa minifi-cpp ti
 RDEPENDS:packagegroup-meta-oe-extended:remove:mips = "sysdig"
 RDEPENDS:packagegroup-meta-oe-extended:remove:powerpc = "upm mraa minifi-cpp"
 RDEPENDS:packagegroup-meta-oe-extended:remove:powerpc64 = "upm mraa minifi-cpp"
-RDEPENDS:packagegroup-meta-oe-extended:remove:powerpc64le = "upm mraa"
+RDEPENDS:packagegroup-meta-oe-extended:remove:powerpc64le = "upm mraa sysdig"
 RDEPENDS:packagegroup-meta-oe-extended:remove:riscv64 = "upm libleak libyang mraa sysdig tiptop"
 RDEPENDS:packagegroup-meta-oe-extended:remove:riscv32 = "upm libleak libyang mraa sysdig tiptop"
 
meta-oe/recipes-extended/sysdig/sysdig/0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch new file +29 -0
new file mode 100644
index 0000000000..903ccdf36a
@@ -0,0 +1,29 @@
+From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 21 Mar 2022 19:35:48 -0700
+Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS
+
+This helps compliation of driver code where its calling modprobe on the
+given kernel module via system() API
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7dceb7ae..e156c36f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,6 +149,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ 	if(NOT DEFINED PROBE_NAME)
+ 		set(PROBE_NAME "scap")
+ 	endif()
++	add_definitions(-DPROBE_NAME="${PROBE_NAME}")
+ 
+ 	set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers")
+ 	
+-- 
+2.35.1
+
meta-oe/recipes-extended/sysdig/sysdig/0001-fix-build-with-LuaJIT-2.1-betas.patch deleted +0 -96

96 lines not on this page · raw message

meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch deleted +0 -155

155 lines not on this page · raw message

meta-oe/recipes-extended/sysdig/sysdig/aarch64.patch deleted +0 -359

359 lines not on this page · raw message

meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb renamed from meta-oe/recipes-extended/sysdig/sysdig_git.bb +13 -8
similarity index 69%
rename from meta-oe/recipes-extended/sysdig/sysdig_git.bb
rename to meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb
index 3916bbd60d..4181da732f 100644
@@ -18,28 +18,32 @@ JIT:powerpc = ""
 JIT:powerpc64le = ""
 JIT:powerpc64 = ""
 
-DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp tbb jq openssl elfutils protobuf protobuf-native jq-native"
+DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \
+            tbb jq openssl elfutils protobuf protobuf-native jq-native valijson"
 RDEPENDS:${PN} = "bash"
 
-SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https \
-           file://0001-fix-build-with-LuaJIT-2.1-betas.patch \
-           file://aarch64.patch \
-           file://0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch \
+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=git/falcosecurity-libs \
+           file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
           "
-SRCREV = "67833b2aca06bd9d11cff7cb29f04fbf4ef96cad"
-PV = "0.27.1"
+SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b"
+SRCREV_falco= "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9"
 
 S = "${WORKDIR}/git"
 
 EXTRA_OECMAKE = "\
                 -DBUILD_DRIVER=OFF \
+                -DMINIMAL_BUILD=ON \
                 -DUSE_BUNDLED_DEPS=OFF \
                 -DCREATE_TEST_TARGETS=OFF \
                 -DDIR_ETC=${sysconfdir} \
                 -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \
-                -DLUA_LIBRARY=libluajit-5.1.so \
+                -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \
+                -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \
 "
 
+#CMAKE_VERBOSE = "VERBOSE=1"
+
 FILES:${PN} += " \
     ${DIR_ETC}/* \
     ${datadir}/zsh/* \
@@ -54,3 +58,4 @@ COMPATIBLE_HOST:mips = "null"
 COMPATIBLE_HOST:riscv64 = "null"
 COMPATIBLE_HOST:riscv32 = "null"
 COMPATIBLE_HOST:powerpc = "null"
+COMPATIBLE_HOST:powerpc64le = "null"
Signature · 1 line
2.35.1