Skip to content

Commit 3e97b04

Browse files
fjlkaralabe
authored andcommitted
build: put GOPATH in /tmp on launchpad (ethereum#20564)
* build: put GOPATH in /tmp on launchpad * build: don't remove GOPATH from go tool environment
1 parent f20c8d4 commit 3e97b04

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build/ci.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func goToolArch(arch string, cc string, subcmd string, args ...string) *exec.Cmd
297297
cmd.Env = append(cmd.Env, "CC="+cc)
298298
}
299299
for _, e := range os.Environ() {
300-
if strings.HasPrefix(e, "GOPATH=") || strings.HasPrefix(e, "GOBIN=") {
300+
if strings.HasPrefix(e, "GOBIN=") {
301301
continue
302302
}
303303
cmd.Env = append(cmd.Env, e)

build/deb/ethereum/deb.rules

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# Launchpad rejects Go's access to $HOME, use custom folders
88
export GOCACHE=/tmp/go-build
9+
export GOPATH=/tmp/gopath
910
export GOROOT_BOOTSTRAP={{.GoBootPath}}
1011

1112
override_dh_auto_clean:
@@ -19,7 +20,8 @@ override_dh_auto_build:
1920

2021
# We can't download external go modules within Launchpad, so we're shipping the
2122
# entire dependency source cache with go-ethereum.
22-
(mkdir -p $(HOME)/go/pkg/mod && mv .mod/* $(HOME)/go/pkg/mod)
23+
mkdir -p $(GOPATH)/pkg
24+
mv .mod $(GOPATH)/pkg/mod
2325

2426
# A fresh Go was built, all dependency downloads faked, hope build works now
2527
../.go/bin/go run build/ci.go install -git-commit={{.Env.Commit}} -git-branch={{.Env.Branch}} -git-tag={{.Env.Tag}} -buildnum={{.Env.Buildnum}} -pull-request={{.Env.IsPullRequest}}

0 commit comments

Comments
 (0)