mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 10:27:00 +02:00
app-emulation/containerd: set GOFLAGS to -mod=vendor
Since containerd 1.5 started to turn on Go module, we need to pass `-mod=vendor` to the go build command. Otherwise, go build will fail because it would try to fetch missing go deps from remote repos. It would not work inside of sandbox. We cannot set `COREOS_GO_MOD=vendor` because containerd ebuild calls `emake` instead of `go_build`.
This commit is contained in:
parent
8a0da2857b
commit
e63de2ea31
@ -54,6 +54,8 @@ src_prepare() {
|
||||
src_compile() {
|
||||
local options=( $(usex btrfs "" "no_btrfs") )
|
||||
export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor
|
||||
export GO111MODULE=on
|
||||
export GOFLAGS="-v -x -mod=vendor"
|
||||
LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') emake BUILDTAGS="${options[*]}"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user