diff options
Diffstat (limited to 'meta-oe/recipes-extended/redis/redis')
8 files changed, 158 insertions, 44 deletions
diff --git a/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch b/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch index b5c4133e31..66ab0ee33c 100644 --- a/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch +++ b/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch @@ -10,15 +10,16 @@ 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 7f7c625..c71dd3b 100644 +index 5564351..83ccd76 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -75,7 +75,7 @@ endif +@@ -91,7 +91,7 @@ endif FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) @@ -26,7 +27,4 @@ index 7f7c625..c71dd3b 100644 +FINAL_LIBS+=-lm DEBUG=-g -ggdb - # Linux ARM needs -latomic at linking time --- -2.23.0 - + # Linux ARM32 needs -latomic at linking time diff --git a/meta-oe/recipes-extended/redis/redis/0006-Define-correct-gregs-for-RISCV32.patch b/meta-oe/recipes-extended/redis/redis/0006-Define-correct-gregs-for-RISCV32.patch new file mode 100644 index 0000000000..9d7e502717 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0006-Define-correct-gregs-for-RISCV32.patch @@ -0,0 +1,62 @@ +From 26bd72f3b8de22e5036d86e6c79f815853b83473 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 5318c14..8c21b47 100644 +--- a/src/debug.c ++++ b/src/debug.c +@@ -1055,7 +1055,9 @@ static void* getAndSetMcontextEip(ucontext_t *uc, void *eip) { + #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__)) + GET_SET_RETURN(uc->uc_mcontext.gregs[14], eip); + #elif defined(__X86_64__) || defined(__x86_64__) + GET_SET_RETURN(uc->uc_mcontext.gregs[16], eip); +@@ -1222,8 +1224,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" +-- +2.25.1 + diff --git a/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch b/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch index 9a40d832f1..20f689bd0b 100644 --- a/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch +++ b/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch @@ -1,4 +1,7 @@ -Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER +From 98d526f76049be21bf3d77158236b2189419a78e 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) @@ -7,6 +10,12 @@ Fixes 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 1f33d09..5e182d1 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -28,6 +28,7 @@ @@ -17,3 +26,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include <stdio.h> #include <stdlib.h> #include <stdint.h> +-- +2.25.1 + diff --git a/meta-oe/recipes-extended/redis/redis/hiredis-use-default-CC-if-it-is-set.patch b/meta-oe/recipes-extended/redis/redis/hiredis-use-default-CC-if-it-is-set.patch index 878cd36973..d2a1b45e66 100644 --- a/meta-oe/recipes-extended/redis/redis/hiredis-use-default-CC-if-it-is-set.patch +++ b/meta-oe/recipes-extended/redis/redis/hiredis-use-default-CC-if-it-is-set.patch @@ -14,6 +14,8 @@ Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reworked for 6.0.4 Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> --- +Upstream-Status: Pending + deps/hiredis/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-oe/recipes-extended/redis/redis/init-redis-server b/meta-oe/recipes-extended/redis/redis/init-redis-server index 6014d70c0e..c5f335f57d 100755 --- a/meta-oe/recipes-extended/redis/redis/init-redis-server +++ b/meta-oe/recipes-extended/redis/redis/init-redis-server @@ -27,6 +27,37 @@ case "$1" in restart) echo "Stopping redis-server..." start-stop-daemon --stop --quiet --exec /usr/bin/redis-server + + # Since busybox implementation ignores --retry arguments repeatedly check + # if the process is still running and try another signal after a timeout, + # efectively simulating a stop with --retry=TERM/5/KILL/5 schedule. + waitAfterTerm=5000000 # us / 5000 ms / 5 s + waitAfterKill=5000000 # us / 5000 ms / 5 s + waitStep=100000 # us / 100 ms / 0.1 s + waited=0 + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + while [ $processOff -eq 0 ] && [ $waited -le $waitAfterTerm ] ; do + usleep ${waitStep} + ((waited+=${waitStep})) + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + done + if [ $processOff -eq 0 ] ; then + start-stop-daemon --stop --signal KILL --exec /usr/bin/redis-server + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + fi + waited=0 + while [ $processOff -eq 0 ] && [ $waited -le $waitAfterKill ] ; do + usleep ${waitStep} + ((waited+=${waitStep})) + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + done + # Here $processOff will indicate if waiting and retrying according to + # the schedule ended in a successfull stop or not. + echo "Starting redis-server..." start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS ;; diff --git a/meta-oe/recipes-extended/redis/redis/lua-update-Makefile-to-use-environment-build-setting.patch b/meta-oe/recipes-extended/redis/redis/lua-update-Makefile-to-use-environment-build-setting.patch index 7e62ae1316..aade7afd06 100644 --- a/meta-oe/recipes-extended/redis/redis/lua-update-Makefile-to-use-environment-build-setting.patch +++ b/meta-oe/recipes-extended/redis/redis/lua-update-Makefile-to-use-environment-build-setting.patch @@ -1,4 +1,4 @@ -From 394108035d350ae662a431c80131f812b5f72dff Mon Sep 17 00:00:00 2001 +From 097a2b259cb266c2c861dc74fa6f80712d6138c5 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 @@ -12,14 +12,44 @@ 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/lua/src/Makefile | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) +Upstream-Status: Pending -Index: redis-3.0.2/deps/lua/src/Makefile -=================================================================== ---- redis-3.0.2.orig/deps/lua/src/Makefile -+++ redis-3.0.2/deps/lua/src/Makefile + 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 ff16ee9..d8d64aa 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -74,7 +74,6 @@ LUA_LDFLAGS+= $(LDFLAGS) + # 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 ======================= @@ -45,27 +75,3 @@ Index: redis-3.0.2/deps/lua/src/Makefile # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= -Index: redis-3.0.2/deps/Makefile -=================================================================== ---- redis-3.0.2.orig/deps/Makefile -+++ redis-3.0.2/deps/Makefile -@@ -63,7 +63,6 @@ LUA_LDFLAGS+= $(LDFLAGS) - # 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=rcu - - lua: .make-prerequisites -Index: redis-3.0.2/deps/lua/Makefile -=================================================================== ---- redis-3.0.2.orig/deps/lua/Makefile -+++ redis-3.0.2/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/meta-oe/recipes-extended/redis/redis/oe-use-libc-malloc.patch b/meta-oe/recipes-extended/redis/redis/oe-use-libc-malloc.patch index 6745f3d0e0..e76bdbc263 100644 --- a/meta-oe/recipes-extended/redis/redis/oe-use-libc-malloc.patch +++ b/meta-oe/recipes-extended/redis/redis/oe-use-libc-malloc.patch @@ -1,4 +1,4 @@ -From f8861d2129b9e18bba137705bfa38c6bd9be1790 Mon Sep 17 00:00:00 2001 +From 1fa047162983d4a7e0576f0837a73a6027a783bd 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 @@ -6,7 +6,7 @@ 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 +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> @@ -15,11 +15,13 @@ Update to work with 4.0.8 Signed-off-by: Alistair Francis <alistair.francis@wdc.com> --- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) +Upstream-Status: Pending + + src/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile -index 86e0b3fe..a810180b 100644 +index ecd6929..c7f43c5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,7 +13,8 @@ @@ -31,4 +33,4 @@ index 86e0b3fe..a810180b 100644 +uname_S := "USE_LIBC_MALLOC" uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') OPTIMIZATION?=-O2 - DEPENDENCY_TARGETS=hiredis linenoise lua + DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram diff --git a/meta-oe/recipes-extended/redis/redis/redis.service b/meta-oe/recipes-extended/redis/redis/redis.service index 36d29852da..f98f2d19e8 100644 --- a/meta-oe/recipes-extended/redis/redis/redis.service +++ b/meta-oe/recipes-extended/redis/redis/redis.service @@ -9,6 +9,7 @@ ExecStart=/usr/bin/redis-server /etc/redis/redis.conf ExecStop=/usr/bin/redis-cli shutdown Restart=always LimitNOFILE=10032 +StateDirectory=redis [Install] WantedBy=multi-user.target |