-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redis 7.0 "includes changes that potentially break backwards compatibility with older versions", so let's let folks some time to test 7.0 and later decide which version(s) we want to keep. Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Loading branch information
Showing
10 changed files
with
1,702 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
meta-oe/recipes-extended/redis/redis-7/0001-src-Do-not-reset-FINAL_LIBS.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From e97a572d4aef099a961e43d528c0268e10d9f1e2 Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <raj.khem@gmail.com> | ||
Date: Tue, 10 Sep 2019 20:04:26 -0700 | ||
Subject: [PATCH] src: Do not reset FINAL_LIBS | ||
|
||
This helps case where additional libraries are needed to be passed from | ||
environment to get it going | ||
|
||
e.g. -latomic is needed on clang/x86 to provide for 64bit atomics | ||
|
||
Upstream-Status: Pending | ||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
|
||
--- | ||
src/Makefile | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/Makefile b/src/Makefile | ||
index ddabd44..5133884 100644 | ||
--- a/src/Makefile | ||
+++ b/src/Makefile | ||
@@ -118,7 +118,7 @@ endif | ||
|
||
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) | ||
FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) | ||
-FINAL_LIBS=-lm | ||
+FINAL_LIBS+=-lm | ||
DEBUG=-g -ggdb | ||
|
||
# Linux ARM32 needs -latomic at linking time |
60 changes: 60 additions & 0 deletions
60
meta-oe/recipes-extended/redis/redis-7/0006-Define-correct-gregs-for-RISCV32.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From f26a978c638bcbc621669dce0ab89e43af42af98 Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <raj.khem@gmail.com> | ||
Date: Mon, 26 Oct 2020 21:32:22 -0700 | ||
Subject: [PATCH] Define correct gregs for RISCV32 | ||
|
||
Upstream-Status: Pending | ||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
|
||
Updated patch for 6.2.1 | ||
Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
|
||
--- | ||
src/debug.c | 26 ++++++++++++++++++++++++-- | ||
1 file changed, 24 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/debug.c b/src/debug.c | ||
index 2da2c5d..1d778fa 100644 | ||
--- a/src/debug.c | ||
+++ b/src/debug.c | ||
@@ -1116,7 +1116,9 @@ static void *getMcontextEip(ucontext_t *uc) { | ||
#endif | ||
#elif defined(__linux__) | ||
/* Linux */ | ||
- #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) | ||
+ #if defined(__riscv) && __riscv_xlen == 32 | ||
+ return (void*) uc->uc_mcontext.__gregs[REG_PC]; | ||
+ #elif defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) | ||
return (void*) uc->uc_mcontext.gregs[14]; /* Linux 32 */ | ||
#elif defined(__X86_64__) || defined(__x86_64__) | ||
return (void*) uc->uc_mcontext.gregs[16]; /* Linux 64 */ | ||
@@ -1298,8 +1300,28 @@ void logRegisters(ucontext_t *uc) { | ||
#endif | ||
/* Linux */ | ||
#elif defined(__linux__) | ||
+ /* Linux RISCV32 */ | ||
+ #if defined(__riscv) && __riscv_xlen == 32 | ||
+ serverLog(LL_WARNING, | ||
+ "\n" | ||
+ "RA:%08lx S0:%08lx S1:%08lx S2:%08lx\n" | ||
+ "SP:%08lx PC:%08lx A0:%08lx A1:%08lx\n" | ||
+ "A2 :%08lx A3:%08lx A4:%08lx", | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_RA], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_S0], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_S1], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_S2], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_SP], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_PC], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 0], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 1], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 2], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 3], | ||
+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 4] | ||
+ ); | ||
+ logStackContent((void**)uc->uc_mcontext.__gregs[REG_SP]); | ||
/* Linux x86 */ | ||
- #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) | ||
+ #elif defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) | ||
serverLog(LL_WARNING, | ||
"\n" | ||
"EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From a22512ac1cbd6de1f5646219722e49752d1f60ac Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <raj.khem@gmail.com> | ||
Date: Sat, 21 Dec 2019 12:09:51 -0800 | ||
Subject: [PATCH] Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER | ||
|
||
Fixes | ||
| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) | ||
| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; | ||
| | ^~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Upstream-Status: Pending | ||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
|
||
--- | ||
src/zmalloc.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/zmalloc.c b/src/zmalloc.c | ||
index ba03685..322304f 100644 | ||
--- a/src/zmalloc.c | ||
+++ b/src/zmalloc.c | ||
@@ -32,6 +32,7 @@ | ||
#include "config.h" | ||
#include "solarisfixes.h" | ||
|
||
+#define _GNU_SOURCE | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <stdint.h> |
36 changes: 36 additions & 0 deletions
36
meta-oe/recipes-extended/redis/redis-7/hiredis-use-default-CC-if-it-is-set.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 9da2d12c9fabfff4b4460accf887658db89687e4 Mon Sep 17 00:00:00 2001 | ||
From: Venture Research <tech@ventureresearch.com> | ||
Date: Fri, 8 Feb 2013 17:39:52 -0600 | ||
Subject: [PATCH] hiredis: use default CC if it is set | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Instead of trying to automagically figure out CC, which breaks with OE | ||
as CC has spaces in it, just skip it if one was already passed in. | ||
|
||
Signed-off-by: Venture Research <tech@ventureresearch.com> | ||
|
||
Update to work with 4.0.8 | ||
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
|
||
Reworked for 6.0.4 | ||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
|
||
--- | ||
deps/hiredis/Makefile | 2 -- | ||
1 file changed, 2 deletions(-) | ||
|
||
diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile | ||
index 7e41c97..54717e3 100644 | ||
--- a/deps/hiredis/Makefile | ||
+++ b/deps/hiredis/Makefile | ||
@@ -42,8 +42,6 @@ endef | ||
export REDIS_TEST_CONFIG | ||
|
||
# Fallback to gcc when $CC is not in $PATH. | ||
-CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') | ||
-CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') | ||
OPTIMIZATION?=-O3 | ||
WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers | ||
DEBUG_FLAGS?= -g -ggdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: redis-server | ||
# Required-Start: $network | ||
# Required-Stop: $network | ||
# Default-Start: S 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Redis, a key-value store | ||
# Description: Redis is an open source, advanced key-value store. | ||
# http://redis.io | ||
### END INIT INFO | ||
|
||
test -f /usr/bin/redis-server || exit 0 | ||
|
||
ARGS="/etc/redis/redis.conf" | ||
|
||
case "$1" in | ||
start) | ||
echo "Starting redis-server..." | ||
start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS | ||
;; | ||
stop) | ||
echo "Stopping redis-server..." | ||
start-stop-daemon --stop --quiet --exec /usr/bin/redis-server | ||
;; | ||
restart) | ||
echo "Stopping redis-server..." | ||
start-stop-daemon --stop --quiet --exec /usr/bin/redis-server | ||
echo "Starting redis-server..." | ||
start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS | ||
;; | ||
*) | ||
echo "Usage: /etc/init.d/redis-server {start|stop|restart}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 | ||
|
76 changes: 76 additions & 0 deletions
76
...recipes-extended/redis/redis-7/lua-update-Makefile-to-use-environment-build-setting.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
From 734ab2f7879c6f94fc18ea6a10adb9bd156ba769 Mon Sep 17 00:00:00 2001 | ||
From: Venture Research <tech@ventureresearch.com> | ||
Date: Fri, 8 Feb 2013 20:22:19 -0600 | ||
Subject: [PATCH] lua: update Makefile to use environment build settings | ||
|
||
OE-specific parameters, instead of overriding all of these simply use | ||
the ones that are already passed in. Also configure for only Linux... | ||
|
||
Signed-off-by: Venture Research <tech@ventureresearch.com> | ||
|
||
Updated to work with 3.0.x | ||
|
||
Signed-off-by: Armin Kuster <akust808@gmail.com> | ||
|
||
updated to work wtih 6.2.1 | ||
Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
|
||
--- | ||
deps/Makefile | 1 - | ||
deps/lua/Makefile | 1 - | ||
deps/lua/src/Makefile | 16 ++++++---------- | ||
3 files changed, 6 insertions(+), 12 deletions(-) | ||
|
||
diff --git a/deps/Makefile b/deps/Makefile | ||
index 8592e17..1807af5 100644 | ||
--- a/deps/Makefile | ||
+++ b/deps/Makefile | ||
@@ -81,7 +81,6 @@ endif | ||
# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more | ||
# challenging to cross-compile lua (and redis). These defines make it easier | ||
# to fit redis into cross-compilation environments, which typically set AR. | ||
-AR=ar | ||
ARFLAGS=rc | ||
|
||
lua: .make-prerequisites | ||
diff --git a/deps/lua/Makefile b/deps/lua/Makefile | ||
index 209a132..72f4b2b 100644 | ||
--- a/deps/lua/Makefile | ||
+++ b/deps/lua/Makefile | ||
@@ -33,7 +33,6 @@ INSTALL_DATA= $(INSTALL) -m 0644 | ||
|
||
# Utilities. | ||
MKDIR= mkdir -p | ||
-RANLIB= ranlib | ||
|
||
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= | ||
|
||
diff --git a/deps/lua/src/Makefile b/deps/lua/src/Makefile | ||
index f3bba2f..1555ec0 100644 | ||
--- a/deps/lua/src/Makefile | ||
+++ b/deps/lua/src/Makefile | ||
@@ -5,18 +5,14 @@ | ||
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= | ||
|
||
# Your platform. See PLATS for possible values. | ||
-PLAT= none | ||
+PLAT= linux | ||
|
||
-CC?= gcc | ||
-CFLAGS= -O2 -Wall $(MYCFLAGS) | ||
-AR= ar rcu | ||
-RANLIB= ranlib | ||
-RM= rm -f | ||
-LIBS= -lm $(MYLIBS) | ||
- | ||
-MYCFLAGS= | ||
+MYCFLAGS=-DLUA_USE_LINUX | ||
MYLDFLAGS= | ||
-MYLIBS= | ||
+MYLIBS=-Wl,-E -ldl -lreadline -lhistory -lncurses | ||
+ | ||
+CFLAGS += $(MYCFLAGS) | ||
+LIBS += -lm $(MYLIBS) | ||
|
||
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= | ||
|
34 changes: 34 additions & 0 deletions
34
meta-oe/recipes-extended/redis/redis-7/oe-use-libc-malloc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 88da6b19ecd00747769663e913aba5e9569c489d Mon Sep 17 00:00:00 2001 | ||
From: Venture Research <tech@ventureresearch.com> | ||
Date: Wed, 6 Feb 2013 20:51:02 -0600 | ||
Subject: [PATCH] hack to force use of libc malloc | ||
|
||
Hack to force libc usage as it seems the option to pass it in has been | ||
removed in favor of magic. | ||
|
||
Note that this of course doesn't allow tcmalloc and jemalloc, however | ||
jemalloc wasn't building correctly. | ||
|
||
Signed-off-by: Venture Research <tech@ventureresearch.com> | ||
|
||
Update to work with 4.0.8 | ||
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
|
||
--- | ||
src/Makefile | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/Makefile b/src/Makefile | ||
index 2a0d74d..ddabd44 100644 | ||
--- a/src/Makefile | ||
+++ b/src/Makefile | ||
@@ -13,7 +13,8 @@ | ||
# Just use 'make dep', but this is only needed by developers. | ||
|
||
release_hdr := $(shell sh -c './mkreleasehdr.sh') | ||
-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') | ||
+# use fake uname option to force use of generic libc | ||
+uname_S := "USE_LIBC_MALLOC" | ||
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') | ||
OPTIMIZATION?=-O2 | ||
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram |
Oops, something went wrong.