Skip to contentSkip to conversation

fluentbit: fix systemd input plugin

PATCH New Ramon Fried 1 participant 2 messages Feb 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 fluentbit: fix systemd input plugin

Because of missing dependency of systemd, Cmake configure step didn't find systemd and skipped the systemd input plugin. Added necessary dependency if systemd is available.

---
v2: Replace bb.utils.contains with bb.utils.filter

 meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb +2 -0
index bc4cd0cf9..0b7d11e16 100644
@@ -22,6 +22,8 @@ SRC_URI[sha256sum] = "e037c76c89269c8dc4027a08e442fefd2751b0f1e0f9c38f9a4b12d781
 
 S = "${WORKDIR}/fluent-bit-${PV}"
 DEPENDS = "zlib bison-native flex-native"
+DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
 DEPENDS_append_libc-musl = " fts "
 
 INSANE_SKIP_${PN}-dev += "dev-elf"
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 2/2 fluentbit: Fix SIGSEGV caused by using flb_free instead of mk_mem_free

---
v2: No changes

 ...caused-by-using-flb_free-instead-of-.patch | 43 ++++++++++
 ...GV-caused-by-using-flb_free-instead-.patch | 82 +++++++++++++++++++
 .../fluentbit/fluentbit_1.3.5.bb              |  4 +-
 3 files changed, 128 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0001-bin-fix-SIGSEGV-caused-by-using-flb_free-instead-of-.patch
 create mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0002-parser-Fix-SIGSEGV-caused-by-using-flb_free-instead-.patch
meta-oe/recipes-extended/fluentbit/fluentbit/0001-bin-fix-SIGSEGV-caused-by-using-flb_free-instead-of-.patch new file +43 -0
new file mode 100644
index 000000000..a6ff5991c
@@ -0,0 +1,43 @@
+From 3d7390c89c2205d1eed0384be0bb65adb675e60d Mon Sep 17 00:00:00 2001
+From: Ramon Fried <[email protected]>
+Date: Tue, 9 Feb 2021 18:59:59 +0200
+Subject: [PATCH] bin: fix SIGSEGV caused by using flb_free instead of
+ mk_mem_free
+
+Upstream-Status: Accepted
+Signed-off-by: Ramon Fried <[email protected]>
+---
+ src/fluent-bit.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/fluent-bit.c b/src/fluent-bit.c
+index c0c73b4..989cfde 100644
+--- a/src/fluent-bit.c
++++ b/src/fluent-bit.c
+@@ -289,7 +289,7 @@ static int input_set_property(struct flb_input_instance *in, char *kv)
+                 in->p->name, key);
+     }
+ 
+-    flb_free(key);
++    mk_mem_free(key);
+     return ret;
+ }
+ 
+@@ -314,7 +314,7 @@ static int output_set_property(struct flb_output_instance *out, char *kv)
+     }
+ 
+     ret = flb_output_set_property(out, key, value);
+-    flb_free(key);
++    mk_mem_free(key);
+     return ret;
+ }
+ 
+@@ -340,7 +340,7 @@ static int filter_set_property(struct flb_filter_instance *filter, char *kv)
+     }
+ 
+     ret = flb_filter_set_property(filter, key, value);
+-    flb_free(key);
++    mk_mem_free(key);
+     return ret;
+ }
+ 
meta-oe/recipes-extended/fluentbit/fluentbit/0002-parser-Fix-SIGSEGV-caused-by-using-flb_free-instead-.patch new file +82 -0

82 lines not on this page · raw message

meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb +3 -1
index 0b7d11e16..eac267041 100644
@@ -16,7 +16,9 @@ SRC_URI = "http://fluentbit.io/releases/1.3/fluent-bit-${PV}.tar.gz \
            file://cross-build-init-system-detection.patch \
            file://builtin-nan.patch \
            file://0001-ppc-Fix-signature-for-co_create-API.patch \
-          "
+           file://0001-bin-fix-SIGSEGV-caused-by-using-flb_free-instead-of-.patch \
+           file://0002-parser-Fix-SIGSEGV-caused-by-using-flb_free-instead-.patch \
+           "
 SRC_URI[md5sum] = "6eae6dfd0a874e5dd270c36e9c68f747"
 SRC_URI[sha256sum] = "e037c76c89269c8dc4027a08e442fefd2751b0f1e0f9c38f9a4b12d781a9c789"
 
Signature · 1 line
2.17.1