Upgrade fluentbit recipe from version 1.3.5 to 1.9.3
PATCH 1/1 Upgrade fluentbit recipe from version 1.3.5 to 1.9.3
From: Lekshmi Ravindran <[email protected]>
The current fluentbit version with oe is much old and outdated. Upgrading to latest version to leverage better stability, performance and newer feature set from the fluentbit project. Source - https://github.com/fluent/fluent-bit/blob/v1.9.3/fluent-bit_1.9.3.bb
--- ...nit-install-location-with-SYSTEM_DIR.patch | 28 ------- ...caused-by-using-flb_free-instead-of-.patch | 43 ---------- ...-ppc-Fix-signature-for-co_create-API.patch | 38 --------- ...GV-caused-by-using-flb_free-instead-.patch | 82 ------------------- .../fluentbit/fluentbit/builtin-nan.patch | 27 ------ .../cross-build-init-system-detection.patch | 38 --------- .../fluentbit/fluentbit/jemalloc.patch | 16 ---- .../fluentbit/fluentbit_1.3.5.bb | 69 ---------------- .../fluentbit/fluentbit_1.9.3.bb | 56 +++++++++++++ 9 files changed, 56 insertions(+), 341 deletions(-) delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0001-Control-sytemd-unit-install-location-with-SYSTEM_DIR.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0001-bin-fix-SIGSEGV-caused-by-using-flb_free-instead-of-.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0002-parser-Fix-SIGSEGV-caused-by-using-flb_free-instead-.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch delete mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb create mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit_1.9.3.bb
meta-oe/recipes-extended/fluentbit/fluentbit/0001-Control-sytemd-unit-install-location-with-SYSTEM_DIR.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From 5571f949fa2048b79c197b5b10a11ecb1891cbe9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -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 <[email protected]> ---- - 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")
meta-oe/recipes-extended/fluentbit/fluentbit/0001-bin-fix-SIGSEGV-caused-by-using-flb_free-instead-of-.patch deleted +0 -43
43 lines not on this page · raw message
meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From be4032079c931704f52e29f5da5c01cde24ac842 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Thu, 16 Jan 2020 10:44:58 -0800 -Subject: [PATCH] ppc: Fix signature for co_create API - -Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/1886] -Signed-off-by: Khem Raj <[email protected]> ---- - lib/flb_libco/ppc.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/lib/flb_libco/ppc.c b/lib/flb_libco/ppc.c -index e6536d56..533256b3 100644 ---- a/lib/flb_libco/ppc.c -+++ b/lib/flb_libco/ppc.c -@@ -279,7 +279,9 @@ static uint32_t* co_create_(unsigned size, uintptr_t entry) { - return t; - } - --cothread_t co_create(unsigned int size, void (*entry_)(void)) { -+cothread_t co_create(unsigned int size, void (*entry_)(void), -+ size_t *out_size) { -+ - uintptr_t entry = (uintptr_t)entry_; - uint32_t* t = 0; - -@@ -325,7 +327,7 @@ cothread_t co_create(unsigned int size, void (*entry_)(void)) { - t[10] = (uint32_t)(sp >> shift >> shift); - t[11] = (uint32_t)sp; - } -- -+ *out_size = size; - return t; - } - --- -2.25.0 -
meta-oe/recipes-extended/fluentbit/fluentbit/0002-parser-Fix-SIGSEGV-caused-by-using-flb_free-instead-.patch deleted +0 -82
82 lines not on this page · raw message
meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch deleted +0 -27
@@ -1,27 +0,0 @@ -help complier to use intrinsics, clang in few cases e.g. aarch64 can not -and then requires linking with libm, its the only function needed from libm then -its good to avoid needing it. - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> - ---- a/include/fluent-bit/stream_processor/flb_sp_timeseries.h -+++ b/include/fluent-bit/stream_processor/flb_sp_timeseries.h -@@ -207,7 +207,7 @@ void cb_forecast_calc(struct timeseries - result = b0 + b1 * (val->f64 + *forecast->latest_x); - break; - default: -- result = nan(""); -+ result = __builtin_nan(""); - break; - } - -@@ -283,7 +283,7 @@ void cb_forecast_r_calc(struct timeserie - result = ((val->i64 - b0) / b1) - *forecast->latest_x; - break; - default: -- result = nan(""); -+ result = __builtin_nan(""); - break; - } -
meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch deleted +0 -38
@@ -1,38 +0,0 @@ -Define CMake variables to indicate init system for target -incase of cross compile, detecting systemd support based on -host directory structure is not right thing to do - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> - ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -317,7 +317,7 @@ if(FLB_BINARY) - install(TARGETS fluent-bit-bin RUNTIME DESTINATION ${FLB_INSTALL_BINDIR}) - - # Detect init system, install upstart, systemd or init.d script -- if(IS_DIRECTORY /lib/systemd/system) -+ if(FLB_SYSTEMD) - set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") - configure_file( - "${PROJECT_SOURCE_DIR}/init/systemd.in" -@@ -325,7 +325,7 @@ if(FLB_BINARY) - ) - install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION /lib/systemd/system) - install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR}) -- elseif(IS_DIRECTORY /usr/share/upstart) -+ elseif(FLB_UPSTART) - set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") - configure_file( - "${PROJECT_SOURCE_DIR}/init/upstart.in" ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -70,6 +70,8 @@ option(FLB_RECORD_ACCESSOR "Enable re - option(FLB_SYSTEM_STRPTIME "Use strptime in system libc" Yes) - option(FLB_STATIC_CONF "Build binary using static configuration") - option(FLB_STREAM_PROCESSOR "Enable Stream Processor" Yes) -+option(FLB_SYSTEMD "Enable systemd init system" No) -+option(FLB_UPSTART "Enable upstart init system" No) - option(FLB_CORO_STACK_SIZE "Set coroutine stack size") - - # Metrics: Experimental Feature, disabled by default on 0.12 series
meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch deleted +0 -16
@@ -1,16 +0,0 @@ -Add --with-jemalloc-prefix=je_ so it compiles on musl - -Signed-off-by: Khem Raj <[email protected]> -Upstream-Status: Pending - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -523,7 +523,7 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} - # Link to Jemalloc as an external dependency - ExternalProject_Add(jemalloc - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1 -- CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> -+ CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-jemalloc-prefix=je_ --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> - CFLAGS=-std=gnu99\ -Wall\ -pipe\ -g3\ -O3\ -funroll-loops - BUILD_COMMAND $(MAKE) - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/
meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb deleted +0 -69
69 lines not on this page · raw message
meta-oe/recipes-extended/fluentbit/fluentbit_1.9.3.bb new file +56 -0
57 lines not on this page · raw message
Signature · 1 line
2.34.0.windows.1
Please note that the previous patch files have been removed for now. It was not clear which all are still relevant and not obsolete in the latest version. Kindly reply to this message if any of the removed patches are identified as must haves, I'll be happy to backport them.
Ideally, any additional patches should be upstreamed to fluentbit project and upgrade the version here so that we can maintain the closest to fluentbit project and avoid double maintenance.
Thanks,
Lekshmi
Quoted 3 lines · Lekshmi Ravindran
Please note that the previous patch files have been removed for now. It was not clear which all are still relevant and not obsolete in the latest version. Kindly reply to this message if any of the removed patches are identified as must haves, I'll be happy to backport them.
We have many combinations that get tested e.g. with systemd w/o systemd, with usrmerge in DISTRO_FEATURE and without, building with clang or gcc, using musl or glibc and finally
many target architectures. While I agree we should be using latest version and perhaps dropping patches which are no longer needed but I think dropping all of them might be a bit too much
so it would be good to state what combinations have been tested with this and perhaps we should limit the recipe to just that combination for now.
Quoted 2 lines
Ideally, any additional patches should be upstreamed to fluentbit project and upgrade the version here so that we can maintain the closest to fluentbit project and avoid double maintenance.
yes we need help in upstreaming the patches as well.
Quoted 11 lines
Thanks,
Lekshmi-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#97043): https://lists.openembedded.org/g/openembedded-devel/message/97043
Mute This Topic: https://lists.openembedded.org/mt/91039194/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-