diff --git a/redis-4.0.14-sw.patch b/redis-4.0.14-sw.patch new file mode 100755 index 0000000000000000000000000000000000000000..e0d353e0cae0e95b5d810558730b56b2e188bd39 --- /dev/null +++ b/redis-4.0.14-sw.patch @@ -0,0 +1,74 @@ +diff -Naur redis-4.0.14.org/deps/jemalloc/config.guess redis-4.0.14.sw/deps/jemalloc/config.guess +--- redis-4.0.14.org/deps/jemalloc/config.guess 2022-09-29 13:42:55.740000000 +0800 ++++ redis-4.0.14.sw/deps/jemalloc/config.guess 2022-09-29 13:48:05.190000000 +0800 +@@ -890,6 +890,14 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-sunway-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur redis-4.0.14.org/deps/jemalloc/config.sub redis-4.0.14.sw/deps/jemalloc/config.sub +--- redis-4.0.14.org/deps/jemalloc/config.sub 2022-09-29 13:42:55.740000000 +0800 ++++ redis-4.0.14.sw/deps/jemalloc/config.sub 2022-09-29 13:47:42.200000000 +0800 +@@ -248,6 +248,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -366,6 +367,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur redis-4.0.14.org/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in redis-4.0.14.sw/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in +--- redis-4.0.14.org/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in 2022-09-29 13:42:55.720000000 +0800 ++++ redis-4.0.14.sw/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in 2022-09-29 13:44:13.410000000 +0800 +@@ -232,6 +232,9 @@ + # ifdef __alpha__ + # define LG_QUANTUM 4 + # endif ++# ifdef __sw_64__ ++# define LG_QUANTUM 4 ++# endif + # if (defined(__sparc64__) || defined(__sparcv9)) + # define LG_QUANTUM 4 + # endif +diff -Naur redis-4.0.14.org/src/config.h redis-4.0.14.sw/src/config.h +--- redis-4.0.14.org/src/config.h 2022-09-29 13:42:55.760000000 +0800 ++++ redis-4.0.14.sw/src/config.h 2022-09-29 13:53:27.710000000 +0800 +@@ -145,7 +145,8 @@ + #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ + defined(vax) || defined(ns32000) || defined(sun386) || \ + defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ +- defined(__alpha__) || defined(__alpha) ++ defined(__alpha__) || defined(__alpha) || \ ++ defined(__sw_64__) || defined(__sw_64) + #define BYTE_ORDER LITTLE_ENDIAN + #endif + +@@ -215,6 +216,10 @@ + #define __arm64__ + #endif + ++#if defined (__sw_64__) ++#define __sw_64__ ++#endif ++ + /* Make sure we can test for SPARC just checking for __sparc__. */ + #if defined(__sparc) && !defined(__sparc__) + #define __sparc__ diff --git a/redis.spec b/redis.spec index dd1d0279a69f4907ec4f0305e5bf0edf6b7cead2..f06b7078c64a093dd08f8544f7ab013d05d78dd4 100644 --- a/redis.spec +++ b/redis.spec @@ -1,6 +1,6 @@ Name: redis Version: 4.0.14 -Release: 1 +Release: 2 Summary: A persistent key-value database License: BSD and MIT URL: https://redis.io @@ -19,6 +19,7 @@ Patch0007: CVE-2021-21309.patch Patch0008: CVE-2021-3470.patch Patch0009: CVE-2021-29478.patch Patch0010: CVE-2021-32672.patch +Patch0011: redis-4.0.14-sw.patch BuildRequires: systemd gcc Requires: /bin/awk @@ -46,6 +47,7 @@ Redis is an advanced key-value store. It is often referred to as a dattructure s %patch0008 -p1 %patch0009 -p1 %patch0010 -p1 +%patch0011 -p1 sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf sed -i -e '$ alogfile /var/log/redis/sentinel.log' sentinel.conf @@ -103,6 +105,9 @@ exit 0 %{_unitdir}/%{name}-sentinel.service %changelog +* Wed Oct 26 2022 wuzx - 4.0.14-2 +- Add sw64 architecture + * Wed Dec 29 2021 zhangjiapeng - 4.0.14-1 - Update to 4.0.14