diff --git a/0008-add-riscv-support.patch b/0008-add-riscv-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..f25c50b34e584aa4c5cabe5d8da3c20367c62aa9 --- /dev/null +++ b/0008-add-riscv-support.patch @@ -0,0 +1,89 @@ +diff -ur kubernetes-1.25.3/hack/lib/golang.sh kubernetes-1.25.3/hack/lib/golang.sh +--- kubernetes-1.25.3/hack/lib/golang.sh 2023-07-28 16:07:07.873130748 +0800 ++++ kubernetes-1.25.3/hack/lib/golang.sh 2023-07-28 17:02:01.192415345 +0800 +@@ -27,6 +27,7 @@ + linux/arm64 + linux/s390x + linux/ppc64le ++ linux/riscv64 + ) + + # The node platforms we build for +@@ -36,6 +37,7 @@ + linux/arm64 + linux/s390x + linux/ppc64le ++ linux/riscv64 + windows/amd64 + ) + +@@ -48,6 +50,7 @@ + linux/arm64 + linux/s390x + linux/ppc64le ++ linux/riscv64 + darwin/amd64 + darwin/arm64 + windows/amd64 +@@ -63,6 +66,7 @@ + linux/arm64 + linux/s390x + linux/ppc64le ++ linux/riscv64 + darwin/amd64 + darwin/arm64 + windows/amd64 +@@ -213,8 +217,8 @@ + + elif [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then + host_arch=$(kube::util::host_arch) +- if [[ "${host_arch}" != "amd64" && "${host_arch}" != "arm64" && "${host_arch}" != "ppc64le" && "${host_arch}" != "s390x" ]]; then +- # on any platform other than amd64, arm64, ppc64le and s390x, we just default to amd64 ++ if [[ "${host_arch}" != "amd64" && "${host_arch}" != "arm64" && "${host_arch}" != "ppc64le" && "${host_arch}" != "s390x" && "${host_arch}" != "riscv64" ]]; then ++ # on any platform other than amd64, arm64, ppc64le and s390x, riscv64, we just default to amd64 + host_arch="amd64" + fi + KUBE_SERVER_PLATFORMS=("linux/${host_arch}") +@@ -444,6 +448,10 @@ + export CGO_ENABLED=1 + export CC=${KUBE_LINUX_S390X_CC:-s390x-linux-gnu-gcc} + ;; ++ "linux/riscv64") ++ export CGO_ENABLED=1 ++ export CC=${KUBE_LINUX_S390X_CC:-riscv64-linux-gnu-gcc} ++ ;; + esac + fi + +diff -ur kubernetes-1.25.3/hack/lib/util.sh kubernetes-1.25.3/hack/lib/util.sh +--- kubernetes-1.25.3/hack/lib/util.sh 2022-10-12 18:47:25.000000000 +0800 ++++ kubernetes-1.25.3/hack/lib/util.sh 2023-07-28 16:09:27.117412982 +0800 +@@ -185,8 +185,11 @@ + ppc64le*) + host_arch=ppc64le + ;; ++ riscv64*) ++ host_arch=riscv64 ++ ;; + *) +- kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." ++ kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, riscv64, s390x or ppc64le." + exit 1 + ;; + esac +diff -ur kubernetes-1.25.3/hack/local-up-cluster.sh kubernetes-1.25.3/hack/local-up-cluster.sh +--- kubernetes-1.25.3/hack/local-up-cluster.sh 2022-10-12 18:47:25.000000000 +0800 ++++ kubernetes-1.25.3/hack/local-up-cluster.sh 2023-07-28 16:08:57.429352807 +0800 +@@ -316,8 +316,11 @@ + ppc64le*) + host_arch=ppc64le + ;; ++ riscv64*) ++ host_arch=riscv64 ++ ;; + *) +- echo "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." >&2 ++ echo "Unsupported host arch. Must be x86_64, 386, arm, arm64, riscv64, s390x or ppc64le." >&2 + exit 1 + ;; + esac diff --git a/kubernetes.spec b/kubernetes.spec index 1b7aece8654c5cb10b3f2812d6fbac2127cdd847..b976165c75b628ba7348c1c6d1e40967e1e34fc4 100644 --- a/kubernetes.spec +++ b/kubernetes.spec @@ -3,7 +3,7 @@ Name: kubernetes Version: 1.25.3 -Release: 1 +Release: 2 Summary: Container cluster management License: ASL 2.0 URL: https://k8s.io/kubernetes @@ -31,6 +31,7 @@ Patch0004: 0004-Return-error-for-localhost-seccomp-type-with-no-loca.patch Patch0005: 0005-Validate-etcd-paths.patch Patch0006: 0006-fix-node-address-validation.patch Patch0007: 0007-Add-ephemeralcontainer-to-imagepolicy-securityaccoun.patch +Patch0008: 0008-add-riscv-support.patch %description Container cluster management. @@ -262,6 +263,9 @@ getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \ %systemd_postun kubelet kube-proxy %changelog +* Fri Jul 28 2023 zhangxiang - 1.25.3-2 +- DESC:add riscv64 support + * Fri Jul 21 2023 zhangxiaoyu - 1.25.3-1 - Type:update - CVE:NA