Skip to contentSkip to conversation

package/fluent-bit: bump to 4.0.2

PATCH In review Thomas Devoogdt 2 participants 3 messages May 16, 2025 Zstd

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/fluent-bit: bump to 4.0.2

News:
- https://fluentbit.io/announcements/v4.0.1/
- https://fluentbit.io/announcements/v4.0.2/

Other remarks:
- Drop the FLB_UNICODE_ENCODER option, as it is no longer needed. [1]

- Added support for FLB_OUT_PGSQL.

- Compile against the buildroot provided zstd package. [2]

- Dropped some patches as they are obsolete. (We use the buildroot packages for them.)
- 0003-lib-nghttp2-CMakeLists.txt-do-not-require-a-CXX-comp.patch
- 0004-lib-luajit-cmake-CMakeLists.txt-do-not-require-a-CXX.patch
- 0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch

- Synced the other patches with their upstream equivalent.

[1] https://github.com/fluent/fluent-bit/commit/92de130cead75f66bd565496947263168d2d5c37
[2] https://github.com/fluent/fluent-bit/commit/5f409f55ec667b525716be4afd54b5485c9d55c1

---
 ...kafka-fix-cmake-cross-compile-error.patch} |  5 +-
 ...able-cxx-support-for-librdkafka-7741.patch | 27 ------
 ...ibrdkafka-only-require-a-C-compiler.patch} | 60 ++++++------
 ...lib-miniz-only-require-a-C-compiler.patch} | 12 ++-
 ...eLists.txt-do-not-require-a-CXX-comp.patch | 91 -------------------
 ...-CMakeLists.txt-do-not-require-a-CXX.patch | 37 --------
 ...able-CXX-support-if-tests-are-requir.patch | 34 -------
 package/fluent-bit/Config.in                  |  1 +
 package/fluent-bit/fluent-bit.hash            |  2 +-
 package/fluent-bit/fluent-bit.mk              | 20 ++--
 10 files changed, 54 insertions(+), 235 deletions(-)
 rename package/fluent-bit/{0005-plugins-in-out-_kafka-CMakeLists.txt-fix-cross-compi.patch => 0001-plugins-kafka-fix-cmake-cross-compile-error.patch} (92%)
 delete mode 100644 package/fluent-bit/0002-build-disable-cxx-support-for-librdkafka-7741.patch
 rename package/fluent-bit/{0001-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch => 0002-lib-librdkafka-only-require-a-C-compiler.patch} (72%)
 rename package/fluent-bit/{0007-lib-miniz-only-require-a-C-compiler.patch => 0003-lib-miniz-only-require-a-C-compiler.patch} (57%)
 delete mode 100644 package/fluent-bit/0003-lib-nghttp2-CMakeLists.txt-do-not-require-a-CXX-comp.patch
 delete mode 100644 package/fluent-bit/0004-lib-luajit-cmake-CMakeLists.txt-do-not-require-a-CXX.patch
 delete mode 100644 package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch
package/fluent-bit/0001-plugins-kafka-fix-cmake-cross-compile-error.patch renamed from package/fluent-bit/0005-plugins-in-out-_kafka-CMakeLists.txt-fix-cross-compi.patch +2 -3
similarity index 92%
rename from package/fluent-bit/0005-plugins-in-out-_kafka-CMakeLists.txt-fix-cross-compi.patch
rename to package/fluent-bit/0001-plugins-kafka-fix-cmake-cross-compile-error.patch
index 787129eb4c..de5dc54e75 100644
@@ -1,8 +1,7 @@
-From 845076d4e8b480da41f80efafd97c199adbb831e Mon Sep 17 00:00:00 2001
+From f32c4e909ec4a4872c2c5fc186f27d1f7e4e8c2a Mon Sep 17 00:00:00 2001
 From: Thomas Devoogdt <[email protected]>
 Date: Sat, 16 Nov 2024 19:46:28 +0100
-Subject: [PATCH] plugins/{in,out}_kafka/CMakeLists.txt: fix cross compile
- error
+Subject: [PATCH] plugins: kafka: fix cmake cross compile error
 
 KAFKA_INCLUDEDIR is not set if FLB_PREFER_SYSTEM_LIB_KAFKA is not used,
 when cross-compiling, it just translates to -I/librdkafka, which is not allowed.
package/fluent-bit/0002-build-disable-cxx-support-for-librdkafka-7741.patch deleted +0 -27
deleted file mode 100644
index afba3d58eb..0000000000
@@ -1,27 +0,0 @@
-From 16dadccb7e718edc27797fa47e251547264c4285 Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <[email protected]>
-Date: Tue, 25 Jul 2023 10:00:36 +0200
-Subject: [PATCH] build: disable cxx support for librdkafka #7741
-
-Fluent-bit is c only, so no need to compile cxx.
-This fixes also a compile error in buildroot.
-
-Upstream: https://github.com/fluent/fluent-bit/pull/9277
-Signed-off-by: Thomas Devoogdt <[email protected]>
----
- cmake/kafka.cmake | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/cmake/kafka.cmake b/cmake/kafka.cmake
-index 3a0ebfed2..af0e2f460 100644
---- a/cmake/kafka.cmake
-+++ b/cmake/kafka.cmake
-@@ -1,4 +1,5 @@
- # kafka cmake
-+FLB_OPTION(RDKAFKA_BUILD_CXX      Off)
- FLB_OPTION(RDKAFKA_BUILD_STATIC    On)
- FLB_OPTION(RDKAFKA_BUILD_EXAMPLES Off)
- FLB_OPTION(RDKAFKA_BUILD_TESTS    Off)
--- 
-2.43.0
-
package/fluent-bit/0002-lib-librdkafka-only-require-a-C-compiler.patch renamed from package/fluent-bit/0001-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch +30 -30

138 lines not on this page · raw message

package/fluent-bit/0003-lib-miniz-only-require-a-C-compiler.patch renamed from package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch +8 -4
similarity index 57%
rename from package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch
rename to package/fluent-bit/0003-lib-miniz-only-require-a-C-compiler.patch
index bfd32d6b68..29c2d9e220 100644
@@ -1,16 +1,20 @@
-From 3732cea4bb3dd9b79732da7bfbf60258bc418195 Mon Sep 17 00:00:00 2001
+From abb3b388aaf7ea72ea1fcad77ead52f15a0cf543 Mon Sep 17 00:00:00 2001
 From: Thomas Devoogdt <[email protected]>
-Date: Tue, 1 Apr 2025 23:01:13 +0200
+Date: Tue, 1 Apr 2025 22:56:00 +0200
 Subject: [PATCH] lib: miniz: only require a C compiler
 
-Upstream: https://github.com/richgel999/miniz/pull/338
+Commit https://github.com/richgel999/miniz/commit/05ab4dc05c9d1e1f951f5849b659e2c7e291a620
+"Add some catch2 tests" dropped that C flag, but should instead only have added a simple
+enable_language call for the tests only.
+
+Upstream: https://github.com/richgel999/miniz/commit/383e551cccf41fc2ce1177712d6a37a85d936642
 Signed-off-by: Thomas Devoogdt <[email protected]>
 ---
  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
+index 859133ad0..f3d80f80a 100644
 --- a/lib/miniz/CMakeLists.txt
 +++ b/lib/miniz/CMakeLists.txt
 @@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
package/fluent-bit/0003-lib-nghttp2-CMakeLists.txt-do-not-require-a-CXX-comp.patch deleted +0 -91

91 lines not on this page · raw message

package/fluent-bit/0004-lib-luajit-cmake-CMakeLists.txt-do-not-require-a-CXX.patch deleted +0 -37
deleted file mode 100644
index 39d235f3d4..0000000000
@@ -1,37 +0,0 @@
-From eee42b2b0998555b035bdd71b1a815db16c0449f Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <[email protected]>
-Date: Sun, 25 Aug 2024 20:10:27 +0200
-Subject: [PATCH] lib: luajit-cmake: CMakeLists.txt: do not require a CXX
- compiler
-
-Upstream: https://github.com/fluent/fluent-bit/pull/9277
-Signed-off-by: Thomas Devoogdt <[email protected]>
----
- lib/luajit-cmake/CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/luajit-cmake/CMakeLists.txt b/lib/luajit-cmake/CMakeLists.txt
-index 7baf878c7..051a800f5 100644
---- a/lib/luajit-cmake/CMakeLists.txt
-+++ b/lib/luajit-cmake/CMakeLists.txt
-@@ -13,7 +13,7 @@ endif()
- 
- get_directory_property(hasParent PARENT_DIRECTORY)
- if(LUAJIT_DIR)
--  project(luajit)
-+  project(luajit LANGUAGES C)
-   include(LuaJIT.cmake)
-   if (hasParent)
-     set(LUA_TARGET $<TARGET_FILE:luajit> PARENT_SCOPE)
-@@ -24,7 +24,7 @@ if(LUAJIT_DIR)
-     endif()
-   endif()
- elseif(LUA_DIR)
--  project(lua)
-+  project(lua LANGUAGES C)
-   include(lua.cmake)
-   if (hasParent)
-     set(LUA_TARGET $<TARGET_FILE:lua> PARENT_SCOPE)
--- 
-2.43.0
-
package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch deleted +0 -34
deleted file mode 100644
index f7b282165c..0000000000
@@ -1,34 +0,0 @@
-From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <[email protected]>
-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 <[email protected]>
----
- 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
-
package/fluent-bit/Config.in +1 -0
index 420e40c9c4..71488afd73 100644
@@ -10,6 +10,7 @@ config BR2_PACKAGE_FLUENT_BIT
 	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
 	select BR2_PACKAGE_LIBOPENSSL_ENGINES # needed by bundled librdkafka
 	select BR2_PACKAGE_LIBYAML
+	select BR2_PACKAGE_ZSTD
 	help
 	  Fast and Lightweight Logs and Metrics processor.
 
package/fluent-bit/fluent-bit.hash +1 -1
index e4394f69d1..37943c6a4f 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  ef9a479c8cc12e01de6682e0cfd21a0a5d335a0ab9be14bbca37211fbf428cad  fluent-bit-4.0.0.tar.gz
+sha256  aa0577ba7251081c8d5398b2a905b5b0585bb657ca13b39a5e12931437516f08  fluent-bit-4.0.2.tar.gz
 sha256  0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594  LICENSE
package/fluent-bit/fluent-bit.mk +12 -8
index 915ec692b3..23b899e1dd 100644
@@ -4,13 +4,14 @@
 #
 ################################################################################
 
-FLUENT_BIT_VERSION = 4.0.0
+FLUENT_BIT_VERSION = 4.0.2
 FLUENT_BIT_SITE = $(call github,fluent,fluent-bit,v$(FLUENT_BIT_VERSION))
 FLUENT_BIT_LICENSE = Apache-2.0
 FLUENT_BIT_LICENSE_FILES = LICENSE
 FLUENT_BIT_CPE_ID_VENDOR = treasuredata
 FLUENT_BIT_CPE_ID_PRODUCT = fluent_bit
-FLUENT_BIT_DEPENDENCIES = c-ares host-bison host-flex libyaml nghttp2 openssl
+FLUENT_BIT_DEPENDENCIES = c-ares host-bison host-flex libyaml nghttp2 openssl \
+	zstd
 
 FLUENT_BIT_CMAKE_BACKEND = ninja
 
@@ -21,12 +22,8 @@ FLUENT_BIT_CONF_OPTS += \
 	-DFLB_EXAMPLES=No \
 	-DFLB_CHUNK_TRACE=No \
 	-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
+	-DFLB_PREFER_SYSTEM_LIB_NGHTTP2=Yes \
+	-DFLB_PREFER_SYSTEM_LIB_ZSTD=Yes
 
 ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
 FLUENT_BIT_WAMR_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH))
@@ -68,6 +65,13 @@ else
 FLUENT_BIT_CONF_OPTS += -DFLB_LUAJIT=No
 endif
 
+ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
+FLUENT_BIT_CONF_OPTS += -DFLB_OUT_PGSQL=Yes
+FLUENT_BIT_DEPENDENCIES += postgresql
+else
+FLUENT_BIT_CONF_OPTS += -DFLB_OUT_PGSQL=No
+endif
+
 # Force bundled miniz to be linked statically.
 # https://github.com/fluent/fluent-bit/issues/6711
 FLUENT_BIT_CONF_OPTS += \
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 18 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Devoogdt <[email protected]> writes:

News:
- https://fluentbit.io/announcements/v4.0.1/
- https://fluentbit.io/announcements/v4.0.2/

Other remarks:
- Drop the FLB_UNICODE_ENCODER option, as it is no longer needed. [1]

- Added support for FLB_OUT_PGSQL.

- Compile against the buildroot provided zstd package. [2]

- Dropped some patches as they are obsolete. (We use the buildroot packages for them.)
- 0003-lib-nghttp2-CMakeLists.txt-do-not-require-a-CXX-comp.patch
- 0004-lib-luajit-cmake-CMakeLists.txt-do-not-require-a-CXX.patch
- 0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch

Quoted 6 lines

- Synced the other patches with their upstream equivalent.

[1] https://github.com/fluent/fluent-bit/commit/92de130cead75f66bd565496947263168d2d5c37
[2] https://github.com/fluent/fluent-bit/commit/5f409f55ec667b525716be4afd54b5485c9d55c1

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Peter,

Thanks for applying the patch.

I should have mentioned it a bit more clearly, but
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
is needed to fix compilation on toolchains without C++ support. What do you think about that patch?

Kind regards,

Thomas Devoogdt

Op vr 16 mei 2025 om 09:59 schreef Peter Korsgaard <[email protected]>:

Quoted 24 lines
Quoted 23 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Thomas" == Thomas Devoogdt <[email protected]> writes:

News:
- https://fluentbit.io/announcements/v4.0.1/
- https://fluentbit.io/announcements/v4.0.2/

Other remarks:
- Drop the FLB_UNICODE_ENCODER option, as it is no longer needed. [1]

- Added support for FLB_OUT_PGSQL.

- Compile against the buildroot provided zstd package. [2]

- Dropped some patches as they are obsolete. (We use the buildroot packages for them.)
- 0003-lib-nghttp2-CMakeLists.txt-do-not-require-a-CXX-comp.patch
- 0004-lib-luajit-cmake-CMakeLists.txt-do-not-require-a-CXX.patch
- 0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch

- Synced the other patches with their upstream equivalent.

[1] https://github.com/fluent/fluent-bit/commit/92de130cead75f66bd565496947263168d2d5c37
[2] https://github.com/fluent/fluent-bit/commit/5f409f55ec667b525716be4afd54b5485c9d55c1

Quoted 7 lines
Quoted 1 line

Committed, thanks.

--
Bye, Peter Korsgaard

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot