[Buildroot] [PATCH] package/fluent-bit: bump to 4.0.0
Thomas Devoogdt
thomas at devoogdt.com
Thu Apr 17 19:50:12 UTC 2025
News:
- https://fluentbit.io/announcements/v4.0.0/
FLB_UNICODE_ENCODER was added, and enabled by default in commit [1],
which requires LIBSTDCPP, disable it if BR2_INSTALL_LIBSTDCPP is not set.
Also add two more patches to drop the LIBSTDCPP requirement.
[1] https://github.com/fluent/fluent-bit/commit/3b04755e99fa500e98dcd1318f9b12f6863d31e4
Signed-off-by: Thomas Devoogdt <thomas at devoogdt.com>
---
...able-CXX-support-if-tests-are-requir.patch | 34 +++++++++++++++++++
...-lib-miniz-only-require-a-C-compiler.patch | 27 +++++++++++++++
package/fluent-bit/fluent-bit.hash | 2 +-
package/fluent-bit/fluent-bit.mk | 7 +++-
4 files changed, 68 insertions(+), 2 deletions(-)
create mode 100644 package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch
create mode 100644 package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch
diff --git a/package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch b/package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch
new file mode 100644
index 0000000000..f7b282165c
--- /dev/null
+++ b/package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch
@@ -0,0 +1,34 @@
+From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas at devoogdt.com>
+Date: Tue, 1 Apr 2025 22:43:30 +0200
+Subject: [PATCH] lib: zstd: only enable CXX support if tests are required
+
+Upstream: https://github.com/facebook/zstd/pull/4357/files
+Signed-off-by: Thomas Devoogdt <thomas at devoogdt.com>
+---
+ lib/zstd-1.5.7/build/cmake/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+index 347d41c0f..70e233df3 100644
+--- a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
++++ b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+@@ -37,7 +37,6 @@ project(zstd
+ VERSION "${ZSTD_FULL_VERSION}"
+ LANGUAGES C # Main library is in C
+ ASM # And ASM
+- CXX # Testing contributed code also utilizes CXX
+ )
+
+ message(STATUS "ZSTD VERSION: ${zstd_VERSION}")
+@@ -170,6 +169,7 @@ if (ZSTD_BUILD_PROGRAMS)
+ endif ()
+
+ if (ZSTD_BUILD_TESTS)
++ enable_language(CXX)
+ enable_testing()
+ if (NOT ZSTD_BUILD_STATIC)
+ message(SEND_ERROR "You need to build static library to build tests")
+--
+2.43.0
+
diff --git a/package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch b/package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch
new file mode 100644
index 0000000000..bfd32d6b68
--- /dev/null
+++ b/package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch
@@ -0,0 +1,27 @@
+From 3732cea4bb3dd9b79732da7bfbf60258bc418195 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas at devoogdt.com>
+Date: Tue, 1 Apr 2025 23:01:13 +0200
+Subject: [PATCH] lib: miniz: only require a C compiler
+
+Upstream: https://github.com/richgel999/miniz/pull/338
+Signed-off-by: Thomas Devoogdt <thomas at devoogdt.com>
+---
+ lib/miniz/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/miniz/CMakeLists.txt b/lib/miniz/CMakeLists.txt
+index ce6ade1c0..91012b36a 100644
+--- a/lib/miniz/CMakeLists.txt
++++ b/lib/miniz/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
+ endif()
+
+ if(CMAKE_MINOR_VERSION LESS 12)
+- project(miniz)
++ project(miniz C)
+ # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
+ else()
+ project(miniz C)
+--
+2.43.0
+
diff --git a/package/fluent-bit/fluent-bit.hash b/package/fluent-bit/fluent-bit.hash
index 9abf13698a..e4394f69d1 100644
--- a/package/fluent-bit/fluent-bit.hash
+++ b/package/fluent-bit/fluent-bit.hash
@@ -1,3 +1,3 @@
# Locally computed
-sha256 f86ecbe208ae152841909a063f28ca250b8a6771c5e43dcb1786ef310f927904 fluent-bit-3.2.10.tar.gz
+sha256 ef9a479c8cc12e01de6682e0cfd21a0a5d335a0ab9be14bbca37211fbf428cad fluent-bit-4.0.0.tar.gz
sha256 0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594 LICENSE
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index bd7c82b26b..09233d13c9 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -4,7 +4,7 @@
#
################################################################################
-FLUENT_BIT_VERSION = 3.2.10
+FLUENT_BIT_VERSION = 4.0.0
FLUENT_BIT_SITE = $(call github,fluent,fluent-bit,v$(FLUENT_BIT_VERSION))
FLUENT_BIT_LICENSE = Apache-2.0
FLUENT_BIT_LICENSE_FILES = LICENSE
@@ -23,6 +23,11 @@ FLUENT_BIT_CONF_OPTS += \
-DFLB_PREFER_SYSTEM_LIB_CARES=Yes \
-DFLB_PREFER_SYSTEM_LIB_NGHTTP2=Yes
+ifeq ($(BR2_INSTALL_LIBSTDCPP),)
+FLUENT_BIT_CONF_OPTS += \
+ -DFLB_UNICODE_ENCODER=No
+endif
+
ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
FLUENT_BIT_WAMR_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH))
--
2.43.0
More information about the buildroot
mailing list