From nobody Sun May 05 14:44:26 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VXS3t5PCQz5K472; Sun, 05 May 2024 14:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VXS3t4sHdz4kqs; Sun, 5 May 2024 14:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714920266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juT2ul39CHyvkaae1jPvYfBV6IHJOQj2JxXSFqyf88w=; b=gdSU6dk0ZnRtXsLU+b7ILZRH/8Lu4jvn+hD+bmRKbqCujcWRwRrRWR54p6skvCvjJDlUbk NvRJbh3awS5/g3ol34kq6acbm/Wx9ThT7xbxkU0pDduR6w4FLYyjyTXn0gphGkdisSsLZY 4D4vk1jxLQpNHic1ySazv0Tk2I1vYIwbAWIVg+gTmV0097UlvWZAPCeLC3BeGRWl2sp2jd g/n6ZLNuFkdMbsxR4gO4AThQaCkYPJ5ZI1faeR/dfdsynZQ51ahCaZdjGLU1rojoFrxn9j tQRlwmz/QXuuVzD8SbImsRVhfWM0mt73cPydvH1GUQHMWKzlOk/1JdQQKUp1iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714920266; a=rsa-sha256; cv=none; b=ONYN8O4O41oW5zL8K4aTF5DwjS427sIb7bS7b/VUKe8U6DSSoi9DnOKj6bqWr1Bb3qn9+c aAkzK9pLRnLlr2qKKZqmn6vYNPQ1qc2mb0yVG7ffI5HT+cSPjwmpAFnoDhHn7yu3zToHnw l5+0oKlaNzivnei2O00U3Wd/lHuUq/rY8jW49fdfcdyWYLXVB1+c9OIYXZ9p5tL5Riw2u2 190xltMENzJwZ3g+PB9lm+kEqDwsJWPYdW3S8O2jzHe2Rh/nK8JMbEsfVDjUVndgEQ9Mzy Bpqy5smYga0+iRVGk8X+arvEPgpSDNmUVbrrlof/BmhY6ni83HG0fe2d6UT/IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714920266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juT2ul39CHyvkaae1jPvYfBV6IHJOQj2JxXSFqyf88w=; b=MjI4blS69IeNL5fzmsCzOuEqUTWbnORieYc5gZa2AiPgOTDjIWm01/HYn685SApWMorGvT qIQjNwtWwA/swprOmKVtwdUIzOTEkp4CiE4+x36VLeQR4GslbNrfLv5sobgNV7V1APF6qE Cynd8qHN0nS/yOEYkZCD85vxf7K9x58Es7JpVufFuWt9VXgYA4XhW//HzxcW+Xw18pZJj0 hYSwfenehOEk8JvlLPptv0uHRI/+i6/aHtmgY+yPOVpOF+2FlLizkegX2ikXhcFmJaPrd3 qkqxia4nAwe1DubCygalC3hMPjDqe7G6WHUlUEB0h8neMEiA5q5okUQiN0AZLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VXS3t4RmmzHc1; Sun, 5 May 2024 14:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 445EiQfb028497; Sun, 5 May 2024 14:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 445EiQgm028494; Sun, 5 May 2024 14:44:26 GMT (envelope-from git) Date: Sun, 5 May 2024 14:44:26 GMT Message-Id: <202405051444.445EiQgm028494@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jimmy Olgeni Subject: git: 170431212955 - main - net/benthos: Add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olgeni X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17043121295573db9777f6dd31364ee356e3154c Auto-Submitted: auto-generated The branch main has been updated by olgeni: URL: https://cgit.FreeBSD.org/ports/commit/?id=17043121295573db9777f6dd31364ee356e3154c commit 17043121295573db9777f6dd31364ee356e3154c Author: Jimmy Olgeni AuthorDate: 2024-05-05 14:08:37 +0000 Commit: Jimmy Olgeni CommitDate: 2024-05-05 14:43:31 +0000 net/benthos: Add new port Benthos solves common data engineering tasks such as transformations, integrations, and multiplexing with declarative and unit testable configuration. This allows you to easily and incrementally adapt your data pipelines as requirements change, letting you focus on the more exciting stuff. Benthos is able to glue a wide range of sources and sinks together and hook into a variety of databases, caches, HTTP APIs, lambdas and more, enabling you to seamlessly drop it into your existing infrastructure. --- GIDs | 2 +- UIDs | 2 +- net/Makefile | 1 + net/benthos/Makefile | 33 ++++++++++++++++++++++++ net/benthos/distinfo | 7 +++++ net/benthos/files/benthos.in | 60 +++++++++++++++++++++++++++++++++++++++++++ net/benthos/files/config.yaml | 27 +++++++++++++++++++ net/benthos/pkg-descr | 15 +++++++++++ 8 files changed, 145 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index c406ff64d990..d98be0309a9c 100644 --- a/GIDs +++ b/GIDs @@ -275,7 +275,7 @@ svxlink:*:331: keycloak:*:332: honeytrap:*:333: percona:*:334: -# free: 335 +benthos:*:335: # free: 336 daapd:*:337: murmur:*:338: diff --git a/UIDs b/UIDs index 6c7bb79453ba..0e43c506f91e 100644 --- a/UIDs +++ b/UIDs @@ -280,7 +280,7 @@ svxlink:*:331:331::0:0:svxlink server:/nonexistent:/usr/sbin/nologin keycloak:*:332:332::0:0:keycloak server:/nonexistent:/usr/sbin/nologin honeytrap:*:333:333::0:0:HoneyTrap Daemon:/nonexistent:/usr/sbin/nologin percona:*:334:334::0:0:Percona Daemons:/nonexistent:/usr/sbin/nologin -# free: 335 +benthos:*:335:335::0:0:Benthos Daemon:/nonexistent:/usr/sbin/nologin _pma:*:336:80::0:0:phpMyAdmin Owner:/nonexistent:/usr/sbin/nologin daapd:*:337:337::0:0:daapd User:/nonexistent:/usr/sbin/nologin murmur:*:338:338::0:0:& User:/nonexistent:/usr/sbin/nologin diff --git a/net/Makefile b/net/Makefile index 265fe9d9eba9..36041d1b163d 100644 --- a/net/Makefile +++ b/net/Makefile @@ -52,6 +52,7 @@ SUBDIR += beacon SUBDIR += beanstalkd SUBDIR += belle-sip + SUBDIR += benthos SUBDIR += bindtest SUBDIR += binkd SUBDIR += bird diff --git a/net/benthos/Makefile b/net/benthos/Makefile new file mode 100644 index 000000000000..1a77541db6f3 --- /dev/null +++ b/net/benthos/Makefile @@ -0,0 +1,33 @@ +PORTNAME= benthos +PORTVERSION= 4.27.0 +DISTVERSIONPREFIX= v +CATEGORIES= net + +MAINTAINER= olgeni@FreeBSD.org +COMMENT= Stream processor for a wide array of data sources and sinks +WWW= https://www.benthos.dev/ + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:modules +USE_GITHUB= yes +GH_ACCOUNT= benthosdev +USE_RC_SUBR= benthos + +GO_MODULE= github.com/benthosdev/benthos/v4 +GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} +GO_TARGET= ./cmd/benthos + +USERS= benthos +GROUPS= benthos + +PLIST_FILES= bin/benthos \ + "@dir(,,755) %%ETCDIR%%" \ + "@sample %%ETCDIR%%/config.yaml.sample" + +post-install: + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${FILESDIR}/config.yaml ${STAGEDIR}${ETCDIR}/config.yaml.sample + +.include diff --git a/net/benthos/distinfo b/net/benthos/distinfo new file mode 100644 index 000000000000..8eee0cc40fef --- /dev/null +++ b/net/benthos/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1714857427 +SHA256 (go/net_benthos/benthosdev-benthos-v4.27.0_GH0/v4.27.0.mod) = 8fbe69c73f2e5da6b0169269b175adfe0edb34b33b401162960d04ef455933eb +SIZE (go/net_benthos/benthosdev-benthos-v4.27.0_GH0/v4.27.0.mod) = 17442 +SHA256 (go/net_benthos/benthosdev-benthos-v4.27.0_GH0/v4.27.0.zip) = 94b8ad0e6f6feb7138391c96580e9a3482f1a5e0f8631d4839ebd182b935e21e +SIZE (go/net_benthos/benthosdev-benthos-v4.27.0_GH0/v4.27.0.zip) = 3980482 +SHA256 (go/net_benthos/benthosdev-benthos-v4.27.0_GH0/benthosdev-benthos-v4.27.0_GH0.tar.gz) = f196b90d1df54641110f9ac04e7b82c079190495e1a26785056cc9bd8abd2e09 +SIZE (go/net_benthos/benthosdev-benthos-v4.27.0_GH0/benthosdev-benthos-v4.27.0_GH0.tar.gz) = 2917074 diff --git a/net/benthos/files/benthos.in b/net/benthos/files/benthos.in new file mode 100644 index 000000000000..e042c13e5896 --- /dev/null +++ b/net/benthos/files/benthos.in @@ -0,0 +1,60 @@ +#!/bin/sh +# +# PROVIDE: benthos +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to run NATS: +# +# benthos_enable (bool): Set it to "YES" to enable benthos. +# Default is "NO". +# benthos_user: User name to run as. default "benthos" +# benthos_group: Group name to run as. default "benthos" +# benthos_resources: Path to benthos resources files (glob). +# benthos_config: Path to benthos configuration file. +# benthos_watcher (bool): Set it to "YES" to enable benthos watcher mode. +# Default is "NO". +# benthos_options: Options to pass benthos +# (e.g. 'streams' for streams mode). +# + +. /etc/rc.subr + +name=benthos +rcvar=`set_rcvar` + +load_rc_config ${name} + +: ${benthos_enable:=NO} +: ${benthos_user:=benthos} +: ${benthos_group:=benthos} +: ${benthos_resources:=""} +: ${benthos_config:="%%PREFIX%%/etc/benthos/config.yaml"} +: ${benthos_watcher:=NO} +: ${benthos_options=""} + +if [ -n "${benthos_resources}" ]; then + benthos_options="--resources '${benthos_resources}' ${benthos_options}" +fi + +if [ -n "${benthos_config}" ]; then + benthos_options="--config ${benthos_config} ${benthos_options}" +fi + +if checkyesno benthos_watcher; then + benthos_options="--watcher ${benthos_options}" +fi + +start_precmd=benthos_start_precmd + +pidfile="/var/run/${name}.pid" +procname=%%PREFIX%%/bin/benthos +command=/usr/sbin/daemon +command_args="-p ${pidfile} ${procname} ${benthos_options}" + +benthos_start_precmd() +{ + install -o ${benthos_user} -g ${benthos_group} /dev/null ${pidfile} +} + +run_rc_command "$1" diff --git a/net/benthos/files/config.yaml b/net/benthos/files/config.yaml new file mode 100644 index 000000000000..9cd7eb3128b1 --- /dev/null +++ b/net/benthos/files/config.yaml @@ -0,0 +1,27 @@ +# Sample configuration file for Benthos. It saves all messages to a file (/tmp/benthos.txt). +http: + enabled: true + address: 127.0.0.1:4195 + root_path: / + debug_endpoints: false +input: + http_server: + path: /post + ws_path: /post/ws + ws_welcome_message: "Welcome to the Benthos Websocket API." + allowed_verbs: + - POST + timeout: 5s + cors: + enabled: false + allowed_origins: [] + sync_response: + status: "200" + headers: + Content-Type: application/octet-stream +output: + file: + path: /tmp/benthos.txt + codec: lines +shutdown_delay: 0s +shutdown_timeout: 20s diff --git a/net/benthos/pkg-descr b/net/benthos/pkg-descr new file mode 100644 index 000000000000..85ca5f5a8c02 --- /dev/null +++ b/net/benthos/pkg-descr @@ -0,0 +1,15 @@ +Benthos solves common data engineering tasks such as transformations, +integrations, and multiplexing with declarative and unit testable +configuration. This allows you to easily and incrementally adapt your data +pipelines as requirements change, letting you focus on the more exciting stuff. + +It comes armed with a wide range of processors, a lit mapping language, +stateless windowed processing capabilities and an industry leading mascot. + +Benthos is able to glue a wide range of sources and sinks together and hook +into a variety of databases, caches, HTTP APIs, lambdas and more, enabling you +to seamlessly drop it into your existing infrastructure. + +Working with disparate APIs and services can be a daunting task, doubly so in a +streaming data context. With Benthos it's possible to break these tasks down +and automatically parallelize them as a streaming workflow.