diff options
| author | Niko Mauno <niko.mauno@vaisala.com> | 2024-10-10 08:46:24 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-10-10 12:53:50 -0700 |
| commit | 1e0a0a6d5dfa06411c186529976eff3df15dd9bd (patch) | |
| tree | c81dafdedc6528a8d2c378bdd0c7da6ebc1013a4 | |
| parent | 27d756a030cb6d9b002c856aaedd5ac3d20f0740 (diff) | |
| download | meta-openembedded-1e0a0a6d5dfa06411c186529976eff3df15dd9bd.tar.gz | |
fluentbit: Upgrade recipe to 3.1.9
According to https://fluentbit.io/announcements/older-versions/
Security Policy: support for current series ends three months after a new series is released.
Fluent Bit v1.9 Series has beel EOL since Dec 5, 2022, so upgrade the
recipe to currently supported / newest available version.
Relevant changelogs since previous 1.9.9 version of the component
- https://fluentbit.io/announcements/v2.0.0/
- https://fluentbit.io/announcements/v2.1.0/
- https://fluentbit.io/announcements/v2.2.0/
- https://fluentbit.io/announcements/v3.0.0/
- https://fluentbit.io/announcements/v3.1.0/
- https://fluentbit.io/announcements/v3.1.1/
- https://fluentbit.io/announcements/v3.1.2/
- https://fluentbit.io/announcements/v3.1.3/
- https://fluentbit.io/announcements/v3.1.4/
- https://fluentbit.io/announcements/v3.1.5/
- https://fluentbit.io/announcements/v3.1.6/
- https://fluentbit.io/announcements/v3.1.7/
- https://fluentbit.io/announcements/v3.1.8/
- https://fluentbit.io/announcements/v3.1.9/
Associated added PACKAGECONFIG knobs are described for the most part in
https://github.com/fluent/fluent-bit/blob/v3.1.9/CMakeLists.txt#L107-L167
The PACKAGECONFIG knobs are named according to the constant names used
in upstream source code. Please note that here the 'yaml' PACKAGECONFIG
option has changed to 'config-yaml', and instead of 'kafka' there is
now 'out-kafka'.
As a related side note, the plugin options are now defined in
https://github.com/fluent/fluent-bit/blob/v3.1.9/cmake/plugins_options.cmake
I have tested this change briefly against "qemuarm64" and "qemuppc"
machines that the fluent-bit systemd service starts successfully in
current master based core-image-minimal, and against "qemuarm" machine
using yoe/meta-clang based core-image-minimal. Also tested using an
i.MX6 board that the new Fluent Bit version seems to work as well as
it did with the old 1.9.9 version with respect to logging in a Yocto
Scarthgap based image.
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
18 files changed, 298 insertions, 554 deletions
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index 6dbe194cd2..78239b1ea7 100644 --- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | |||
| @@ -333,6 +333,7 @@ RDEPENDS:packagegroup-meta-oe-extended = "\ | |||
| 333 | dumb-init \ | 333 | dumb-init \ |
| 334 | enscript \ | 334 | enscript \ |
| 335 | figlet \ | 335 | figlet \ |
| 336 | fluentbit \ | ||
| 336 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gnuplot", "", d)} \ | 337 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gnuplot", "", d)} \ |
| 337 | haveged \ | 338 | haveged \ |
| 338 | hexedit \ | 339 | hexedit \ |
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch deleted file mode 100644 index 0cabed9633..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | From 6a704ab7bf69cd5d6970b3a7d3ae7798b26027c1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paulo Neves <ptsneves@gmail.com> | ||
| 3 | Date: Thu, 28 Jul 2022 11:28:41 +0200 | ||
| 4 | Subject: [PATCH] CMakeLists.txt Do not use private makefile $< target | ||
| 5 | |||
| 6 | $< is a private detail from the Makefile generated by CMakefile and | ||
| 7 | are not under control or to be used at the CMakeLists level. In 3.20 | ||
| 8 | that private generation changed pre-requisite targets[1] and now logs | ||
| 9 | contain the path compiler_depend.ts instead of the actual file. | ||
| 10 | |||
| 11 | Upstream-Status: Pending [https://github.com/fluent/fluent-bit/issues/5492] | ||
| 12 | --- | ||
| 13 | CMakeLists.txt | 6 +----- | ||
| 14 | lib/chunkio/CMakeLists.txt | 7 +------ | ||
| 15 | lib/cmetrics/CMakeLists.txt | 7 +------ | ||
| 16 | 3 files changed, 3 insertions(+), 17 deletions(-) | ||
| 17 | |||
| 18 | --- a/CMakeLists.txt | ||
| 19 | +++ b/CMakeLists.txt | ||
| 20 | @@ -46,11 +46,7 @@ else() | ||
| 21 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
| 22 | endif() | ||
| 23 | |||
| 24 | -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| 25 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") | ||
| 26 | -else() | ||
| 27 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 28 | -endif() | ||
| 29 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 30 | |||
| 31 | if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l") | ||
| 32 | set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -latomic") | ||
| 33 | --- a/lib/chunkio/CMakeLists.txt | ||
| 34 | +++ b/lib/chunkio/CMakeLists.txt | ||
| 35 | @@ -14,12 +14,7 @@ else() | ||
| 36 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall ") | ||
| 37 | endif() | ||
| 38 | |||
| 39 | -# Set __FILENAME__ | ||
| 40 | -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| 41 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") | ||
| 42 | -else() | ||
| 43 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 44 | -endif() | ||
| 45 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 46 | |||
| 47 | include(cmake/macros.cmake) | ||
| 48 | |||
| 49 | --- a/lib/cmetrics/CMakeLists.txt | ||
| 50 | +++ b/lib/cmetrics/CMakeLists.txt | ||
| 51 | @@ -34,12 +34,7 @@ set(CMT_VERSION_MINOR 3) | ||
| 52 | set(CMT_VERSION_PATCH 7) | ||
| 53 | set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}") | ||
| 54 | |||
| 55 | -# Define __CMT_FILENAME__ consistently across Operating Systems | ||
| 56 | -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| 57 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") | ||
| 58 | -else() | ||
| 59 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") | ||
| 60 | -endif() | ||
| 61 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") | ||
| 62 | |||
| 63 | # Configuration options | ||
| 64 | option(CMT_DEV "Enable development mode" No) | ||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch deleted file mode 100644 index 8d89e4df35..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From f645128082117a0152a95b3dccd869a184b7513f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 10 Aug 2022 01:23:48 -0700 | ||
| 4 | Subject: [PATCH 1/2] Use posix strerror_r with musl | ||
| 5 | |||
| 6 | Default with glibc is GNU extention of strerror_r | ||
| 7 | where as musl uses posix variant, call that out | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [Need wider porting beyond linux/musl/glibc] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | src/flb_network.c | 5 +++++ | ||
| 13 | 1 file changed, 5 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/src/flb_network.c b/src/flb_network.c | ||
| 16 | index 992eb1d..5d7a337 100644 | ||
| 17 | --- a/src/flb_network.c | ||
| 18 | +++ b/src/flb_network.c | ||
| 19 | @@ -506,7 +506,12 @@ static int net_connect_async(int fd, | ||
| 20 | } | ||
| 21 | |||
| 22 | /* Connection is broken, not much to do here */ | ||
| 23 | +#ifdef __GLIBC__ | ||
| 24 | str = strerror_r(error, so_error_buf, sizeof(so_error_buf)); | ||
| 25 | +#else | ||
| 26 | + strerror_r(error, so_error_buf, sizeof(so_error_buf)); | ||
| 27 | + str = so_error_buf; | ||
| 28 | +#endif | ||
| 29 | flb_error("[net] TCP connection failed: %s:%i (%s)", | ||
| 30 | u->tcp_host, u->tcp_port, str); | ||
| 31 | return -1; | ||
| 32 | -- | ||
| 33 | 2.37.1 | ||
| 34 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch new file mode 100644 index 0000000000..233e8c4e31 --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | From 940a4e270bb8879a78c0eac4daf997cb77e25b4b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Niko Mauno <niko.mauno@vaisala.com> | ||
| 3 | Date: Sun, 29 Sep 2024 12:00:00 +0000 | ||
| 4 | Subject: [PATCH] lib: Do not use private makefile targets in CMakelists.txt | ||
| 5 | |||
| 6 | By extending the scope of changes introduced in commit | ||
| 7 | fc325524d50fe179b76f127243ab9e03ddbdaaa4 | ||
| 8 | ("build: CMakeLists.txt Do not use private makefile targets (#5819)") | ||
| 9 | we mitigate the following error produced by BitBake in Yocto | ||
| 10 | |||
| 11 | ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths] | ||
| 12 | ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task. | ||
| 13 | |||
| 14 | stemming from | ||
| 15 | |||
| 16 | $ strings packages-split/fluentbit/usr/bin/fluent-bit | ||
| 17 | ... | ||
| 18 | $(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<)) | ||
| 19 | ... | ||
| 20 | |||
| 21 | Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> | ||
| 22 | |||
| 23 | Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/9450] | ||
| 24 | --- | ||
| 25 | lib/cfl/CMakeLists.txt | 8 ++------ | ||
| 26 | lib/cmetrics/CMakeLists.txt | 8 ++------ | ||
| 27 | lib/ctraces/CMakeLists.txt | 8 ++------ | ||
| 28 | lib/monkey/CMakeLists.txt | 4 ---- | ||
| 29 | 4 files changed, 6 insertions(+), 22 deletions(-) | ||
| 30 | |||
| 31 | diff --git a/lib/cfl/CMakeLists.txt b/lib/cfl/CMakeLists.txt | ||
| 32 | index 2193cb29c..e2a5cba37 100644 | ||
| 33 | --- a/lib/cfl/CMakeLists.txt | ||
| 34 | +++ b/lib/cfl/CMakeLists.txt | ||
| 35 | @@ -40,12 +40,8 @@ if(NOT MSVC) | ||
| 36 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
| 37 | endif() | ||
| 38 | |||
| 39 | -# Define __FILENAME__ consistently across Operating Systems | ||
| 40 | -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| 41 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") | ||
| 42 | -else() | ||
| 43 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 44 | -endif() | ||
| 45 | +# Define __FILENAME__ | ||
| 46 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | diff --git a/lib/cmetrics/CMakeLists.txt b/lib/cmetrics/CMakeLists.txt | ||
| 51 | index 4f2989106..9c40dadf4 100644 | ||
| 52 | --- a/lib/cmetrics/CMakeLists.txt | ||
| 53 | +++ b/lib/cmetrics/CMakeLists.txt | ||
| 54 | @@ -60,12 +60,8 @@ if(NOT MSVC) | ||
| 55 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
| 56 | endif() | ||
| 57 | |||
| 58 | -# Define __CMT_FILENAME__ consistently across Operating Systems | ||
| 59 | -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| 60 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") | ||
| 61 | -else() | ||
| 62 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") | ||
| 63 | -endif() | ||
| 64 | +# Define __CMT_FILENAME__ | ||
| 65 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") | ||
| 66 | |||
| 67 | # Configuration options | ||
| 68 | option(CMT_DEV "Enable development mode" No) | ||
| 69 | diff --git a/lib/ctraces/CMakeLists.txt b/lib/ctraces/CMakeLists.txt | ||
| 70 | index e92834e06..5cebb3b73 100644 | ||
| 71 | --- a/lib/ctraces/CMakeLists.txt | ||
| 72 | +++ b/lib/ctraces/CMakeLists.txt | ||
| 73 | @@ -30,12 +30,8 @@ set(CTR_VERSION_MINOR 5) | ||
| 74 | set(CTR_VERSION_PATCH 6) | ||
| 75 | set(CTR_VERSION_STR "${CTR_VERSION_MAJOR}.${CTR_VERSION_MINOR}.${CTR_VERSION_PATCH}") | ||
| 76 | |||
| 77 | -# Define __FILENAME__ consistently across Operating Systems | ||
| 78 | -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| 79 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") | ||
| 80 | -else() | ||
| 81 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 82 | -endif() | ||
| 83 | +# Define __FILENAME__ | ||
| 84 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 85 | |||
| 86 | # Configuration options | ||
| 87 | option(CTR_DEV "Enable development mode" No) | ||
| 88 | diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt | ||
| 89 | index 95d8cc1e6..8c66887da 100644 | ||
| 90 | --- a/lib/monkey/CMakeLists.txt | ||
| 91 | +++ b/lib/monkey/CMakeLists.txt | ||
| 92 | @@ -15,10 +15,8 @@ include(GNUInstallDirs) | ||
| 93 | # Set default compiler options | ||
| 94 | if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
| 95 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra") | ||
| 96 | -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath \$$<))\"'") | ||
| 97 | -else() | ||
| 98 | -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 99 | endif() | ||
| 100 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
| 101 | |||
| 102 | # Monkey Version | ||
| 103 | set(MK_VERSION_MAJOR 1) | ||
| 104 | -- | ||
| 105 | 2.39.2 | ||
| 106 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-monkey-Define-_GNU_SOURCE-for-memmem-API-check.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-monkey-Define-_GNU_SOURCE-for-memmem-API-check.patch deleted file mode 100644 index e70664031b..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-monkey-Define-_GNU_SOURCE-for-memmem-API-check.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | From 0d22024c5defba7007e3e633753790e20209c6f6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Aug 2022 09:59:41 -0700 | ||
| 4 | Subject: [PATCH 1/5] monkey: Define _GNU_SOURCE for memmem API check | ||
| 5 | |||
| 6 | This define is necessary to get this API on glibc based systems | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | lib/monkey/mk_core/CMakeLists.txt | 1 + | ||
| 12 | 1 file changed, 1 insertion(+) | ||
| 13 | |||
| 14 | diff --git a/lib/monkey/mk_core/CMakeLists.txt b/lib/monkey/mk_core/CMakeLists.txt | ||
| 15 | index 0e74f8d..739fff3 100644 | ||
| 16 | --- a/lib/monkey/mk_core/CMakeLists.txt | ||
| 17 | +++ b/lib/monkey/mk_core/CMakeLists.txt | ||
| 18 | @@ -62,6 +62,7 @@ set(src "${src}" | ||
| 19 | ) | ||
| 20 | |||
| 21 | check_c_source_compiles(" | ||
| 22 | + #define _GNU_SOURCE | ||
| 23 | #include <string.h> | ||
| 24 | int main() { | ||
| 25 | char haystack[] = \"1234\"; | ||
| 26 | -- | ||
| 27 | 2.37.1 | ||
| 28 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0002-mbedtls-Remove-unused-variable.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0002-mbedtls-Remove-unused-variable.patch deleted file mode 100644 index d911420df2..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0002-mbedtls-Remove-unused-variable.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From c7b969d1a2a6b61bd179214ee2516b7b6cd55b27 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Aug 2022 11:21:57 -0700 | ||
| 4 | Subject: [PATCH 2/5] mbedtls: Remove unused variable | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | library/bignum.c:1395:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable] | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | lib/mbedtls-2.28.0/library/bignum.c | 4 +--- | ||
| 14 | 1 file changed, 1 insertion(+), 3 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/lib/mbedtls-2.28.0/library/bignum.c b/lib/mbedtls-2.28.0/library/bignum.c | ||
| 17 | index 62e7f76..9c256ae 100644 | ||
| 18 | --- a/lib/mbedtls-2.28.0/library/bignum.c | ||
| 19 | +++ b/lib/mbedtls-2.28.0/library/bignum.c | ||
| 20 | @@ -1392,7 +1392,7 @@ void mpi_mul_hlp( size_t i, | ||
| 21 | mbedtls_mpi_uint *d, | ||
| 22 | mbedtls_mpi_uint b ) | ||
| 23 | { | ||
| 24 | - mbedtls_mpi_uint c = 0, t = 0; | ||
| 25 | + mbedtls_mpi_uint c = 0; | ||
| 26 | |||
| 27 | #if defined(MULADDC_HUIT) | ||
| 28 | for( ; i >= 8; i -= 8 ) | ||
| 29 | @@ -1443,8 +1443,6 @@ void mpi_mul_hlp( size_t i, | ||
| 30 | } | ||
| 31 | #endif /* MULADDC_HUIT */ | ||
| 32 | |||
| 33 | - t++; | ||
| 34 | - | ||
| 35 | while( c != 0 ) | ||
| 36 | { | ||
| 37 | *d += c; c = ( *d < c ); d++; | ||
| 38 | -- | ||
| 39 | 2.37.1 | ||
| 40 | |||
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 new file mode 100644 index 0000000000..36a0092ba8 --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0003-Disable-installing-systemd-service-file.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 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/0003-mbedtls-Disable-documentation-warning-as-error-with-.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0003-mbedtls-Disable-documentation-warning-as-error-with-.patch deleted file mode 100644 index 473ebaf7d4..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0003-mbedtls-Disable-documentation-warning-as-error-with-.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 2d12629f768d2459b1fc8a8ca0c38024d84bc195 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Aug 2022 11:32:12 -0700 | ||
| 4 | Subject: [PATCH 3/5] mbedtls: Disable documentation warning as error with | ||
| 5 | clang | ||
| 6 | |||
| 7 | There are shortcomings with doxygen info which clang-15+ flags, dont | ||
| 8 | treat them as errors | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | Upstream-Status: Pending | ||
| 13 | |||
| 14 | lib/mbedtls-2.28.0/CMakeLists.txt | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/lib/mbedtls-2.28.0/CMakeLists.txt b/lib/mbedtls-2.28.0/CMakeLists.txt | ||
| 18 | index b33c088..c5f886f 100644 | ||
| 19 | --- a/lib/mbedtls-2.28.0/CMakeLists.txt | ||
| 20 | +++ b/lib/mbedtls-2.28.0/CMakeLists.txt | ||
| 21 | @@ -212,7 +212,7 @@ if(CMAKE_COMPILER_IS_GNU) | ||
| 22 | endif(CMAKE_COMPILER_IS_GNU) | ||
| 23 | |||
| 24 | if(CMAKE_COMPILER_IS_CLANG) | ||
| 25 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral") | ||
| 26 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wno-error=documentation") | ||
| 27 | set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") | ||
| 28 | set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3") | ||
| 29 | set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls") | ||
| 30 | -- | ||
| 31 | 2.37.1 | ||
| 32 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0003-mbedtls-Do-not-overwrite-CFLAGS.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0003-mbedtls-Do-not-overwrite-CFLAGS.patch deleted file mode 100644 index 158857ae20..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0003-mbedtls-Do-not-overwrite-CFLAGS.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 8486b912281ae85db0c9fc05bb546f16872e114c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paulo Neves <ptsneves@gmail.com> | ||
| 3 | Date: Thu, 28 Jul 2022 14:37:18 +0200 | ||
| 4 | Subject: [PATCH] mbedtls: Do not overwrite CFLAGS | ||
| 5 | |||
| 6 | bitbake passes CFLAGS that are often in conflict with the ones set | ||
| 7 | in mbedtls' CMakeLists.txt. Such conflicts are the inability to use | ||
| 8 | FORTIFY_SOURCE=2 except in release mode | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [due to fluent-bit having it's own Release flags that also overwrite bitbake ones.] | ||
| 11 | --- | ||
| 12 | lib/mbedtls-2.28.0/CMakeLists.txt | 2 -- | ||
| 13 | 1 file changed, 2 deletions(-) | ||
| 14 | |||
| 15 | --- a/lib/mbedtls-2.28.0/CMakeLists.txt | ||
| 16 | +++ b/lib/mbedtls-2.28.0/CMakeLists.txt | ||
| 17 | @@ -204,8 +204,6 @@ if(CMAKE_COMPILER_IS_GNU) | ||
| 18 | if (GCC_VERSION VERSION_GREATER 7.0 OR GCC_VERSION VERSION_EQUAL 7.0) | ||
| 19 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation") | ||
| 20 | endif() | ||
| 21 | - set(CMAKE_C_FLAGS_RELEASE "-O2") | ||
| 22 | - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") | ||
| 23 | set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") | ||
| 24 | set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3") | ||
| 25 | set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls") | ||
| 26 | @@ -215,8 +213,6 @@ endif(CMAKE_COMPILER_IS_GNU) | ||
| 27 | |||
| 28 | if(CMAKE_COMPILER_IS_CLANG) | ||
| 29 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral") | ||
| 30 | - set(CMAKE_C_FLAGS_RELEASE "-O2") | ||
| 31 | - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") | ||
| 32 | set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") | ||
| 33 | set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3") | ||
| 34 | set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls") | ||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0004-Use-correct-type-to-store-return-from-flb_kv_item_cr.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0004-Use-correct-type-to-store-return-from-flb_kv_item_cr.patch deleted file mode 100644 index bd4276193d..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0004-Use-correct-type-to-store-return-from-flb_kv_item_cr.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From a797b79483940ed4adcaa5fe2c40dd0487c7c2c7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Aug 2022 11:39:08 -0700 | ||
| 4 | Subject: [PATCH 4/5] Use correct type to store return from flb_kv_item_create | ||
| 5 | |||
| 6 | Fix | ||
| 7 | error: incompatible pointer to integer conversion assigning to 'int' from 'struct flb_kv *' | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | plugins/out_stackdriver/stackdriver_conf.c | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/plugins/out_stackdriver/stackdriver_conf.c b/plugins/out_stackdriver/stackdriver_conf.c | ||
| 17 | index a9a8eb0..e4f969e 100644 | ||
| 18 | --- a/plugins/out_stackdriver/stackdriver_conf.c | ||
| 19 | +++ b/plugins/out_stackdriver/stackdriver_conf.c | ||
| 20 | @@ -176,12 +176,12 @@ static int read_credentials_file(const char *cred_file, struct flb_stackdriver * | ||
| 21 | |||
| 22 | static int parse_configuration_labels(struct flb_stackdriver *ctx) | ||
| 23 | { | ||
| 24 | - int ret; | ||
| 25 | char *p; | ||
| 26 | flb_sds_t key; | ||
| 27 | flb_sds_t val; | ||
| 28 | struct mk_list *head; | ||
| 29 | struct flb_slist_entry *entry; | ||
| 30 | + struct flb_kv *ret; | ||
| 31 | msgpack_object_kv *kv = NULL; | ||
| 32 | |||
| 33 | if (ctx->labels) { | ||
| 34 | @@ -216,7 +216,7 @@ static int parse_configuration_labels(struct flb_stackdriver *ctx) | ||
| 35 | flb_sds_destroy(key); | ||
| 36 | flb_sds_destroy(val); | ||
| 37 | |||
| 38 | - if (ret == -1) { | ||
| 39 | + if (!ret) { | ||
| 40 | return -1; | ||
| 41 | } | ||
| 42 | } | ||
| 43 | -- | ||
| 44 | 2.37.1 | ||
| 45 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch deleted file mode 100644 index f6e3dce2f3..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | From 7a792624925d46690c1f07fe4b194b5f4c510db6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paulo Neves <ptsneves@gmail.com> | ||
| 3 | Date: Tue, 2 Aug 2022 09:57:05 +0200 | ||
| 4 | Subject: [PATCH 1/1] build: Make systemd init systemd detection contingent on | ||
| 5 | pkgconfig | ||
| 6 | |||
| 7 | Use pkg-config to get systemd.pc variables and systemdunitdir. Those | ||
| 8 | variable ensure that .service files are installed in the correct paths | ||
| 9 | and only when systemd is detected. | ||
| 10 | |||
| 11 | Upstream-Status: Pending [https://github.com/fluent/fluent-bit/pull/5818] | ||
| 12 | |||
| 13 | --- | ||
| 14 | cmake/FindJournald.cmake | 4 ++++ | ||
| 15 | src/CMakeLists.txt | 4 ++-- | ||
| 16 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/cmake/FindJournald.cmake b/cmake/FindJournald.cmake | ||
| 19 | index f5a3a832b..9e6657a29 100644 | ||
| 20 | --- a/cmake/FindJournald.cmake | ||
| 21 | +++ b/cmake/FindJournald.cmake | ||
| 22 | @@ -5,6 +5,8 @@ | ||
| 23 | # JOURNALD_INCLUDE_DIR - the Journald include directory | ||
| 24 | # JOURNALD_LIBRARIES - Link these to use Journald | ||
| 25 | # JOURNALD_DEFINITIONS - Compiler switches required for using Journald | ||
| 26 | +# SYSTEMD_UNITDIR - The systemd units' directory | ||
| 27 | +# | ||
| 28 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
| 29 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
| 30 | # | ||
| 31 | @@ -16,7 +18,9 @@ | ||
| 32 | # in the FIND_PATH() and FIND_LIBRARY() calls | ||
| 33 | find_package(PkgConfig) | ||
| 34 | pkg_check_modules(PC_JOURNALD QUIET systemd) | ||
| 35 | +pkg_get_variable(PC_SYSTEMD_UNITDIR systemd "systemdsystemunitdir") | ||
| 36 | |||
| 37 | +set(SYSTEMD_UNITDIR ${PC_SYSTEMD_UNITDIR}) | ||
| 38 | set(JOURNALD_FOUND ${PC_JOURNALD_FOUND}) | ||
| 39 | set(JOURNALD_DEFINITIONS ${PC_JOURNALD_CFLAGS_OTHER}) | ||
| 40 | |||
| 41 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
| 42 | index 522bbf9bd..30743d8d6 100644 | ||
| 43 | --- a/src/CMakeLists.txt | ||
| 44 | +++ b/src/CMakeLists.txt | ||
| 45 | @@ -480,13 +480,13 @@ if(FLB_BINARY) | ||
| 46 | endif() | ||
| 47 | |||
| 48 | # Detect init system, install upstart, systemd or init.d script | ||
| 49 | - if(IS_DIRECTORY /lib/systemd/system) | ||
| 50 | + if(DEFINED SYSTEMD_UNITDIR) | ||
| 51 | set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") | ||
| 52 | configure_file( | ||
| 53 | "${PROJECT_SOURCE_DIR}/init/systemd.in" | ||
| 54 | ${FLB_SYSTEMD_SCRIPT} | ||
| 55 | ) | ||
| 56 | - install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION /lib/systemd/system) | ||
| 57 | + install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION ${SYSTEMD_UNITDIR}) | ||
| 58 | install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary) | ||
| 59 | elseif(IS_DIRECTORY /usr/share/upstart) | ||
| 60 | set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") | ||
| 61 | -- | ||
| 62 | 2.25.1 | ||
| 63 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0002-chunkio-Link-with-fts-library-with-musl.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0004-chunkio-Link-with-fts-library-with-musl.patch index bdcc534964..d1c39d89c3 100644 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0002-chunkio-Link-with-fts-library-with-musl.patch +++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0004-chunkio-Link-with-fts-library-with-musl.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 63dbbad5978e5f5b0e7d42614999cb6b4ebcce10 Mon Sep 17 00:00:00 2001 | 1 | From 63dbbad5978e5f5b0e7d42614999cb6b4ebcce10 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 10 Aug 2022 01:27:16 -0700 | 3 | Date: Wed, 10 Aug 2022 01:27:16 -0700 |
| 4 | Subject: [PATCH 2/2] chunkio: Link with fts library with musl | 4 | Subject: [PATCH] chunkio: Link with fts library with musl |
| 5 | 5 | ||
| 6 | Fixes | 6 | Fixes |
| 7 | cio_utils.c:(.text+0x64): undefined reference to `fts_read' | 7 | cio_utils.c:(.text+0x64): undefined reference to `fts_read' |
| @@ -27,4 +27,3 @@ index a4fc2d3..4244eb8 100644 | |||
| 27 | set(src | 27 | set(src |
| 28 | -- | 28 | -- |
| 29 | 2.37.1 | 29 | 2.37.1 |
| 30 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0005-Use-posix-strerror_r-with-musl.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0005-Use-posix-strerror_r-with-musl.patch new file mode 100644 index 0000000000..bcce328037 --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0005-Use-posix-strerror_r-with-musl.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From f645128082117a0152a95b3dccd869a184b7513f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 10 Aug 2022 01:23:48 -0700 | ||
| 4 | Subject: [PATCH] Use posix strerror_r with musl | ||
| 5 | |||
| 6 | Default with glibc is GNU extention of strerror_r | ||
| 7 | where as musl uses posix variant, call that out | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [Need wider porting beyond linux/musl/glibc] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | |||
| 12 | Resolved conflicts while upgrading recipe from v1.9.9 to v3.1.9. | ||
| 13 | |||
| 14 | Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> | ||
| 15 | |||
| 16 | diff --git a/src/flb_network.c b/src/flb_network.c | ||
| 17 | index d183209fd..41e0281b5 100644 | ||
| 18 | --- a/src/flb_network.c | ||
| 19 | +++ b/src/flb_network.c | ||
| 20 | @@ -553,7 +553,7 @@ static int net_connect_async(int fd, | ||
| 21 | /* Connection is broken, not much to do here */ | ||
| 22 | #if ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ | ||
| 23 | (defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0L >= 600L)) && \ | ||
| 24 | - (!defined(_GNU_SOURCE)) | ||
| 25 | + (!defined(_GNU_SOURCE)) || (!defined(__GLIBC__)) | ||
| 26 | ret = strerror_r(error, so_error_buf, sizeof(so_error_buf)); | ||
| 27 | if (ret == 0) { | ||
| 28 | str = so_error_buf; | ||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0005-stackdriver-Fix-return-type-mismatch.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0005-stackdriver-Fix-return-type-mismatch.patch deleted file mode 100644 index f023ab5732..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0005-stackdriver-Fix-return-type-mismatch.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | From 27f0bd5a3339612e03112e6b490900a9fabc3337 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Aug 2022 11:44:25 -0700 | ||
| 4 | Subject: [PATCH 5/5] stackdriver: Fix return type mismatch | ||
| 5 | |||
| 6 | Fix | ||
| 7 | error: incompatible integer to pointer conversion returning 'int' from a function with result type 'flb_sds_t' (aka 'char *') [-Wint-conversion] | ||
| 8 | return -1; | ||
| 9 | ^~ | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | Upstream-Status: Pending | ||
| 14 | |||
| 15 | plugins/out_stackdriver/stackdriver.c | 2 +- | ||
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/plugins/out_stackdriver/stackdriver.c b/plugins/out_stackdriver/stackdriver.c | ||
| 19 | index ae66bf2..e01755c 100644 | ||
| 20 | --- a/plugins/out_stackdriver/stackdriver.c | ||
| 21 | +++ b/plugins/out_stackdriver/stackdriver.c | ||
| 22 | @@ -2033,7 +2033,7 @@ static flb_sds_t stackdriver_format(struct flb_stackdriver *ctx, | ||
| 23 | flb_sds_destroy(operation_producer); | ||
| 24 | msgpack_unpacked_destroy(&result); | ||
| 25 | msgpack_sbuffer_destroy(&mp_sbuf); | ||
| 26 | - return -1; | ||
| 27 | + return NULL; | ||
| 28 | } | ||
| 29 | |||
| 30 | /* Number of parsed labels */ | ||
| 31 | -- | ||
| 32 | 2.37.1 | ||
| 33 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch deleted file mode 100644 index c3f2574d26..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | From f88d9b82e8bd8ae38fba666b5825ffb41769f81a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Aug 2022 12:25:22 -0700 | ||
| 4 | Subject: [PATCH] monkey: Fix TLS detection testcase | ||
| 5 | |||
| 6 | Clang15 errors out on compiling the check and disables TLS | ||
| 7 | |||
| 8 | Fixes errors like | ||
| 9 | |||
| 10 | error: call to undeclared function '__tls_get_addr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] | ||
| 11 | __tls_get_addr(0); | ||
| 12 | ^ | ||
| 13 | |||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | Upstream-Status: Pending | ||
| 17 | |||
| 18 | lib/monkey/CMakeLists.txt | 2 ++ | ||
| 19 | 1 file changed, 2 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt | ||
| 22 | index 15e62e8..96ac2bd 100644 | ||
| 23 | --- a/lib/monkey/CMakeLists.txt | ||
| 24 | +++ b/lib/monkey/CMakeLists.txt | ||
| 25 | @@ -178,6 +178,8 @@ endif() | ||
| 26 | # Use old Pthread TLS | ||
| 27 | if(NOT MK_PTHREAD_TLS) | ||
| 28 | check_c_source_compiles(" | ||
| 29 | + #include <sys/types.h> | ||
| 30 | + extern void *__tls_get_addr(size_t *v); | ||
| 31 | __thread int a; | ||
| 32 | int main() { | ||
| 33 | __tls_get_addr(0); | ||
| 34 | -- | ||
| 35 | 2.37.1 | ||
| 36 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0007-cmake-Do-not-check-for-upstart-on-build-host.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0007-cmake-Do-not-check-for-upstart-on-build-host.patch deleted file mode 100644 index 71bdd34eeb..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0007-cmake-Do-not-check-for-upstart-on-build-host.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | From c41653e856d05ed430d22f8b311714ff756a0e0b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 23 Mar 2023 18:05:27 -0700 | ||
| 4 | Subject: [PATCH] cmake: Do not check for upstart on build host | ||
| 5 | |||
| 6 | Some ubuntu distros might have this directory /usr/share/upstart around | ||
| 7 | and yocto based distros not using systemd will process this piece of | ||
| 8 | code and falsely assume that target supports upstart, which may not be | ||
| 9 | true in case of cross-compilation. | ||
| 10 | |||
| 11 | This also can end up in configure errors e.g. | ||
| 12 | |||
| 13 | | CMake Error at src/CMakeLists.txt:496 (install): | ||
| 14 | | install DIRECTORY given unknown argument "/etc/td-agent-bit/". | ||
| 15 | | | ||
| 16 | | | ||
| 17 | | -- Configuring incomplete, errors occurred! | ||
| 18 | |||
| 19 | Upstream-Status: Inappropriate [ Cross-compile Specific ] | ||
| 20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 21 | --- | ||
| 22 | src/CMakeLists.txt | 8 -------- | ||
| 23 | 1 file changed, 8 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
| 26 | index bb30b2a..c63b6d8 100644 | ||
| 27 | --- a/src/CMakeLists.txt | ||
| 28 | +++ b/src/CMakeLists.txt | ||
| 29 | @@ -486,14 +486,6 @@ if(FLB_BINARY) | ||
| 30 | ) | ||
| 31 | install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION ${SYSTEMD_UNITDIR}) | ||
| 32 | install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary) | ||
| 33 | - elseif(IS_DIRECTORY /usr/share/upstart) | ||
| 34 | - set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") | ||
| 35 | - configure_file( | ||
| 36 | - "${PROJECT_SOURCE_DIR}/init/upstart.in" | ||
| 37 | - ${FLB_UPSTART_SCRIPT} | ||
| 38 | - ) | ||
| 39 | - install(FILES ${FLB_UPSTART_SCRIPT} COMPONENT binary DESTINATION /etc/init) | ||
| 40 | - install(DIRECTORY DESTINATION COMPONENT binary ${FLB_INSTALL_CONFDIR}) | ||
| 41 | else() | ||
| 42 | # FIXME: should we support Sysv init script ? | ||
| 43 | endif() | ||
| 44 | -- | ||
| 45 | 2.40.0 | ||
| 46 | |||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb b/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb deleted file mode 100644 index 660a3a63eb..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb +++ /dev/null | |||
| @@ -1,97 +0,0 @@ | |||
| 1 | SUMMARY = "Fast Log processor and Forwarder" | ||
| 2 | DESCRIPTION = "Fluent Bit is a data collector, processor and \ | ||
| 3 | forwarder for Linux. It supports several input sources and \ | ||
| 4 | backends (destinations) for your data. \ | ||
| 5 | " | ||
| 6 | |||
| 7 | HOMEPAGE = "http://fluentbit.io" | ||
| 8 | BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" | ||
| 9 | |||
| 10 | LICENSE = "Apache-2.0" | ||
| 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" | ||
| 12 | SECTION = "net" | ||
| 13 | |||
| 14 | SRC_URI = "https://releases.fluentbit.io/1.9/source-${PV}.tar.gz;subdir=fluent-bit-${PV};downloadfilename=${BPN}-${PV}.tar.gz \ | ||
| 15 | file://0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch \ | ||
| 16 | file://0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch \ | ||
| 17 | file://0003-mbedtls-Do-not-overwrite-CFLAGS.patch \ | ||
| 18 | file://0004-build-Make-systemd-init-systemd-detection-contingent.patch \ | ||
| 19 | file://0001-monkey-Define-_GNU_SOURCE-for-memmem-API-check.patch \ | ||
| 20 | file://0002-mbedtls-Remove-unused-variable.patch \ | ||
| 21 | file://0003-mbedtls-Disable-documentation-warning-as-error-with-.patch \ | ||
| 22 | file://0004-Use-correct-type-to-store-return-from-flb_kv_item_cr.patch \ | ||
| 23 | file://0005-stackdriver-Fix-return-type-mismatch.patch \ | ||
| 24 | file://0006-monkey-Fix-TLS-detection-testcase.patch \ | ||
| 25 | file://0007-cmake-Do-not-check-for-upstart-on-build-host.patch \ | ||
| 26 | " | ||
| 27 | SRC_URI:remove:x86 = "file://0002-mbedtls-Remove-unused-variable.patch" | ||
| 28 | SRC_URI:append:libc-musl = "\ | ||
| 29 | file://0001-Use-posix-strerror_r-with-musl.patch \ | ||
| 30 | file://0002-chunkio-Link-with-fts-library-with-musl.patch \ | ||
| 31 | " | ||
| 32 | SRC_URI[sha256sum] = "3f6cd4bd1894cda16b465aef6ffec7e920d54c4209b3e2320fcffe7ae345700e" | ||
| 33 | S = "${WORKDIR}/fluent-bit-${PV}" | ||
| 34 | |||
| 35 | DEPENDS = "zlib bison-native flex-native openssl" | ||
| 36 | DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
| 37 | |||
| 38 | PACKAGECONFIG[yaml] = "-DFLB_CONFIG_YAML=On,-DFLB_CONFIG_YAML=Off,libyaml" | ||
| 39 | PACKAGECONFIG[kafka] = "-DFLB_OUT_KAFKA=On,-DFLB_OUT_KAFKA=Off,librdkafka" | ||
| 40 | PACKAGECONFIG[examples] = "-DFLB_EXAMPLES=On,-DFLB_EXAMPLES=Off" | ||
| 41 | PACKAGECONFIG[jemalloc] = "-DFLB_JEMALLOC=On,-DFLB_JEMALLOC=Off,jemalloc" | ||
| 42 | #TODO add more fluentbit options to PACKAGECONFIG[] | ||
| 43 | |||
| 44 | DEPENDS:append:libc-musl = " fts " | ||
| 45 | |||
| 46 | # flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. | ||
| 47 | do_compile:append() { | ||
| 48 | find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' | ||
| 49 | } | ||
| 50 | |||
| 51 | PACKAGECONFIG ?= "yaml" | ||
| 52 | |||
| 53 | LTO = "" | ||
| 54 | |||
| 55 | # Use CMake 'Unix Makefiles' generator | ||
| 56 | OECMAKE_GENERATOR ?= "Unix Makefiles" | ||
| 57 | |||
| 58 | # Fluent Bit build options | ||
| 59 | # ======================== | ||
| 60 | |||
| 61 | # Host related setup | ||
| 62 | EXTRA_OECMAKE += "-DGNU_HOST=${HOST_SYS} -DFLB_TD=1" | ||
| 63 | |||
| 64 | # Disable LuaJIT and filter_lua support | ||
| 65 | EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off " | ||
| 66 | |||
| 67 | # Disable Library and examples | ||
| 68 | EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off" | ||
| 69 | |||
| 70 | # Enable systemd iff systemd is in DISTRO_FEATURES | ||
| 71 | EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES','systemd','-DFLB_SYSTEMD=On','-DFLB_SYSTEMD=Off',d)}" | ||
| 72 | |||
| 73 | # Enable release builds | ||
| 74 | EXTRA_OECMAKE += "-DFLB_RELEASE=On" | ||
| 75 | |||
| 76 | # musl needs these options | ||
| 77 | EXTRA_OECMAKE:append:libc-musl = ' -DFLB_JEMALLOC_OPTIONS="--with-jemalloc-prefix=je_ --with-lg-quantum=3" -DFLB_CORO_STACK_SIZE=24576' | ||
| 78 | |||
| 79 | EXTRA_OECMAKE:append:riscv64 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 80 | EXTRA_OECMAKE:append:riscv32 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 81 | EXTRA_OECMAKE:append:mips = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 82 | EXTRA_OECMAKE:append:powerpc = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 83 | EXTRA_OECMAKE:append:x86 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 84 | |||
| 85 | CFLAGS:append:x86 = " -DMBEDTLS_HAVE_SSE2" | ||
| 86 | |||
| 87 | # Fixes build with GCC-14 | ||
| 88 | CFLAGS += "-Wno-error=incompatible-pointer-types" | ||
| 89 | |||
| 90 | inherit cmake systemd pkgconfig | ||
| 91 | |||
| 92 | SYSTEMD_SERVICE:${PN} = "td-agent-bit.service" | ||
| 93 | |||
| 94 | EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" | ||
| 95 | TARGET_CC_ARCH += " ${SELECTED_OPTIMIZATION}" | ||
| 96 | |||
| 97 | SKIP_RECIPE[fluentbit] ?= "It is not reproducible. QA Issue: File /usr/bin/.debug/td-agent-bit in package fluentbit-dbg contains reference to TMPDIR [buildpaths]" | ||
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb b/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb new file mode 100644 index 0000000000..fc67236d3e --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit_3.1.9.bb | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | SUMMARY = "Fast Log Processor and Forwarder" | ||
| 2 | DESCRIPTION = "Fluent Bit allows to collect log events or metrics from \ | ||
| 3 | different sources, process them and deliver them to different backends \ | ||
| 4 | such as Fluentd, Elasticsearch, Splunk, DataDog, Kafka, New Relic, Azure \ | ||
| 5 | services, AWS services, Google services, NATS, InfluxDB or any custom \ | ||
| 6 | HTTP end-point." | ||
| 7 | HOMEPAGE = "http://fluentbit.io" | ||
| 8 | BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" | ||
| 9 | SECTION = "net" | ||
| 10 | LICENSE = "Apache-2.0" | ||
| 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" | ||
| 12 | DEPENDS = "\ | ||
| 13 | bison-native \ | ||
| 14 | flex-native \ | ||
| 15 | openssl \ | ||
| 16 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | ||
| 17 | " | ||
| 18 | DEPENDS:append:libc-musl = " fts" | ||
| 19 | |||
| 20 | SRCREV = "431fa79ae27edaef8d050a7af6f038f4400193a1" | ||
| 21 | SRC_URI = "\ | ||
| 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 \ | ||
| 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)} \ | ||
| 26 | " | ||
| 27 | SRC_URI:append:libc-musl = "\ | ||
| 28 | file://0004-chunkio-Link-with-fts-library-with-musl.patch \ | ||
| 29 | file://0005-Use-posix-strerror_r-with-musl.patch \ | ||
| 30 | " | ||
| 31 | |||
| 32 | S = "${WORKDIR}/git" | ||
| 33 | |||
| 34 | PACKAGECONFIG ??= "\ | ||
| 35 | aws \ | ||
| 36 | binary \ | ||
| 37 | config-yaml \ | ||
| 38 | custom-calyptia \ | ||
| 39 | http-server \ | ||
| 40 | inotify \ | ||
| 41 | metrics \ | ||
| 42 | parser \ | ||
| 43 | proxy-go \ | ||
| 44 | record-accessor \ | ||
| 45 | regex \ | ||
| 46 | release \ | ||
| 47 | signv4 \ | ||
| 48 | sqldb \ | ||
| 49 | stream-processor \ | ||
| 50 | tls \ | ||
| 51 | utf8-encoder \ | ||
| 52 | " | ||
| 53 | |||
| 54 | PACKAGECONFIG[all] = "-DFLB_ALL=Yes,-DFLB_ALL=No" | ||
| 55 | PACKAGECONFIG[arrow] = "-DFLB_ARROW=Yes,-DFLB_ARROW=No" | ||
| 56 | PACKAGECONFIG[avro-encoder] = "-DFLB_AVRO_ENCODER=Yes,-DFLB_AVRO_ENCODER=No" | ||
| 57 | PACKAGECONFIG[aws-error-reporter] = "-DFLB_AWS_ERROR_REPORTER=Yes,-DFLB_AWS_ERROR_REPORTER=No" | ||
| 58 | PACKAGECONFIG[aws] = "-DFLB_AWS=Yes,-DFLB_AWS=No" | ||
| 59 | PACKAGECONFIG[backtrace] = "-DFLB_BACKTRACE=Yes,-DFLB_BACKTRACE=No" | ||
| 60 | PACKAGECONFIG[binary] = "-DFLB_BINARY=Yes,-DFLB_BINARY=No" | ||
| 61 | PACKAGECONFIG[chunk-trace] = "-DFLB_CHUNK_TRACE=Yes,-DFLB_CHUNK_TRACE=No" | ||
| 62 | PACKAGECONFIG[config-yaml] = "-DFLB_CONFIG_YAML=Yes,-DFLB_CONFIG_YAML=No,libyaml" | ||
| 63 | PACKAGECONFIG[coverage] = "-DFLB_COVERAGE=Yes,-DFLB_COVERAGE=No" | ||
| 64 | PACKAGECONFIG[custom-calyptia] = "-DFLB_CUSTOM_CALYPTIA=Yes,-DFLB_CUSTOM_CALYPTIA=No" | ||
| 65 | PACKAGECONFIG[debug] = "-DFLB_DEBUG=Yes,-DFLB_DEBUG=No" | ||
| 66 | PACKAGECONFIG[enforce-alignment] = "-DFLB_ENFORCE_ALIGNMENT=Yes,-DFLB_ENFORCE_ALIGNMENT=No" | ||
| 67 | PACKAGECONFIG[examples] = "-DFLB_EXAMPLES=Yes,-DFLB_EXAMPLES=No" | ||
| 68 | PACKAGECONFIG[http-client-debug] = "-DFLB_HTTP_CLIENT_DEBUG=Yes,-DFLB_HTTP_CLIENT_DEBUG=No" | ||
| 69 | PACKAGECONFIG[http-server] = "-DFLB_HTTP_SERVER=Yes,-DFLB_HTTP_SERVER=No" | ||
| 70 | PACKAGECONFIG[inotify] = "-DFLB_INOTIFY=Yes,-DFLB_INOTIFY=No" | ||
| 71 | PACKAGECONFIG[jemalloc] = "-DFLB_JEMALLOC=Yes,-DFLB_JEMALLOC=No,jemalloc" | ||
| 72 | PACKAGECONFIG[luajit] = "-DFLB_LUAJIT=Yes,-DFLB_LUAJIT=No" | ||
| 73 | PACKAGECONFIG[metrics] = "-DFLB_METRICS=Yes,-DFLB_METRICS=No" | ||
| 74 | PACKAGECONFIG[mtrace] = "-DFLB_MTRACE=Yes,-DFLB_MTRACE=No" | ||
| 75 | PACKAGECONFIG[parser] = "-DFLB_PARSER=Yes,-DFLB_PARSER=No" | ||
| 76 | PACKAGECONFIG[posix-tls] = "-DFLB_POSIX_TLS=Yes,-DFLB_POSIX_TLS=No" | ||
| 77 | PACKAGECONFIG[proxy-go] = "-DFLB_PROXY_GO=Yes,-DFLB_PROXY_GO=No" | ||
| 78 | PACKAGECONFIG[record-accessor] = "-DFLB_RECORD_ACCESSOR=Yes,-DFLB_RECORD_ACCESSOR=No" | ||
| 79 | PACKAGECONFIG[regex] = "-DFLB_REGEX=Yes,-DFLB_REGEX=No" | ||
| 80 | PACKAGECONFIG[release] = "-DFLB_RELEASE=Yes,-DFLB_RELEASE=No" | ||
| 81 | PACKAGECONFIG[run-ldconfig] = "-DFLB_RUN_LDCONFIG=Yes,-DFLB_RUN_LDCONFIG=No" | ||
| 82 | PACKAGECONFIG[shared-lib] = "-DFLB_SHARED_LIB=Yes,-DFLB_SHARED_LIB=No" | ||
| 83 | PACKAGECONFIG[signv4] = "-DFLB_SIGNV4=Yes,-DFLB_SIGNV4=No" | ||
| 84 | PACKAGECONFIG[small] = "-DFLB_SMALL=Yes,-DFLB_SMALL=No" | ||
| 85 | PACKAGECONFIG[sqldb] = "-DFLB_SQLDB=Yes,-DFLB_SQLDB=No" | ||
| 86 | PACKAGECONFIG[stream-processor] = "-DFLB_STREAM_PROCESSOR=Yes,-DFLB_STREAM_PROCESSOR=No" | ||
| 87 | PACKAGECONFIG[tests-runtime] = "-DFLB_TESTS_RUNTIME=Yes,-DFLB_TESTS_RUNTIME=No" | ||
| 88 | PACKAGECONFIG[tls] = "-DFLB_TLS=Yes,-DFLB_TLS=No" | ||
| 89 | PACKAGECONFIG[trace] = "-DFLB_TRACE=Yes,-DFLB_TRACE=No" | ||
| 90 | PACKAGECONFIG[utf8-encoder] = "-DFLB_UTF8_ENCODER=Yes,-DFLB_UTF8_ENCODER=No" | ||
| 91 | PACKAGECONFIG[valgrind] = "-DFLB_VALGRIND=Yes,-DFLB_VALGRIND=No" | ||
| 92 | PACKAGECONFIG[wamrc] = "-DFLB_WAMRC=Yes,-DFLB_WAMRC=No" | ||
| 93 | PACKAGECONFIG[wasm-stack-protect] = "-DFLB_WASM_STACK_PROTECT=Yes,-DFLB_WASM_STACK_PROTECT=No" | ||
| 94 | PACKAGECONFIG[wasm] = "-DFLB_WASM=Yes,-DFLB_WASM=No" | ||
| 95 | PACKAGECONFIG[windows-defaults] = "-DFLB_WINDOWS_DEFAULTS=Yes,-DFLB_WINDOWS_DEFAULTS=No" | ||
| 96 | |||
| 97 | # Option to disable all Fluent Bit plugins by default. See cmake/plugins_options.cmake which | ||
| 98 | # individual plugins then to enable (e.g. using EXTRA_OECMAKE:append = " -DFLB_FOOBAR=ON") | ||
| 99 | PACKAGECONFIG[minimal] = "-DFLB_MINIMAL=Yes,-DFLB_MINIMAL=No" | ||
| 100 | |||
| 101 | # Without zstd dependency, kafka plugin build fails at link attempt against native libzstd.so | ||
| 102 | PACKAGECONFIG[in-kafka] = "-DFLB_IN_KAFKA=ON,-DFLB_IN_KAFKA=OFF,librdkafka zstd" | ||
| 103 | PACKAGECONFIG[out-kafka] = "-DFLB_OUT_KAFKA=ON,-DFLB_OUT_KAFKA=OFF,librdkafka zstd" | ||
| 104 | |||
| 105 | SYSTEMD_SERVICE:${PN} = "fluent-bit.service" | ||
| 106 | |||
| 107 | inherit cmake systemd pkgconfig | ||
| 108 | |||
| 109 | FULL_OPTIMIZATION:remove = "${@'-O2' if bb.data.inherits_class('clang', d) else ''}" | ||
| 110 | TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION}" | ||
| 111 | TARGET_CC_ARCH:remove = "-D_FORTIFY_SOURCE=2" | ||
| 112 | EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" | ||
| 113 | EXTRA_OECMAKE:append:mips = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 114 | EXTRA_OECMAKE:append:powerpc = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" | ||
| 115 | EXTRA_OECMAKE:append:riscv32 = " -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" | ||
| 118 | |||
| 119 | # flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. | ||
| 120 | do_compile:append() { | ||
| 121 | find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' | ||
| 122 | } | ||
