diff --git a/add-riscv-support.patch b/add-riscv-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..d1f2fbab0fe40e656b0f6c135d89c253e2e17997 --- /dev/null +++ b/add-riscv-support.patch @@ -0,0 +1,108 @@ +diff -ur --new-file kubeedge-1.8.0/edge/hack/setup_for_IEF.sh kubeedge-1.8.0/edge/hack/setup_for_IEF.sh +--- kubeedge-1.8.0/edge/hack/setup_for_IEF.sh 2021-08-31 17:27:20.000000000 +0800 ++++ kubeedge-1.8.0/edge/hack/setup_for_IEF.sh 2023-07-18 12:54:55.563641095 +0800 +@@ -78,6 +78,10 @@ + archInfo="arm64" + sed -i "s/{ARCH}/${archInfo}/g" ${CURRENT_PATH}/conf/system.yaml + ;; ++ "riscv64") ++ archInfo="riscv64" ++ sed -i "s/{ARCH}/${archInfo}/g" ${CURRENT_PATH}/conf/system.yaml ++ ;; + "i386") + archInfo="i386" + sed -i "s/{ARCH}/${archInfo}/g" ${CURRENT_PATH}/conf/system.yaml +diff -ur --new-file kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/common.go kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/common.go +--- kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/common.go 2021-08-31 17:27:20.000000000 +0800 ++++ kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/common.go 2023-07-18 10:41:23.579292888 +0800 +@@ -74,6 +74,7 @@ + OSArchAMD64 string = "amd64" + OSArchARM64 string = "arm64" + OSArchARM32 string = "arm" ++ OSArchRISCV64 string="riscv64" + + APT string = "apt" + YUM string = "yum" +diff -ur --new-file kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/pacmaninstaller.go kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/pacmaninstaller.go +--- kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/pacmaninstaller.go 2021-08-31 17:27:20.000000000 +0800 ++++ kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/pacmaninstaller.go 2023-07-18 11:04:22.148587219 +0800 +@@ -67,6 +67,8 @@ + arch = OSArchARM64 + case "x86_64": + arch = OSArchAMD64 ++ case "riscv64": ++ arch = OSArchRISCV64 + default: + return fmt.Errorf("can't support this architecture of PacmanOS: %s", result) + } +diff -ur --new-file kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/rpminstaller.go kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/rpminstaller.go +--- kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/rpminstaller.go 2023-07-18 09:54:42.488903499 +0800 ++++ kubeedge-1.8.0/keadm/cmd/keadm/app/cmd/util/rpminstaller.go 2023-07-18 11:04:22.148587219 +0800 +@@ -106,6 +106,8 @@ + arch = OSArchARM64 + case "x86_64": + arch = OSArchAMD64 ++ case "riscv64": ++ arch = OSArchRISCV64 + default: + return fmt.Errorf("can't support this architecture of RpmOS: %s", result) + } +diff -ur --new-file kubeedge-1.8.0/vendor/github.com/containerd/containerd/platforms/database.go kubeedge-1.8.0/vendor/github.com/containerd/containerd/platforms/database.go +--- kubeedge-1.8.0/vendor/github.com/containerd/containerd/platforms/database.go 2021-08-31 17:27:20.000000000 +0800 ++++ kubeedge-1.8.0/vendor/github.com/containerd/containerd/platforms/database.go 2023-07-18 11:28:48.152068672 +0800 +@@ -89,6 +89,9 @@ + case "x86_64", "x86-64": + arch = "amd64" + variant = "" ++ case "riscv64": ++ arch = "riscv64" ++ variant = "" + case "aarch64", "arm64": + arch = "arm64" + switch variant { +diff -ur --new-file kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo.go kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo.go +--- kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo.go 2021-08-31 17:27:20.000000000 +0800 ++++ kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo.go 2023-07-18 12:55:42.887757845 +0800 +@@ -362,6 +362,7 @@ + return cpuinfo, nil + } + ++ + func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { + scanner := bufio.NewScanner(bytes.NewReader(info)) + +diff -ur --new-file kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo_riscv64.go kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo_riscv64.go +--- kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo_riscv64.go 1970-01-01 08:00:00.000000000 +0800 ++++ kubeedge-1.8.0/vendor/github.com/prometheus/procfs/cpuinfo_riscv64.go 2023-07-18 12:55:45.603764545 +0800 +@@ -0,0 +1,19 @@ ++// Copyright 2020 The Prometheus Authors ++// Licensed under the Apache License, Version 2.0 (the "License"); ++// you may not use this file except in compliance with the License. ++// You may obtain a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++// +build linux ++// +build riscv riscv64 ++ ++package procfs ++ ++var parseCPUInfo = parseCPUInfoRISCV +diff -ur --new-file kubeedge-1.8.0/vendor/github.com/seccomp/libseccomp-golang/seccomp.go kubeedge-1.8.0/vendor/github.com/seccomp/libseccomp-golang/seccomp.go +--- kubeedge-1.8.0/vendor/github.com/seccomp/libseccomp-golang/seccomp.go 2021-08-31 17:27:20.000000000 +0800 ++++ kubeedge-1.8.0/vendor/github.com/seccomp/libseccomp-golang/seccomp.go 2023-07-18 10:18:53.584007378 +0800 +@@ -196,6 +196,8 @@ + return ArchMIPS, nil + case "mips64": + return ArchMIPS64, nil ++ case "riscv64": ++ return ArchRISCV64, nil + case "mips64n32": + return ArchMIPS64N32, nil + case "mipsel": diff --git a/kubeedge.spec b/kubeedge.spec index 118fe277872e02a4d06285f0d1c441bc50dab868..25f81f3d3ad44a8f0264b8e42fc85ff5c3aa3df3 100644 --- a/kubeedge.spec +++ b/kubeedge.spec @@ -4,12 +4,15 @@ %ifarch aarch64 %global gohostarch arm64 %endif +%ifarch riscv64 +%global gohostarch riscv64 +%endif %define debug_package %{nil} Name: kubeedge Version: 1.8.0 -Release: 3 +Release: 4 Summary: Kubernetes Native Edge Computing Framework License: Apache-2.0 URL: https://github.com/kubeedge/kubeedge @@ -17,6 +20,7 @@ Source0: https://github.com/kubeedge/kubeedge/archive/refs/tags/v%{version}.tar. BuildRequires: golang glibc-static make tar systemd git Patch0001: 0001-rpminstaller-add-support-for-openEuler.patch +Patch0002: add-riscv-support.patch %description KubeEdge is an open source system for extending native containerized application @@ -165,6 +169,9 @@ install -Dpm0550 checksum_%{tarball_name}.tar.gz.txt %{buildroot}%{_sysconfdir}/ %attr(550,root,root) %{_prefix}/local/bin/edgesite-server %changelog +* Mon Jul 17 2023 zhangxiang - 1.8.0-4 +- add riscv64 support + * Tue Mar 7 2023 caodongxia - 1.8.0-3 - Fix not stripped problem