2020-01-21 09:24:40 +00:00
|
|
|
From b38cd2374c2395f5a77802ef8ea3d7ac5b8a86ad Mon Sep 17 00:00:00 2001
|
2019-07-23 23:35:09 +00:00
|
|
|
From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka@redhat.com>
|
|
|
|
Date: Mon, 27 May 2019 15:12:53 +0200
|
|
|
|
Subject: [PATCH 3/3] cmd/go: disable Google's proxy and sumdb
|
|
|
|
|
|
|
|
---
|
2020-01-21 09:24:40 +00:00
|
|
|
src/cmd/go/internal/cfg/cfg.go | 10 +++++-----
|
|
|
|
src/cmd/go/testdata/script/mod_sumdb_golang.txt | 6 +++---
|
|
|
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
2019-07-23 23:35:09 +00:00
|
|
|
|
|
|
|
diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
|
2020-01-21 09:24:40 +00:00
|
|
|
index 61dc6bdda6..e8658dc56c 100644
|
2019-07-23 23:35:09 +00:00
|
|
|
--- a/src/cmd/go/internal/cfg/cfg.go
|
|
|
|
+++ b/src/cmd/go/internal/cfg/cfg.go
|
2020-01-21 09:24:40 +00:00
|
|
|
@@ -245,11 +245,11 @@ var (
|
2019-07-23 23:35:09 +00:00
|
|
|
GOPPC64 = envOr("GOPPC64", fmt.Sprintf("%s%d", "power", objabi.GOPPC64))
|
|
|
|
GOWASM = envOr("GOWASM", fmt.Sprint(objabi.GOWASM))
|
|
|
|
|
2020-01-21 09:24:40 +00:00
|
|
|
- GOPROXY = envOr("GOPROXY", "https://proxy.golang.org,direct")
|
|
|
|
- GOSUMDB = envOr("GOSUMDB", "sum.golang.org")
|
|
|
|
- GOPRIVATE = Getenv("GOPRIVATE")
|
|
|
|
- GONOPROXY = envOr("GONOPROXY", GOPRIVATE)
|
|
|
|
- GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE)
|
2019-07-23 23:35:09 +00:00
|
|
|
+ GOPROXY = envOr("GOPROXY", "direct")
|
|
|
|
+ GOSUMDB = envOr("GOSUMDB", "off")
|
2020-01-21 09:24:40 +00:00
|
|
|
+ GOPRIVATE = Getenv("GOPRIVATE")
|
|
|
|
+ GONOPROXY = envOr("GONOPROXY", GOPRIVATE)
|
|
|
|
+ GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE)
|
|
|
|
GOINSECURE = Getenv("GOINSECURE")
|
|
|
|
)
|
|
|
|
|
2019-07-23 23:35:09 +00:00
|
|
|
diff --git a/src/cmd/go/testdata/script/mod_sumdb_golang.txt b/src/cmd/go/testdata/script/mod_sumdb_golang.txt
|
|
|
|
index 40a07fc7e9..50436e32d7 100644
|
|
|
|
--- a/src/cmd/go/testdata/script/mod_sumdb_golang.txt
|
|
|
|
+++ b/src/cmd/go/testdata/script/mod_sumdb_golang.txt
|
|
|
|
@@ -2,12 +2,12 @@
|
|
|
|
env GOPROXY=
|
|
|
|
env GOSUMDB=
|
|
|
|
go env GOPROXY
|
|
|
|
-stdout '^https://proxy.golang.org,direct$'
|
|
|
|
+stdout '^direct$'
|
|
|
|
go env GOSUMDB
|
|
|
|
-stdout '^sum.golang.org$'
|
|
|
|
+stdout '^off$'
|
|
|
|
env GOPROXY=https://proxy.golang.org
|
|
|
|
go env GOSUMDB
|
|
|
|
-stdout '^sum.golang.org$'
|
|
|
|
+stdout '^off$'
|
|
|
|
|
|
|
|
# download direct from github
|
|
|
|
[!net] skip
|
|
|
|
--
|
|
|
|
2.21.0
|
|
|
|
|