aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@FreeBSD.org>2020-11-12 08:15:43 +0000
committerDave Cottlehuber <dch@FreeBSD.org>2020-11-12 08:15:43 +0000
commit1225f3cf100cc3d646423370c3a640f8a3f5c7f7 (patch)
tree0a3068b52bd2d2754de314186c949e9d62e0f1c0 /Mk
parent6ffdc4e27b4abb2db7e912f13e55ce0a5ddcd1cd (diff)
downloadports-1225f3cf100cc3d646423370c3a640f8a3f5c7f7.tar.gz
ports-1225f3cf100cc3d646423370c3a640f8a3f5c7f7.zip
Ensure go modules cannot fetch missing modules via network
Notes from go help modules: If GOPROXY is set to the string "direct", downloads use a direct connection to source control servers. Setting GOPROXY to "off" disallows downloading modules from any source. Otherwise, GOPROXY is expected to be list of module proxy URLs separated by either comma (,) or pipe (|) characters, which control error fallback behavior. For each request, the go command tries each proxy in sequence. If there is an error, the go command will try the next proxy in the list if the error is a 404 or 410 HTTP response or if the current proxy is followed by a pipe character, indicating it is safe to fall back on any error. The GOPRIVATE and GONOPROXY environment variables allow bypassing the proxy for selected modules. See 'go help module-private' for details. No matter the source of the modules, the go command checks downloads against known checksums, to detect unexpected changes in the content of any specific module version from one day to the next. This check first consults the current module's go.sum file but falls back to the Go checksum database, controlled by the GOSUMDB and GONOSUMDB environment variables. See 'go help module-auth' for details. Reviewed by: dmgk Sponsored by: SkunkWerks, GmbH Differential Revision: https://reviews.freebsd.org/D26860
Notes
Notes: svn path=/head/; revision=554936
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/go.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk
index 1a025b2216cf..9ae5a97a05a2 100644
--- a/Mk/Uses/go.mk
+++ b/Mk/Uses/go.mk
@@ -108,6 +108,7 @@ GO_TESTFLAGS+= -mod=vendor
GO_WRKSRC= ${WRKSRC}
GO_ENV+= GOPATH="" \
GOBIN="${GO_WRKDIR_BIN}" \
+ GOPROXY=off \
GO_NO_VENDOR_CHECKS=1
.else
GO_WRKSRC= ${WRKDIR}/src/${GO_PKGNAME}