Skip to content

Commit 7a5456e

Browse files
committed
Add FreeBSD port
1 parent a0c5d89 commit 7a5456e

File tree

5 files changed

+90
-4
lines changed

5 files changed

+90
-4
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

24-
- name: Build on FreeBSD
24+
- name: Build
2525
id: build
2626
uses: vmactions/freebsd-vm@v1
2727
with:
@@ -36,11 +36,20 @@ jobs:
3636
cd pfSense-pkg-NetBird
3737
make
3838
make package
39-
ls -lh
39+
cd ../netbird
40+
make makesum
41+
make package
4042
41-
- name: Upload package artifact
43+
- name: Upload pfSense package artifact
4244
uses: actions/upload-artifact@v4
4345
with:
4446
name: pfSense-package
4547
path: pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg
46-
retention-days: 7
48+
retention-days: 3
49+
50+
- name: Upload FreeBSD package artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: freebsd-package
54+
path: netbird/work/pkg/netbird-*.pkg
55+
retention-days: 3

netbird/Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
PORTNAME= netbird
2+
DISTVERSIONPREFIX= v
3+
DISTVERSION= 0.49.0
4+
CATEGORIES= security net net-vpn
5+
6+
MAINTAINER= [email protected]
7+
COMMENT= Peer-to-peer VPN that seamlessly connects your devices
8+
WWW= https://netbird.io/
9+
10+
LICENSE= BSD3CLAUSE
11+
LICENSE_FILE= ${WRKSRC}/LICENSE
12+
13+
NOT_FOR_ARCHS= i386
14+
NOT_FOR_ARCHS_REASON= "no 32-bit builds supported"
15+
16+
RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss
17+
18+
USES= go:1.23,modules
19+
USE_RC_SUBR= netbird
20+
21+
GO_MODULE= github.com/netbirdio/netbird
22+
GO_TARGET= ./client:netbird
23+
GO_BUILDFLAGS= -tags freebsd -o ${PORTNAME} -ldflags "\
24+
-s -w -X github.com/netbirdio/netbird/version.version=${PORTVERSION}"
25+
26+
WRKSRC= ${WRKDIR}/netbird-${PORTVERSION}
27+
28+
PLIST_FILES= bin/netbird
29+
30+
.include <bsd.port.mk>

netbird/files/netbird.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
#
3+
# PROVIDE: netbird
4+
# REQUIRE: SERVERS
5+
# KEYWORD: shutdown
6+
#
7+
8+
. /etc/rc.subr
9+
10+
name="netbird"
11+
netbird_env="IS_DAEMON=1"
12+
pidfile="/var/run/${name}.pid"
13+
command="/usr/sbin/daemon"
14+
daemon_args="-P ${pidfile} -r -t \"${name}: daemon\""
15+
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"
16+
17+
run_rc_command "$1"
18+

netbird/pkg-descr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
NetBird is an open-source WireGuard-based overlay network combined with
2+
Zero Trust Network Access, providing secure and reliable connectivity
3+
to internal resources.
4+
5+
Key features:
6+
- Zero-config VPN: Easily create secure connections between devices without
7+
manual network setup.
8+
- Built on WireGuard: Leverages WireGuard's high-performance encryption for
9+
fast and secure communication.
10+
- Self-hosted or Cloud-managed: Users can deploy their own NetBird management
11+
server or use NetBird Cloud for centralized control.
12+
- Access Control & Routing: Fine-grained access control policies and automatic
13+
network routing simplify connectivity.
14+
- This FreeBSD port provides the NetBird client daemon and CLI tools, allowing
15+
FreeBSD systems to join a NetBird mesh network and securely communicate with
16+
other peers.
17+
18+
For more details, visit: https://netbird.io

netbird/pkg-message

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{ type: install
3+
message: <<EOM
4+
At this time this code is new, unvetted, possibly buggy, and should be
5+
considered "experimental". It might contain security issues. We gladly
6+
welcome your testing and bug reports, but do keep in mind that this code
7+
is new, so some caution should be exercised at the moment for using it
8+
in mission critical environments.
9+
EOM
10+
}
11+
]

0 commit comments

Comments
 (0)