# Contributor: Stefan Reimer # Maintainer: Stefan Reimer pkgname=fluent-bit pkgver=2.1.10 pkgrel=0 pkgdesc="Fast and Lightweight Log processor and forwarder" url="https://fluentbit.io/" # riscv64: does not support bundled luajit arch="all !ppc64le !s390x !riscv64" license="Apache-2.0" makedepends=" bison cmake flex gtest-dev linux-headers musl-fts-dev openssl-dev yaml-dev zlib-dev " subpackages=" $pkgname-dev $pkgname-openrc " source="$pkgname-$pkgver.tar.gz::https://github.com/fluent/fluent-bit/archive/v$pkgver.tar.gz fluent-bit.confd fluent-bit.initd chunkio-static-lib-fts.patch exclude-luajit.patch xsi-strerror.patch fluent-bit.conf zdt-parsers.conf fluent-bit.logrotated " # enable check when this solved - https://github.com/fluent/fluent-bit/issues/2464#issuecomment-673280055 # Disable all things AWS to make tests pass options="!check" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=$CHOST-gcc" fi # default CORE_STACK_SIZE=((3 * PTHREAD_STACK_MIN) / 2)=3072 is invalid # set default to 24576 # Disable stream processor due to issue see: https://github.com/fluent/fluent-bit/issues/2464 cmake -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=None \ -DFLB_CORO_STACK_SIZE=24576 \ -DFLB_RELEASE=Yes \ -DFLB_DEBUG=Off \ -DFLB_SHARED_LIB=Off \ -DFLB_JEMALLOC=Yes \ -DFLB_IN_SYSTEMD=Off \ -DFLB_PROXY_GO=No \ -DFLB_TLS=Yes \ -DFLB_HTTP_SERVER=Yes \ $CMAKE_CROSSOPTS . make -C build #-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \ #-DCMAKE_EXE_LINKER_FLAGS="-static" \ #-DFLB_STREAM_PROCESSOR=No \ #-DFLB_LUAJIT=Yes \ #-DFLB_FILTER_LUA=Off \ #-DFLB_TESTS_INTERNAL=Yes \ #-DFLB_AWS=No \ #-DFLB_SIGNV4=No \ #-DFLB_OUT_S3=No \ #-DFLB_OUT_CLOUDWATCH_LOGS=No \ #-DFLB_OUT_KINESIS_FIREHOSE=No \ #-DFLB_OUT_KINESIS_STREAMS=No \ #-DFLB_OUT_BIGQUERY=No \ #-DFLB_FILTER_AWS=No \ #-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ } check() { CTEST_OUTPUT_ON_FAILURE=1 make -C build test } package() { make -C build DESTDIR="$pkgdir" install install -Dm755 "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname install -Dm644 "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname mv "$pkgdir"/usr/etc/* "$pkgdir"/etc rm "$pkgdir"/etc/fluent-bit/fluent-bit.conf mkdir -p "$pkgdir"/var/spool/fluent-bit install -Dm644 "$srcdir/fluent-bit.conf" "$pkgdir/etc/fluent-bit/fluent-bit.conf" install -Dm644 "$srcdir/zdt-parsers.conf" "$pkgdir/etc/fluent-bit/zdt-parsers.conf" install -Dm644 "$srcdir"/fluent-bit.logrotated "$pkgdir"/etc/logrotate.d/fluentbit touch "$pkgdir"/etc/fluent-bit/metadata.conf } sha512sums=" 55caefa81cdeaf293b727829383c6eaa75bc2f8b8c61ebe15e1478c66033921fde6e50c39fc8c39a7d2d93d03892f709daf4d1b6caacf586133de5268de10299 fluent-bit-2.1.10.tar.gz f6431397c80a036980b5377b51e38aec25dfceeb8dbe4cd54dce1f6e77d669d9f8daf983fcc96d25332385888f1809ced5e8ab0e8ccfcd93d19494036e3dc949 fluent-bit.confd e17bad6abd597da620fdb930e3f18612a828dd956abf87ce850e2660b83db4d9ab7d373ab3a9bf1d07f605b5077998234ce4774007c0197cfbfdad465ca6b47a fluent-bit.initd 6bd7d8b4da93a17f29b6ea1e0286ea226d0e376024284741110936779b3229bd8d6cd03ffbdc5d3b4842294e7f32a888de0dd16b0851b65d91b062ca58530ea0 chunkio-static-lib-fts.patch e3308a8377fb8ba496415b7a31e9e022e5aa9965d27a0c33ea5166a29049b72cb364bbcdf9d8611ef3407b0968f9bd4adff12cdb39728bbebd382710e5bc75d0 exclude-luajit.patch d61f30344af997f126486fa5b34cd3fbfe88bfc9aea394a8c60d0206f4db8db998eadf637a3a581b89512411c1e7980c414e236e455d5e2b889d20a556ee6577 xsi-strerror.patch 52aba9d23584d64842bc967504701a10166a43a03ca0d31de9b6cbffaacdbaa7d99f0fd55a4b0194e3b65d456817cb1779b86d468d81c1d9681a6fa708e85449 fluent-bit.conf 31899a3c68bbb43adb9025a3a46bad4ca0c740d5bca5c252c8667197575698d98ac4a3b6e11ee160c4bb8df0d0089b639bfd7d0ffa52391e6c4f8f734a6952a6 zdt-parsers.conf e166b0ff11a1789599e93f86b72102ca6a06725c98553a8fdd48c8d6414bfa765c3958d07bfb4c4d99101d8cdf7d00db1a8506d48c2cbd6bd375ce43c43d2bf9 fluent-bit.logrotated "