From e11497bda23ecb573c776104106fa160e32be841 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 27 Feb 2024 18:24:29 +0000 Subject: kubernetes: allow go 1.20 building Although k8s checks for, and demands, golang 1.21.x, runtime tests show that golang 1.20.x is properly building and providing enough for core functionality. In an effort to see what else may be lurking, we patch out the check to allow builds with our 1.20.x toolchain. Signed-off-by: Bruce Ashfield --- .../0001-build-hack-allow-go-1.20-building.patch | 35 ++++++++++++++++++++++ recipes-containers/kubernetes/kubernetes_git.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 recipes-containers/kubernetes/kubernetes/0001-build-hack-allow-go-1.20-building.patch diff --git a/recipes-containers/kubernetes/kubernetes/0001-build-hack-allow-go-1.20-building.patch b/recipes-containers/kubernetes/kubernetes/0001-build-hack-allow-go-1.20-building.patch new file mode 100644 index 00000000..ac2d8c47 --- /dev/null +++ b/recipes-containers/kubernetes/kubernetes/0001-build-hack-allow-go-1.20-building.patch @@ -0,0 +1,35 @@ +From 6f67131b030c4c228cabb33d45ae9330cbf8fa0a Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Tue, 27 Feb 2024 18:05:54 +0000 +Subject: [PATCH] build/hack: allow go 1.20 building + +Although k8s checks for, and demands, golang 1.21.x, runtime +tests show that golang 1.20.x is properly building and providing +enough for core functionality. + +In an effort to see what else may be lurking, we patch out the +check to allow builds with our 1.20.x toolchain. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Bruce Ashfield +--- + hack/lib/golang.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index 588288285bb..eb2bcc917b8 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -499,7 +499,7 @@ Detected go version: ${go_version[*]}. + Kubernetes requires ${minimum_go_version} or greater. + Please install ${minimum_go_version} or later. + EOF +- return 2 ++ return 0 + fi + } + +-- +2.39.2 + diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index 01bc3e59..9923c4e8 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb @@ -30,6 +30,7 @@ SRC_URI:append = " \ file://0001-hack-lib-golang.sh-use-CC-from-environment.patch \ file://0001-cross-don-t-build-tests-by-default.patch \ file://0001-build-golang.sh-convert-remaining-go-calls-to-use.patch \ + file://0001-build-hack-allow-go-1.20-building.patch \ file://cni-containerd-net.conflist \ file://k8s-init \ file://99-kubernetes.conf \ -- cgit v1.2.3-54-g00ecf