diff options
Diffstat (limited to 'meta-selftest/recipes-extended')
6 files changed, 187 insertions, 0 deletions
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc b/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc new file mode 100644 index 0000000000..9646482b28 --- /dev/null +++ b/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc @@ -0,0 +1,8 @@ +# Autogenerated with 'bitbake -c update_crates hello-rs' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/figlet-rs/0.1.5 \ +" + +SRC_URI[figlet-rs-0.1.5.sha256sum] = "4742a071cd9694fc86f9fa1a08fa3e53d40cc899d7ee532295da2d085639fbc5" diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch b/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch new file mode 100644 index 0000000000..7569ccef7b --- /dev/null +++ b/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch @@ -0,0 +1,24 @@ +From 3aea1ece0ca6ac0bf0ffe42736827af22966f767 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alexk@zuma.ai> +Date: Wed, 27 Dec 2023 09:55:48 +0000 +Subject: [PATCH] Greet "OE-Core" + +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +Upstream-Status: Inappropriate +--- + src/main.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main.rs b/src/main.rs +index f4a310758b19..224eca65c38d 100644 +--- a/src/main.rs ++++ b/src/main.rs +@@ -3,7 +3,7 @@ use hello_lib::greet; + + fn main() { + let standard_font = FIGfont::standard().unwrap(); +- let greeting = greet(None); ++ let greeting = greet(Some("OE-Core")); + let figure = standard_font.convert(&greeting); + println!("{}", figure.unwrap()); + } diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb b/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb new file mode 100644 index 0000000000..9a136f2978 --- /dev/null +++ b/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "Simple hello world example" +HOMEPAGE = "https://github.com/akiernan/hello-bin" +LICENSE = "Unlicense" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7246f848faa4e9c9fc0ea91122d6e680" + +SRC_URI = "git://github.com/akiernan/hello-bin.git;protocol=https;branch=main;subpath=rust \ + file://0001-Greet-OE-Core.patch \ + git://github.com/akiernan/hello-lib.git;protocol=https;branch=main;name=hello-lib;destsuffix=hello-lib;type=git-dependency \ + " +SRCREV = "d3d096eda182644868f8e7458dcfa538ff637db3" + +SRCREV_FORMAT .= "_hello-lib" +SRCREV_hello-lib = "59c84574e844617043cf337bc8fa537cf87ad8ae" + +S = "${WORKDIR}/rust" + +inherit cargo cargo-update-recipe-crates ptest-cargo + +# Remove this when the recipe is reproducible +EXCLUDE_FROM_WORLD = "1" + +require ${BPN}-crates.inc diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch new file mode 100644 index 0000000000..e564958dad --- /dev/null +++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch @@ -0,0 +1,38 @@ +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 diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch new file mode 100644 index 0000000000..903ccdf36a --- /dev/null +++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch @@ -0,0 +1,29 @@ +From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +--- + 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 + diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb b/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb new file mode 100644 index 0000000000..2ce85fe451 --- /dev/null +++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb @@ -0,0 +1,66 @@ +SUMMARY = "A New System Troubleshooting Tool Built for the Way You Work" +DESCRIPTION = "Sysdig is open source, system-level exploration: capture \ +system state and activity from a running Linux instance, then save, \ +filter and analyze." +HOMEPAGE = "http://www.sysdig.org/" +LICENSE = "Apache-2.0 & (MIT | GPL-2.0-only)" +LIC_FILES_CHKSUM = "file://COPYING;md5=f8fee3d59797546cffab04f3b88b2d44" + +inherit cmake pkgconfig + +#OECMAKE_GENERATOR = "Unix Makefiles" +JIT ?= "jit" +JIT:mipsarchn32 = "" +JIT:mipsarchn64 = "" +JIT:riscv64 = "" +JIT:riscv32 = "" +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 valijson" +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=git/falcosecurity-libs \ + file://0055-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \ + file://0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \ + " +SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b" +SRCREV_falco= "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9" + +SRCREV_FORMAT = "sysdig_falco" + +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 \ + -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \ + -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \ +" + +#CMAKE_VERBOSE = "VERBOSE=1" + +FILES:${PN} += " \ + ${DIR_ETC}/* \ + ${datadir}/zsh/* \ + ${prefix}/src/* \ +" +# Use getaddrinfo_a is a GNU extension in libsinsp +# It should be fixed in sysdig, until then disable +# on musl +# Something like this https://code.videolan.org/ePirat/vlc/-/commit/01fd9fe4c7f6c5558f7345f38abf0152e17853ab is needed to fix it +COMPATIBLE_HOST:libc-musl = "null" +COMPATIBLE_HOST:mips = "null" +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" +COMPATIBLE_HOST:powerpc = "null" +COMPATIBLE_HOST:powerpc64le = "null" + +EXCLUDE_FROM_WORLD = "1" |