Ravenports generated: 30 Jan 2023 20:50
[ravenports.git] / bucket_12 / fluent-bit
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               fluent-bit
4 VERSION=                2.0.8
5 KEYWORDS=               sysutils
6 VARIANTS=               standard
7 SDESC[standard]=        Fast and Lightweight Log processor and forwarder
8 HOMEPAGE=               https://fluentbit.io/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            GITHUB/fluent:fluent-bit:v2.0.8
13 DISTFILE[1]=            generated:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         library
18
19 OPTIONS_AVAILABLE=      none
20 OPTIONS_STANDARD=       none
21
22 USES=                   cpe cmake bison zlib gmake pkgconfig shebangfix ssl
23                         python:build cclibs:primary,library
24
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
30 LICENSE_SCHEME=         solo
31
32 CPE_PRODUCT=            fluent_bit
33 CPE_VENDOR=             treasuredata
34 FPC_EQUIVALENT=         sysutils/fluent-bit
35 SHEBANG_ADD_SH=         lib/luajit-3065c9/configure
36
37 RC_SUBR=                fluent-bit:primary
38
39 CMAKE_ARGS=             -DFLB_DEBUG=Off
40                         -DFLB_TRACE=Off
41                         -DFLB_BACKTRACE=Off
42                         -DFLB_TLS=On
43                         -DFLB_EXAMPLES=On
44                         -DFLB_OUT_PGSQL=Off
45                         -DFLB_CONFIG_YAML=Off
46                         -DFLB_HTTP_SERVER=On
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
50
51 post-install:
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
62
63 pre-configure:
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
67
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
72 without complexity.
73
74 Fluent Bit is part of the Fluentd project ecosystem.
75
76
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.
80
81
82 [FILE:109:distinfo]
83 8ff5566389033669feabc9c69a5c6f417dad5c8b066454388e6a706507262acf     22044712 fluent-fluent-bit-2.0.8.tar.gz
84
85
86 [FILE:132:manifests/plist.primary]
87 @sample etc/fluent-bit/fluent-bit.conf.sample
88 @sample etc/fluent-bit/parsers.conf.sample
89 bin/fluent-bit
90 etc/fluent-bit/plugins.conf
91
92
93 [FILE:2499:manifests/plist.library]
94 include/
95  fluent-bit.h
96  libco.h
97  settings.h
98 include/fluent-bit/
99  flb_api.h
100  flb_avro.h
101  flb_aws_credentials.h
102  flb_aws_util.h
103  flb_base64.h
104  flb_bits.h
105  flb_bucket_queue.h
106  flb_callback.h
107  flb_chunk_trace.h
108  flb_compat.h
109  flb_config.h
110  flb_config_format.h
111  flb_config_map.h
112  flb_connection.h
113  flb_coro.h
114  flb_crypto.h
115  flb_crypto_constants.h
116  flb_csv.h
117  flb_custom.h
118  flb_custom_plugin.h
119  flb_dlfcn_win32.h
120  flb_downstream.h
121  flb_downstream_conn.h
122  flb_dump.h
123  flb_endian.h
124  flb_engine.h
125  flb_engine_dispatch.h
126  flb_engine_macros.h
127  flb_env.h
128  flb_error.h
129  flb_event.h
130  flb_event_loop.h
131  flb_file.h
132  flb_filter.h
133  flb_filter_plugin.h
134  flb_fstore.h
135  flb_gzip.h
136  flb_hash.h
137  flb_hash_table.h
138  flb_help.h
139  flb_hmac.h
140  flb_http_client.h
141  flb_http_client_debug.h
142  flb_http_server.h
143  flb_info.h
144  flb_input.h
145  flb_input_chunk.h
146  flb_input_log.h
147  flb_input_metric.h
148  flb_input_plugin.h
149  flb_input_thread.h
150  flb_input_trace.h
151  flb_intermediate_metric.h
152  flb_io.h
153  flb_jsmn.h
154  flb_kafka.h
155  flb_kernel.h
156  flb_kv.h
157  flb_langinfo.h
158  flb_lib.h
159  flb_log.h
160  flb_lua.h
161  flb_luajit.h
162  flb_macros.h
163  flb_mem.h
164  flb_meta.h
165  flb_metrics.h
166  flb_metrics_exporter.h
167  flb_mp.h
168  flb_net_dns.h
169  flb_network.h
170  flb_oauth2.h
171  flb_output.h
172  flb_output_plugin.h
173  flb_output_thread.h
174  flb_pack.h
175  flb_parser.h
176  flb_parser_decoder.h
177  flb_pipe.h
178  flb_plugin.h
179  flb_plugin_proxy.h
180  flb_pthread.h
181  flb_ra_key.h
182  flb_random.h
183  flb_record_accessor.h
184  flb_regex.h
185  flb_ring_buffer.h
186  flb_router.h
187  flb_routes_mask.h
188  flb_s3_local_buffer.h
189  flb_scheduler.h
190  flb_sds.h
191  flb_sds_list.h
192  flb_signv4.h
193  flb_slist.h
194  flb_snappy.h
195  flb_socket.h
196  flb_sosreport.h
197  flb_sqldb.h
198  flb_stacktrace.h
199  flb_storage.h
200  flb_str.h
201  flb_stream.h
202  flb_strptime.h
203  flb_task.h
204  flb_task_map.h
205  flb_thread_pool.h
206  flb_thread_storage.h
207  flb_time.h
208  flb_time_utils.h
209  flb_typecast.h
210  flb_unescape.h
211  flb_upstream.h
212  flb_upstream_conn.h
213  flb_upstream_ha.h
214  flb_upstream_node.h
215  flb_upstream_queue.h
216  flb_uri.h
217  flb_utf8.h
218  flb_utils.h
219  flb_version.h
220  flb_worker.h
221 include/fluent-bit/tls/
222  flb_tls.h
223  flb_tls_info.h
224 include/fluent-bit/wasm/flb_wasm.h
225 include/monkey/mk_core.h
226 include/monkey/mk_core/
227  mk_dep_unistd.h
228  mk_dirent.h
229  mk_event.h
230  mk_event_epoll.h
231  mk_event_kqueue.h
232  mk_event_libevent.h
233  mk_event_select.h
234  mk_file.h
235  mk_getopt.h
236  mk_iov.h
237  mk_limits.h
238  mk_list.h
239  mk_macros.h
240  mk_memory.h
241  mk_pipe.h
242  mk_pthread.h
243  mk_rconf.h
244  mk_sleep.h
245  mk_string.h
246  mk_thread.h
247  mk_thread_channel.h
248  mk_uio.h
249  mk_unistd.h
250  mk_utils.h
251 lib/fluent-bit/libfluent-bit.so
252
253
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.
257
258 --- include/fluent-bit/flb_coro.h.orig  2022-11-22 14:33:00 UTC
259 +++ include/fluent-bit/flb_coro.h
260 @@ -20,11 +20,6 @@
261  #ifndef FLB_CORO_H
262  #define FLB_CORO_H
263  
264 -/* Required by OSX */
265 -#ifndef _XOPEN_SOURCE
266 -#define _XOPEN_SOURCE
267 -#endif
268 -
269  #ifndef _DEFAULT_SOURCE
270  #define _DEFAULT_SOURCE
271  #endif
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
275  #else
276 +# if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN)
277 +#include <machine/vmparam.h>
278 +#define FLB_CORO_STACK_SIZE_BYTE      (16 * PAGE_SIZE)
279 +# else
280  #define FLB_CORO_STACK_SIZE_BYTE      ((3 * PTHREAD_STACK_MIN) / 2)
281 +# endif
282  #endif
283  
284  #define FLB_CORO_DATA(coro)      (((char *) coro) + sizeof(struct flb_coro))
285
286
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.
289
290 --- include/fluent-bit/flb_endian.h.orig        2022-11-22 14:33:00 UTC
291 +++ include/fluent-bit/flb_endian.h
292 @@ -39,7 +39,7 @@
293   */
294  #if defined(__GLIBC__)
295  #include <endian.h>
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>
301
302
303 [FILE:272:patches/patch-include_fluent-bit_flb__output.h]
304 --- include/fluent-bit/flb_output.h.orig        2022-11-22 14:33:00 UTC
305 +++ include/fluent-bit/flb_output.h
306 @@ -20,10 +20,6 @@
307  #ifndef FLB_OUTPUT_H
308  #define FLB_OUTPUT_H
309  
310 -#ifndef _XOPEN_SOURCE
311 -#define _XOPEN_SOURCE
312 -#endif
313 -
314  #ifndef _GNU_SOURCE
315  #define _GNU_SOURCE
316  #endif
317
318
319 [FILE:388:patches/patch-lib_chunkio_deps_crc32_crc32.c]
320 --- lib/chunkio/deps/crc32/crc32.c.orig 2022-11-22 14:33:00 UTC
321 +++ lib/chunkio/deps/crc32/crc32.c
322 @@ -34,7 +34,7 @@
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>
331
332
333 [FILE:617:patches/patch-lib_luajit-cmake_LuaJIT.cmake]
334 --- lib/luajit-cmake/LuaJIT.cmake.orig  2022-11-22 14:33:00 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)
344  else()
345
346
347 [FILE:840:patches/patch-lib_monkey_CMakeLists.txt]
348 --- lib/monkey/CMakeLists.txt.orig      2022-11-22 14:33:00 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)
362    set(MK_BACKTRACE No)
363 -else()
364 -  MK_DEFINITION(MK_HAVE_BACKTRACE)
365  endif()
366  
367  # Check for LTTng-UST
368
369
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.
372
373 --- lib/monkey/include/monkey/mk_thread_libco.h.orig    2022-11-22 14:33:00 UTC
374 +++ lib/monkey/include/monkey/mk_thread_libco.h
375 @@ -51,7 +51,12 @@ struct mk_thread {
376      void (*cb_destroy) (void *);
377  };
378  
379 +#if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN)
380 +#include <machine/vmparam.h>
381 +#define MK_THREAD_STACK_SIZE      (16 * PAGE_SIZE)
382 +#else
383  #define MK_THREAD_STACK_SIZE      ((3 * PTHREAD_STACK_MIN) / 2)
384 +#endif
385  #define MK_THREAD_DATA(th)        (((char *) th) + sizeof(struct mk_thread))
386  
387  extern MK_EXPORT MK_TLS_DEFINE(struct mk_thread, mk_thread);
388
389
390 [FILE:491:patches/patch-lib_monkey_mk__core_deps_libevent_buffer.c]
391 --- lib/monkey/mk_core/deps/libevent/buffer.c.orig      2022-11-22 14:33:00 UTC
392 +++ lib/monkey/mk_core/deps/libevent/buffer.c
393 @@ -108,6 +108,9 @@
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
403
404
405 [FILE:804:patches/patch-lib_monkey_mk__core_deps_libevent_kqueue.c]
406 --- lib/monkey/mk_core/deps/libevent/kqueue.c.orig      2022-11-22 14:33:00 UTC
407 +++ lib/monkey/mk_core/deps/libevent/kqueue.c
408 @@ -50,7 +50,7 @@
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))
416  #else
417
418
419 [FILE:440:patches/patch-lib_monkey_mk__server_CMakeLists.txt]
420 --- lib/monkey/mk_server/CMakeLists.txt.orig    2022-11-22 14:33:00 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)
424  endif()
425  
426 -# FreeBSD backtrace
427 -if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
428 -  target_link_libraries(monkey-core-static execinfo)
429 -endif()
430  
431  if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
432    target_link_libraries(monkey-core-static socket nsl)
433
434
435 [FILE:366:patches/patch-lib_monkey_plugins_liana_liana.c]
436 --- lib/monkey/plugins/liana/liana.c.orig       2022-11-22 14:33:00 UTC
437 +++ lib/monkey/plugins/liana/liana.c
438 @@ -109,7 +109,7 @@ int mk_liana_send_file(int socket_fd, in
439          return len;
440      }
441      return ret;
442 -#elif defined (__FreeBSD__)
443 +#elif defined (__FreeBSD__) || defined(__DragonFly__)
444      off_t offset = *file_offset;
445      off_t len = (off_t) file_count;
446  
447
448
449 [FILE:319:patches/patch-lib_snappy-fef67ac_compat.h]
450 --- lib/snappy-fef67ac/compat.h.orig    2022-11-22 14:33:00 UTC
451 +++ lib/snappy-fef67ac/compat.h
452 @@ -4,6 +4,8 @@
453  
454  #ifdef __FreeBSD__
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>
460  
461
462
463 [FILE:904:patches/patch-src_flb__network.c]
464 --- src/flb_network.c.orig      2022-11-22 14:33:00 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)
469  {
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;
474  #endif
475 @@ -1819,7 +1819,7 @@ static int net_address_unix_socket_peer_
476          return -1;
477      }
478  
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);
482  
483      result = getsockopt(fd,
484
485
486 [FILE:700:files/fluent-bit.in]
487 #!/bin/sh
488
489 # PROVIDE: fluent-bit
490 # REQUIRE: DAEMON
491 # BEFORE: LOGIN
492 # KEYWORD: shutdown
493
494 # Add the following lines to /etc/rc.conf to enable fluent-bit:
495 #
496 # fluent_bit_enable (bool):     Set to YES to enable fluent-bit
497 #                               Default: NO
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
502
503 . /etc/rc.subr
504
505 name="fluent_bit"
506 rcvar=${name}_enable
507 load_rc_config $name
508
509 : ${fluent_bit_enable:="NO"}
510 : ${fluent_bit_user:="nobody"}
511
512 command=%%PREFIX%%/bin/fluent-bit
513 command_args="--quiet --daemon --config %%ETCDIR%%/fluent-bit.conf"
514
515 run_rc_command "$1"
516