netbird: update to 0.66.2 (breaking change) #28589
Conversation
|
I don't think it make sense to go backwards with go versions. Adding an older version i.e. a new package, implies to me it needs to be supported for the duration of the release. All the other packages seem to build with 1.26, so it's up to netbird to fix their issues. And it looks like they just need to update their dependencies: I think you can temporarily patch go.mod to replace gvisor with a newer version and see if it builds. Something like: go mod edit -replace gvisor.dev/gvisor@v0.0.0-20251031020517-ecfcdd2f171c=gvisor.dev/gvisor@v0.0.0-20260208121942-9fb1260a5885
go mod tidy |
|
I agree with you. It's not worth keeping an older version of Go for a single package, although that may happen eventually. Thanks for "show me the way". Unfortunately, the version you proposed introduced another bug (and some other versions did too), so I shamelessly grabbed the version from the Chaotic-AUR repo: https://gitlab.com/chaotic-aur/pkgbuilds/-/blame/bf25fdfdeb67463d3bc91fd7a2c025a93d05617c/netbird/PKGBUILD#L33 In the meantime, I opened a PR upstream to see if it will be accepted: I will wait a little before backporting, maintaining patches is always a pain. |
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 <wehagy@proton.me>
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 <wehagy@proton.me>
|
Also, I think all the bump commits should be squashed. |
|
Yeah, you are probably right. |
|
I'll mark this as Draft because I need to test and update the top description/title, with the changes. |
|
I have successfully running 0.66.2 but just by using Go 1.25, do you want me to test and review this patch? |
603994a to
9d25dd0
Compare
|
I just compiled with the go-mod patch and it compiles with go 1.26. Uploaded to my MT6000 running 25.12 Snapshot from today and it is working: Thanks @wehagy and @GeorgeSapkin ! |
|
@egc112 thanks for testing 👍. I updated the title/description of the PR. The only missing part is getting CI to be happy, the last run failed with |
|
Since the latest version is not going to work without a patch, I think the last two commits should be squashed. |
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: netbirdio/netbird#5290 Upstream PR: netbirdio/netbird#5447 Signed-off-by: Wesley Gimenes <wehagy@proton.me>
|
Squashed the last 2 commits and sorted the commit message. Let's wait for the world to be green. |
|
Merged. Thanks for the help. |
📦 Package Details
Maintainer: me
(You can find this by checking the history of the package
Makefile.)Description:
Important
Self‑hosted deployments must update both management and dashboard
I usually prefer to upgradenetbirdto the latest release (currently0.65.1), butnetbirdmoves fast and a newly added Reverse Proxy feature will likely require several follow-up fixes, so I’m holding off on upgrading immediately.The time has passed and
netbirdseems calmer than in recent weeks, so I will update to the latest release (0.66.2) available now.Update netbird to
0.64.60.66.2, for detailed info please read the commits. Notable changes:Move the
netbirdstate file to/var/lib/netbird/state.jsonby settingNB_DNS_STATE_FILEin the init environment to reduce storage wear:/root/.config/netbird/state.jsoncan be removed.resolv.conf) privately with @egc112. Onlyresolv.confnow needs to be moved, I will likely remove theresolv.confentirely.0.61.2:0.62.3:1.24.xto1.25.x(see go.mod): https://github.com/netbirdio/netbird/blob/v0.62.3/go.mod#L3-L50.63.0:0.65.x:v0.65.xnow includes a built-in reverse proxy.the reverse proxy feature.
0.66.x:v0.66.xadds support for exposing a local HTTP servicefrom the CLI.
Add patch to fix build with Go 1.26.x
Out of scope for this PR but related:Fixed with a patch:
Waiting CI build fail, I will update this comment with details.@egc112 alerted me by email (thanks) that the newer
netbirdfails to build in OpenWrt after the Go package was updated to 1.26.x and 1.25.x removed. The CI shows a similar error:It seems that
netbirdversions 0.62.2 and later are affected. I tested using containers (not OpenWrt), and the errors I see are the same. The build works with Go 1.25.x.@GeorgeSapkin, you recently added a way to have multiple Go versions in parallel on OpenWrt. I don't know the plans, but can we reintroduce Go 1.25.x? That makes sense to me, since both 1.25.x and 1.26.x are supported.
Also, I prefer to use the same dependency versions declared by upstream, if possible.
🧪 Run Testing Details
Tested by @egc112. #28589 (comment)
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.