1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Fast and Lightweight Log processor and forwarder
8 HOMEPAGE= https://fluentbit.io/
12 SITES[main]= GITHUB/fluent:fluent-bit:v2.0.9
13 DISTFILE[1]= generated:main
15 SPKGS[standard]= complete
19 OPTIONS_AVAILABLE= none
20 OPTIONS_STANDARD= none
22 USES= cpe cmake bison zlib gmake pkgconfig shebangfix ssl
23 python:build cclibs:primary,library
25 LICENSE= APACHE20:library
26 LICENSE_TERMS= library:{{WRKDIR}}/TERMS
27 LICENSE_FILE= APACHE20:{{WRKSRC}}/LICENSE
28 LICENSE_AWK= TERMS:"_GNU_SOURCE"
29 LICENSE_SOURCE= TERMS:{{WRKSRC}}/src/fluent-bit.c
32 CPE_PRODUCT= fluent_bit
33 CPE_VENDOR= treasuredata
34 FPC_EQUIVALENT= sysutils/fluent-bit
35 SHEBANG_ADD_SH= lib/luajit-3065c9/configure
37 RC_SUBR= fluent-bit:primary
39 CMAKE_ARGS= -DFLB_DEBUG=Off
47 VAR_OPSYS[freebsd]= CMAKE_ARGS=-DFLB_WASM=Off
48 VAR_OPSYS[netbsd]= CMAKE_ARGS=-DFLB_WASM=Off
49 VAR_OPSYS[dragonfly]= CMAKE_ARGS=-DFLB_WASM=Off
52 ${MV} ${STAGEDIR}${ETCDIR}/fluent-bit.conf \
53 ${STAGEDIR}${ETCDIR}/fluent-bit.conf.sample
54 ${MV} ${STAGEDIR}${ETCDIR}/parsers.conf \
55 ${STAGEDIR}${ETCDIR}/parsers.conf.sample
56 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/fluent-bit
57 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/fluent-bit/libfluent-bit.so
58 # don't install conflicting luajit files
59 ${RM} ${STAGEDIR}${PREFIX}/bin/luajit
60 ${RM} ${STAGEDIR}${PREFIX}/lib/libluajit.a
61 ${RM} -r ${STAGEDIR}${PREFIX}/include/luajit
64 # seems several platforms have issue with entropy
65 ${REINPLACE_CMD} -e '/#define LJ_TARGET_HAS_GETENTROPY/s@1@0@g' \
66 ${WRKSRC}/lib/luajit-*/src/lj_prng.c
68 [FILE:284:descriptions/desc.primary]
69 Fluent Bit is a Fast and Lightweight Data Forwarder for Linux, OSX and BSD
70 family operating systems. It has been made with a strong focus on
71 performance to allow the collection of events from different sources
74 Fluent Bit is part of the Fluentd project ecosystem.
77 [FILE:151:descriptions/desc.library]
78 Fluent Bit is a Fast and Lightweight Data Forwarder for Linux, OSX and BSD
79 family operating systems. This subpackage contains the library and headers.
83 393ad4a6ced48c327607653d610ef273843085a17b6e5c8013877abdf31e6945 22404154 fluent-fluent-bit-2.0.9.tar.gz
86 [FILE:132:manifests/plist.primary]
87 @sample etc/fluent-bit/fluent-bit.conf.sample
88 @sample etc/fluent-bit/parsers.conf.sample
90 etc/fluent-bit/plugins.conf
93 [FILE:2499:manifests/plist.library]
101 flb_aws_credentials.h
115 flb_crypto_constants.h
121 flb_downstream_conn.h
125 flb_engine_dispatch.h
141 flb_http_client_debug.h
151 flb_intermediate_metric.h
166 flb_metrics_exporter.h
183 flb_record_accessor.h
188 flb_s3_local_buffer.h
221 include/fluent-bit/tls/
224 include/fluent-bit/wasm/flb_wasm.h
225 include/monkey/mk_core.h
226 include/monkey/mk_core/
251 lib/fluent-bit/libfluent-bit.so
254 [FILE:880:patches/patch-include_fluent-bit_flb__coro.h]
255 NetBSD doesn't define THREAD_STACK_MIN, so pick an arbitrary 16 pages.
256 _XOPEN_SOURCE is messing up sys/socket.h on NetBSD so remove it.
258 --- include/fluent-bit/flb_coro.h.orig 2023-02-01 17:09:22 UTC
259 +++ include/fluent-bit/flb_coro.h
264 -/* Required by OSX */
265 -#ifndef _XOPEN_SOURCE
266 -#define _XOPEN_SOURCE
269 #ifndef _DEFAULT_SOURCE
270 #define _DEFAULT_SOURCE
272 @@ -64,7 +59,12 @@ struct flb_coro {
273 #ifdef FLB_CORO_STACK_SIZE
274 #define FLB_CORO_STACK_SIZE_BYTE FLB_CORO_STACK_SIZE
276 +# if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN)
277 +#include <machine/vmparam.h>
278 +#define FLB_CORO_STACK_SIZE_BYTE (16 * PAGE_SIZE)
280 #define FLB_CORO_STACK_SIZE_BYTE ((3 * PTHREAD_STACK_MIN) / 2)
284 #define FLB_CORO_DATA(coro) (((char *) coro) + sizeof(struct flb_coro))
287 [FILE:496:patches/patch-include_fluent-bit_flb__endian.h]
288 _XOPEN_SOURCE is messing up sys/socket.h on NetBSD so remove it.
290 --- include/fluent-bit/flb_endian.h.orig 2023-02-01 17:09:22 UTC
291 +++ include/fluent-bit/flb_endian.h
294 #if defined(__GLIBC__)
296 -#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
297 +#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
298 #include <sys/endian.h>
299 #elif defined(__APPLE__)
300 #include <libkern/OSByteOrder.h>
303 [FILE:272:patches/patch-include_fluent-bit_flb__output.h]
304 --- include/fluent-bit/flb_output.h.orig 2023-02-01 17:09:22 UTC
305 +++ include/fluent-bit/flb_output.h
310 -#ifndef _XOPEN_SOURCE
311 -#define _XOPEN_SOURCE
319 [FILE:388:patches/patch-lib_chunkio_deps_crc32_crc32.c]
320 --- lib/chunkio/deps/crc32/crc32.c.orig 2023-02-01 17:09:22 UTC
321 +++ lib/chunkio/deps/crc32/crc32.c
323 # define __BIG_ENDIAN 1
324 # define __LITTLE_ENDIAN 2
325 # define __BYTE_ORDER __LITTLE_ENDIAN
326 -#elif defined(__FreeBSD__)
327 +#elif defined(__FreeBSD__) || defined(__DragonFly__)
328 # include <sys/endian.h>
329 #elif defined(__sun) || defined(sun)
330 # include <sys/byteorder.h>
333 [FILE:617:patches/patch-lib_luajit-cmake_LuaJIT.cmake]
334 --- lib/luajit-cmake/LuaJIT.cmake.orig 2023-02-01 17:09:22 UTC
335 +++ lib/luajit-cmake/LuaJIT.cmake
336 @@ -329,6 +329,8 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL Hai
337 set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_POSIX)
338 elseif(${CMAKE_SYSTEM_NAME} MATCHES "(Open|Free|Net)BSD")
339 set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_BSD)
340 +elseif(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
341 + set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_BSD)
342 elseif(${CMAKE_SYSTEM_NAME} STREQUAL iOS)
343 set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_OSX -DTARGET_OS_IPHONE=1)
347 [FILE:840:patches/patch-lib_monkey_CMakeLists.txt]
348 --- lib/monkey/CMakeLists.txt.orig 2023-02-01 17:09:22 UTC
349 +++ lib/monkey/CMakeLists.txt
350 @@ -43,7 +43,7 @@ option(MK_LINUX_KQUEUE "Use Linux kque
351 option(MK_TRACE "Enable Trace mode" No)
352 option(MK_UCLIB "Enable uClib libc support" No)
353 option(MK_MUSL "Enable Musl libc support" No)
354 -option(MK_BACKTRACE "Enable Backtrace feature" Yes)
355 +option(MK_BACKTRACE "Enable Backtrace feature" No)
356 option(MK_LINUX_TRACE "Enable Lttng support" No)
357 option(MK_PTHREAD_TLS "Use old Pthread TLS mode" No)
358 option(MK_MBEDTLS_SHARED "Use mbedtls shared lib" No)
359 @@ -162,8 +162,6 @@ endif()
360 check_include_file("execinfo.h" HAVE_BACKTRACE)
361 if (NOT HAVE_BACKTRACE)
364 - MK_DEFINITION(MK_HAVE_BACKTRACE)
367 # Check for LTTng-UST
370 [FILE:635:patches/patch-lib_monkey_include_monkey_mk__thread__libco.h]
371 NetBSD doesn't define THREAD_STACK_MIN, so pick an arbitrary 16 pages.
373 --- lib/monkey/include/monkey/mk_thread_libco.h.orig 2023-02-01 17:09:22 UTC
374 +++ lib/monkey/include/monkey/mk_thread_libco.h
375 @@ -51,7 +51,12 @@ struct mk_thread {
376 void (*cb_destroy) (void *);
379 +#if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN)
380 +#include <machine/vmparam.h>
381 +#define MK_THREAD_STACK_SIZE (16 * PAGE_SIZE)
383 #define MK_THREAD_STACK_SIZE ((3 * PTHREAD_STACK_MIN) / 2)
385 #define MK_THREAD_DATA(th) (((char *) th) + sizeof(struct mk_thread))
387 extern MK_EXPORT MK_TLS_DEFINE(struct mk_thread, mk_thread);
390 [FILE:491:patches/patch-lib_monkey_mk__core_deps_libevent_buffer.c]
391 --- lib/monkey/mk_core/deps/libevent/buffer.c.orig 2023-02-01 17:09:22 UTC
392 +++ lib/monkey/mk_core/deps/libevent/buffer.c
394 #elif defined(EVENT__HAVE_SENDFILE) && defined(__FreeBSD__)
395 #define USE_SENDFILE 1
396 #define SENDFILE_IS_FREEBSD 1
397 +#elif defined(EVENT__HAVE_SENDFILE) && defined(__DragonFly__)
398 +#define USE_SENDFILE 1
399 +#define SENDFILE_IS_FREEBSD 1
400 #elif defined(EVENT__HAVE_SENDFILE) && defined(__APPLE__)
401 #define USE_SENDFILE 1
402 #define SENDFILE_IS_MACOSX 1
405 [FILE:804:patches/patch-lib_monkey_mk__core_deps_libevent_kqueue.c]
406 --- lib/monkey/mk_core/deps/libevent/kqueue.c.orig 2023-02-01 17:09:22 UTC
407 +++ lib/monkey/mk_core/deps/libevent/kqueue.c
409 /* Some platforms apparently define the udata field of struct kevent as
410 * intptr_t, whereas others define it as void*. There doesn't seem to be an
411 * easy way to tell them apart via autoconf, so we need to use OS macros. */
412 -#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__)
413 +#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__) && !defined(__DragonFly__)
414 #define PTR_TO_UDATA(x) ((intptr_t)(x))
415 #define INT_TO_UDATA(x) ((intptr_t)(x))
419 [FILE:440:patches/patch-lib_monkey_mk__server_CMakeLists.txt]
420 --- lib/monkey/mk_server/CMakeLists.txt.orig 2023-02-01 17:09:22 UTC
421 +++ lib/monkey/mk_server/CMakeLists.txt
422 @@ -47,10 +47,6 @@ if(MK_HAVE_LINUX_KQUEUE)
423 target_link_libraries(monkey-core-static kqueue)
427 -if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
428 - target_link_libraries(monkey-core-static execinfo)
431 if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
432 target_link_libraries(monkey-core-static socket nsl)
435 [FILE:366:patches/patch-lib_monkey_plugins_liana_liana.c]
436 --- lib/monkey/plugins/liana/liana.c.orig 2023-02-01 17:09:22 UTC
437 +++ lib/monkey/plugins/liana/liana.c
438 @@ -109,7 +109,7 @@ int mk_liana_send_file(int socket_fd, in
442 -#elif defined (__FreeBSD__)
443 +#elif defined (__FreeBSD__) || defined(__DragonFly__)
444 off_t offset = *file_offset;
445 off_t len = (off_t) file_count;
449 [FILE:319:patches/patch-lib_snappy-fef67ac_compat.h]
450 --- lib/snappy-fef67ac/compat.h.orig 2023-02-01 17:09:22 UTC
451 +++ lib/snappy-fef67ac/compat.h
455 # include <sys/endian.h>
456 +#elif defined __DragonFly__
457 +# include <sys/endian.h>
458 #elif defined(__APPLE_CC_) || defined(__MACH__) /* MacOS/X support */
459 # include <machine/endian.h>
463 [FILE:904:patches/patch-src_flb__network.c]
464 --- src/flb_network.c.orig 2023-02-01 17:09:22 UTC
465 +++ src/flb_network.c
466 @@ -1801,7 +1801,7 @@ static int net_address_unix_socket_peer_
467 int output_buffer_size,
468 size_t *output_data_size)
470 -#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD)
471 +#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD) && !defined(__DragonFly__) && !defined(__NetBSD__)
472 unsigned int peer_credentials_size;
473 struct ucred peer_credentials;
475 @@ -1819,7 +1819,7 @@ static int net_address_unix_socket_peer_
479 -#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD)
480 +#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD) && !defined(__DragonFly__) && !defined(__NetBSD__)
481 peer_credentials_size = sizeof(struct ucred);
483 result = getsockopt(fd,
486 [FILE:700:files/fluent-bit.in]
489 # PROVIDE: fluent-bit
494 # Add the following lines to /etc/rc.conf to enable fluent-bit:
496 # fluent_bit_enable (bool): Set to YES to enable fluent-bit
498 # fluent_bit_config (str): config files to use
499 # Default: %%ETCDIR%%/fluent-bit.conf
500 # fluent_bit_flags (str): Extra flags passed to fluent-bit
501 # fluent_bit_user (str): Default run as user nobody
509 : ${fluent_bit_enable:="NO"}
510 : ${fluent_bit_user:="nobody"}
512 command=%%PREFIX%%/bin/fluent-bit
513 command_args="--quiet --daemon --config %%ETCDIR%%/fluent-bit.conf"