On 25-02-09 19:58:29, Daniel Jakots wrote: > Hey, > > Trying to update minio, I got this error during `make fake`: > > go: downloading go1.23.6 (openbsd/amd64) > go: download go1.23.6 for openbsd/amd64: toolchain not available > > The error happens because a recent commit in minio began to use the > toolchain directive in go.mod. > https://github.com/minio/minio/commit/703f51164d3d0c44af41b0d86075a1f61e4779e7#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6 > > This 'toolchain' directive was added in go1.21. With it, a module can > define which version you should use. Check this article for more > details: https://go.dev/doc/toolchain > > In our case, I don't see any use-case where we would want to download > the toolchain from Google. So let's disable this?
ok jsing@ Thanks for raising this. I've been meaning to deal with this in lang/go proper and I think we should carry the patch below so that we default to local rather than auto. That said, there's no real downside to including it explicitly in go.port.mk as well. Index: Makefile =================================================================== RCS file: /cvs/ports/lang/go/Makefile,v diff -u -p -r1.159 Makefile --- Makefile 9 Feb 2025 13:08:16 -0000 1.159 +++ Makefile 12 Feb 2025 12:29:38 -0000 @@ -8,6 +8,7 @@ COMMENT = Go programming language # increment _MODGO_SYSTEM_VERSION in go.port.mk after updating to a new # version, to trigger updates of go-compiled ports VERSION = 1.23.5 +REVISION = 0 DISTNAME = go${VERSION}.src PKGNAME = go-${VERSION} PKGSPEC = ${FULLPKGNAME:S/go-/go-=/} Index: patches/patch-go_env =================================================================== RCS file: patches/patch-go_env diff -N patches/patch-go_env --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-go_env 12 Feb 2025 12:29:38 -0000 @@ -0,0 +1,12 @@ +Index: go.env +--- go.env.orig ++++ go.env +@@ -7,6 +7,6 @@ + GOPROXY=https://proxy.golang.org,direct + GOSUMDB=sum.golang.org + +-# Automatically download newer toolchains as directed by go.mod files. ++# Only use the bundled toolchain, rather than downloading newer toolchains as directed by go.mod files. + # See https://go.dev/doc/toolchain for details. +-GOTOOLCHAIN=auto ++GOTOOLCHAIN=local