diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/fluentbit')
3 files changed, 33 insertions, 3 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Control-sytemd-unit-install-location-with-SYSTEM_DIR.patch b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Control-sytemd-unit-install-location-with-SYSTEM_DIR.patch new file mode 100644 index 0000000000..bf4cda08f0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Control-sytemd-unit-install-location-with-SYSTEM_DIR.patch @@ -0,0 +1,28 @@ +From 5571f949fa2048b79c197b5b10a11ecb1891cbe9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 23 Apr 2022 08:24:34 -0700 +Subject: [PATCH] Control sytemd unit install location with SYSTEM_DIR + +This helps building when usrmerge is on + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -323,7 +323,11 @@ if(FLB_BINARY) + "${PROJECT_SOURCE_DIR}/init/systemd.in" + ${FLB_SYSTEMD_SCRIPT} + ) +- install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION /lib/systemd/system) ++ if(SYSTEMD_DIR) ++ install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION ${SYSTEMD_DIR}) ++ else() ++ install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION /lib/systemd/system) ++ endif() + install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR}) + elseif(FLB_UPSTART) + set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") diff --git a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch index a185789992..d3822fc8da 100644 --- a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch +++ b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch @@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.kheem@gmail.com> # Detect init system, install upstart, systemd or init.d script - if(IS_DIRECTORY /lib/systemd/system) -+ if(IS_DIRECTORY /lib/systemd/system OR FLB_SYSTEMD) ++ if(FLB_SYSTEMD) set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") configure_file( "${PROJECT_SOURCE_DIR}/init/systemd.in" @@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.kheem@gmail.com> install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION /lib/systemd/system) install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR}) - elseif(IS_DIRECTORY /usr/share/upstart) -+ elseif(IS_DIRECTORY /usr/share/upstart OR FLB_UPSTART) ++ elseif(FLB_UPSTART) set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") configure_file( "${PROJECT_SOURCE_DIR}/init/upstart.in" diff --git a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb index 670d596cad..b231cc2878 100644 --- a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb +++ b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb @@ -18,6 +18,7 @@ SRC_URI = "http://fluentbit.io/releases/1.3/fluent-bit-${PV}.tar.gz \ file://0001-ppc-Fix-signature-for-co_create-API.patch \ file://0001-bin-fix-SIGSEGV-caused-by-using-flb_free-instead-of-.patch \ file://0002-parser-Fix-SIGSEGV-caused-by-using-flb_free-instead-.patch \ + file://0001-Control-sytemd-unit-install-location-with-SYSTEM_DIR.patch \ " SRC_URI[md5sum] = "6eae6dfd0a874e5dd270c36e9c68f747" SRC_URI[sha256sum] = "e037c76c89269c8dc4027a08e442fefd2751b0f1e0f9c38f9a4b12d781a9c789" @@ -47,7 +48,8 @@ EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off " # Disable Library and examples EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off -DFLB_EXAMPLES=Off " -EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES','systemd','-DFLB_SYSTEMD=On','',d)}" +# Enable systemd iff systemd is in DISTRO_FEATURES +EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES','systemd','-DFLB_SYSTEMD=On -DSYSTEMD_DIR=${systemd_system_unitdir}','-DFLB_SYSTEMD=Off',d)}" EXTRA_OECMAKE:append:riscv64 = " -DFLB_DEPS='atomic'" EXTRA_OECMAKE:append:riscv32 = " -DFLB_DEPS='atomic'" |