Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/cri-o/
Date: Mon, 29 Apr 2019 17:35:03
Message-Id: 1556559171.a0e75219444993d81826f7650bcccad80c968b5d.zmedico@gentoo
1 commit: a0e75219444993d81826f7650bcccad80c968b5d
2 Author: Dongsu Park <dongsu <AT> kinvolk <DOT> io>
3 AuthorDate: Mon Apr 29 05:42:50 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 29 17:32:51 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0e75219
7
8 app-emulation/cri-o: disable go build install flag
9
10 There has been a corner case where `make bin/crio` failed like that:
11
12 ```
13 go build runtime/cgo: open /usr/lib/go1.12/pkg/linux_amd64/runtime/cgo.a: permission denied
14 make: *** [Makefile:99: bin/crio] Error 1
15 ```
16
17 The failure happens only under certain circumstances, for example in
18 Jenkins pipelines, where the standard Go runtime path `/usr/lib/go1.12`
19 is not writable for normal users like `jenkins`. On the other hand, the
20 failure is not reproducible when testing locally, nor when testing
21 with the root user who can write to the Go runtime path.
22
23 What happens is, the standard Go runtime sometime has incorrect
24 timestamps or checksums of `cgo.a`, which makes `go build -i` think
25 that it has to install its own library to the system directory. That's
26 obviously not what the build process should do. Since Go 1.10, it's
27 unnecessary to run `go build` with an `-i` option, because now `go build`
28 command itself maintains a cache of recently build packages. Build speed
29 will not be better by adding an `-i` option.
30 So let's remove `-i` flag from `go build`. That's actually what upstream
31 Go maintainers recommend to do.
32
33 See: https://github.com/golang/go/issues/24674
34 Closes: https://github.com/gentoo/gentoo/pull/11863
35 Package-Manager: Portage-2.3.65, Repoman-2.3.12
36 Signed-off-by: Dongsu Park <dongsu <AT> kinvolk.io>
37 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
38
39 app-emulation/cri-o/cri-o-1.10.6.ebuild | 2 +-
40 app-emulation/cri-o/cri-o-1.13.5.ebuild | 2 +-
41 2 files changed, 2 insertions(+), 2 deletions(-)
42
43 diff --git a/app-emulation/cri-o/cri-o-1.10.6.ebuild b/app-emulation/cri-o/cri-o-1.10.6.ebuild
44 index dbb1db95a32..845da94a93b 100644
45 --- a/app-emulation/cri-o/cri-o-1.10.6.ebuild
46 +++ b/app-emulation/cri-o/cri-o-1.10.6.ebuild
47 @@ -43,7 +43,7 @@ src_prepare() {
48 default
49
50 sed -e '/^GIT_.*/d' \
51 - -e 's/$(GO) build/$(GO) build -v -work -x/' \
52 + -e 's/$(GO) build -i/$(GO) build -v -work -x/' \
53 -e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
54 -i Makefile || die
55
56
57 diff --git a/app-emulation/cri-o/cri-o-1.13.5.ebuild b/app-emulation/cri-o/cri-o-1.13.5.ebuild
58 index bf1e755e142..2478498c2a7 100644
59 --- a/app-emulation/cri-o/cri-o-1.13.5.ebuild
60 +++ b/app-emulation/cri-o/cri-o-1.13.5.ebuild
61 @@ -44,7 +44,7 @@ src_prepare() {
62
63 sed -e '/^GIT_.*/d' \
64 -e '/ git diff --exit-code/d' \
65 - -e 's/$(GO) build/$(GO) build -v -work -x/' \
66 + -e 's/$(GO) build -i/$(GO) build -v -work -x/' \
67 -e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
68 -i Makefile || die