diff --git a/0004-add-loong64-support-for-etcd.patch b/0004-add-loong64-support-for-etcd.patch new file mode 100644 index 0000000000000000000000000000000000000000..cd71a39eb1c33fc921b04df802165920941bb60f --- /dev/null +++ b/0004-add-loong64-support-for-etcd.patch @@ -0,0 +1,30 @@ +From 5af3d04b4bf015be831312d9fcf5e6f20d889fa0 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Fri, 6 Jan 2023 07:25:42 +0000 +Subject: [PATCH] add loong64 support for etcd + +--- + vendor/go.etcd.io/bbolt/bolt_loong64.go | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + create mode 100644 vendor/go.etcd.io/bbolt/bolt_loong64.go + +diff --git a/vendor/go.etcd.io/bbolt/bolt_loong64.go b/vendor/go.etcd.io/bbolt/bolt_loong64.go +new file mode 100644 +index 0000000..a161182 +--- /dev/null ++++ b/vendor/go.etcd.io/bbolt/bolt_loong64.go +@@ -0,0 +1,12 @@ ++// +build loong64 ++ ++package bbolt ++ ++// maxMapSize represents the largest mmap size supported by Bolt. ++const maxMapSize = 0x8000000000 // 512GB ++ ++// maxAllocSize is the size used when creating array pointers. ++const maxAllocSize = 0x7FFFFFFF ++ ++// Are unaligned load/stores broken on this arch? ++var brokenUnaligned = false +-- +2.33.0 diff --git a/etcd.spec b/etcd.spec index 21d3255e50730c09ac0c0b1a7f829c6fc16f6ddb..f73692a9a85daa3a3b02b3b175d8d84de5bd138c 100644 --- a/etcd.spec +++ b/etcd.spec @@ -31,7 +31,7 @@ system.} %global gosupfiles integration/fixtures/* etcdserver/api/v2http/testdata/* Name: etcd -Release: 5 +Release: 6 Summary: Distributed reliable key-value store for the most critical data of a distributed system # Upstream license specification: Apache-2.0 @@ -43,10 +43,15 @@ Source2: %{name}.conf Source3: man-%{man_version}.tar.gz # sh genmanpages.sh path_to_built_source Source10: genmanpages.sh +%ifarch loongarch64 +#Source11 from go get -d golang.org/x/sys@27713097b9563e84e4e03a2ed9652ef9fe62263a +Source11: sys.tar.gz +%endif # update grpc-go version to v1.32.0 Patch1: 0001-Convert-int-to-string-using-strconv.Itoa.patch Patch2: 0002-Etcd-on-unsupported-platform-without-ETCD_UNSUPPORTED_ARCH=arm64-set.patch Patch3: 0003-etcd-Add-sw64-architecture.patch +Patch4: 0004-add-loong64-support-for-etcd.patch BuildRequires: golang BuildRequires: python3-devel @@ -67,6 +72,12 @@ Requires(pre): shadow-utils %ifarch sw_64 %patch3 -p1 %endif +%ifarch loongarch64 +%patch4 -p1 +rm -rf vendor/golang.org/x/sys +tar -xf %{SOURCE11} -C vendor/golang.org/x/ +%endif + # For compatibility cp -aR etcdserver/api/snap snap cp -aR etcdserver/api/membership etcdserver/membership @@ -152,6 +163,9 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/ %endif %changelog +* Thu Jul 20 2023 Wenlong Zhang - 3.4.14-6 +- Add loong64 suppodt for etcd + * Wed Oct 19 2022 wuzx - 3.4.14-5 - add sw64 patch diff --git a/sys.tar.gz b/sys.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..99d8837a7b73a082f13b0da60c31e28525078c7e Binary files /dev/null and b/sys.tar.gz differ