From 088cec8f0f592a01083d6fcf085e1a857860e6bd Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Aug 2023 10:30:15 +0200 Subject: [PATCH 1/2] hack: update link to GOPATH documentation This documentation moved to a different page, and the Go documentation moved to the https://go.dev/ domain. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 2aabd6447753bde5c844b2549cd2330cb1383bb6) Signed-off-by: Sebastiaan van Stijn --- hack/make.ps1 | 2 +- hack/make.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/make.ps1 b/hack/make.ps1 index 82a38f3cfc..5c9d3a951d 100644 --- a/hack/make.ps1 +++ b/hack/make.ps1 @@ -459,7 +459,7 @@ Try { if (-not $inContainer) { Verify-GoVersion } # Verify GOPATH is set - if ($env:GOPATH.Length -eq 0) { Throw "Missing GOPATH environment variable. See https://golang.org/doc/code.html#GOPATH" } + if ($env:GOPATH.Length -eq 0) { Throw "Missing GOPATH environment variable. See https://pkg.go.dev/cmd/go#hdr-GOPATH_environment_variable" } # Run autogen if building daemon. if ($Daemon) { diff --git a/hack/make.sh b/hack/make.sh index d8c7667cda..ec01bc1068 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -79,7 +79,7 @@ if [ "$AUTO_GOPATH" ]; then fi if [ ! "$GOPATH" ]; then - echo >&2 'error: missing GOPATH; please see https://golang.org/doc/code.html#GOPATH' + echo >&2 'error: missing GOPATH; please see https://pkg.go.dev/cmd/go#hdr-GOPATH_environment_variable' echo >&2 ' alternatively, set AUTO_GOPATH=1' exit 1 fi From 377af4c9b4ee16f178a7899fdf953a99ad8daf06 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Aug 2023 10:45:50 +0200 Subject: [PATCH 2/2] Dockerfile: Windows: update Golang download domains to cut down redirects The `golang.org` domain moved to `go.dev`, and the download-URLs we were using resulted in 2 redirects; curl -sI https://golang.org/dl/go1.20.windows-amd64.zip | grep 'location' location: https://go.dev/dl/go1.20.windows-amd64.zip curl -sI https://go.dev/dl/go1.20.windows-amd64.zip | grep 'location' location: https://dl.google.com/go/go1.20.windows-amd64.zip curl -sI https://dl.google.com/go/go1.20.windows-amd64.zip HTTP/2 200 # ... This patch cuts it down to one redirects. I decided not to use the "final" (`dl.google.com`) URL, because that URL is not documented in the Golang docs, and visiting the domain itself (https://dl.google.com/) redirects to a marketing page for "Google Chrome". Trying the `/go/` path (https://dl.google.com/go/) also does not show a landing page that lists downloads, so I'm considering those URLs to be "unstable". Signed-off-by: Sebastiaan van Stijn (cherry picked from commit f6a5318f9411ae26bb6d7335b36505c83bbc21b9) Signed-off-by: Sebastiaan van Stijn --- Dockerfile.windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index d3783a9331..2f20f52112 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -224,7 +224,7 @@ RUN ` ` Write-Host INFO: Downloading go...; ` $dlGoVersion=$Env:GO_VERSION -replace '\.0$',''; ` - Download-File "https://golang.org/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; ` + Download-File "https://go.dev/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; ` ` Write-Host INFO: Downloading compiler 1 of 3...; ` Download-File https://raw.githubusercontent.com/moby/docker-tdmgcc/master/gcc.zip C:\gcc.zip; `