From 417cfa77c5fe870a7cd3f76a37f5d45f5f743c79 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 4 Mar 2024 20:22:53 +0000 Subject: kubernetes: fix build with go 1.21+ go1.21+ checks the GOTOOLCHAIN variable and will attempt to validate/fetch the toolchain version requested. That doesn't work in our environment, so we export the variable as "local" to indicate that the build should trust (and use) the local toolchain. Signed-off-by: Bruce Ashfield --- recipes-containers/kubernetes/kubernetes_git.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index 9923c4e8..caa5ec17 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb @@ -71,6 +71,11 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" + # set the toolchain to local to avoid an attempted fetch of + # valiation by the build + # https://github.com/actions/setup-go/issues/420 + export GOTOOLCHAIN="local" + # make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # is replaced by: # ./hack/update-codegen.sh -- cgit v1.2.3-54-g00ecf