]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: introduce GOROOT/go.env and move proxy/sumdb config there
authorRuss Cox <rsc@golang.org>
Sat, 14 Jan 2023 21:40:22 +0000 (16:40 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 17 Jan 2023 23:10:39 +0000 (23:10 +0000)
commit7aa85e01376d840acc8bb931156d607a00b64a60
treead0f59de62a0783aa66b9659451596e3c6ed9feb
parent8a27154bcdb657fd172e77ba19ac0a5dccb996fb
cmd/go: introduce GOROOT/go.env and move proxy/sumdb config there

Various Linux distributions edit cmd/go/internal/cfg/cfg.go to change
the default settings of GOPROXY and GOSUMDB. Make it possible for
them to do this without editing the go command source code by
introducing GOROOT/go.env and moving those defaults there.

With the upcoming changes for reproducible builds (#24904),
this should mean that Linux distributions distribute binaries
that are bit-for-bit identical to the Go distribution binaries,
even when rebuilding the distribution themselves.

Fixes #57179.

Change-Id: Ib2ecc61e6d036f97db6fd47dca757c94fdea5629
Reviewed-on: https://go-review.googlesource.com/c/go/+/462198
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
go.env [new file with mode: 0644]
src/cmd/go/internal/cfg/cfg.go