golang: add support for multiple version #28309
Open
+691
−504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📦 Package Details
Maintainer: @jefferyto, adding myself as well from now on, cc: @1715173329, @SuperSandro2000
Description:
Split bootstrap into a new package to enable multiple versions of go to reuse the same bootstrap.
Add versioned package for 1.25 to enable having multiple host go versions side by side and set it as the default version in
golang-values.mk.Add unversioned dummy package to allow go-based packages to continue using the default go version.
Move version definition to a helper file so multiple versions can be easily defined using it. Target go is installed through alternatives with the default version having higher priority.
Newer versions can reuse older ones as bootstraps by setting
BOOTSTRAP_VERSION_IDpackage variable to older version, e.g.:BOOTSTRAP_VERSION_ID:=1.24All subpackages provide suffix-less names, e.g. golang, golang-src, etc. Default versions are marked as default variants.
Add an example golang 1.23 and switch AdGuard Home, ctop and Syncthing to different version Go to demonstrate the behavior of the new buildsystem. These commits are meant to be dropped.
Add more source mirrors.
Add SPDX license identifiers.
Related:
There's an issue with apk, alternatives and virtual provides, so this depends on (i.e. build will fail before that):
🧪 Run Testing Details
Several target version can be installed side-by-side with the default having the highest alternatives priority:
$ ctop -v ctop version dev-build, build none go1.23.12 $ syncthing --version syncthing v2.0.12 "Hafnium Hornet" (go1.25.5 linux-amd64) openwrt@openwrt 2026-01-09 14:37:07 UTC [noupgrade] $ AdGuardHome --version AdGuard Home, version 0.107.71✅ Formalities