diff options
3 files changed, 49 insertions, 41 deletions
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0003-CMakeLists.txt-Revise-init-manager-deduction.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0003-CMakeLists.txt-Revise-init-manager-deduction.patch new file mode 100644 index 0000000000..5105444dc0 --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0003-CMakeLists.txt-Revise-init-manager-deduction.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From c9969cc46e5e4d58db28c89b22bebe42d9f96962 Mon Sep 17 00:00:00 2001 | ||
2 | From: Niko Mauno <niko.mauno@vaisala.com> | ||
3 | Date: Mon, 21 Oct 2024 16:02:46 +0000 | ||
4 | Subject: [PATCH] CMakeLists.txt: Revise init manager deduction | ||
5 | |||
6 | The init manager deduction is not cross-compile friendly, so replace | ||
7 | the host specific condition checks with placeholders that can be | ||
8 | replaced in Yocto recipe. | ||
9 | |||
10 | Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> | ||
11 | |||
12 | Upstream-Status: Inappropriate [configuration] | ||
13 | --- | ||
14 | src/CMakeLists.txt | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
18 | index 084f2c57d..f0f35f00b 100644 | ||
19 | --- a/src/CMakeLists.txt | ||
20 | +++ b/src/CMakeLists.txt | ||
21 | @@ -532,7 +532,7 @@ if(FLB_BINARY) | ||
22 | set(SYSTEMD_UNITDIR /lib/systemd/system) | ||
23 | endif() | ||
24 | |||
25 | - if(SYSTEMD_UNITDIR) | ||
26 | + if(@INIT_MANAGER_IS_SYSTEMD@) | ||
27 | set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") | ||
28 | configure_file( | ||
29 | "${PROJECT_SOURCE_DIR}/init/systemd.in" | ||
30 | @@ -540,7 +540,7 @@ if(FLB_BINARY) | ||
31 | ) | ||
32 | install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION ${SYSTEMD_UNITDIR}) | ||
33 | install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary) | ||
34 | - elseif(IS_DIRECTORY /usr/share/upstart) | ||
35 | + elseif(@INIT_MANAGER_IS_UPSTART@) | ||
36 | set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") | ||
37 | configure_file( | ||
38 | "${PROJECT_SOURCE_DIR}/init/upstart.in" | ||
39 | -- | ||
40 | 2.39.2 | ||
41 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0003-Disable-installing-systemd-service-file.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0003-Disable-installing-systemd-service-file.patch deleted file mode 100644 index 36a0092ba8..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0003-Disable-installing-systemd-service-file.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From c3b891eeec691753fccdf8e0a4541dcba244ec6b Mon Sep 17 00:00:00 2001 | ||
2 | From: Niko Mauno <niko.mauno@vaisala.com> | ||
3 | Date: Thu, 10 Oct 2024 11:06:07 +0300 | ||
4 | Subject: [PATCH] Disable installing systemd service file | ||
5 | |||
6 | With this we avoid the the following BitBake error when using some | ||
7 | other init manager than SystemD: | ||
8 | |||
9 | ERROR: fluentbit-3.1.9-r0 do_package: QA Issue: fluentbit: Files/directories were installed but not shipped in any package: | ||
10 | /lib | ||
11 | /lib/systemd | ||
12 | /lib/systemd/system | ||
13 | /lib/systemd/system/fluent-bit.service | ||
14 | Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. | ||
15 | fluentbit: 4 installed and not shipped files. [installed-vs-shipped] | ||
16 | ERROR: fluentbit-3.1.9-r0 do_package: Fatal QA errors were found, failing task. | ||
17 | |||
18 | Upstream-Status: Inappropriate [hack] | ||
19 | |||
20 | Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> | ||
21 | --- | ||
22 | src/CMakeLists.txt | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
26 | index e24666484..c102806d0 100644 | ||
27 | --- a/src/CMakeLists.txt | ||
28 | +++ b/src/CMakeLists.txt | ||
29 | @@ -534,7 +534,7 @@ if(FLB_BINARY) | ||
30 | set(SYSTEMD_UNITDIR /lib/systemd/system) | ||
31 | endif() | ||
32 | |||
33 | - if(SYSTEMD_UNITDIR) | ||
34 | + if(FALSE) | ||
35 | set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") | ||
36 | configure_file( | ||
37 | "${PROJECT_SOURCE_DIR}/init/systemd.in" | ||
38 | -- | ||
39 | 2.39.2 | ||
40 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb b/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb index fc67236d3e..f96e1a7edc 100644 --- a/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb +++ b/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb | |||
@@ -22,7 +22,7 @@ SRC_URI = "\ | |||
22 | git://github.com/fluent/fluent-bit.git;branch=3.1;protocol=https \ | 22 | git://github.com/fluent/fluent-bit.git;branch=3.1;protocol=https \ |
23 | file://0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch \ | 23 | file://0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch \ |
24 | file://0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch \ | 24 | file://0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch \ |
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0003-Disable-installing-systemd-service-file.patch', d)} \ | 25 | file://0003-CMakeLists.txt-Revise-init-manager-deduction.patch \ |
26 | " | 26 | " |
27 | SRC_URI:append:libc-musl = "\ | 27 | SRC_URI:append:libc-musl = "\ |
28 | file://0004-chunkio-Link-with-fts-library-with-musl.patch \ | 28 | file://0004-chunkio-Link-with-fts-library-with-musl.patch \ |
@@ -116,6 +116,13 @@ EXTRA_OECMAKE:append:riscv32 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | |||
116 | EXTRA_OECMAKE:append:riscv64 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | 116 | EXTRA_OECMAKE:append:riscv64 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" |
117 | EXTRA_OECMAKE:append:x86 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | 117 | EXTRA_OECMAKE:append:x86 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" |
118 | 118 | ||
119 | do_configure:prepend() { | ||
120 | sed -i \ | ||
121 | -e 's#@INIT_MANAGER_IS_SYSTEMD@#'${@'TRUE' if d.getVar('INIT_MANAGER') == 'systemd' else 'FALSE'}'#' \ | ||
122 | -e 's#@INIT_MANAGER_IS_UPSTART@#'${@'TRUE' if d.getVar('INIT_MANAGER') == 'upstart' else 'FALSE'}'#' \ | ||
123 | ${S}/src/CMakeLists.txt | ||
124 | } | ||
125 | |||
119 | # flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. | 126 | # flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. |
120 | do_compile:append() { | 127 | do_compile:append() { |
121 | find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' | 128 | find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' |