diff --git a/Makefile b/Makefile index 5bd88c622..7ddb9d8e2 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ lintci-deps: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b ./build/bin v1.21.0 clean: - ./build/clean_go_build_cache.sh + go clean -cache rm -fr build/_workspace/pkg/ $(GOBIN)/* # The devtools target installs tools required for 'go generate'. diff --git a/build/ci.go b/build/ci.go index 3ec237fda..cd7da2f93 100644 --- a/build/ci.go +++ b/build/ci.go @@ -563,7 +563,7 @@ func doDebianSource(cmdline []string) { log.Fatalf("Failed to copy Go module dependencies: %v", err) } // Run the packaging and upload to the PPA - debuild := exec.Command("debuild", "-S", "-sa", "-us", "-uc", "-d", "-Zxz") + debuild := exec.Command("debuild", "-S", "-sa", "-us", "-uc", "-d", "-Zxz", "-nc") debuild.Dir = pkgdir build.MustRun(debuild) diff --git a/build/clean_go_build_cache.sh b/build/clean_go_build_cache.sh deleted file mode 100755 index 1666381d9..000000000 --- a/build/clean_go_build_cache.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# Cleaning the Go cache only makes sense if we actually have Go installed... or -# if Go is actually callable. This does not hold true during deb packaging, so -# we need an explicit check to avoid build failures. -if ! command -v go > /dev/null; then - exit -fi - -version_gt() { - test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -} - -golang_version=$(go version |cut -d' ' -f3 |sed 's/go//') - -# Clean go build cache when go version is greater than or equal to 1.10 -if !(version_gt 1.10 $golang_version); then - go clean -cache -fi diff --git a/build/deb/ethereum/deb.rules b/build/deb/ethereum/deb.rules index 8f72437b8..983b87af1 100644 --- a/build/deb/ethereum/deb.rules +++ b/build/deb/ethereum/deb.rules @@ -4,10 +4,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# Launchpad rejects Go's access to $HOME/.cache, use custom folder +# Launchpad rejects Go's access to $HOME, use custom folders export GOCACHE=/tmp/go-build export GOROOT_BOOTSTRAP={{.GoBootPath}} +override_dh_auto_clean: + # Don't try to be smart Launchpad, we know our build rules better than you + override_dh_auto_build: # We can't download a fresh Go within Launchpad, so we're shipping and building # one on the fly. However, we can't build it inside the go-ethereum folder as