mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
fluent-bit: update to 4.0.9
- Remove obsolete patch - Add patch replace NPN with ALPN for client connections \ because the default OpenSSL library does not enable NPN. - Add newly libstdcpp dependency Build system: aarch64 Build-tested: mediatek/filogic Run-tested: mediatek/filogic Signed-off-by: Biao Zhu <zhumouren0623@qq.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fluent-bit
|
PKG_NAME:=fluent-bit
|
||||||
PKG_VERSION:=3.1.9
|
PKG_VERSION:=4.0.9
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
|
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
|
||||||
PKG_SOURCE_VERSION=v$(PKG_VERSION)
|
PKG_SOURCE_VERSION=v$(PKG_VERSION)
|
||||||
PKG_MIRROR_HASH:=cb81f94e4d4b1cb88dee06f9534efbb7fdc92a24d950cab7ccbd1a01d89bf908
|
PKG_MIRROR_HASH:=3826f4d1c37a9aee45db5f4e13f0779e5ab23638993009b24b524ec7be05096f
|
||||||
|
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
@@ -20,7 +20,7 @@ define Package/fluent-bit
|
|||||||
CATEGORY:=Administration
|
CATEGORY:=Administration
|
||||||
TITLE:=Fast and Lightweight Logs and Metrics processor
|
TITLE:=Fast and Lightweight Logs and Metrics processor
|
||||||
URL:=https://fluentbit.io/
|
URL:=https://fluentbit.io/
|
||||||
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
|
DEPENDS:= +libyaml +libopenssl +libcurl +libstdcpp +libatomic +musl-fts +flex +bison
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/fluent-bit/description
|
define Package/fluent-bit/description
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
Fix -Wint-conversion error with gcc 14 due to musl using POSIX strerror_r.
|
|
||||||
|
|
||||||
```
|
|
||||||
/home/build/aports/testing/fluent-bit/src/fluent-bit-3.1.9/src/flb_network.c: In function 'net_connect_async':
|
|
||||||
/home/build/aports/testing/fluent-bit/src/fluent-bit-3.1.9/src/flb_network.c:566:17: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
|
|
||||||
566 | str = strerror_r(error, so_error_buf, sizeof(so_error_buf));
|
|
||||||
```
|
|
||||||
|
|
||||||
--- a/src/flb_network.c
|
|
||||||
+++ b/src/flb_network.c
|
|
||||||
@@ -551,9 +551,6 @@ static int net_connect_async(int fd,
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Connection is broken, not much to do here */
|
|
||||||
-#if ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
|
|
||||||
- (defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0L >= 600L)) && \
|
|
||||||
- (!defined(_GNU_SOURCE))
|
|
||||||
ret = strerror_r(error, so_error_buf, sizeof(so_error_buf));
|
|
||||||
if (ret == 0) {
|
|
||||||
str = so_error_buf;
|
|
||||||
@@ -562,9 +559,6 @@ static int net_connect_async(int fd,
|
|
||||||
flb_errno();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
-#else
|
|
||||||
- str = strerror_r(error, so_error_buf, sizeof(so_error_buf));
|
|
||||||
-#endif
|
|
||||||
flb_error("[net] TCP connection failed: %s:%i (%s)",
|
|
||||||
u->tcp_host, u->tcp_port, str);
|
|
||||||
return -1;
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
From 1d8ae53900e27a28fa31adb7f71f235ce919bafc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Biao Zhu <zhumouren0623@qq.com>
|
||||||
|
Date: Tue, 2 Sep 2025 23:45:31 +0800
|
||||||
|
Subject: [PATCH] tls: replace NPN with ALPN for client connections
|
||||||
|
|
||||||
|
Signed-off-by: Biao Zhu <zhumouren0623@qq.com>
|
||||||
|
---
|
||||||
|
src/tls/openssl.c | 28 +++++++++-------------------
|
||||||
|
1 file changed, 9 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/tls/openssl.c
|
||||||
|
+++ b/src/tls/openssl.c
|
||||||
|
@@ -198,21 +198,6 @@ static int tls_context_server_alpn_selec
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int tls_context_client_alpn_select_callback(SSL *ssl,
|
||||||
|
- unsigned char **out,
|
||||||
|
- unsigned char *outlen,
|
||||||
|
- const unsigned char *in,
|
||||||
|
- unsigned int inlen,
|
||||||
|
- void *arg)
|
||||||
|
-{
|
||||||
|
- return tls_context_server_alpn_select_callback(ssl,
|
||||||
|
- (const unsigned char **) out,
|
||||||
|
- outlen,
|
||||||
|
- in,
|
||||||
|
- inlen,
|
||||||
|
- arg);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
int tls_context_alpn_set(void *ctx_backend, const char *alpn)
|
||||||
|
{
|
||||||
|
size_t wire_format_alpn_index;
|
||||||
|
@@ -283,10 +268,15 @@ int tls_context_alpn_set(void *ctx_backe
|
||||||
|
ctx);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
- SSL_CTX_set_next_proto_select_cb(
|
||||||
|
- ctx->ctx,
|
||||||
|
- tls_context_client_alpn_select_callback,
|
||||||
|
- ctx);
|
||||||
|
+ if (ctx->alpn == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ if (SSL_CTX_set_alpn_protos(
|
||||||
|
+ ctx->ctx,
|
||||||
|
+ (const unsigned char *) &ctx->alpn[1],
|
||||||
|
+ (unsigned int) ctx->alpn[0]) != 0) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user