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 @@ | |||
1 | # Autogenerated with 'bitbake -c update_crates hello-rs' | ||
2 | |||
3 | # from Cargo.lock | ||
4 | SRC_URI += " \ | ||
5 | crate://crates.io/figlet-rs/0.1.5 \ | ||
6 | " | ||
7 | |||
8 | 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 @@ | |||
1 | From 3aea1ece0ca6ac0bf0ffe42736827af22966f767 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kiernan <alexk@zuma.ai> | ||
3 | Date: Wed, 27 Dec 2023 09:55:48 +0000 | ||
4 | Subject: [PATCH] Greet "OE-Core" | ||
5 | |||
6 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
7 | Upstream-Status: Inappropriate | ||
8 | --- | ||
9 | src/main.rs | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/src/main.rs b/src/main.rs | ||
13 | index f4a310758b19..224eca65c38d 100644 | ||
14 | --- a/src/main.rs | ||
15 | +++ b/src/main.rs | ||
16 | @@ -3,7 +3,7 @@ use hello_lib::greet; | ||
17 | |||
18 | fn main() { | ||
19 | let standard_font = FIGfont::standard().unwrap(); | ||
20 | - let greeting = greet(None); | ||
21 | + let greeting = greet(Some("OE-Core")); | ||
22 | let figure = standard_font.convert(&greeting); | ||
23 | println!("{}", figure.unwrap()); | ||
24 | } | ||
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 @@ | |||
1 | SUMMARY = "Simple hello world example" | ||
2 | HOMEPAGE = "https://github.com/akiernan/hello-bin" | ||
3 | LICENSE = "Unlicense" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7246f848faa4e9c9fc0ea91122d6e680" | ||
5 | |||
6 | SRC_URI = "git://github.com/akiernan/hello-bin.git;protocol=https;branch=main;subpath=rust \ | ||
7 | file://0001-Greet-OE-Core.patch \ | ||
8 | git://github.com/akiernan/hello-lib.git;protocol=https;branch=main;name=hello-lib;destsuffix=hello-lib;type=git-dependency \ | ||
9 | " | ||
10 | SRCREV = "d3d096eda182644868f8e7458dcfa538ff637db3" | ||
11 | |||
12 | SRCREV_FORMAT .= "_hello-lib" | ||
13 | SRCREV_hello-lib = "59c84574e844617043cf337bc8fa537cf87ad8ae" | ||
14 | |||
15 | S = "${WORKDIR}/rust" | ||
16 | |||
17 | inherit cargo cargo-update-recipe-crates ptest-cargo | ||
18 | |||
19 | # Remove this when the recipe is reproducible | ||
20 | EXCLUDE_FROM_WORLD = "1" | ||
21 | |||
22 | 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 @@ | |||
1 | From 3d076ea588eb3c7f334133b4c31172a14beadf5b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 2 Feb 2023 20:18:27 -0800 | ||
4 | Subject: [PATCH] Add <cstdint> for uintXX_t types | ||
5 | |||
6 | gcc 13 moved some includes around and as a result <cstdint> is no | ||
7 | longer transitively included [1]. Explicitly include it | ||
8 | for uintXX_t. | ||
9 | |||
10 | [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/falcosecurity/libs/pull/862] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | userspace/libsinsp/filter/parser.h | 1 + | ||
16 | userspace/libsinsp/filter_value.h | 1 + | ||
17 | 2 files changed, 2 insertions(+) | ||
18 | |||
19 | --- a/userspace/libsinsp/filter/parser.h | ||
20 | +++ b/userspace/libsinsp/filter/parser.h | ||
21 | @@ -18,6 +18,7 @@ limitations under the License. | ||
22 | #pragma once | ||
23 | |||
24 | #include "ast.h" | ||
25 | +#include <cstdint> | ||
26 | |||
27 | // | ||
28 | // Context-free Grammar for Sinsp Filters | ||
29 | --- a/userspace/libsinsp/filter_value.h | ||
30 | +++ b/userspace/libsinsp/filter_value.h | ||
31 | @@ -18,6 +18,7 @@ limitations under the License. | ||
32 | #pragma once | ||
33 | |||
34 | #include <string.h> | ||
35 | +#include <cstdint> | ||
36 | #include <utility> | ||
37 | |||
38 | // 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 @@ | |||
1 | From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 21 Mar 2022 19:35:48 -0700 | ||
4 | Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS | ||
5 | |||
6 | This helps compliation of driver code where its calling modprobe on the | ||
7 | given kernel module via system() API | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | CMakeLists.txt | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
16 | index 7dceb7ae..e156c36f 100644 | ||
17 | --- a/CMakeLists.txt | ||
18 | +++ b/CMakeLists.txt | ||
19 | @@ -149,6 +149,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
20 | if(NOT DEFINED PROBE_NAME) | ||
21 | set(PROBE_NAME "scap") | ||
22 | endif() | ||
23 | + add_definitions(-DPROBE_NAME="${PROBE_NAME}") | ||
24 | |||
25 | set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers") | ||
26 | |||
27 | -- | ||
28 | 2.35.1 | ||
29 | |||
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 @@ | |||
1 | SUMMARY = "A New System Troubleshooting Tool Built for the Way You Work" | ||
2 | DESCRIPTION = "Sysdig is open source, system-level exploration: capture \ | ||
3 | system state and activity from a running Linux instance, then save, \ | ||
4 | filter and analyze." | ||
5 | HOMEPAGE = "http://www.sysdig.org/" | ||
6 | LICENSE = "Apache-2.0 & (MIT | GPL-2.0-only)" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=f8fee3d59797546cffab04f3b88b2d44" | ||
8 | |||
9 | inherit cmake pkgconfig | ||
10 | |||
11 | #OECMAKE_GENERATOR = "Unix Makefiles" | ||
12 | JIT ?= "jit" | ||
13 | JIT:mipsarchn32 = "" | ||
14 | JIT:mipsarchn64 = "" | ||
15 | JIT:riscv64 = "" | ||
16 | JIT:riscv32 = "" | ||
17 | JIT:powerpc = "" | ||
18 | JIT:powerpc64le = "" | ||
19 | JIT:powerpc64 = "" | ||
20 | |||
21 | #DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \ | ||
22 | # tbb jq openssl elfutils protobuf protobuf-native jq-native valijson" | ||
23 | RDEPENDS:${PN} = "bash" | ||
24 | |||
25 | SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \ | ||
26 | git://github.com/falcosecurity/libs;protocol=https;branch=master;name=falco;subdir=git/falcosecurity-libs \ | ||
27 | file://0055-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \ | ||
28 | file://0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \ | ||
29 | " | ||
30 | SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b" | ||
31 | SRCREV_falco= "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9" | ||
32 | |||
33 | SRCREV_FORMAT = "sysdig_falco" | ||
34 | |||
35 | S = "${WORKDIR}/git" | ||
36 | |||
37 | EXTRA_OECMAKE = "\ | ||
38 | -DBUILD_DRIVER=OFF \ | ||
39 | -DMINIMAL_BUILD=ON \ | ||
40 | -DUSE_BUNDLED_DEPS=OFF \ | ||
41 | -DCREATE_TEST_TARGETS=OFF \ | ||
42 | -DDIR_ETC=${sysconfdir} \ | ||
43 | -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \ | ||
44 | -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \ | ||
45 | -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \ | ||
46 | " | ||
47 | |||
48 | #CMAKE_VERBOSE = "VERBOSE=1" | ||
49 | |||
50 | FILES:${PN} += " \ | ||
51 | ${DIR_ETC}/* \ | ||
52 | ${datadir}/zsh/* \ | ||
53 | ${prefix}/src/* \ | ||
54 | " | ||
55 | # Use getaddrinfo_a is a GNU extension in libsinsp | ||
56 | # It should be fixed in sysdig, until then disable | ||
57 | # on musl | ||
58 | # Something like this https://code.videolan.org/ePirat/vlc/-/commit/01fd9fe4c7f6c5558f7345f38abf0152e17853ab is needed to fix it | ||
59 | COMPATIBLE_HOST:libc-musl = "null" | ||
60 | COMPATIBLE_HOST:mips = "null" | ||
61 | COMPATIBLE_HOST:riscv64 = "null" | ||
62 | COMPATIBLE_HOST:riscv32 = "null" | ||
63 | COMPATIBLE_HOST:powerpc = "null" | ||
64 | COMPATIBLE_HOST:powerpc64le = "null" | ||
65 | |||
66 | EXCLUDE_FROM_WORLD = "1" | ||