From f702405fe9c24f66e8bf38b8801cd7e87ddd2f55 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Thu, 10 Oct 2024 09:58:44 +0800 Subject: redis: upgrade 6.2.14 -> 6.2.16 ChangeLog: Security fixes ============== * (CVE-2024-31449) Lua library commands may lead to stack overflow and potential RCE. * (CVE-2024-31228) Potential Denial-of-service due to unbounded pattern matching. Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- .../0001-hiredis-use-default-CC-if-it-is-set.patch | 37 +++++++++++ .../redis/0001-src-Do-not-reset-FINAL_LIBS.patch | 30 --------- ...Makefile-to-use-environment-build-setting.patch | 77 ++++++++++++++++++++++ .../0003-hack-to-force-use-of-libc-malloc.patch | 35 ++++++++++ .../redis/0004-src-Do-not-reset-FINAL_LIBS.patch | 30 +++++++++ ...U_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch | 29 ++++++++ .../0006-Define-correct-gregs-for-RISCV32.patch | 12 ++-- .../recipes-extended/redis/redis/GNU_SOURCE.patch | 31 --------- .../hiredis-use-default-CC-if-it-is-set.patch | 37 ----------- .../recipes-extended/redis/redis/init-redis-server | 0 ...Makefile-to-use-environment-build-setting.patch | 77 ---------------------- .../redis/redis/oe-use-libc-malloc.patch | 36 ---------- meta-oe/recipes-extended/redis/redis_6.2.14.bb | 66 ------------------- meta-oe/recipes-extended/redis/redis_6.2.16.bb | 67 +++++++++++++++++++ 14 files changed, 280 insertions(+), 284 deletions(-) create mode 100644 meta-oe/recipes-extended/redis/redis/0001-hiredis-use-default-CC-if-it-is-set.patch delete mode 100644 meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch create mode 100644 meta-oe/recipes-extended/redis/redis/0002-lua-update-Makefile-to-use-environment-build-setting.patch create mode 100644 meta-oe/recipes-extended/redis/redis/0003-hack-to-force-use-of-libc-malloc.patch create mode 100644 meta-oe/recipes-extended/redis/redis/0004-src-Do-not-reset-FINAL_LIBS.patch create mode 100644 meta-oe/recipes-extended/redis/redis/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch delete mode 100644 meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch delete mode 100644 meta-oe/recipes-extended/redis/redis/hiredis-use-default-CC-if-it-is-set.patch mode change 100755 => 100644 meta-oe/recipes-extended/redis/redis/init-redis-server delete mode 100644 meta-oe/recipes-extended/redis/redis/lua-update-Makefile-to-use-environment-build-setting.patch delete mode 100644 meta-oe/recipes-extended/redis/redis/oe-use-libc-malloc.patch delete mode 100644 meta-oe/recipes-extended/redis/redis_6.2.14.bb create mode 100644 meta-oe/recipes-extended/redis/redis_6.2.16.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/redis/redis/0001-hiredis-use-default-CC-if-it-is-set.patch b/meta-oe/recipes-extended/redis/redis/0001-hiredis-use-default-CC-if-it-is-set.patch new file mode 100644 index 0000000000..51a6e9c957 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0001-hiredis-use-default-CC-if-it-is-set.patch @@ -0,0 +1,37 @@ +From 67990f216f2fbbc8a6699c700dfc089aa617905f Mon Sep 17 00:00:00 2001 +From: Venture Research +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. + +Upstream-Status: Pending + +Signed-off-by: Venture Research + +Update to work with 4.0.8 +Signed-off-by: Alistair Francis + +Reworked for 6.0.4 +Signed-off-by: Andreas Müller +--- + 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 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 deleted file mode 100644 index 66ab0ee33c..0000000000 --- a/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 97584e1eb78dc18599534b47b6670c20c63f5ee2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 - ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index 5564351..83ccd76 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -91,7 +91,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 diff --git a/meta-oe/recipes-extended/redis/redis/0002-lua-update-Makefile-to-use-environment-build-setting.patch b/meta-oe/recipes-extended/redis/redis/0002-lua-update-Makefile-to-use-environment-build-setting.patch new file mode 100644 index 0000000000..17b533669b --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0002-lua-update-Makefile-to-use-environment-build-setting.patch @@ -0,0 +1,77 @@ +From ef989aab052510bfda32b2b325a5f80b76c42677 Mon Sep 17 00:00:00 2001 +From: Venture Research +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... + +Upstream-Status: Pending + +Signed-off-by: Venture Research + +Updated to work with 3.0.x + +Signed-off-by: Armin Kuster + +updated to work wtih 6.2.1 +Signed-off-by: Yi Fan Yu +--- + 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 cbe3aef..76bc222 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 ========= + diff --git a/meta-oe/recipes-extended/redis/redis/0003-hack-to-force-use-of-libc-malloc.patch b/meta-oe/recipes-extended/redis/redis/0003-hack-to-force-use-of-libc-malloc.patch new file mode 100644 index 0000000000..f1021eef6c --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0003-hack-to-force-use-of-libc-malloc.patch @@ -0,0 +1,35 @@ +From b9586abcb803747301f6cc4ff93c7642bef693ea Mon Sep 17 00:00:00 2001 +From: Venture Research +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. + +Upstream-Status: Pending + +Signed-off-by: Venture Research + +Update to work with 4.0.8 +Signed-off-by: Alistair Francis +--- + src/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 7d75c83..35dd314 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 diff --git a/meta-oe/recipes-extended/redis/redis/0004-src-Do-not-reset-FINAL_LIBS.patch b/meta-oe/recipes-extended/redis/redis/0004-src-Do-not-reset-FINAL_LIBS.patch new file mode 100644 index 0000000000..958106e261 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0004-src-Do-not-reset-FINAL_LIBS.patch @@ -0,0 +1,30 @@ +From a4d87aca1c00c53b386ee7490223971e00873add Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 35dd314..3770f96 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -93,7 +93,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 diff --git a/meta-oe/recipes-extended/redis/redis/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch b/meta-oe/recipes-extended/redis/redis/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch new file mode 100644 index 0000000000..d73c66c9d0 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch @@ -0,0 +1,29 @@ +From 2e6311c9c7cd85bf63eab8fe92c08ec1ec01b6fc Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + 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 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _GNU_SOURCE + #include + #include + #include 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 index 9d7e502717..bb3f5c607e 100644 --- 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 @@ -1,9 +1,10 @@ -From 26bd72f3b8de22e5036d86e6c79f815853b83473 Mon Sep 17 00:00:00 2001 +From 6149911f7a6fbaef3ed418408e2b501fa9479ffa Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 26 Oct 2020 21:32:22 -0700 Subject: [PATCH] Define correct gregs for RISCV32 Upstream-Status: Pending + Signed-off-by: Khem Raj Updated patch for 6.2.1 @@ -13,10 +14,10 @@ Signed-off-by: Yi Fan Yu 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/debug.c b/src/debug.c -index 5318c14..8c21b47 100644 +index bb76c5d..55a0696 100644 --- a/src/debug.c +++ b/src/debug.c -@@ -1055,7 +1055,9 @@ static void* getAndSetMcontextEip(ucontext_t *uc, void *eip) { +@@ -1067,7 +1067,9 @@ static void* getAndSetMcontextEip(ucontext_t *uc, void *eip) { #endif #elif defined(__linux__) /* Linux */ @@ -27,7 +28,7 @@ index 5318c14..8c21b47 100644 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) { +@@ -1234,8 +1236,28 @@ void logRegisters(ucontext_t *uc) { #endif /* Linux */ #elif defined(__linux__) @@ -57,6 +58,3 @@ index 5318c14..8c21b47 100644 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 deleted file mode 100644 index 20f689bd0b..0000000000 --- a/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 98d526f76049be21bf3d77158236b2189419a78e Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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 @@ - * POSSIBILITY OF SUCH DAMAGE. - */ - -+#define _GNU_SOURCE - #include - #include - #include --- -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 deleted file mode 100644 index d2a1b45e66..0000000000 --- a/meta-oe/recipes-extended/redis/redis/hiredis-use-default-CC-if-it-is-set.patch +++ /dev/null @@ -1,37 +0,0 @@ -From dc745a33f3875cc72d41bd34ed490b352e546352 Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Fri, 8 Feb 2013 17:39:52 -0600 -Subject: [PATCH] hiredis: use default CC if it is set - -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 - -Update to work with 4.0.8 -Signed-off-by: Alistair Francis - -Reworked for 6.0.4 -Signed-off-by: Andreas Müller ---- -Upstream-Status: Pending - - deps/hiredis/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile -index 25ac154..569f82b 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 --- -2.21.3 - diff --git a/meta-oe/recipes-extended/redis/redis/init-redis-server b/meta-oe/recipes-extended/redis/redis/init-redis-server old mode 100755 new mode 100644 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 deleted file mode 100644 index aade7afd06..0000000000 --- a/meta-oe/recipes-extended/redis/redis/lua-update-Makefile-to-use-environment-build-setting.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 097a2b259cb266c2c861dc74fa6f80712d6138c5 Mon Sep 17 00:00:00 2001 -From: Venture Research -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 - -Updated to work with 3.0.x - -Signed-off-by: Armin Kuster - -updated to work wtih 6.2.1 -Signed-off-by: Yi Fan Yu ---- -Upstream-Status: Pending - - 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 ======================= - - # 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 ========= - 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 deleted file mode 100644 index e76bdbc263..0000000000 --- a/meta-oe/recipes-extended/redis/redis/oe-use-libc-malloc.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1fa047162983d4a7e0576f0837a73a6027a783bd Mon Sep 17 00:00:00 2001 -From: Venture Research -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 - -Update to work with 4.0.8 -Signed-off-by: Alistair Francis - ---- -Upstream-Status: Pending - - src/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index ecd6929..c7f43c5 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 diff --git a/meta-oe/recipes-extended/redis/redis_6.2.14.bb b/meta-oe/recipes-extended/redis/redis_6.2.14.bb deleted file mode 100644 index 2433abba55..0000000000 --- a/meta-oe/recipes-extended/redis/redis_6.2.14.bb +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY = "Redis key-value store" -DESCRIPTION = "Redis is an open source, advanced key-value store." -HOMEPAGE = "http://redis.io" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" -DEPENDS = "readline lua ncurses" - -SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ - file://redis.conf \ - file://init-redis-server \ - file://redis.service \ - file://hiredis-use-default-CC-if-it-is-set.patch \ - file://lua-update-Makefile-to-use-environment-build-setting.patch \ - file://oe-use-libc-malloc.patch \ - file://0001-src-Do-not-reset-FINAL_LIBS.patch \ - file://GNU_SOURCE.patch \ - file://0006-Define-correct-gregs-for-RISCV32.patch \ - " -SRC_URI[sha256sum] = "34e74856cbd66fdb3a684fb349d93961d8c7aa668b06f81fd93ff267d09bc277" - -inherit autotools-brokensep update-rc.d systemd useradd - -FINAL_LIBS:x86:toolchain-clang = "-latomic" -FINAL_LIBS:riscv32:toolchain-clang = "-latomic" -FINAL_LIBS:mips = "-latomic" -FINAL_LIBS:arm = "-latomic" -FINAL_LIBS:powerpc = "-latomic" - -export FINAL_LIBS - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" -GROUPADD_PARAM:${PN} = "--system redis" - -REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" - -do_compile:prepend() { - (cd deps && oe_runmake hiredis lua linenoise) -} - -do_install() { - export PREFIX=${D}/${prefix} - oe_runmake install - install -d ${D}/${sysconfdir}/redis - install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${UNPACKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server - install -d ${D}/var/lib/redis/ - chown redis.redis ${D}/var/lib/redis/ - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${UNPACKDIR}/redis.service ${D}${systemd_system_unitdir} - sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service - - if [ "${REDIS_ON_SYSTEMD}" = true ]; then - sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf - fi -} - -CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf" - -INITSCRIPT_NAME = "redis-server" -INITSCRIPT_PARAMS = "defaults 87" - -SYSTEMD_SERVICE:${PN} = "redis.service" diff --git a/meta-oe/recipes-extended/redis/redis_6.2.16.bb b/meta-oe/recipes-extended/redis/redis_6.2.16.bb new file mode 100644 index 0000000000..40473461a2 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis_6.2.16.bb @@ -0,0 +1,67 @@ +SUMMARY = "Redis key-value store" +DESCRIPTION = "Redis is an open source, advanced key-value store." +HOMEPAGE = "http://redis.io" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" +DEPENDS = "readline lua ncurses" + +SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ + file://redis.conf \ + file://init-redis-server \ + file://redis.service \ + file://0001-hiredis-use-default-CC-if-it-is-set.patch \ + file://0002-lua-update-Makefile-to-use-environment-build-setting.patch \ + file://0003-hack-to-force-use-of-libc-malloc.patch \ + file://0004-src-Do-not-reset-FINAL_LIBS.patch \ + file://0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch \ + file://0006-Define-correct-gregs-for-RISCV32.patch \ + " + +SRC_URI[sha256sum] = "846bff83c26d827d49f8cc8114ea9d1e72eea1169f7de36b8135ea2cec104e7d" + +inherit autotools-brokensep update-rc.d systemd useradd + +FINAL_LIBS:x86:toolchain-clang = "-latomic" +FINAL_LIBS:riscv32 = "-latomic" +FINAL_LIBS:mips = "-latomic" +FINAL_LIBS:arm = "-latomic" +FINAL_LIBS:powerpc = "-latomic" + +export FINAL_LIBS + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" +GROUPADD_PARAM:${PN} = "--system redis" + +REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" + +do_compile:prepend() { + (cd deps && oe_runmake hiredis lua linenoise) +} + +do_install() { + export PREFIX=${D}/${prefix} + oe_runmake install + install -d ${D}/${sysconfdir}/redis + install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server + install -d ${D}/var/lib/redis/ + chown redis.redis ${D}/var/lib/redis/ + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/redis.service ${D}${systemd_system_unitdir} + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service + + if [ "${REDIS_ON_SYSTEMD}" = true ]; then + sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf + fi +} + +CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf" + +INITSCRIPT_NAME = "redis-server" +INITSCRIPT_PARAMS = "defaults 87" + +SYSTEMD_SERVICE:${PN} = "redis.service" -- cgit v1.2.3-54-g00ecf