Skip to contentSkip to conversation

package/fluent-bit: add new package

PATCH Superseded Thomas Devoogdt 2 participants 3 messages Jan 23, 2023 – Jan 27, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 package/fluent-bit: add new package

Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.

---
 package/Config.in                             |  1 +
 ...ts.txt-Miniz-compile-as-a-static-lib.patch | 36 ++++++++++++
 package/fluent-bit/Config.in                  | 13 +++++
 package/fluent-bit/S99fluent-bit              | 55 +++++++++++++++++++
 package/fluent-bit/fluent-bit.hash            |  3 +
 package/fluent-bit/fluent-bit.mk              | 43 +++++++++++++++
 6 files changed, 151 insertions(+)
 create mode 100644 package/fluent-bit/0001-CMakeLists.txt-Miniz-compile-as-a-static-lib.patch
 create mode 100644 package/fluent-bit/Config.in
 create mode 100644 package/fluent-bit/S99fluent-bit
 create mode 100644 package/fluent-bit/fluent-bit.hash
 create mode 100644 package/fluent-bit/fluent-bit.mk
package/Config.in +1 -0
index 995dae2c57..b281a67157 100644
@@ -2610,6 +2610,7 @@ menu "System tools"
 	source "package/efivar/Config.in"
 	source "package/embiggen-disk/Config.in"
 	source "package/emlog/Config.in"
+	source "package/fluent-bit/Config.in"
 	source "package/ftop/Config.in"
 	source "package/getent/Config.in"
 	source "package/gkrellm/Config.in"
package/fluent-bit/0001-CMakeLists.txt-Miniz-compile-as-a-static-lib.patch new file +36 -0
new file mode 100644
index 0000000000..8594c2a6e6
@@ -0,0 +1,36 @@
+From b82a0d5f4f1d4c8cf6c5da542be999b30456e27c Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Mon, 23 Jan 2023 09:57:17 +0100
+Subject: [PATCH] CMakeLists.txt: Miniz: compile as a static lib
+
+https://github.com/fluent/fluent-bit/issues/6711
+
+Buildroot enforces globally wide that all packages are
+dynamically linked (if BR2_SHARED_LIBS), so that means
+that these options slept through the subdirectories.
+The libminiz.so is not installed by cmake, causing the
+fluent-bit to crash. This patch forces libminiz to be
+compiled statically.
+
+upstream: https://github.com/fluent/fluent-bit/pull/6723
+
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a7adb02de..ac1b9cd75 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -510,6 +510,7 @@ add_definitions(-DMPACK_EXTENSIONS=1)
+ add_subdirectory(${FLB_PATH_LIB_MPACK} EXCLUDE_FROM_ALL)
+ 
+ # Miniz (zip)
++FLB_OPTION(BUILD_SHARED_LIBS OFF)
+ add_subdirectory(${FLB_PATH_LIB_MINIZ} EXCLUDE_FROM_ALL)
+ 
+ # ring buffer library
+-- 
+2.39.0
+
package/fluent-bit/Config.in new file +13 -0
new file mode 100644
index 0000000000..c8f9d4e489
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_FLUENT_BIT
+	bool "fluent-bit"
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBYAML
+	help
+	  Fast and Lightweight Logs and Metrics processor.
+
+	  https://github.com/fluent/fluent-bit
+
+comment "fluent-bit needs a glibc toolchain, dynamic library"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS
package/fluent-bit/S99fluent-bit new file +55 -0

55 lines not on this page · raw message

package/fluent-bit/fluent-bit.hash new file +3 -0
new file mode 100644
index 0000000000..ce7cea7b59
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  8ff5566389033669feabc9c69a5c6f417dad5c8b066454388e6a706507262acf  fluent-bit-2.0.8.tar.gz
+sha256  0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594  LICENSE
package/fluent-bit/fluent-bit.mk new file +43 -0

43 lines not on this page · raw message

Signature · 6 lines
2.39.0

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

PATCH v4 1/1 package/fluent-bit: add new package

Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.

---

Changes v3 -> v4:
- .mk: dropped patch & use BUILD_SHARED_LIBS=OFF
- .mk: added issue links
- .S99fluent-bit: fixed all the ./utils/check-package issues & synced with S01syslogd

 package/Config.in                  |  1 +
 package/fluent-bit/Config.in       | 13 ++++++
 package/fluent-bit/S99fluent-bit   | 72 ++++++++++++++++++++++++++++++
 package/fluent-bit/fluent-bit.hash |  3 ++
 package/fluent-bit/fluent-bit.mk   | 49 ++++++++++++++++++++
 5 files changed, 138 insertions(+)
 create mode 100644 package/fluent-bit/Config.in
 create mode 100644 package/fluent-bit/S99fluent-bit
 create mode 100644 package/fluent-bit/fluent-bit.hash
 create mode 100644 package/fluent-bit/fluent-bit.mk
package/Config.in +1 -0
index 68df6f1478..e18f75bf75 100644
@@ -2531,6 +2531,7 @@ menu "System tools"
 	source "package/efivar/Config.in"
 	source "package/embiggen-disk/Config.in"
 	source "package/emlog/Config.in"
+	source "package/fluent-bit/Config.in"
 	source "package/ftop/Config.in"
 	source "package/getent/Config.in"
 	source "package/gkrellm/Config.in"
package/fluent-bit/Config.in new file +13 -0
new file mode 100644
index 0000000000..c8f9d4e489
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_FLUENT_BIT
+	bool "fluent-bit"
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBYAML
+	help
+	  Fast and Lightweight Logs and Metrics processor.
+
+	  https://github.com/fluent/fluent-bit
+
+comment "fluent-bit needs a glibc toolchain, dynamic library"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS
package/fluent-bit/S99fluent-bit new file +72 -0

72 lines not on this page · raw message

package/fluent-bit/fluent-bit.hash new file +3 -0
new file mode 100644
index 0000000000..ce7cea7b59
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  8ff5566389033669feabc9c69a5c6f417dad5c8b066454388e6a706507262acf  fluent-bit-2.0.8.tar.gz
+sha256  0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594  LICENSE
package/fluent-bit/fluent-bit.mk new file +49 -0

49 lines not on this page · raw message

Signature · 6 lines
2.39.0

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

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

Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.

---

Changes v3 -> v4:
- .mk: dropped patch & use BUILD_SHARED_LIBS=OFF

With this we can presumably get rid of the BR2_STATIC_LIBS dependency (glibc still implies it though), so I've dropped that.

Quoted 4 lines

- .mk: added issue links
- .S99fluent-bit: fixed all the ./utils/check-package issues & synced with S01syslogd

+# Force miniz to be compiled statically.

I've slightly reworded this to make it clear miniz is bundled with fluent-bit. I've added a DEVELOPERS entry and committed, thanks.

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