Skip to content

Conversation

@GeorgeSapkin
Copy link
Member

📦 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_ID package variable to older version, e.g.: BOOTSTRAP_VERSION_ID:=1.24

All 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

  • OpenWrt Version: main buildroot, 25.12-rc2
  • OpenWrt Target/Subtarget: x86/64
  • OpenWrt Device: QEMU

Several target version can be installed side-by-side with the default having the highest alternatives priority:

$ apk add --allow-untrusted ./golang1.23-src-1.23.12-r1.apk ./golang1.23-1.23.12-r1.apk .golang1.25-src-1.25.5-r2.apk ./golang1.25-1.25.5-r2.apk
(1/7) Installing libstdcpp6 (14.3.0-r5)
  Executing libstdcpp6-14.3.0-r5.post-install
(2/7) Installing libjpeg-turbo (3.1.1-r1)
  Executing libjpeg-turbo-3.1.1-r1.post-install
(3/7) Installing libtiff6 (4.7.1-r1)
  Executing libtiff6-4.7.1-r1.post-install
(4/7) Installing golang1.23-src (1.23.12-r1)
  Executing golang1.23-src-1.23.12-r1.post-install
(5/7) Installing golang1.23 (1.23.12-r1)
  Executing golang1.23-1.23.12-r1.post-install
  * add alternative: /usr/bin/go -> /usr/lib/go-1.23/bin/go
  * add alternative: /usr/bin/gofmt -> /usr/lib/go-1.23/bin/gofmt
(6/7) Installing golang1.25-src (1.25.5-r2)
  Executing golang1.25-src-1.25.5-r2.post-install
(7/7) Installing golang1.25 (1.25.5-r2)
  Executing golang1.25-1.25.5-r2.post-install
  * add alternative: /usr/bin/go -> /usr/lib/go-1.25/bin/go
  * add alternative: /usr/bin/gofmt -> /usr/lib/go-1.25/bin/gofmt
OK: 490.7 MiB in 151 packages

$ go version
go version go1.25.5 linux/amd64

$ /usr/lib/go-1.23/bin/go version
go version go1.23.12 linux/amd64
$ 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

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

Link: https://spdx.org/licenses/GPL-2.0-only.html
Signed-off-by: George Sapkin <george@sapk.in>
Split bootstrap into a new package to enable multiple versions of go to
reuse the same bootstrap.

Add more source mirrors.

Signed-off-by: George Sapkin <george@sapk.in>
Add versioned package for 1.25 to enable having multiple host go
versions side by side.

Set default version to 1.25 in golang-values.mk

Add unversioned dummy package to allow go-based packages to continue
using the default go version.

Signed-off-by: George Sapkin <george@sapk.in>
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_ID package variable to older version, e.g.:
BOOTSTRAP_VERSION_ID:=1.24

All subpackages provide suffix-less names, e.g. golang, golang-src, etc.
Default versions are marked as default variants.

Signed-off-by: George Sapkin <george@sapk.in>
Add an example golang 1.23.

Signed-off-by: George Sapkin <george@sapk.in>
Example building ctop with golang 1.23.

Signed-off-by: George Sapkin <george@sapk.in>
Example building adguardhome using golang 1.25.

Signed-off-by: George Sapkin <george@sapk.in>
Example building syncthing using default golang.

Signed-off-by: George Sapkin <george@sapk.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant