# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= fluent-bit VERSION= 3.0.2 KEYWORDS= sysutils VARIANTS= standard SDESC[standard]= Fast and Lightweight Log processor and forwarder HOMEPAGE= https://fluentbit.io/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/fluent:fluent-bit:v3.0.2 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[standard]= complete primary dev OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none USES= cpe cmake bison zlib gmake pkgconfig shebangfix ssl:openssl30 python:build cclibs:primary LICENSE= APACHE20:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= APACHE20:{{WRKSRC}}/LICENSE LICENSE_AWK= TERMS:"_GNU_SOURCE" LICENSE_SOURCE= TERMS:{{WRKSRC}}/src/fluent-bit.c LICENSE_SCHEME= solo CPE_PRODUCT= fluent_bit CPE_VENDOR= treasuredata FPC_EQUIVALENT= sysutils/fluent-bit SHEBANG_ADD_SH= lib/luajit-3065c9/configure RC_SUBR= fluent-bit:primary CMAKE_ARGS= -DFLB_DEBUG=Off -DFLB_TRACE=Off -DFLB_BACKTRACE=Off -DFLB_TLS=On -DFLB_EXAMPLES=On -DFLB_OUT_PGSQL=Off -DFLB_CONFIG_YAML=Off -DFLB_HTTP_SERVER=On VAR_OPSYS[freebsd]= CMAKE_ARGS=-DFLB_WASM=Off VAR_OPSYS[netbsd]= CMAKE_ARGS=-DFLB_WASM=Off VAR_OPSYS[dragonfly]= CMAKE_ARGS=-DFLB_WASM=Off VAR_OPSYS[midnightbsd]= CMAKE_ARGS=-DFLB_WASM=Off post-install: ${MV} ${STAGEDIR}${ETCDIR}/fluent-bit.conf \ ${STAGEDIR}${ETCDIR}/fluent-bit.conf.sample ${MV} ${STAGEDIR}${ETCDIR}/parsers.conf \ ${STAGEDIR}${ETCDIR}/parsers.conf.sample ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/fluent-bit ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/fluent-bit/libfluent-bit.so # don't install conflicting luajit files ${RM} ${STAGEDIR}${PREFIX}/bin/luajit ${RM} ${STAGEDIR}${PREFIX}/lib/libluajit.a ${RM} -r ${STAGEDIR}${PREFIX}/include/luajit pre-configure: # seems several platforms have issue with entropy ${REINPLACE_CMD} -e '/#define LJ_TARGET_HAS_GETENTROPY/s@1@0@g' \ ${WRKSRC}/lib/luajit-*/src/lj_prng.c [FILE:284:descriptions/desc.primary] Fluent Bit is a Fast and Lightweight Data Forwarder for Linux, OSX and BSD family operating systems. It has been made with a strong focus on performance to allow the collection of events from different sources without complexity. Fluent Bit is part of the Fluentd project ecosystem. [FILE:109:distinfo] d2bbf633ddaa79210db31a18c65feb81377d9e3ffca01c0f88fc68d2dfbb2661 26984927 fluent-fluent-bit-3.0.2.tar.gz [FILE:164:manifests/plist.primary] @sample etc/fluent-bit/fluent-bit.conf.sample @sample etc/fluent-bit/parsers.conf.sample bin/fluent-bit etc/fluent-bit/plugins.conf lib/fluent-bit/libfluent-bit.so [FILE:2970:manifests/plist.dev] include/ fluent-bit.h libco.h settings.h include/fluent-bit/ flb_api.h flb_avro.h flb_aws_credentials.h flb_aws_util.h flb_base64.h flb_bits.h flb_bucket_queue.h flb_byteswap.h flb_callback.h flb_chunk_trace.h flb_compat.h flb_compression.h flb_config.h flb_config_format.h flb_config_map.h flb_connection.h flb_coro.h flb_crypto.h flb_crypto_constants.h flb_csv.h flb_custom.h flb_custom_plugin.h flb_dlfcn_win32.h flb_downstream.h flb_downstream_conn.h flb_dump.h flb_endian.h flb_engine.h flb_engine_dispatch.h flb_engine_macros.h flb_env.h flb_error.h flb_event.h flb_event_loop.h flb_file.h flb_filter.h flb_filter_plugin.h flb_fstore.h flb_gzip.h flb_hash.h flb_hash_table.h flb_help.h flb_hmac.h flb_http_client.h flb_http_client_debug.h flb_http_common.h flb_http_server.h flb_info.h flb_input.h flb_input_chunk.h flb_input_log.h flb_input_metric.h flb_input_plugin.h flb_input_thread.h flb_input_trace.h flb_intermediate_metric.h flb_io.h flb_jsmn.h flb_kafka.h flb_kernel.h flb_kv.h flb_langinfo.h flb_lib.h flb_log.h flb_log_event.h flb_log_event_decoder.h flb_log_event_encoder.h flb_log_event_encoder_body_macros.h flb_log_event_encoder_dynamic_field.h flb_log_event_encoder_metadata_macros.h flb_log_event_encoder_primitives.h flb_log_event_encoder_root_macros.h flb_lua.h flb_luajit.h flb_macros.h flb_mem.h flb_meta.h flb_metrics.h flb_metrics_exporter.h flb_motd.h flb_mp.h flb_mp_chunk.h flb_msgpack_append_message.h flb_net_dns.h flb_network.h flb_oauth2.h flb_output.h flb_output_plugin.h flb_output_thread.h flb_pack.h flb_parser.h flb_parser_decoder.h flb_pipe.h flb_plugin.h flb_plugin_proxy.h flb_processor.h flb_processor_plugin.h flb_pthread.h flb_ra_key.h flb_random.h flb_record_accessor.h flb_regex.h flb_reload.h flb_ring_buffer.h flb_router.h flb_routes_mask.h flb_s3_local_buffer.h flb_scheduler.h flb_sds.h flb_sds_list.h flb_signv4.h flb_slist.h flb_snappy.h flb_socket.h flb_sosreport.h flb_sqldb.h flb_stacktrace.h flb_storage.h flb_str.h flb_stream.h flb_strptime.h flb_task.h flb_task_map.h flb_thread_pool.h flb_thread_storage.h flb_time.h flb_time_utils.h flb_typecast.h flb_unescape.h flb_upstream.h flb_upstream_conn.h flb_upstream_ha.h flb_upstream_node.h flb_upstream_queue.h flb_uri.h flb_utf8.h flb_utils.h flb_version.h flb_worker.h include/fluent-bit/config_format/ flb_cf.h flb_cf_fluentbit.h flb_cf_yaml.h include/fluent-bit/tls/ flb_tls.h flb_tls_info.h include/fluent-bit/wasm/flb_wasm.h include/monkey/mk_core.h include/monkey/mk_core/ mk_dep_unistd.h mk_dirent.h mk_event.h mk_event_epoll.h mk_event_kqueue.h mk_event_libevent.h mk_event_select.h mk_file.h mk_getopt.h mk_iov.h mk_limits.h mk_list.h mk_macros.h mk_memory.h mk_pipe.h mk_pthread.h mk_rconf.h mk_sleep.h mk_string.h mk_thread.h mk_thread_channel.h mk_uio.h mk_unistd.h mk_utils.h [FILE:488:patches/patch-CMakeLists.txt] --- CMakeLists.txt.orig 2024-04-12 03:19:42 UTC +++ CMakeLists.txt @@ -71,7 +71,7 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ar set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -latomic") set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic") endif() -if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") +if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|MidnightBSD") set(FLB_SYSTEM_FREEBSD On) add_definitions(-DFLB_SYSTEM_FREEBSD) set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -lutil") [FILE:895:patches/patch-include_fluent-bit_flb__coro.h] NetBSD doesn't define THREAD_STACK_MIN, so pick an arbitrary 16 pages. _XOPEN_SOURCE is messing up sys/socket.h on NetBSD so remove it. --- include/fluent-bit/flb_coro.h.orig 2024-04-12 03:19:42 UTC +++ include/fluent-bit/flb_coro.h @@ -20,11 +20,6 @@ #ifndef FLB_CORO_H #define FLB_CORO_H -/* Required by OSX */ -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE -#endif - #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif @@ -74,7 +69,12 @@ struct flb_coro { #ifdef FLB_CORO_STACK_SIZE #define FLB_CORO_STACK_SIZE_BYTE FLB_CORO_STACK_SIZE #else +# if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN) +#include +#define FLB_CORO_STACK_SIZE_BYTE (16 * PAGE_SIZE) +# else #define FLB_CORO_STACK_SIZE_BYTE ((3 * STACK_FACTOR * PTHREAD_STACK_MIN) / 2) +# endif #endif #define FLB_CORO_DATA(coro) (((char *) coro) + sizeof(struct flb_coro)) [FILE:496:patches/patch-include_fluent-bit_flb__endian.h] _XOPEN_SOURCE is messing up sys/socket.h on NetBSD so remove it. --- include/fluent-bit/flb_endian.h.orig 2024-04-12 03:19:42 UTC +++ include/fluent-bit/flb_endian.h @@ -39,7 +39,7 @@ */ #if defined(__GLIBC__) #include -#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) #include #elif defined(__APPLE__) #include [FILE:272:patches/patch-include_fluent-bit_flb__output.h] --- include/fluent-bit/flb_output.h.orig 2024-04-12 03:19:42 UTC +++ include/fluent-bit/flb_output.h @@ -20,10 +20,6 @@ #ifndef FLB_OUTPUT_H #define FLB_OUTPUT_H -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE -#endif - #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif [FILE:388:patches/patch-lib_chunkio_deps_crc32_crc32.c] --- lib/chunkio/deps/crc32/crc32.c.orig 2024-04-12 03:19:42 UTC +++ lib/chunkio/deps/crc32/crc32.c @@ -34,7 +34,7 @@ # define __BIG_ENDIAN 1 # define __LITTLE_ENDIAN 2 # define __BYTE_ORDER __LITTLE_ENDIAN -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__DragonFly__) # include #elif defined(__sun) || defined(sun) # include [FILE:369:patches/patch-lib_librdkafka-2.1.0_src_rd.h] --- lib/librdkafka-2.3.0/src/rd.h.orig 2024-04-12 03:19:42 UTC +++ lib/librdkafka-2.3.0/src/rd.h @@ -39,6 +39,10 @@ #define _DARWIN_C_SOURCE /* for strlcpy, pthread_setname_np, etc */ #endif +#if defined(__NetBSD__) +#define _XOPEN_SOURCE 600 +#endif + #define __need_IOV_MAX #ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L /* for timespec on solaris */ [FILE:374:patches/patch-lib_librdkafka-2.1.0_src_rdaddr.h] --- lib/librdkafka-2.3.0/src/rdaddr.h.orig 2024-04-12 03:19:42 UTC +++ lib/librdkafka-2.3.0/src/rdaddr.h @@ -39,7 +39,7 @@ #include #endif -#if defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__) #include #endif [FILE:316:patches/patch-lib_librdkafka-2.1.0_src_rdendian.h] --- lib/librdkafka-2.3.0/src/rdendian.h.orig 2024-04-12 03:19:42 UTC +++ lib/librdkafka-2.3.0/src/rdendian.h @@ -40,7 +40,7 @@ * le64toh() */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) #include #elif defined __GLIBC__ #include [FILE:375:patches/patch-lib_librdkafka-2.1.0_src_rdposix.h] --- lib/librdkafka-2.3.0/src/rdposix.h.orig 2024-04-12 03:19:42 UTC +++ lib/librdkafka-2.3.0/src/rdposix.h @@ -65,7 +65,7 @@ /** * Allocation */ -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) /* alloca(3) is in stdlib on FreeBSD */ #include #endif [FILE:369:patches/patch-lib_librdkafka-2.1.0_src_snappy__compat.h] --- lib/librdkafka-2.3.0/src/snappy_compat.h.orig 2024-04-12 03:19:42 UTC +++ lib/librdkafka-2.3.0/src/snappy_compat.h @@ -33,7 +33,7 @@ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) # include #elif defined(__APPLE_CC_) || (defined(__MACH__) && defined(__APPLE__)) /* MacOS/X support */ # include [FILE:629:patches/patch-lib_luajit-cmake_LuaJIT.cmake] --- lib/luajit-cmake/LuaJIT.cmake.orig 2024-04-12 03:19:42 UTC +++ lib/luajit-cmake/LuaJIT.cmake @@ -329,6 +329,8 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL Hai set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_POSIX) elseif(${CMAKE_SYSTEM_NAME} MATCHES "(Open|Free|Net)BSD") set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_BSD) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|MidnightBSD") + set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_BSD) elseif(${CMAKE_SYSTEM_NAME} STREQUAL iOS) set(TARGET_OS_FLAGS ${TARGET_OS_FLAGS} -DLUAJIT_OS=LUAJIT_OS_OSX -DTARGET_OS_IPHONE=1) else() [FILE:840:patches/patch-lib_monkey_CMakeLists.txt] --- lib/monkey/CMakeLists.txt.orig 2024-04-12 03:19:42 UTC +++ lib/monkey/CMakeLists.txt @@ -43,7 +43,7 @@ option(MK_LINUX_KQUEUE "Use Linux kque option(MK_TRACE "Enable Trace mode" No) option(MK_UCLIB "Enable uClib libc support" No) option(MK_MUSL "Enable Musl libc support" No) -option(MK_BACKTRACE "Enable Backtrace feature" Yes) +option(MK_BACKTRACE "Enable Backtrace feature" No) option(MK_LINUX_TRACE "Enable Lttng support" No) option(MK_PTHREAD_TLS "Use old Pthread TLS mode" No) option(MK_MBEDTLS_SHARED "Use mbedtls shared lib" No) @@ -162,8 +162,6 @@ endif() check_include_file("execinfo.h" HAVE_BACKTRACE) if (NOT HAVE_BACKTRACE) set(MK_BACKTRACE No) -else() - MK_DEFINITION(MK_HAVE_BACKTRACE) endif() # Check for LTTng-UST [FILE:635:patches/patch-lib_monkey_include_monkey_mk__thread__libco.h] NetBSD doesn't define THREAD_STACK_MIN, so pick an arbitrary 16 pages. --- lib/monkey/include/monkey/mk_thread_libco.h.orig 2024-04-12 03:19:42 UTC +++ lib/monkey/include/monkey/mk_thread_libco.h @@ -51,7 +51,12 @@ struct mk_thread { void (*cb_destroy) (void *); }; +#if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN) +#include +#define MK_THREAD_STACK_SIZE (16 * PAGE_SIZE) +#else #define MK_THREAD_STACK_SIZE ((3 * PTHREAD_STACK_MIN) / 2) +#endif #define MK_THREAD_DATA(th) (((char *) th) + sizeof(struct mk_thread)) extern MK_EXPORT MK_TLS_DEFINE(struct mk_thread, mk_thread); [FILE:491:patches/patch-lib_monkey_mk__core_deps_libevent_buffer.c] --- lib/monkey/mk_core/deps/libevent/buffer.c.orig 2024-04-12 03:19:42 UTC +++ lib/monkey/mk_core/deps/libevent/buffer.c @@ -108,6 +108,9 @@ #elif defined(EVENT__HAVE_SENDFILE) && defined(__FreeBSD__) #define USE_SENDFILE 1 #define SENDFILE_IS_FREEBSD 1 +#elif defined(EVENT__HAVE_SENDFILE) && defined(__DragonFly__) +#define USE_SENDFILE 1 +#define SENDFILE_IS_FREEBSD 1 #elif defined(EVENT__HAVE_SENDFILE) && defined(__APPLE__) #define USE_SENDFILE 1 #define SENDFILE_IS_MACOSX 1 [FILE:804:patches/patch-lib_monkey_mk__core_deps_libevent_kqueue.c] --- lib/monkey/mk_core/deps/libevent/kqueue.c.orig 2024-04-12 03:19:42 UTC +++ lib/monkey/mk_core/deps/libevent/kqueue.c @@ -50,7 +50,7 @@ /* Some platforms apparently define the udata field of struct kevent as * intptr_t, whereas others define it as void*. There doesn't seem to be an * easy way to tell them apart via autoconf, so we need to use OS macros. */ -#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__) +#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__) && !defined(__DragonFly__) #define PTR_TO_UDATA(x) ((intptr_t)(x)) #define INT_TO_UDATA(x) ((intptr_t)(x)) #else [FILE:440:patches/patch-lib_monkey_mk__server_CMakeLists.txt] --- lib/monkey/mk_server/CMakeLists.txt.orig 2024-04-12 03:19:42 UTC +++ lib/monkey/mk_server/CMakeLists.txt @@ -47,10 +47,6 @@ if(MK_HAVE_LINUX_KQUEUE) target_link_libraries(monkey-core-static kqueue) endif() -# FreeBSD backtrace -if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - target_link_libraries(monkey-core-static execinfo) -endif() if (CMAKE_SYSTEM_NAME MATCHES "SunOS") target_link_libraries(monkey-core-static socket nsl) [FILE:365:patches/patch-lib_monkey_plugins_liana_liana.c] --- lib/monkey/plugins/liana/liana.c.orig 2024-04-12 03:19:42 UTC +++ lib/monkey/plugins/liana/liana.c @@ -122,7 +122,7 @@ int mk_liana_send_file(struct mk_plugin return len; } return ret; -#elif defined (__FreeBSD__) +#elif defined (__FreeBSD__) || defined(__DragonFly__) off_t offset = *file_offset; off_t len = (off_t) file_count; [FILE:341:patches/patch-lib_snappy-fef67ac_compat.h] --- lib/snappy-fef67ac/compat.h.orig 2024-04-12 03:19:42 UTC +++ lib/snappy-fef67ac/compat.h @@ -4,6 +4,8 @@ #ifdef __FreeBSD__ # include +#elif defined __DragonFly__ || defined __NetBSD__ +# include #elif defined(__APPLE_CC_) || defined(__MACH__) /* MacOS/X support */ # include [FILE:904:patches/patch-src_flb__network.c] --- src/flb_network.c.orig 2024-04-12 03:19:42 UTC +++ src/flb_network.c @@ -1871,7 +1871,7 @@ static int net_address_unix_socket_peer_ int output_buffer_size, size_t *output_data_size) { -#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD) +#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD) && !defined(__DragonFly__) && !defined(__NetBSD__) unsigned int peer_credentials_size; struct ucred peer_credentials; #endif @@ -1889,7 +1889,7 @@ static int net_address_unix_socket_peer_ return -1; } -#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD) +#if !defined(FLB_SYSTEM_MACOS) && !defined(FLB_SYSTEM_FREEBSD) && !defined(__DragonFly__) && !defined(__NetBSD__) peer_credentials_size = sizeof(struct ucred); result = getsockopt(fd, [FILE:700:files/fluent-bit.in] #!/bin/sh # PROVIDE: fluent-bit # REQUIRE: DAEMON # BEFORE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable fluent-bit: # # fluent_bit_enable (bool): Set to YES to enable fluent-bit # Default: NO # fluent_bit_config (str): config files to use # Default: %%ETCDIR%%/fluent-bit.conf # fluent_bit_flags (str): Extra flags passed to fluent-bit # fluent_bit_user (str): Default run as user nobody . /etc/rc.subr name="fluent_bit" rcvar=${name}_enable load_rc_config $name : ${fluent_bit_enable:="NO"} : ${fluent_bit_user:="nobody"} command=%%PREFIX%%/bin/fluent-bit command_args="--quiet --daemon --config %%ETCDIR%%/fluent-bit.conf" run_rc_command "$1"