diff --git a/1000-anolis-redis-add-loongarch-support.patch b/1000-anolis-redis-add-loongarch-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..6ff25b562d69057f17b7101a69a7269bd8b8d7de --- /dev/null +++ b/1000-anolis-redis-add-loongarch-support.patch @@ -0,0 +1,45 @@ +diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +index 1b750b1..780627d 100644 +--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h ++++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +@@ -107,6 +107,9 @@ typedef int malloc_cpuid_t; + # ifdef __tile__ + # define LG_QUANTUM 4 + # endif ++# ifdef __loongarch__ ++# define LG_QUANTUM 4 ++# endif + # ifdef __le32__ + # define LG_QUANTUM 4 + # endif +--- redis-5.0.3.orig/deps/jemalloc/build-aux/config.guess 2021-11-16 19:51:58.136000000 +0800 ++++ redis-5.0.3.new/deps/jemalloc/build-aux/config.guess 2021-11-16 20:23:58.472000000 +0800 +@@ -915,6 +915,9 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Nur redis-5.0.3.orig/deps/jemalloc/build-aux/config.sub redis-5.0.3.new/deps/jemalloc/build-aux/config.sub +--- redis-5.0.3.orig/deps/jemalloc/build-aux/config.sub 2021-11-16 19:51:58.136000000 +0800 ++++ redis-5.0.3.new/deps/jemalloc/build-aux/config.sub 2021-11-16 20:26:14.956000000 +0800 +@@ -248,6 +248,7 @@ + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -372,6 +373,7 @@ + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ ++ | loongarch32-* | loongarch64-* | loongarchx32-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ diff --git a/redis.spec b/redis.spec index a0ac1efc50d9173f49856903dacdd2b050d479a2..d1de57b2b627e6ebdcdc8e98d66f6f04869a4607 100644 --- a/redis.spec +++ b/redis.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # # RHEL / Fedora spec file for redis # @@ -20,7 +21,7 @@ Name: redis Version: 5.0.3 -Release: 5%{?dist} +Release: 5%{anolis_release}%{?dist} Summary: A persistent key-value database # redis, jemalloc, linenoise, lzf, hiredis are BSD # lua is MIT @@ -58,6 +59,8 @@ Patch104: redis-CVE-2021-32626.patch Patch105: redis-CVE-2021-32627.patch Patch106: redis-CVE-2021-32675.patch +Patch1000: 1000-anolis-redis-add-loongarch-support.patch + %if 0%{?with_tests} BuildRequires: procps-ng BuildRequires: tcl @@ -142,6 +145,8 @@ mv ../%{name}-doc-%{doc_commit} doc %patch105 -p1 -b .cve-2021-32627 %patch106 -p1 -b .cve-2021-32675 +%patch1000 -p1 + mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc mv deps/hiredis/COPYING COPYING-hiredis @@ -286,6 +291,9 @@ exit 0 %changelog +* Tue Jan 25 2022 Liwei Ge - 5.0.3-5.0.1 +- Support loongarch64 platform + * Mon Oct 11 2021 Remi Collet - 5.0.3-5 - fix denial of service via Redis Standard Protocol (RESP) request CVE-2021-32675