summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongsu Park <dongsu@kinvolk.io>2019-04-29 07:42:50 +0200
committerZac Medico <zmedico@gentoo.org>2019-04-29 10:32:51 -0700
commita0e75219444993d81826f7650bcccad80c968b5d (patch)
tree83fe9e3170fea342b27995303842cb6f8ac4d19a /app-emulation/cri-o
parentapp-emulation/cri-o: remove old version 1.13.0 (diff)
downloadgentoo-a0e75219444993d81826f7650bcccad80c968b5d.tar.gz
gentoo-a0e75219444993d81826f7650bcccad80c968b5d.tar.bz2
gentoo-a0e75219444993d81826f7650bcccad80c968b5d.zip
app-emulation/cri-o: disable go build install flag
There has been a corner case where `make bin/crio` failed like that: ``` go build runtime/cgo: open /usr/lib/go1.12/pkg/linux_amd64/runtime/cgo.a: permission denied make: *** [Makefile:99: bin/crio] Error 1 ``` The failure happens only under certain circumstances, for example in Jenkins pipelines, where the standard Go runtime path `/usr/lib/go1.12` is not writable for normal users like `jenkins`. On the other hand, the failure is not reproducible when testing locally, nor when testing with the root user who can write to the Go runtime path. What happens is, the standard Go runtime sometime has incorrect timestamps or checksums of `cgo.a`, which makes `go build -i` think that it has to install its own library to the system directory. That's obviously not what the build process should do. Since Go 1.10, it's unnecessary to run `go build` with an `-i` option, because now `go build` command itself maintains a cache of recently build packages. Build speed will not be better by adding an `-i` option. So let's remove `-i` flag from `go build`. That's actually what upstream Go maintainers recommend to do. See: https://github.com/golang/go/issues/24674 Closes: https://github.com/gentoo/gentoo/pull/11863 Package-Manager: Portage-2.3.65, Repoman-2.3.12 Signed-off-by: Dongsu Park <dongsu@kinvolk.io> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-emulation/cri-o')
-rw-r--r--app-emulation/cri-o/cri-o-1.10.6.ebuild2
-rw-r--r--app-emulation/cri-o/cri-o-1.13.5.ebuild2
2 files changed, 2 insertions, 2 deletions
diff --git a/app-emulation/cri-o/cri-o-1.10.6.ebuild b/app-emulation/cri-o/cri-o-1.10.6.ebuild
index dbb1db95a323..845da94a93bd 100644
--- a/app-emulation/cri-o/cri-o-1.10.6.ebuild
+++ b/app-emulation/cri-o/cri-o-1.10.6.ebuild
@@ -43,7 +43,7 @@ src_prepare() {
default
sed -e '/^GIT_.*/d' \
- -e 's/$(GO) build/$(GO) build -v -work -x/' \
+ -e 's/$(GO) build -i/$(GO) build -v -work -x/' \
-e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
-i Makefile || die
diff --git a/app-emulation/cri-o/cri-o-1.13.5.ebuild b/app-emulation/cri-o/cri-o-1.13.5.ebuild
index bf1e755e142f..2478498c2a74 100644
--- a/app-emulation/cri-o/cri-o-1.13.5.ebuild
+++ b/app-emulation/cri-o/cri-o-1.13.5.ebuild
@@ -44,7 +44,7 @@ src_prepare() {
sed -e '/^GIT_.*/d' \
-e '/ git diff --exit-code/d' \
- -e 's/$(GO) build/$(GO) build -v -work -x/' \
+ -e 's/$(GO) build -i/$(GO) build -v -work -x/' \
-e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
-i Makefile || die