fluent-bit: 3.2.6 -> 4.0.3

fluent-bit now dynamically links against libzstd, sqlite and msgpack

This means that we will not run into the issue that caused us
to roll back from 3.2.9 to 3.2.6 anymore (https://github.com/NixOS/nixpkgs/pull/395128)
as there shouldn't be two incompatible versions of libzstd loaded at the same time.

Fixes https://github.com/fluent/fluent-bit/issues/10139

Is this eligible for back-porting even-though it's a major version bump?  In my
opinion: yes.  We can't keep maintaining 3.x as all the builds after 3.2.6 have
the same issue so we are missing out on critical vulnerability fixes. In the
meantine Non of the following links mention any backwards compatibilities with
3.2.6:

* https://fluentbit.io/announcements/v4.0.0/
* https://fluentbit.io/announcements/v4.0.1/
* https://fluentbit.io/announcements/v4.0.2/
* https://fluentbit.io/announcements/v4.0.3/
* https://docs.fluentbit.io/manual/installation/upgrade-notes/
This commit is contained in:
Arian van Putten 2025-05-22 13:42:27 +02:00
parent 485624fecf
commit cd90fbd9cc

View file

@ -1,41 +1,41 @@
{ {
lib, lib,
stdenv, stdenv,
fetchFromGitHub,
nixosTests,
arrow-glib, arrow-glib,
bison, bison,
c-ares, c-ares,
cmake, cmake,
curl,
fetchFromGitHub,
flex, flex,
jemalloc, jemalloc,
libbacktrace, libbacktrace,
libbpf, libbpf,
libnghttp2,
libpq, libpq,
libyaml, libyaml,
luajit, luajit,
msgpack-c,
nghttp2,
nix-update-script, nix-update-script,
nixosTests,
openssl, openssl,
pkg-config, pkg-config,
rdkafka, rdkafka,
sqlite,
systemd, systemd,
versionCheckHook, versionCheckHook,
zlib,
zstd, zstd,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "fluent-bit"; pname = "fluent-bit";
# FIXME: We are deliberately on 3.2.6 as 3.2.7 and above are causing segfaults (https://github.com/fluent/fluent-bit/issues/10139) version = "4.0.3";
version = "3.2.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fluent"; owner = "fluent";
repo = "fluent-bit"; repo = "fluent-bit";
tag = "v${finalAttrs.version}"; tag = "v${finalAttrs.version}";
hash = "sha256-S0sb954n17z+zrVNkYd6yiV01aNbOLJLOV+34PRkSXQ="; hash = "sha256-hxlvidzrEE/5xzka414CerGQ/Vi2jXUnNvO/oSxrHQQ=";
}; };
# The source build documentation covers some dependencies and CMake options. # The source build documentation covers some dependencies and CMake options.
@ -49,15 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
# Fortunately, there's the undocumented `FLB_PREFER_SYSTEM_LIBS` CMake option to link against system libraries for # Fortunately, there's the undocumented `FLB_PREFER_SYSTEM_LIBS` CMake option to link against system libraries for
# some dependencies. # some dependencies.
# #
# See https://github.com/fluent/fluent-bit/blob/v3.2.6/CMakeLists.txt#L211-L218. # https://github.com/fluent/fluent-bit/blob/v4.0.2/CMakeLists.txt#L245
#
# Like `FLB_PREFER_SYSTEM_LIBS`, several CMake options aren't documented.
#
# See https://github.com/fluent/fluent-bit/blob/v3.2.6/CMakeLists.txt#L111-L157.
#
# The CMake options may differ across target platforms. We'll stick to the minimum.
#
# See https://github.com/fluent/fluent-bit/tree/v3.2.6/packaging/distros.
strictDeps = true; strictDeps = true;
@ -72,19 +64,16 @@ stdenv.mkDerivation (finalAttrs: {
[ [
arrow-glib arrow-glib
c-ares c-ares
# Needed by rdkafka.
curl
jemalloc jemalloc
libbacktrace libbacktrace
libnghttp2
libpq libpq
libyaml libyaml
luajit luajit
msgpack-c
nghttp2.dev
openssl openssl
rdkafka rdkafka
# Needed by rdkafka. sqlite.dev
zlib
# Needed by rdkafka.
zstd zstd
] ]
++ lib.optionals stdenv.hostPlatform.isLinux [ ++ lib.optionals stdenv.hostPlatform.isLinux [