git: e3ce7637de5f - main - security/netbird: New Port: wireguard based VPN client

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Sun, 11 May 2025 10:22:36 UTC
The branch main has been updated by pi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e3ce7637de5f9b9056f7dc9b10069f89d41ecabd

commit e3ce7637de5f9b9056f7dc9b10069f89d41ecabd
Author:     Hakan Sarıman <hakan.external@netbird.io>
AuthorDate: 2025-05-11 10:09:46 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2025-05-11 10:22:28 +0000

    security/netbird: New Port: wireguard based VPN client
    
    NetBird is an open-source WireGuard-based overlay network combined with
    Zero Trust Network Access, providing secure and reliable connectivity
    to internal resources.
    
    Key features:
    - Zero-config VPN: Easily create secure connections between devices without
      manual network setup.
    - Built on WireGuard: Leverages WireGuard's high-performance encryption for
      fast and secure communication.
    - Self-hosted or Cloud-managed: Users can deploy their own NetBird management
      server or use NetBird Cloud for centralized control.
    - Access Control & Routing: Fine-grained access control policies and automatic
      network routing simplify connectivity.
    - This FreeBSD port provides the NetBird client daemon and CLI tools,
      allowing FreeBSD systems to join a NetBird mesh network and securely
      communicate with other peers.
    
    For more details, visit: https://netbird.io
    
    PR:             284877
---
 security/Makefile                 |  1 +
 security/netbird/Makefile         | 30 ++++++++++++++++++++++++++++++
 security/netbird/distinfo         |  5 +++++
 security/netbird/files/netbird.in | 18 ++++++++++++++++++
 security/netbird/pkg-descr        | 18 ++++++++++++++++++
 5 files changed, 72 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index b697cb9b4465..54b0a4ba353f 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -400,6 +400,7 @@
     SUBDIR += ncrack
     SUBDIR += ncrypt
     SUBDIR += nebula
+    SUBDIR += netbird
     SUBDIR += nettle
     SUBDIR += nextcloud-end_to_end_encryption
     SUBDIR += nextcloud-passman
diff --git a/security/netbird/Makefile b/security/netbird/Makefile
new file mode 100644
index 000000000000..ac0494289a48
--- /dev/null
+++ b/security/netbird/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	netbird
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.41.2
+CATEGORIES=	security net net-vpn
+
+MAINTAINER=	hakan.external@netbird.io
+COMMENT=	Peer-to-peer VPN that seamlessly connects your devices
+WWW=		https://netbird.io/
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+NOT_FOR_ARCHS=	i386
+NOT_FOR_ARCHS_REASON=	"no 32-bit builds supported"
+
+RUN_DEPENDS=	ca_root_nss>0:security/ca_root_nss
+
+USES=		go:1.23,modules
+USE_RC_SUBR=	netbird
+
+GO_MODULE=	github.com/netbirdio/netbird
+GO_TARGET=	./client:netbird
+GO_BUILDFLAGS=			-tags freebsd -o ${PORTNAME} -ldflags "\
+						-s -w -X github.com/netbirdio/netbird/version.version=${PORTVERSION}"
+
+WRKSRC=		${WRKDIR}/netbird-${PORTVERSION}
+
+PLIST_FILES=	bin/netbird
+
+.include <bsd.port.mk>
diff --git a/security/netbird/distinfo b/security/netbird/distinfo
new file mode 100644
index 000000000000..e17c221ae8c9
--- /dev/null
+++ b/security/netbird/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1742927796
+SHA256 (go/security_netbird/netbird-v0.41.2/v0.41.2.mod) = 3649cbceb472822d76d4ce2db77665ff47ba2573b0151b3e63a69ec063518320
+SIZE (go/security_netbird/netbird-v0.41.2/v0.41.2.mod) = 12115
+SHA256 (go/security_netbird/netbird-v0.41.2/v0.41.2.zip) = b1c371b36075221150f53a6d651ec9cab9e30263a2d55975b1587c43e6c29bb9
+SIZE (go/security_netbird/netbird-v0.41.2/v0.41.2.zip) = 2821494
diff --git a/security/netbird/files/netbird.in b/security/netbird/files/netbird.in
new file mode 100644
index 000000000000..191491ea3604
--- /dev/null
+++ b/security/netbird/files/netbird.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# PROVIDE: netbird
+# REQUIRE: SERVERS
+# KEYWORD: shutdown
+#
+
+. /etc/rc.subr
+
+name="netbird"
+netbird_env="IS_DAEMON=1"
+pidfile="/var/run/${name}.pid"
+command="/usr/sbin/daemon"
+daemon_args="-P ${pidfile} -r -t \"${name}: daemon\""
+command_args="${daemon_args} /usr/local/bin/netbird service run --config /var/db/netbird/config.json --log-level info --daemon-addr unix:///var/run/netbird.sock --log-file /var/log/netbird/client.log"
+
+run_rc_command "$1"
+
diff --git a/security/netbird/pkg-descr b/security/netbird/pkg-descr
new file mode 100644
index 000000000000..e3c155b98d5e
--- /dev/null
+++ b/security/netbird/pkg-descr
@@ -0,0 +1,18 @@
+NetBird is an open-source WireGuard-based overlay network combined with
+Zero Trust Network Access, providing secure and reliable connectivity
+to internal resources.
+
+Key features:
+- Zero-config VPN: Easily create secure connections between devices without
+manual network setup.
+- Built on WireGuard: Leverages WireGuard's high-performance encryption for
+fast and secure communication.
+- Self-hosted or Cloud-managed: Users can deploy their own NetBird management
+server or use NetBird Cloud for centralized control.
+- Access Control & Routing: Fine-grained access control policies and automatic
+network routing simplify connectivity.
+- This FreeBSD port provides the NetBird client daemon and CLI tools, allowing
+FreeBSD systems to join a NetBird mesh network and securely communicate with
+other peers.
+
+For more details, visit: https://netbird.io