containerd: add -modcacherw to GO_BUILD_FLAGS
PATCH 1/1 containerd: add -modcacherw to GO_BUILD_FLAGS
From: Aleksey Vasilenko <[email protected]>
Because containerd overrides do_compile, it misses the standard -modcacherw flag from go-mod.bbclass. This leaves read-only files in the build directory, causing permission errors during cleanup tasks like rm_work.
Explicitly add the flag to GO_BUILD_FLAGS to fix this.
Signed-off-by krant <[email protected]>
--- recipes-containers/containerd/containerd_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/containerd/containerd_git.bb +1 -1
@@ -58,7 +58,7 @@ do_compile() { # cannot find package runtime/cgo (using -importcfg) # ... recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link: # cannot open file : open : no such file or directory - export GO_BUILD_FLAGS="-trimpath -a -pkgdir dontusecurrentpkgs" + export GO_BUILD_FLAGS="-trimpath -a -pkgdir dontusecurrentpkgs -modcacherw" # As of v2.2.0+ the GO11MODULE setting breaks the build (linking errors). It doesn't # seem necessary anymore. Leaving it here for now as a breakcrumb if other errors pop # up
Signature · 1 line
2.56.0
merged
Bruce