From 11d3cf26977538b1ee20ea331e0f14e995d7f550 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 13 Apr 2022 17:13:45 -0700 Subject: Makefile, podman.spec.rpkg: rm GOBIN and GOPATH Remove GOPATH setting as since Go 1.9 it defaults to $HOME/go (for earlier versions it had to be specified explicitly). Remove GOPATH-related code from the spec, using relative paths when compiling packages, and enable Go modules, simplifying the spec. Remove support for multiple paths in GOPATH (which is rarely used and doesn't really work with modules). Remove setting GOBIN, rely on $GOPATH/bin instead. In case GOBIN is explicitly set (which is highly unlikely), forcefully ignore by unsetting it. Remove GOBIN from tools invocation since we added GOPATH/bin to PATH. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.cirrus.yml') diff --git a/.cirrus.yml b/.cirrus.yml index 324fd32f6..eed12b02f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,7 +9,6 @@ env: DEST_BRANCH: "main" # Overrides default location (/tmp/cirrus) for repo clone GOPATH: &gopath "/var/tmp/go" - GOBIN: "${GOPATH}/bin" GOCACHE: "${GOPATH}/cache" GOSRC: &gosrc "/var/tmp/go/src/github.com/containers/podman" CIRRUS_WORKING_DIR: *gosrc -- cgit v1.2.3-54-g00ecf From 2b54bf3e64f1969dea1fac79365d0b84aa6714a9 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 13 Apr 2022 17:24:32 -0700 Subject: Move GOPROXY from Makefile to cirrus.yml GOPROXY's default value is "https://proxy.golang.org,direct" since go 1.13, so it is redundant to set it explicitly. For some reason though, GOPROXY in Cirrus CI is set to direct, which makes things such as go mod tidy very slow. So, set the proper (default) value for in in .cirrus.yml. Do the same for GOSUMDB. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 3 +++ Makefile | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to '.cirrus.yml') diff --git a/.cirrus.yml b/.cirrus.yml index eed12b02f..ee0131279 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,6 +7,9 @@ env: #### # Name of the ultimate destination branch for this CI run, PR or post-merge. DEST_BRANCH: "main" + # Sane (default) value for GOPROXY and GOSUMDB. + GOPROXY: "https://proxy.golang.org,direct" + GOSUMDB: "sum.golang.org" # Overrides default location (/tmp/cirrus) for repo clone GOPATH: &gopath "/var/tmp/go" GOCACHE: "${GOPATH}/cache" diff --git a/Makefile b/Makefile index ff3e69087..57b8035be 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,6 @@ ### Variables & Definitions ### -export GOPROXY=https://proxy.golang.org - GO ?= go GO_LDFLAGS:= $(shell if $(GO) version|grep -q gccgo ; then echo "-gccgoflags"; else echo "-ldflags"; fi) GOCMD = CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO) -- cgit v1.2.3-54-g00ecf