From e63de2ea31d4e0c5c26ca72e09b910ad7e9b716b Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Thu, 20 May 2021 14:15:15 +0200 Subject: [PATCH] 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`. --- .../app-emulation/containerd/containerd-9999.ebuild | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild index b8d6eb053b..7a943da963 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild @@ -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[*]}" }