kubernetes: upgrade to 1.26.1
PATCH 1/1 kubernetes: upgrade to 1.26.1
Changes include:
1. Update SRC_URI an SRCREV
2. Change 0001-hack-lib-golang.sh-use-CC-from-environment.patch to also remove the 'export CC=xxx' for amd64. The original patch is a little strange, it removes such statements for other archs but leaves amd64 untouched. If we're using CC from our environment, we use it for all targets.
3. Adapt 0001-build-golang.sh-convert-remaining-go-calls-to-use.patch to the 1.26.1 version.
4. Comment out the 'make file_generated' command. I'm not sure why it's needed in the past, but for 1.26.1, it does seem to be necessary.
This upgrade is tested on qemux86-64 & qemuarm64: k8s + containerd + flannel.
--- ...sh-convert-remaining-go-calls-to-use.patch | 39 +++++++++++-------- ...ib-golang.sh-use-CC-from-environment.patch | 25 +++++++----- .../kubernetes/kubernetes_git.bb | 8 ++-- 3 files changed, 43 insertions(+), 29 deletions(-)
recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +23 -16
@@ -1,18 +1,22 @@ -From 9973a66665992c49593595ae1eb70848907ea6a9 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <[email protected]> -Date: Wed, 12 Aug 2020 16:01:49 +0000 -Subject: [PATCH] build/golang.sh: convert remaining 'go' calls to use +From 3a357f4bb769a4127f5107f4ae21ee8f12279677 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Thu, 2 Feb 2023 22:29:07 -0800 +Subject: [PATCH 2/2] golang.sh: convert go to $GO -Signed-off-by: Bruce Ashfield <[email protected]> +Upstream-Status: Inappropriate [OE Specific] + +[The patch was original created by Bruce.] + +Signed-off-by: Chen Qi <[email protected]> --- hack/lib/golang.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f.orig/hack/lib/golang.sh -+++ kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -@@ -652,7 +652,7 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index 0ed2d719dd1..c2ea9e10186 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -676,7 +676,7 @@ kube::golang::build_some_binaries() { kube::golang::create_coverage_dummy_test "${package}" kube::util::trap_add "kube::golang::delete_coverage_dummy_test \"${package}\"" EXIT
@@ -21,23 +25,23 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g -covermode count \ -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ "${build_args[@]}" \ -@@ -664,13 +664,13 @@ +@@ -688,13 +688,13 @@ kube::golang::build_some_binaries() { done if [[ "${#uncovered[@]}" != 0 ]]; then V=2 kube::log::info "Building ${uncovered[*]} without coverage..." -- go install "${build_args[@]}" "${uncovered[@]}" -+ $GO install "${build_args[@]}" "${uncovered[@]}" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "${uncovered[@]}" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "${uncovered[@]}" else V=2 kube::log::info "Nothing to build without coverage." fi else V=2 kube::log::info "Coverage is disabled." -- go install "${build_args[@]}" "$@" -+ $GO install "${build_args[@]}" "$@" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "$@" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "$@" fi } -@@ -729,7 +729,7 @@ +@@ -756,7 +756,7 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")"
@@ -46,3 +50,6 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g ${goflags:+"${goflags[@]}"} \ -gcflags="${gogcflags}" \ -asmflags="${goasmflags}" \ +-- +2.37.1 +
recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +16 -9
@@ -1,21 +1,25 @@ -From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:00 2001 +From 116ccf93eef322db23e3bd4f35b12be09ebfbde5 Mon Sep 17 00:00:00 2001 From: Koen Kooi <[email protected]> Date: Mon, 23 Jul 2018 15:28:02 +0200 -Subject: [PATCH] hack/lib/golang.sh: use CC from environment +Subject: [PATCH 1/2] hack/lib/golang.sh: use CC from environment Toolchain tupples differs, especially when using vendor provides ones. Upstream-status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <[email protected]> --- - hack/lib/golang.sh | 4 ---- - 1 file changed, 4 deletions(-) + hack/lib/golang.sh | 5 ----- + 1 file changed, 5 deletions(-) -Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630.orig/hack/lib/golang.sh -+++ kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -@@ -414,19 +414,15 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index fb97ee76783..0ed2d719dd1 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -419,23 +419,18 @@ kube::golang::set_platform_envs() { + case "${platform}" in + "linux/amd64") + export CGO_ENABLED=1 +- export CC=${KUBE_LINUX_AMD64_CC:-x86_64-linux-gnu-gcc} ;; "linux/arm") export CGO_ENABLED=1
@@ -35,3 +39,6 @@ Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/g ;; esac fi +-- +2.37.1 +
recipes-containers/kubernetes/kubernetes_git.bb +4 -4
@@ -5,8 +5,8 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ maintenance, and scaling of applications. \ " -PV = "v1.24.0+git${SRCREV_kubernetes}" -SRCREV_kubernetes = "8b1b4db3834ddf7cf1b97137180f413cb9e2186f" +PV = "v1.26.1+git${SRCREV_kubernetes}" +SRCREV_kubernetes = "8f94681cd294aa8cfd3407b8191f6c70214973a4" SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" PE = "1"
@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" SRCREV_FORMAT ?= "kubernetes_release" -SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.24;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ +SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.26;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" SRC_URI:append = " \
@@ -69,7 +69,7 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" - make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" + #make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # Build the target binaries export GOARCH="${TARGET_GOARCH}"
Signature · 1 line
2.37.1
Quoted 12 lines · Chen Qi
Changes include:
1. UpdateSRC_URIan SRCREV
2. Change 0001-hack-lib-golang.sh-use-CC-from-environment.patch to also remove the 'export CC=xxx' for amd64. The original patch is a little strange, it removes such statements for other archs but leaves amd64 untouched. If we're using CC from our environment, we use it for all targets.
3. Adapt 0001-build-golang.sh-convert-remaining-go-calls-to-use.patch to the 1.26.1 version.
4. Comment out the 'makefile_generated' command. I'm not sure why it's needed in the past, but for 1.26.1, it does seem to be necessary.
Those are host tools / files required for the build. The support has moved into a new
script update-codegen.sh. While it isn't always necessary, there are some paths through the build that require it.
There are some unprotected calls to "go" in the script, but luckily it is host side
so the architecture matches and we are fine. If someone is building on a ARM host, they can send patches to fix things.
I have been working on a similar update, and I'll roll your changes into my work and add your signed off by to the commit.
Bruce
Quoted 167 lines
This upgrade is tested on qemux86-64 & qemuarm64: k8s + containerd + flannel.
Signed-off-by Chen Qi <[email protected]>--- ...sh-convert-remaining-go-calls-to-use.patch | 39 +++++++++++-------- ...ib-golang.sh-use-CC-from-environment.patch | 25 +++++++----- .../kubernetes/kubernetes_git.bb | 8 ++-- 3 files changed, 43 insertions(+), 29 deletions(-)recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +23
-16@@ -1,18 +1,22 @@ -From 9973a66665992c49593595ae1eb70848907ea6a9 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <[email protected]> -Date: Wed, 12 Aug 2020 16:01:49 +0000 -Subject: [PATCH] build/golang.sh: convert remaining 'go' calls to use +From 3a357f4bb769a4127f5107f4ae21ee8f12279677 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Thu, 2 Feb 2023 22:29:07 -0800 +Subject: [PATCH 2/2] golang.sh: convert go to $GO -Signed-off-by: Bruce Ashfield <[email protected]> +Upstream-Status: Inappropriate [OE Specific] + +[The patch was original created by Bruce.] + +Signed-off-by: Chen Qi <[email protected]> --- hack/lib/golang.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f.orig/hack/lib/golang.sh -+++ kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -@@ -652,7 +652,7 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index 0ed2d719dd1..c2ea9e10186 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -676,7 +676,7 @@ kube::golang::build_some_binaries() { kube::golang::create_coverage_dummy_test "${package}" kube::util::trap_add "kube::golang::delete_coverage_dummy_test \"${package}\"" EXIT@@ -21,23 +25,23 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g -covermode count \ -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ "${build_args[@]}" \ -@@ -664,13 +664,13 @@ +@@ -688,13 +688,13 @@ kube::golang::build_some_binaries() { done if [[ "${#uncovered[@]}" != 0 ]]; then V=2 kube::log::info "Building ${uncovered[*]} without coverage..." -- go install "${build_args[@]}" "${uncovered[@]}" -+ $GO install "${build_args[@]}" "${uncovered[@]}" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "${uncovered[@]}" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "${uncovered[@]}" else V=2 kube::log::info "Nothing to build without coverage." fi else V=2 kube::log::info "Coverage is disabled." -- go install "${build_args[@]}" "$@" -+ $GO install "${build_args[@]}" "$@" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "$@" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "$@" fi } -@@ -729,7 +729,7 @@ +@@ -756,7 +756,7 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")"@@ -46,3 +50,6 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g ${goflags:+"${goflags[@]}"} \ -gcflags="${gogcflags}" \ -asmflags="${goasmflags}" \ +-- +2.37.1 +recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +16
-9@@ -1,21 +1,25 @@ -From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:00 2001 +From 116ccf93eef322db23e3bd4f35b12be09ebfbde5 Mon Sep 17 00:00:00 2001 From: Koen Kooi <[email protected]> Date: Mon, 23 Jul 2018 15:28:02 +0200 -Subject: [PATCH] hack/lib/golang.sh: use CC from environment +Subject: [PATCH 1/2] hack/lib/golang.sh: use CC from environment Toolchain tupples differs, especially when using vendor provides ones. Upstream-status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <[email protected]> --- - hack/lib/golang.sh | 4 ---- - 1 file changed, 4 deletions(-) + hack/lib/golang.sh | 5 ----- + 1 file changed, 5 deletions(-) -Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630.orig/hack/lib/golang.sh -+++ kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -@@ -414,19 +414,15 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index fb97ee76783..0ed2d719dd1 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -419,23 +419,18 @@ kube::golang::set_platform_envs() { + case "${platform}" in + "linux/amd64") + export CGO_ENABLED=1 +- export CC=${KUBE_LINUX_AMD64_CC:-x86_64-linux-gnu-gcc} ;; "linux/arm") export CGO_ENABLED=1@@ -35,3 +39,6 @@ Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/g ;; esac fi +-- +2.37.1 +recipes-containers/kubernetes/kubernetes_git.bb +4
-5@@ -5,8 +5,8 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ maintenance, and scaling of applications. \ " -PV = "v1.24.0+git${SRCREV_kubernetes}" -SRCREV_kubernetes = "8b1b4db3834ddf7cf1b97137180f413cb9e2186f" +PV = "v1.26.1+git${SRCREV_kubernetes}" +SRCREV_kubernetes = "8f94681cd294aa8cfd3407b8191f6c70214973a4" SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" PE = "1"@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" SRCREV_FORMAT ?= "kubernetes_release" -SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.24;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ +SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.26;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" SRC_URI:append = " \@@ -69,7 +69,7 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" - make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" + #make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # Build the target binaries export GOARCH="${TARGET_GOARCH}" --2.37.1
Quoted 8 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7843): https://lists.yoctoproject.org/g/meta-virtualization/message/7843
Mute This Topic: https://lists.yoctoproject.org/mt/96719358/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
Got it. Thanks.
FYI, I did build and runtime test for qemux86-64 and qemuarm64, and I also did build time test for qemuarm. Things were working without 'make file_generated' for 1.26.1.
Regards,
Qi
-----Original Message-----
From: Bruce Ashfield <[email protected]>
Sent: Friday, February 3, 2023 10:39 PM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [meta-virtualization][PATCH] kubernetes: upgrade to 1.26.1
Quoted 12 lines · Chen Qi
Changes include:
1. UpdateSRC_URIan SRCREV
2. Change 0001-hack-lib-golang.sh-use-CC-from-environment.patch to also remove the 'export CC=xxx' for amd64. The original patch is a little strange, it removes such statements for other archs but leaves amd64 untouched. If we're using CC from our environment, we use it for all targets.
3. Adapt 0001-build-golang.sh-convert-remaining-go-calls-to-use.patch to the 1.26.1 version.
4. Comment out the 'makefile_generated' command. I'm not sure why it's needed in the past, but for 1.26.1, it does seem to be necessary.
Those are host tools / files required for the build. The support has moved into a new script update-codegen.sh. While it isn't always necessary, there are some paths through the build that require it.
There are some unprotected calls to "go" in the script, but luckily it is host side so the architecture matches and we are fine. If someone is building on a ARM host, they can send patches to fix things.
I have been working on a similar update, and I'll roll your changes into my work and add your signed off by to the commit.
Bruce
Quoted 203 lines
This upgrade is tested on qemux86-64 & qemuarm64: k8s + containerd + flannel.
Signed-off-by Chen Qi <[email protected]>--- ...sh-convert-remaining-go-calls-to-use.patch | 39 +++++++++++-------- ...ib-golang.sh-use-CC-from-environment.patch | 25 +++++++----- .../kubernetes/kubernetes_git.bb | 8 ++-- 3 files changed, 43 insertions(+), 29 deletions(-)(quoted diff) +0
-0a/recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-conver t-remaining-go-calls-to-use.patch b/recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-conver t-remaining-go-calls-to-use.patch
index 8c6644a..6849549 100644
---
a/recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-conver t-remaining-go-calls-to-use.patch
+++ b/recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-co +++ nvert-remaining-go-calls-to-use.patch(quoted diff) +0
-1@@ -1,18 +1,22 @@ -From 9973a66665992c49593595ae1eb70848907ea6a9 Mon Sep 17 00:00:002001
recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +10
-5-From: Bruce Ashfield <[email protected]> -Date: Wed, 12 Aug 2020 16:01:49 +0000 -Subject: [PATCH] build/golang.sh: convert remaining 'go' calls to use +From 3a357f4bb769a4127f5107f4ae21ee8f12279677 Mon Sep 17 00:00:00 +2001 +From: Chen Qi <[email protected]> +Date: Thu, 2 Feb 2023 22:29:07 -0800 +Subject: [PATCH 2/2] golang.sh: convert go to $GO -Signed-off-by: Bruce Ashfield <[email protected]> +Upstream-Status: Inappropriate [OE Specific] + +[The patch was original created by Bruce.] + +Signed-off-by: Chen Qi <[email protected]> --- hack/lib/golang.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index:kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/li
b/golang.sh
-===================================================================
----
kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f.orig/hack/lib/golang.sh
-+++ kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/ha -+++ck/lib/golang.sh
-@@ -652,7 +652,7 @@
+diff --gita/hack/lib/golang.shb/hack/lib/golang.shindex +0ed2d719dd1..c2ea9e10186 100755
+---a/hack/lib/golang.sh
++++b/hack/lib/golang.sh+@@ -676,7 +676,7 @@ kube::golang::build_some_binaries() { kube::golang::create_coverage_dummy_test "${package}" kube::util::trap_add"
kube::golang::delete_coverage_dummy_test\"${package}\"" EXITrecipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +9
-6@@ -21,23 +25,23 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g -covermode count \ -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ "${build_args[@]}" \ -@@ -664,13 +664,13 @@ +@@ -688,13 +688,13 @@ kube::golang::build_some_binaries() { done if [[ "${#uncovered[@]}" != 0 ]]; then V=2 kube::log::info "Building ${uncovered[*]} without coverage..." -- go install "${build_args[@]}" "${uncovered[@]}" -+ $GO install "${build_args[@]}" "${uncovered[@]}" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "${uncovered[@]}" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "${uncovered[@]}" else V=2 kube::log::info "Nothing to build without coverage." fi else V=2 kube::log::info "Coverage is disabled." -- go install "${build_args[@]}" "$@" -+ $GO install "${build_args[@]}" "$@" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "$@" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "$@" fi } -@@ -729,7 +729,7 @@ +@@ -756,7 +756,7 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")"@@ -46,3 +50,6 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g ${goflags:+"${goflags[@]}"} \ -gcflags="${gogcflags}" \ -asmflags="${goasmflags}" \ +-- +2.37.1 +(quoted diff) +0
-0a/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use -CC-from-environment.patch b/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use -CC-from-environment.patch
index 1c4555a..c81bd1a 100644
---
a/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use(quoted diff) +2
-2-CC-from-environment.patch +++ b/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh +++ -use-CC-from-environment.patch@@ -1,21 +1,25 @@ -From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:002001
recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +5
-4+From 116ccf93eef322db23e3bd4f35b12be09ebfbde5 Mon Sep 17 00:00:00 +2001 From: Koen Kooi <[email protected]> Date: Mon, 23 Jul 2018 15:28:02 +0200 -Subject: [PATCH] hack/lib/golang.sh: use CC from environment +Subject: [PATCH 1/2] hack/lib/golang.sh: use CC from environment Toolchain tupples differs, especially when using vendor provides ones. Upstream-status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <[email protected]> --- - hack/lib/golang.sh | 4 ---- - 1 file changed, 4 deletions(-) + hack/lib/golang.sh | 5 ----- + 1 file changed, 5 deletions(-) -Index:kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/li
b/golang.sh
-===================================================================
----
kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630.orig/hack/lib/golang.sh
-+++ kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/ha -+++ck/lib/golang.sh
-@@ -414,19 +414,15 @@recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +12
-0+diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index +fb97ee76783..0ed2d719dd1 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -419,23 +419,18 @@ kube::golang::set_platform_envs() { + case "${platform}" in + "linux/amd64") + export CGO_ENABLED=1 +- export CC=${KUBE_LINUX_AMD64_CC:-x86_64-linux-gnu-gcc} ;; "linux/arm") export CGO_ENABLED=1@@ -35,3 +39,6 @@ Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/g ;; esac fi +-- +2.37.1 +recipes-containers/kubernetes/kubernetes_git.bb +0
-0@@ -5,8 +5,8 @@ applications across multiple hosts, providing basicmechanisms for deployment, \ maintenance, and scaling of applications. \ "
recipes-containers/kubernetes/kubernetes_git.bb +2
-3-PV = "v1.24.0+git${SRCREV_kubernetes}" -SRCREV_kubernetes = "8b1b4db3834ddf7cf1b97137180f413cb9e2186f" +PV = "v1.26.1+git${SRCREV_kubernetes}" +SRCREV_kubernetes = "8f94681cd294aa8cfd3407b8191f6c70214973a4" SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" PE = "1"@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" SRCREV_FORMAT ?= "kubernetes_release" -SRC_URI ="
git://github.com/kubernetes/kubernetes.git;branch=release-1.24;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kube rnetes \recipes-containers/kubernetes/kubernetes_git.bb +5
-2+SRC_URI = +"git://github.com/kubernetes/kubernetes.git;branch=release-1.26;name= +kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/ku +bernetes \ git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" SRC_URI:append = " \@@ -69,7 +69,7 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" - make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" + #make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # Build the target binaries export GOARCH="${TARGET_GOARCH}" --2.37.1
Quoted 11 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#7843):
https://lists.yoctoproject.org/g/meta-virtualization/message/7843
Mute This Topic: https://lists.yoctoproject.org/mt/96719358/1050810
Group Owner: [email protected] Unsubscribe:
https://lists.yoctoproject.org/g/meta-virtualization/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
I haven't forgotten about this, I'm still working on a joint upgrade to multiple recipes and stacks related to kubernetes, so it is taking a bit longer than I'd like for the update.
Bruce
In message: [meta-virtualization][PATCH] kubernetes: upgrade to 1.26.1
Quoted 187 lines · on 03/02/2023 Chen Qi wrote:
Changes include:
1. UpdateSRC_URIan SRCREV
2. Change 0001-hack-lib-golang.sh-use-CC-from-environment.patch to also remove the 'export CC=xxx' for amd64. The original patch is a little strange, it removes such statements for other archs but leaves amd64 untouched. If we're using CC from our environment, we use it for all targets.
3. Adapt 0001-build-golang.sh-convert-remaining-go-calls-to-use.patch to the 1.26.1 version.
4. Comment out the 'makefile_generated' command. I'm not sure why it's needed in the past, but for 1.26.1, it does seem to be necessary.This upgrade is tested on qemux86-64 & qemuarm64: k8s + containerd + flannel.
Signed-off-by Chen Qi <[email protected]>--- ...sh-convert-remaining-go-calls-to-use.patch | 39 +++++++++++-------- ...ib-golang.sh-use-CC-from-environment.patch | 25 +++++++----- .../kubernetes/kubernetes_git.bb | 8 ++-- 3 files changed, 43 insertions(+), 29 deletions(-)recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +23
-16@@ -1,18 +1,22 @@ -From 9973a66665992c49593595ae1eb70848907ea6a9 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <[email protected]> -Date: Wed, 12 Aug 2020 16:01:49 +0000 -Subject: [PATCH] build/golang.sh: convert remaining 'go' calls to use +From 3a357f4bb769a4127f5107f4ae21ee8f12279677 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Thu, 2 Feb 2023 22:29:07 -0800 +Subject: [PATCH 2/2] golang.sh: convert go to $GO -Signed-off-by: Bruce Ashfield <[email protected]> +Upstream-Status: Inappropriate [OE Specific] + +[The patch was original created by Bruce.] + +Signed-off-by: Chen Qi <[email protected]> --- hack/lib/golang.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f.orig/hack/lib/golang.sh -+++ kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -@@ -652,7 +652,7 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index 0ed2d719dd1..c2ea9e10186 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -676,7 +676,7 @@ kube::golang::build_some_binaries() { kube::golang::create_coverage_dummy_test "${package}" kube::util::trap_add "kube::golang::delete_coverage_dummy_test \"${package}\"" EXIT@@ -21,23 +25,23 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g -covermode count \ -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ "${build_args[@]}" \ -@@ -664,13 +664,13 @@ +@@ -688,13 +688,13 @@ kube::golang::build_some_binaries() { done if [[ "${#uncovered[@]}" != 0 ]]; then V=2 kube::log::info "Building ${uncovered[*]} without coverage..." -- go install "${build_args[@]}" "${uncovered[@]}" -+ $GO install "${build_args[@]}" "${uncovered[@]}" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "${uncovered[@]}" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "${uncovered[@]}" else V=2 kube::log::info "Nothing to build without coverage." fi else V=2 kube::log::info "Coverage is disabled." -- go install "${build_args[@]}" "$@" -+ $GO install "${build_args[@]}" "$@" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "$@" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "$@" fi } -@@ -729,7 +729,7 @@ +@@ -756,7 +756,7 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")"@@ -46,3 +50,6 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g ${goflags:+"${goflags[@]}"} \ -gcflags="${gogcflags}" \ -asmflags="${goasmflags}" \ +-- +2.37.1 +recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +16
-9@@ -1,21 +1,25 @@ -From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:00 2001 +From 116ccf93eef322db23e3bd4f35b12be09ebfbde5 Mon Sep 17 00:00:00 2001 From: Koen Kooi <[email protected]> Date: Mon, 23 Jul 2018 15:28:02 +0200 -Subject: [PATCH] hack/lib/golang.sh: use CC from environment +Subject: [PATCH 1/2] hack/lib/golang.sh: use CC from environment Toolchain tupples differs, especially when using vendor provides ones. Upstream-status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <[email protected]> --- - hack/lib/golang.sh | 4 ---- - 1 file changed, 4 deletions(-) + hack/lib/golang.sh | 5 ----- + 1 file changed, 5 deletions(-) -Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630.orig/hack/lib/golang.sh -+++ kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -@@ -414,19 +414,15 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index fb97ee76783..0ed2d719dd1 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -419,23 +419,18 @@ kube::golang::set_platform_envs() { + case "${platform}" in + "linux/amd64") + export CGO_ENABLED=1 +- export CC=${KUBE_LINUX_AMD64_CC:-x86_64-linux-gnu-gcc} ;; "linux/arm") export CGO_ENABLED=1@@ -35,3 +39,6 @@ Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/g ;; esac fi +-- +2.37.1 +recipes-containers/kubernetes/kubernetes_git.bb +4
-4@@ -5,8 +5,8 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ maintenance, and scaling of applications. \ " -PV = "v1.24.0+git${SRCREV_kubernetes}" -SRCREV_kubernetes = "8b1b4db3834ddf7cf1b97137180f413cb9e2186f" +PV = "v1.26.1+git${SRCREV_kubernetes}" +SRCREV_kubernetes = "8f94681cd294aa8cfd3407b8191f6c70214973a4" SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" PE = "1"@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" SRCREV_FORMAT ?= "kubernetes_release" -SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.24;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ +SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.26;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" SRC_URI:append = " \@@ -69,7 +69,7 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" - make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" + #make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # Build the target binaries export GOARCH="${TARGET_GOARCH}"Signature · 11 lines
2.37.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7843): https://lists.yoctoproject.org/g/meta-virtualization/message/7843 Mute This Topic: https://lists.yoctoproject.org/mt/96719358/1050810 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
I ran into some issues with varying networking, and latest updates to go (related to the build).
Since 1.27 releases on April 11th, I've started to consolidate all the fixes into a single bump to 1.27.x that will be in place for the mickledore release.
Bruce
Quoted 201 lines · Bruce Ashfield via lists.yoctoproject.org
I haven't forgotten about this, I'm still working on a joint upgrade to multiple recipes and stacks related to kubernetes, so it is taking a bit longer than I'd like for the update.
Bruce
In message: [meta-virtualization][PATCH] kubernetes: upgrade to 1.26.1
Quoted 175 lines · on 03/02/2023 Chen Qi wrote:
Changes include:
1. UpdateSRC_URIan SRCREV
2. Change 0001-hack-lib-golang.sh-use-CC-from-environment.patch to also remove the 'export CC=xxx' for amd64. The original patch is a little strange, it removes such statements for other archs but leaves amd64 untouched. If we're using CC from our environment, we use it for all targets.
3. Adapt 0001-build-golang.sh-convert-remaining-go-calls-to-use.patch to the 1.26.1 version.
4. Comment out the 'makefile_generated' command. I'm not sure why it's needed in the past, but for 1.26.1, it does seem to be necessary.This upgrade is tested on qemux86-64 & qemuarm64: k8s + containerd + flannel.
Signed-off-by Chen Qi <[email protected]>--- ...sh-convert-remaining-go-calls-to-use.patch | 39 +++++++++++-------- ...ib-golang.sh-use-CC-from-environment.patch | 25 +++++++----- .../kubernetes/kubernetes_git.bb | 8 ++-- 3 files changed, 43 insertions(+), 29 deletions(-)recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +23
-16@@ -1,18 +1,22 @@ -From 9973a66665992c49593595ae1eb70848907ea6a9 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <[email protected]> -Date: Wed, 12 Aug 2020 16:01:49 +0000 -Subject: [PATCH] build/golang.sh: convert remaining 'go' calls to use +From 3a357f4bb769a4127f5107f4ae21ee8f12279677 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Thu, 2 Feb 2023 22:29:07 -0800 +Subject: [PATCH 2/2] golang.sh: convert go to $GO -Signed-off-by: Bruce Ashfield <[email protected]> +Upstream-Status: Inappropriate [OE Specific] + +[The patch was original created by Bruce.] + +Signed-off-by: Chen Qi <[email protected]> --- hack/lib/golang.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f.orig/hack/lib/golang.sh -+++ kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -@@ -652,7 +652,7 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index 0ed2d719dd1..c2ea9e10186 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -676,7 +676,7 @@ kube::golang::build_some_binaries() { kube::golang::create_coverage_dummy_test "${package}" kube::util::trap_add "kube::golang::delete_coverage_dummy_test \"${package}\"" EXIT@@ -21,23 +25,23 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g -covermode count \ -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ "${build_args[@]}" \ -@@ -664,13 +664,13 @@ +@@ -688,13 +688,13 @@ kube::golang::build_some_binaries() { done if [[ "${#uncovered[@]}" != 0 ]]; then V=2 kube::log::info "Building ${uncovered[*]} without coverage..." -- go install "${build_args[@]}" "${uncovered[@]}" -+ $GO install "${build_args[@]}" "${uncovered[@]}" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "${uncovered[@]}" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "${uncovered[@]}" else V=2 kube::log::info "Nothing to build without coverage." fi else V=2 kube::log::info "Coverage is disabled." -- go install "${build_args[@]}" "$@" -+ $GO install "${build_args[@]}" "$@" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "$@" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "$@" fi } -@@ -729,7 +729,7 @@ +@@ -756,7 +756,7 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")"@@ -46,3 +50,6 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g ${goflags:+"${goflags[@]}"} \ -gcflags="${gogcflags}" \ -asmflags="${goasmflags}" \ +-- +2.37.1 +recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +16
-9@@ -1,21 +1,25 @@ -From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:00 2001 +From 116ccf93eef322db23e3bd4f35b12be09ebfbde5 Mon Sep 17 00:00:00 2001 From: Koen Kooi <[email protected]> Date: Mon, 23 Jul 2018 15:28:02 +0200 -Subject: [PATCH] hack/lib/golang.sh: use CC from environment +Subject: [PATCH 1/2] hack/lib/golang.sh: use CC from environment Toolchain tupples differs, especially when using vendor provides ones. Upstream-status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <[email protected]> --- - hack/lib/golang.sh | 4 ---- - 1 file changed, 4 deletions(-) + hack/lib/golang.sh | 5 ----- + 1 file changed, 5 deletions(-) -Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630.orig/hack/lib/golang.sh -+++ kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -@@ -414,19 +414,15 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index fb97ee76783..0ed2d719dd1 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -419,23 +419,18 @@ kube::golang::set_platform_envs() { + case "${platform}" in + "linux/amd64") + export CGO_ENABLED=1 +- export CC=${KUBE_LINUX_AMD64_CC:-x86_64-linux-gnu-gcc} ;; "linux/arm") export CGO_ENABLED=1@@ -35,3 +39,6 @@ Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/g ;; esac fi +-- +2.37.1 +recipes-containers/kubernetes/kubernetes_git.bb +4
-5@@ -5,8 +5,8 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ maintenance, and scaling of applications. \ " -PV = "v1.24.0+git${SRCREV_kubernetes}" -SRCREV_kubernetes = "8b1b4db3834ddf7cf1b97137180f413cb9e2186f" +PV = "v1.26.1+git${SRCREV_kubernetes}" +SRCREV_kubernetes = "8f94681cd294aa8cfd3407b8191f6c70214973a4" SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" PE = "1"@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" SRCREV_FORMAT ?= "kubernetes_release" -SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.24;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ +SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.26;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" SRC_URI:append = " \@@ -69,7 +69,7 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" - make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" + #make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # Build the target binaries export GOARCH="${TARGET_GOARCH}" --Quoted 6 lines
2.37.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7935): https://lists.yoctoproject.org/g/meta-virtualization/message/7935
Mute This Topic: https://lists.yoctoproject.org/mt/96719358/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/leave/6693017/1050810/978058475/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
1.27.x that I have under test is on master-next.
I changed this commit to just be part 2) below, and left your Signed-off-by.
Bruce
In message: [meta-virtualization][PATCH] kubernetes: upgrade to 1.26.1
Quoted 187 lines · on 03/02/2023 Chen Qi wrote:
Changes include:
1. UpdateSRC_URIan SRCREV
2. Change 0001-hack-lib-golang.sh-use-CC-from-environment.patch to also remove the 'export CC=xxx' for amd64. The original patch is a little strange, it removes such statements for other archs but leaves amd64 untouched. If we're using CC from our environment, we use it for all targets.
3. Adapt 0001-build-golang.sh-convert-remaining-go-calls-to-use.patch to the 1.26.1 version.
4. Comment out the 'makefile_generated' command. I'm not sure why it's needed in the past, but for 1.26.1, it does seem to be necessary.This upgrade is tested on qemux86-64 & qemuarm64: k8s + containerd + flannel.
Signed-off-by Chen Qi <[email protected]>--- ...sh-convert-remaining-go-calls-to-use.patch | 39 +++++++++++-------- ...ib-golang.sh-use-CC-from-environment.patch | 25 +++++++----- .../kubernetes/kubernetes_git.bb | 8 ++-- 3 files changed, 43 insertions(+), 29 deletions(-)recipes-containers/kubernetes/kubernetes/0001-build-golang.sh-convert-remaining-go-calls-to-use.patch +23
-16@@ -1,18 +1,22 @@ -From 9973a66665992c49593595ae1eb70848907ea6a9 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <[email protected]> -Date: Wed, 12 Aug 2020 16:01:49 +0000 -Subject: [PATCH] build/golang.sh: convert remaining 'go' calls to use +From 3a357f4bb769a4127f5107f4ae21ee8f12279677 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Thu, 2 Feb 2023 22:29:07 -0800 +Subject: [PATCH 2/2] golang.sh: convert go to $GO -Signed-off-by: Bruce Ashfield <[email protected]> +Upstream-Status: Inappropriate [OE Specific] + +[The patch was original created by Bruce.] + +Signed-off-by: Chen Qi <[email protected]> --- hack/lib/golang.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f.orig/hack/lib/golang.sh -+++ kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/golang.sh -@@ -652,7 +652,7 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index 0ed2d719dd1..c2ea9e10186 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -676,7 +676,7 @@ kube::golang::build_some_binaries() { kube::golang::create_coverage_dummy_test "${package}" kube::util::trap_add "kube::golang::delete_coverage_dummy_test \"${package}\"" EXIT@@ -21,23 +25,23 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g -covermode count \ -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ "${build_args[@]}" \ -@@ -664,13 +664,13 @@ +@@ -688,13 +688,13 @@ kube::golang::build_some_binaries() { done if [[ "${#uncovered[@]}" != 0 ]]; then V=2 kube::log::info "Building ${uncovered[*]} without coverage..." -- go install "${build_args[@]}" "${uncovered[@]}" -+ $GO install "${build_args[@]}" "${uncovered[@]}" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "${uncovered[@]}" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "${uncovered[@]}" else V=2 kube::log::info "Nothing to build without coverage." fi else V=2 kube::log::info "Coverage is disabled." -- go install "${build_args[@]}" "$@" -+ $GO install "${build_args[@]}" "$@" +- GO111MODULE=on GOPROXY=off go install "${build_args[@]}" "$@" ++ GO111MODULE=on GOPROXY=off $GO install "${build_args[@]}" "$@" fi } -@@ -729,7 +729,7 @@ +@@ -756,7 +756,7 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")"@@ -46,3 +50,6 @@ Index: kubernetes-v1.24.0+git8b1b4db3834ddf7cf1b97137180f413cb9e2186f/hack/lib/g ${goflags:+"${goflags[@]}"} \ -gcflags="${gogcflags}" \ -asmflags="${goasmflags}" \ +-- +2.37.1 +recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch +16
-9@@ -1,21 +1,25 @@ -From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:00 2001 +From 116ccf93eef322db23e3bd4f35b12be09ebfbde5 Mon Sep 17 00:00:00 2001 From: Koen Kooi <[email protected]> Date: Mon, 23 Jul 2018 15:28:02 +0200 -Subject: [PATCH] hack/lib/golang.sh: use CC from environment +Subject: [PATCH 1/2] hack/lib/golang.sh: use CC from environment Toolchain tupples differs, especially when using vendor provides ones. Upstream-status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <[email protected]> --- - hack/lib/golang.sh | 4 ---- - 1 file changed, 4 deletions(-) + hack/lib/golang.sh | 5 ----- + 1 file changed, 5 deletions(-) -Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -=================================================================== ---- kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630.orig/hack/lib/golang.sh -+++ kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/golang.sh -@@ -414,19 +414,15 @@ +diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh +index fb97ee76783..0ed2d719dd1 100755 +--- a/hack/lib/golang.sh ++++ b/hack/lib/golang.sh +@@ -419,23 +419,18 @@ kube::golang::set_platform_envs() { + case "${platform}" in + "linux/amd64") + export CGO_ENABLED=1 +- export CC=${KUBE_LINUX_AMD64_CC:-x86_64-linux-gnu-gcc} ;; "linux/arm") export CGO_ENABLED=1@@ -35,3 +39,6 @@ Index: kubernetes-v1.21.1+git45da3fc33872083fb225c1a8c4d03e530d6f7630/hack/lib/g ;; esac fi +-- +2.37.1 +recipes-containers/kubernetes/kubernetes_git.bb +4
-4@@ -5,8 +5,8 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ maintenance, and scaling of applications. \ " -PV = "v1.24.0+git${SRCREV_kubernetes}" -SRCREV_kubernetes = "8b1b4db3834ddf7cf1b97137180f413cb9e2186f" +PV = "v1.26.1+git${SRCREV_kubernetes}" +SRCREV_kubernetes = "8f94681cd294aa8cfd3407b8191f6c70214973a4" SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" PE = "1"@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" SRCREV_FORMAT ?= "kubernetes_release" -SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.24;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ +SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.26;name=kubernetes;protocol=https;destsuffix=git/src/github.com/kubernetes/kubernetes \ git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" SRC_URI:append = " \@@ -69,7 +69,7 @@ do_compile() { export CC="${BUILD_CC}" export LD="${BUILD_LD}" - make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" + #make generated_files GO="go" KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" # Build the target binaries export GOARCH="${TARGET_GOARCH}"Signature · 11 lines
2.37.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7843): https://lists.yoctoproject.org/g/meta-virtualization/message/7843 Mute This Topic: https://lists.yoctoproject.org/mt/96719358/1050810 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-