]> git.99rst.org Git - openwrt-packages.git/commitdiff
redis: update to 8.8.0
authorAlexandru Ardelean <redacted>
Sun, 9 Aug 2026 09:16:41 +0000 (12:16 +0300)
committerAlexandru Ardelean <redacted>
Tue, 11 Aug 2026 05:50:35 +0000 (08:50 +0300)
Update from the 6.2.x series to the current 8.x line. The 8.x releases
are tri-licensed (RSALv2 / SSPLv1 / AGPL-3.0); set PKG_LICENSE to
AGPL-3.0-only and follow upstream renaming COPYING to LICENSE.txt.

Drop 020-fix-atomicvar.patch, no longer needed, and keep
030-skip-module-tests.patch. Add a functional test.sh.

Signed-off-by: Alexandru Ardelean <redacted>
libs/redis/Makefile
libs/redis/patches/020-fix-atomicvar.patch [deleted file]
libs/redis/patches/030-skip-module-tests.patch [new file with mode: 0644]
libs/redis/test.sh [new file with mode: 0755]

index aa17be500e59c4480dd5c92d467fc07351520408..69df3139295c34dbc92ea6e3b0b3ce57e9e8c2a8 100644 (file)
@@ -1,16 +1,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=redis
-PKG_VERSION:=6.2.14
+PKG_VERSION:=8.8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://download.redis.io/releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=34e74856cbd66fdb3a684fb349d93961d8c7aa668b06f81fd93ff267d09bc277
+PKG_HASH:=88422181efb0c9c0abba332e3e391d409e1e13714b838931669235e5796f704b
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=COPYING
+# Redis 8.x is tri-licensed: RSALv2 / SSPLv1 / AGPL-3.0. Pick AGPL-3.0
+# as the canonical SPDX identifier and document the choice for downstream
+# consumers in the package description. (Redis <= 7.2 was BSD-3-Clause.)
+PKG_LICENSE:=AGPL-3.0-only
+PKG_LICENSE_FILES:=LICENSE.txt
 PKG_CPE_ID:=cpe:/a:redis:redis
 
 PKG_INSTALL:=1
@@ -23,6 +26,18 @@ MAKE_FLAGS+= \
        PREFIX="$(PKG_INSTALL_DIR)/usr" \
        ARCH=""
 
+# The bundled vector-sets module is 32-bit-incompatible: it fails to initialize
+# and aborts redis-server at startup. redis' own build passes SKIP_VEC_SETS=yes
+# for 32-bit targets, so do the same here.
+ifeq ($(CONFIG_ARCH_64BIT),)
+  MAKE_FLAGS += SKIP_VEC_SETS=yes
+endif
+
+# redis 8.x builds with -Werror -pedantic -Werror=deprecated-declarations,
+# which the musl fortify wrappers trip (void-returning bcopy, deprecated
+# sprintf/strcpy/strcat); demote both diagnostics from error to warning.
+TARGET_CFLAGS += -Wno-error=pedantic -Wno-error=deprecated-declarations
+
 TARGET_LDFLAGS += -latomic
 
 define Package/redis/Default
@@ -58,9 +73,10 @@ $(call  Package/redis/Default)
 endef
 
 define Package/redis-full/description
-  Redis is an open source, BSD licensed, advanced key-value cache and store.
-  It is often referred to as a data structure server since keys can contain
-  strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
+  Redis is an open source, advanced key-value cache and store. Redis 8.x is
+  tri-licensed under RSALv2 / SSPLv1 / AGPL-3.0; this package builds it under
+  AGPL-3.0. It is often referred to as a data structure server since keys can
+  contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
 endef
 
 define Package/redis-server/conffiles
diff --git a/libs/redis/patches/020-fix-atomicvar.patch b/libs/redis/patches/020-fix-atomicvar.patch
deleted file mode 100644 (file)
index bf98b0e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/atomicvar.h
-+++ b/src/atomicvar.h
-@@ -81,7 +81,7 @@
- #define ANNOTATE_HAPPENS_AFTER(v)  ((void) v)
- #endif
--#if !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__STDC_VERSION__) && \
-+#if defined(CONFIG_EDAC_ATOMIC_SCRUB) && !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__STDC_VERSION__) && \
-     (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
- /* Use '_Atomic' keyword if the compiler supports. */
- #undef  redisAtomic
-@@ -126,7 +126,7 @@
-     __atomic_store_n(&var,value,__ATOMIC_SEQ_CST)
- #define REDIS_ATOMIC_API "atomic-builtin"
--#elif defined(HAVE_ATOMIC)
-+#elif defined(CONFIG_EDAC_ATOMIC_SCRUB) && defined(HAVE_ATOMIC)
- /* Implementation using __sync macros. */
- #define atomicIncr(var,count) __sync_add_and_fetch(&var,(count))
diff --git a/libs/redis/patches/030-skip-module-tests.patch b/libs/redis/patches/030-skip-module-tests.patch
new file mode 100644 (file)
index 0000000..cecfdbe
--- /dev/null
@@ -0,0 +1,27 @@
+From 5c04abd039eb23115389777ccbef7baa98188a86 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <alex@shruggie.ro>
+Date: Thu, 6 Aug 2026 10:00:00 +0300
+Subject: [PATCH] redis: skip building the module_tests target
+
+The default "all" target also builds module_tests, which compiles the
+example test modules under tests/modules/. Those are only needed to run
+the upstream test suite, not for the packaged binaries, and building them
+pulls in extra objects that are pointless for the OpenWrt package. Drop
+module_tests from the "all" prerequisites.
+
+Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -393,7 +393,7 @@ REDIS_CHECK_RDB_NAME=redis-check-rdb$(PR
+ REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX)
+ ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_VEC_SETS_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ)))
+-all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) $(TLS_MODULE) module_tests
++all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) $(TLS_MODULE)
+       @echo ""
+       @echo "Hint: It's a good idea to run 'make test' ;)"
+       @echo ""
diff --git a/libs/redis/test.sh b/libs/redis/test.sh
new file mode 100755 (executable)
index 0000000..3d4a6a0
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Functional tests for the redis packages; CI already probes --version.
+
+sock="/tmp/redis-t.$$.sock"; dir="/tmp/redis-t.$$"; logf="/tmp/redis-t.$$.log"
+srv_pid=""
+cleanup() { [ -n "$srv_pid" ] && kill "$srv_pid" 2>/dev/null; rm -rf "$sock" "$dir" "$logf"; }
+trap cleanup EXIT
+
+# Start redis-server in the foreground and background it with the shell. Under
+# QEMU the madvise/fork COW self-check trips and redis refuses to start, so
+# suppress it with ignore-warnings. Wait up to 30s for the unix socket and dump
+# the log if the server never comes up.
+start_server() {
+       mkdir -p "$dir"
+       redis-server --port 0 --unixsocket "$sock" --dir "$dir" --save '' \
+               --ignore-warnings ARM64-COW-BUG --logfile "$logf" --daemonize no &
+       srv_pid=$!
+       i=0
+       while [ "$i" -lt 30 ]; do
+               [ -S "$sock" ] && return 0
+               kill -0 "$srv_pid" 2>/dev/null || break
+               i=$((i + 1)); sleep 1
+       done
+       echo "redis-server did not come up; log:"; cat "$logf" 2>/dev/null
+       return 1
+}
+
+case "$1" in
+redis-server)
+       [ -f /etc/redis.conf ] || { echo "FAIL: /etc/redis.conf missing"; exit 1; }
+       grep "dir /var/lib/redis" /etc/redis.conf || { echo "FAIL: redis.conf dir"; exit 1; }
+       [ -x /etc/init.d/redis ] || { echo "FAIL: init script missing"; exit 1; }
+       start_server || { echo "FAIL: redis-server did not start / bind socket"; exit 1; }
+       echo "redis-server: started and listening on unix socket"
+       ;;
+redis-cli)
+       # No server is installed alongside redis-cli, so prove the client runs
+       # and fails cleanly against a dead endpoint.
+       redis-cli -s /nonexistent.sock -t 1 ping 2>&1 |
+               grep -iE "could not connect|no such" ||
+               { echo "FAIL: redis-cli did not report a connection error"; exit 1; }
+       echo "redis-cli: runs and reports connection errors"
+       ;;
+redis-utils)
+       [ -x /usr/bin/redis-check-aof ] || { echo "FAIL: redis-check-aof missing"; exit 1; }
+       # redis-server comes in as a dependency here: run a real client/server
+       # round-trip across several data types through redis-benchmark.
+       start_server || { echo "FAIL: redis-server did not start"; exit 1; }
+       redis-benchmark -s "$sock" -n 100 -c 2 -q -t set,get,incr,lpush,lrange,hset \
+               >/dev/null 2>&1 || { echo "FAIL: redis-benchmark round-trip failed"; exit 1; }
+       echo "redis-utils: benchmark round-trip (set/get/incr/lpush/lrange/hset) ok"
+       ;;
+*)
+       echo "Unsupported test target: $1" >&2
+       exit 1
+       ;;
+esac
git clone https://git.99rst.org/PROJECT