Skip to content

Commit d8fc169

Browse files
Use Golang.org's proxy for fetching modules. (See golang/go/issues/38373.)
1 parent c4938ed commit d8fc169

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

ethr/ethr.spec

+7
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ export GOPATH=%{gopath}
4646
export GOBIN=%{gobin}
4747
export GOCACHE=%{gocache}
4848

49+
%if 0%{el7}
50+
# EL7 has problems with its git that cause module fetches not to work.
51+
# Use Golang's proxy to do it instead.
52+
export GO111MODULE=on
53+
export GOPROXY="https://proxy.golang.org"
54+
%endif
55+
4956
go mod init microsoft.com/ethr
5057
go mod tidy
5158
go get ./...

s3-benchmark/s3-benchmark.spec

+11-9
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,17 @@ export GOPATH=%{gopath}
4242
export GOBIN=%{gobin}
4343
export GOCACHE=%{gocache}
4444

45-
#doesn't work
46-
#go get ./...
47-
48-
go get golang.org/x/net/http2
49-
go get code.cloudfoundry.org/bytefmt
50-
go get github.com/aws/aws-sdk-go/aws
51-
go get github.com/aws/aws-sdk-go/aws/credentials
52-
go get github.com/aws/aws-sdk-go/aws/session
53-
go get github.com/aws/aws-sdk-go/service/s3
45+
%if 0%{el7}
46+
# EL7 has problems with its git that cause module fetches not to work.
47+
# Use Golang's proxy to do it instead.
48+
export GO111MODULE=on
49+
export GOPROXY="https://proxy.golang.org"
50+
%endif
51+
52+
go mod init wasabi.com/s3-benchmark
53+
go mod tidy
54+
go get ./...
55+
5456

5557

5658
%build -n %{directory}

0 commit comments

Comments
 (0)