diff options
Diffstat (limited to 'meta-oe/recipes-extended/fluentbit/fluentbit_4.2.0.bb')
| -rw-r--r-- | meta-oe/recipes-extended/fluentbit/fluentbit_4.2.0.bb | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit_4.2.0.bb b/meta-oe/recipes-extended/fluentbit/fluentbit_4.2.0.bb new file mode 100644 index 0000000000..279486eee3 --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit_4.2.0.bb | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | SUMMARY = "Fast Log Processor and Forwarder" | ||
| 2 | DESCRIPTION = "Fluent Bit allows to collect log events or metrics from \ | ||
| 3 | different sources, process them and deliver them to different backends \ | ||
| 4 | such as Fluentd, Elasticsearch, Splunk, DataDog, Kafka, New Relic, Azure \ | ||
| 5 | services, AWS services, Google services, NATS, InfluxDB or any custom \ | ||
| 6 | HTTP end-point." | ||
| 7 | HOMEPAGE = "http://fluentbit.io" | ||
| 8 | BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" | ||
| 9 | SECTION = "net" | ||
| 10 | LICENSE = "Apache-2.0" | ||
| 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" | ||
| 12 | DEPENDS = "\ | ||
| 13 | bison-native \ | ||
| 14 | flex-native \ | ||
| 15 | openssl \ | ||
| 16 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | ||
| 17 | " | ||
| 18 | DEPENDS:append:libc-musl = " fts" | ||
| 19 | |||
| 20 | SRCREV = "6bc014390c5485b96521c56b98369b44b9faa08b" | ||
| 21 | SRC_URI = "\ | ||
| 22 | git://github.com/fluent/fluent-bit.git;branch=master;protocol=https \ | ||
| 23 | file://0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch \ | ||
| 24 | file://0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch \ | ||
| 25 | file://0003-CMakeLists.txt-Revise-init-manager-deduction.patch \ | ||
| 26 | " | ||
| 27 | SRC_URI:append:libc-musl = "\ | ||
| 28 | file://0004-chunkio-Link-with-fts-library-with-musl.patch \ | ||
| 29 | " | ||
| 30 | |||
| 31 | # prefix tag with "v" to avoid upgrade to random tags like "20220215" | ||
| 32 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))" | ||
| 33 | |||
| 34 | |||
| 35 | PACKAGECONFIG ??= "\ | ||
| 36 | aws \ | ||
| 37 | binary \ | ||
| 38 | config-yaml \ | ||
| 39 | custom-calyptia \ | ||
| 40 | http-server \ | ||
| 41 | inotify \ | ||
| 42 | ipo \ | ||
| 43 | metrics \ | ||
| 44 | parser \ | ||
| 45 | prefer-system-libs \ | ||
| 46 | profiles \ | ||
| 47 | proxy-go \ | ||
| 48 | record-accessor \ | ||
| 49 | regex \ | ||
| 50 | signv4 \ | ||
| 51 | sqldb \ | ||
| 52 | stream-processor \ | ||
| 53 | tls \ | ||
| 54 | utf8-encoder \ | ||
| 55 | " | ||
| 56 | # See https://github.com/fluent/fluent-bit/issues/7248#issuecomment-1631280496 | ||
| 57 | PACKAGECONFIG:remove:toolchain-clang = "ipo" | ||
| 58 | |||
| 59 | # Use system libs | ||
| 60 | PACKAGECONFIG[prefer-system-libs] = "-DFLB_PREFER_SYSTEM_LIBS=Yes,-DFLB_PREFER_SYSTEM_LIBS=No, nghttp2 c-ares" | ||
| 61 | DEPENDS += " ${@bb.utils.contains('PACKAGECONFIG', 'prefer-system-libs backtrace', 'libbacktrace', '', d)}" | ||
| 62 | DEPENDS += " ${@bb.utils.contains('PACKAGECONFIG', 'prefer-system-libs jemalloc', 'jemalloc', '', d)}" | ||
| 63 | DEPENDS += " ${@bb.utils.contains('PACKAGECONFIG', 'prefer-system-libs luajit', 'luajit', '', d)}" | ||
| 64 | |||
| 65 | PACKAGECONFIG[all] = "-DFLB_ALL=Yes,-DFLB_ALL=No" | ||
| 66 | PACKAGECONFIG[arrow] = "-DFLB_ARROW=Yes,-DFLB_ARROW=No" | ||
| 67 | PACKAGECONFIG[avro-encoder] = "-DFLB_AVRO_ENCODER=Yes,-DFLB_AVRO_ENCODER=No" | ||
| 68 | PACKAGECONFIG[aws-error-reporter] = "-DFLB_AWS_ERROR_REPORTER=Yes,-DFLB_AWS_ERROR_REPORTER=No" | ||
| 69 | PACKAGECONFIG[aws] = "-DFLB_AWS=Yes,-DFLB_AWS=No" | ||
| 70 | PACKAGECONFIG[backtrace] = "-DFLB_BACKTRACE=Yes,-DFLB_BACKTRACE=No" | ||
| 71 | PACKAGECONFIG[binary] = "-DFLB_BINARY=Yes,-DFLB_BINARY=No" | ||
| 72 | PACKAGECONFIG[chunk-trace] = "-DFLB_CHUNK_TRACE=Yes,-DFLB_CHUNK_TRACE=No" | ||
| 73 | PACKAGECONFIG[config-yaml] = "-DFLB_CONFIG_YAML=Yes,-DFLB_CONFIG_YAML=No,libyaml" | ||
| 74 | PACKAGECONFIG[custom-calyptia] = "-DFLB_CUSTOM_CALYPTIA=Yes,-DFLB_CUSTOM_CALYPTIA=No" | ||
| 75 | PACKAGECONFIG[enforce-alignment] = "-DFLB_ENFORCE_ALIGNMENT=Yes,-DFLB_ENFORCE_ALIGNMENT=No" | ||
| 76 | PACKAGECONFIG[examples] = "-DFLB_EXAMPLES=Yes,-DFLB_EXAMPLES=No" | ||
| 77 | PACKAGECONFIG[http-client-debug] = "-DFLB_HTTP_CLIENT_DEBUG=Yes,-DFLB_HTTP_CLIENT_DEBUG=No" | ||
| 78 | PACKAGECONFIG[http-server] = "-DFLB_HTTP_SERVER=Yes,-DFLB_HTTP_SERVER=No" | ||
| 79 | PACKAGECONFIG[inotify] = "-DFLB_INOTIFY=Yes,-DFLB_INOTIFY=No" | ||
| 80 | PACKAGECONFIG[ipo] = "-DFLB_IPO=Yes,-DFLB_IPO=no" | ||
| 81 | PACKAGECONFIG[jemalloc] = "-DFLB_JEMALLOC=Yes,-DFLB_JEMALLOC=No,jemalloc" | ||
| 82 | PACKAGECONFIG[luajit] = "-DFLB_LUAJIT=Yes,-DFLB_LUAJIT=No" | ||
| 83 | PACKAGECONFIG[metrics] = "-DFLB_METRICS=Yes,-DFLB_METRICS=No" | ||
| 84 | PACKAGECONFIG[mtrace] = "-DFLB_MTRACE=Yes,-DFLB_MTRACE=No" | ||
| 85 | PACKAGECONFIG[parser] = "-DFLB_PARSER=Yes,-DFLB_PARSER=No" | ||
| 86 | PACKAGECONFIG[posix-tls] = "-DFLB_POSIX_TLS=Yes,-DFLB_POSIX_TLS=No" | ||
| 87 | PACKAGECONFIG[profiles] = "-DFLB_PROFILES=Yes,-DFLB_PROFILES=No" | ||
| 88 | PACKAGECONFIG[proxy-go] = "-DFLB_PROXY_GO=Yes,-DFLB_PROXY_GO=No" | ||
| 89 | PACKAGECONFIG[record-accessor] = "-DFLB_RECORD_ACCESSOR=Yes,-DFLB_RECORD_ACCESSOR=No" | ||
| 90 | PACKAGECONFIG[regex] = "-DFLB_REGEX=Yes,-DFLB_REGEX=No" | ||
| 91 | PACKAGECONFIG[run-ldconfig] = "-DFLB_RUN_LDCONFIG=Yes,-DFLB_RUN_LDCONFIG=No" | ||
| 92 | PACKAGECONFIG[shared-lib] = "-DFLB_SHARED_LIB=Yes,-DFLB_SHARED_LIB=No" | ||
| 93 | PACKAGECONFIG[signv4] = "-DFLB_SIGNV4=Yes,-DFLB_SIGNV4=No" | ||
| 94 | PACKAGECONFIG[sqldb] = "-DFLB_SQLDB=Yes,-DFLB_SQLDB=No" | ||
| 95 | PACKAGECONFIG[stream-processor] = "-DFLB_STREAM_PROCESSOR=Yes,-DFLB_STREAM_PROCESSOR=No" | ||
| 96 | PACKAGECONFIG[tests-runtime] = "-DFLB_TESTS_RUNTIME=Yes,-DFLB_TESTS_RUNTIME=No" | ||
| 97 | PACKAGECONFIG[tls] = "-DFLB_TLS=Yes,-DFLB_TLS=No" | ||
| 98 | PACKAGECONFIG[trace] = "-DFLB_TRACE=Yes,-DFLB_TRACE=No" | ||
| 99 | PACKAGECONFIG[utf8-encoder] = "-DFLB_UTF8_ENCODER=Yes,-DFLB_UTF8_ENCODER=No" | ||
| 100 | PACKAGECONFIG[valgrind] = "-DFLB_VALGRIND=Yes,-DFLB_VALGRIND=No,valgrind" | ||
| 101 | PACKAGECONFIG[wamrc] = "-DFLB_WAMRC=Yes,-DFLB_WAMRC=No" | ||
| 102 | PACKAGECONFIG[wasm-stack-protect] = "-DFLB_WASM_STACK_PROTECT=Yes,-DFLB_WASM_STACK_PROTECT=No" | ||
| 103 | PACKAGECONFIG[wasm] = "-DFLB_WASM=Yes,-DFLB_WASM=No" | ||
| 104 | PACKAGECONFIG[windows-defaults] = "-DFLB_WINDOWS_DEFAULTS=Yes,-DFLB_WINDOWS_DEFAULTS=No" | ||
| 105 | |||
| 106 | # Option to disable all Fluent Bit plugins by default. See cmake/plugins_options.cmake which | ||
| 107 | # individual plugins then to enable (e.g. using EXTRA_OECMAKE:append = " -DFLB_FOOBAR=ON") | ||
| 108 | PACKAGECONFIG[minimal] = "-DFLB_MINIMAL=Yes,-DFLB_MINIMAL=No" | ||
| 109 | |||
| 110 | PACKAGECONFIG[in-kafka] = "-DFLB_KAFKA=ON -DFLB_IN_KAFKA=ON,-DFLB_KAFKA=OFF -DFLB_IN_KAFKA=OFF,librdkafka curl" | ||
| 111 | PACKAGECONFIG[out-kafka] = "-DFLB_KAFKA=ON -DFLB_OUT_KAFKA=ON,-DFLB_KAFKA=OFF -DFLB_OUT_KAFKA=OFF,librdkafka curl" | ||
| 112 | |||
| 113 | SYSTEMD_SERVICE:${PN} = "fluent-bit.service" | ||
| 114 | |||
| 115 | inherit cmake systemd pkgconfig | ||
| 116 | |||
| 117 | # disable manipulation of compiler flags and CMAKE_BUILD_TYPE | ||
| 118 | # release and coverage are off by default, disable also debug | ||
| 119 | EXTRA_OECMAKE += "-DFLB_DEBUG=No" | ||
| 120 | |||
| 121 | FULL_OPTIMIZATION:remove = "${@'-O2' if bb.data.inherits_class('clang', d) else ''}" | ||
| 122 | TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION}" | ||
| 123 | TARGET_CC_ARCH:remove = "-D_FORTIFY_SOURCE=2" | ||
| 124 | EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" | ||
| 125 | |||
| 126 | SECURITY_STRINGFORMAT:remove = "${@bb.utils.contains('PACKAGECONFIG', 'aws-error-reporter', '-Werror=format-security', '', d)}" | ||
| 127 | |||
| 128 | # GCC-15 uses C23 std and it does not yet compile with C23 | ||
| 129 | CFLAGS += "-std=gnu17" | ||
| 130 | # 64bit atomics builtins do not exist in compiler on these arches | ||
| 131 | LDFLAGS:append:mips = " -latomic" | ||
| 132 | LDFLAGS:append:powerpc = " -latomic" | ||
| 133 | LDFLAGS:append:riscv32 = " -latomic" | ||
| 134 | LDFLAGS:append:riscv64 = " -latomic" | ||
| 135 | LDFLAGS:append:x86 = " -latomic" | ||
| 136 | |||
| 137 | do_configure:prepend() { | ||
| 138 | sed -i \ | ||
| 139 | -e 's#@INIT_MANAGER_IS_SYSTEMD@#'${@'TRUE' if d.getVar('INIT_MANAGER') == 'systemd' else 'FALSE'}'#' \ | ||
| 140 | -e 's#@INIT_MANAGER_IS_UPSTART@#'${@'TRUE' if d.getVar('INIT_MANAGER') == 'upstart' else 'FALSE'}'#' \ | ||
| 141 | ${S}/src/CMakeLists.txt | ||
| 142 | } | ||
| 143 | |||
| 144 | # flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. | ||
| 145 | do_compile:append() { | ||
| 146 | find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' | ||
| 147 | } | ||
| 148 | |||
| 149 | # needed for shared-lib package config | ||
| 150 | FILES:${PN} += "${libdir}/fluent-bit" | ||
