From 446265431bfe0ff5d9ec6800aebfa46a39af6ed9 Mon Sep 17 00:00:00 2001 From: Wesley Gimenes Date: Tue, 17 Feb 2026 04:04:06 -0300 Subject: [PATCH 1/3] netbird: move state file to reduce storage wear Add `NB_DNS_STATE_FILE="/var/lib/netbird/state.json"` to the init environment. This moves the state from the directory `/root/.config/netbird` to the file `/var/lib/netbird/state.json` to avoid storage wear. Note: the file is not preserved across reboots. The state file contains information such as locally disabled routes and other data primarily useful for desktop clients. In OpenWrt setups, these changes are normally handled by the NetBird `management` server. This matches the behavior prior to `netbird` v0.52.x, I have not received any reports that this file caused problems before, so it is unlikely to cause issues now. The previous state file `/root/.config/netbird/state.json` can be removed. Signed-off-by: Wesley Gimenes (cherry picked from commit 696c2b6096f78fb74d8fb5a5514cc9d653795840) --- net/netbird/Makefile | 2 +- net/netbird/files/netbird.init | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/netbird/Makefile b/net/netbird/Makefile index d349b525d2adcc..29d95a4d6bd40a 100644 --- a/net/netbird/Makefile +++ b/net/netbird/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netbird PKG_VERSION:=0.60.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)? diff --git a/net/netbird/files/netbird.init b/net/netbird/files/netbird.init index 6072e2d2c3438e..533404a075412f 100755 --- a/net/netbird/files/netbird.init +++ b/net/netbird/files/netbird.init @@ -12,6 +12,7 @@ start_service() { procd_set_param env NB_STATE_DIR="/root/.config/netbird" procd_append_param env NB_DISABLE_SSH_CONFIG="1" + procd_append_param env NB_DNS_STATE_FILE="/var/lib/netbird/state.json" procd_set_param pidfile /var/run/netbird.pid procd_close_instance From c740419b193613a4853e38901562102d33b94f3b Mon Sep 17 00:00:00 2001 From: Wesley Gimenes Date: Tue, 17 Feb 2026 02:45:20 -0300 Subject: [PATCH 2/3] netbird: update to 0.61.2 (breaking change) Changelog: https://github.com/netbirdio/netbird/releases/tag/v0.61.2 The second release of `netbird` that introduces a breaking change[1]. A backport will be provided for OpenWrt 25.12 but not for OpenWrt 24.10, since OpenWrt 25.12 has not been released yet. NetBird adds **fine-grained SSH access control**[2]. Self-hosters must update both the `management` and `dashboard`[3]. [1]: https://forum.netbird.io/t/upcoming-breaking-changes-to-netbird-ssh/401 [2]: https://docs.netbird.io/manage/peers/ssh#fine-grained-access-control [3]: https://docs.netbird.io/manage/peers/ssh#v0-61-0 Signed-off-by: Wesley Gimenes (cherry picked from commit 291dacc67ce56c21dc81445a2233979b4511741f) --- net/netbird/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/netbird/Makefile b/net/netbird/Makefile index 29d95a4d6bd40a..f1734e31bda55e 100644 --- a/net/netbird/Makefile +++ b/net/netbird/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netbird -PKG_VERSION:=0.60.8 -PKG_RELEASE:=2 +PKG_VERSION:=0.61.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=c7d13a75dc1e245cafff371e63d20b7f8c977179a3b956ef4ba6caafa7998425 +PKG_HASH:=6a13cba1a1176faf6932926e04cf09916dbfd1e42a269709416eb0b8a8ee3b2a PKG_MAINTAINER:=Wesley Gimenes PKG_LICENSE:=BSD-3-Clause From ab91a14afcb36579b17f93d79e8e96a6449070a3 Mon Sep 17 00:00:00 2001 From: Wesley Gimenes Date: Tue, 17 Feb 2026 03:21:11 -0300 Subject: [PATCH 3/3] netbird: update to 0.66.2, patch for Go 1.26 build Changelog: https://github.com/netbirdio/netbird/releases/tag/v0.66.2 NetBird `v0.66.x` adds support for exposing a local HTTP service from the CLI with the `netbird expose`[1] command, but only for self-hosted deployments. Cloud support is coming. [1]: https://docs.netbird.io/manage/reverse-proxy/expose-from-cli --- `0.65.x` highlights Changelog: https://github.com/netbirdio/netbird/releases/tag/v0.65.3 NetBird `v0.65.x` now includes a built-in reverse proxy[1], but only for self-hosted deployments and is currently in beta. Cloud support is coming soon. Important: pre-shared keys or Rosenpass are currently incompatible with the reverse proxy feature. [1]: https://docs.netbird.io/manage/reverse-proxy --- `v0.63.x` highlights Changelog: https://github.com/netbirdio/netbird/releases/tag/v0.63.0 NetBird now supports private DNS zones[1]. [1]: https://docs.netbird.io/manage/dns/custom-zones --- `v0.62.x` highlights Changelog: https://github.com/netbirdio/netbird/releases/tag/v0.62.3 Upstream minimum Go requirement raised from `v1.24.x` to `v1.25.x`, see the go.mod[1]. [1]: https://github.com/netbirdio/netbird/blob/v0.62.3/go.mod#L3-L5 --- Building `netbird` with Go 1.26.x fails with errors: ``` [...] /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go126.go:22:2: WaitReasonSelect redeclared in this block /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go125.go:22:2: other declaration of WaitReasonSelect /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go126.go:23:2: WaitReasonChanReceive redeclared in this block /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go125.go:23:2: other declaration of WaitReasonChanReceive /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go126.go:24:2: WaitReasonSemacquire redeclared in this block /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go125.go:24:2: other declaration of WaitReasonSemacquire [...] ``` Upstream Issue: https://github.com/netbirdio/netbird/issues/5290 Upstream PR: https://github.com/netbirdio/netbird/pull/5447 Signed-off-by: Wesley Gimenes (cherry picked from commit df6533b96e78da83f5fda584759571217a236b63) --- net/netbird/Makefile | 4 +- ...pdate_gvisor_to_build_with_Go_1.26.x.patch | 58 +++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 net/netbird/patches/0100-client_update_gvisor_to_build_with_Go_1.26.x.patch diff --git a/net/netbird/Makefile b/net/netbird/Makefile index f1734e31bda55e..d016759c4bb739 100644 --- a/net/netbird/Makefile +++ b/net/netbird/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netbird -PKG_VERSION:=0.61.2 +PKG_VERSION:=0.66.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=6a13cba1a1176faf6932926e04cf09916dbfd1e42a269709416eb0b8a8ee3b2a +PKG_HASH:=a6fd51d14c9508ccaa51dee165de552f04ef78d82ac8ee4a86afd35c93790d87 PKG_MAINTAINER:=Wesley Gimenes PKG_LICENSE:=BSD-3-Clause diff --git a/net/netbird/patches/0100-client_update_gvisor_to_build_with_Go_1.26.x.patch b/net/netbird/patches/0100-client_update_gvisor_to_build_with_Go_1.26.x.patch new file mode 100644 index 00000000000000..af97ed2adb5aa7 --- /dev/null +++ b/net/netbird/patches/0100-client_update_gvisor_to_build_with_Go_1.26.x.patch @@ -0,0 +1,58 @@ +From 9ac6ea431fdc68940785814fc799d7a157bb4323 Mon Sep 17 00:00:00 2001 +From: Wesley Gimenes +Date: Wed, 25 Feb 2026 06:36:10 -0300 +Subject: [PATCH] [client] update gvisor to fix build with Go 1.26.x +Upstream-Status: Submitted [https://github.com/netbirdio/netbird/pull/5447] + +Building the client with the Go 1.26.x you see the error: + +``` +[...] +/builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go126.go:22:2: WaitReasonSelect redeclared in this block + /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go125.go:22:2: other declaration of WaitReasonSelect +/builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go126.go:23:2: WaitReasonChanReceive redeclared in this block + /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go125.go:23:2: other declaration of WaitReasonChanReceive +/builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go126.go:24:2: WaitReasonSemacquire redeclared in this block + /builder/dl/go-mod-cache/gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c/pkg/sync/runtime_constants_go125.go:24:2: other declaration of WaitReasonSemacquire +[...] +``` + +Fixes: https://github.com/netbirdio/netbird/issues/5290 ("Does not build with Go 1.26rc3") + +Signed-off-by: Wesley Gimenes +--- + go.mod | 6 ++---- + go.sum | 4 ++-- + 2 files changed, 4 insertions(+), 6 deletions(-) + +--- a/go.mod ++++ b/go.mod +@@ -1,8 +1,6 @@ + module github.com/netbirdio/netbird + +-go 1.25 +- +-toolchain go1.25.5 ++go 1.25.5 + + require ( + cunicu.li/go-rosenpass v0.4.0 +@@ -125,7 +123,7 @@ require ( + gorm.io/driver/postgres v1.5.7 + gorm.io/driver/sqlite v1.5.7 + gorm.io/gorm v1.25.12 +- gvisor.dev/gvisor v0.0.0-20251031020517-ecfcdd2f171c ++ gvisor.dev/gvisor v0.0.0-20260219192049-0f2374377e89 + ) + + require ( +--- a/go.sum ++++ b/go.sum +@@ -852,5 +852,5 @@ gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1W + gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= + gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= + gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +-gvisor.dev/gvisor v0.0.0-20251031020517-ecfcdd2f171c h1:pfzmXIkkDgydR4ZRP+e1hXywZfYR21FA0Fbk6ptMkiA= +-gvisor.dev/gvisor v0.0.0-20251031020517-ecfcdd2f171c/go.mod h1:/mc6CfwbOm5KKmqoV7Qx20Q+Ja8+vO4g7FuCdlVoAfQ= ++gvisor.dev/gvisor v0.0.0-20260219192049-0f2374377e89 h1:mGJaeA61P8dEHTqdvAgc70ZIV3QoUoJcXCRyyjO26OA= ++gvisor.dev/gvisor v0.0.0-20260219192049-0f2374377e89/go.mod h1:QkHjoMIBaYtpVufgwv3keYAbln78mBoCuShZrPrer1Q=