diff --git a/0001-add-loong64-support-for-etcd.patch b/0001-add-loong64-support-for-etcd.patch new file mode 100644 index 0000000000000000000000000000000000000000..e70f54a89f464220e64619702c1d0f803ed8390d --- /dev/null +++ b/0001-add-loong64-support-for-etcd.patch @@ -0,0 +1,31 @@ +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 f74797d59973760eaa1a47613ca276d5c2e35be0..0733b51f30458fd547e4d0288de6eb58d9b536a3 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,12 @@ Source2: %{name}.conf Source3: man-%{man_version}.tar.gz # sh genmanpages.sh path_to_built_source Source10: genmanpages.sh +Source11: sys.tar.gz # 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-3.4.14-sw.patch +Patch4: 0001-add-loong64-support-for-etcd.patch BuildRequires: golang BuildRequires: python3-devel @@ -67,6 +69,11 @@ Requires(pre): shadow-utils %ifarch sw_64 %patch3 -p1 %endif +%patch4 -p1 +%ifarch loongarch64 +rm -rf vendor/golang.org/x/sys +tar -xf %{SOURCE11} -C vendor/golang.org/x/ +%endif # For compatibility cp -aR etcdserver/api/snap snap @@ -153,6 +160,9 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/ %endif %changelog +* Fri Jan 6 2023 Wenlong Zhang - 3.4.14-6 +- add loong64 support 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..b4ad0697e1e5010da3ab78894255af8b036e8b0c Binary files /dev/null and b/sys.tar.gz differ