From c4273b4eadd16c8d716375e9839e6a901c1f3829 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 18 Oct 2018 19:44:25 +0200 Subject: [PATCH] redis: Update from 4.0.11 to 5.0.0 --- packages/redis/build.sh | 5 +-- packages/redis/lower-default-values.patch | 55 ----------------------- packages/redis/redis.conf.patch | 30 +++++++++++++ packages/redis/src-Makefile.patch | 12 +++++ packages/redis/src-server.h.patch | 21 +++++++++ 5 files changed, 65 insertions(+), 58 deletions(-) delete mode 100644 packages/redis/lower-default-values.patch create mode 100644 packages/redis/redis.conf.patch create mode 100644 packages/redis/src-Makefile.patch create mode 100644 packages/redis/src-server.h.patch diff --git a/packages/redis/build.sh b/packages/redis/build.sh index 7df43a3c5..b3c77c65f 100644 --- a/packages/redis/build.sh +++ b/packages/redis/build.sh @@ -1,8 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://redis.io/ TERMUX_PKG_DESCRIPTION="In-memory data structure store used as a database, cache and message broker" -TERMUX_PKG_VERSION=4.0.11 -TERMUX_PKG_REVISION=1 -TERMUX_PKG_SHA256=fc53e73ae7586bcdacb4b63875d1ff04f68c5474c1ddeda78f00e5ae2eed1bbb +TERMUX_PKG_VERSION=5.0.0 +TERMUX_PKG_SHA256=70c98b2d0640b2b73c9d8adb4df63bcb62bad34b788fe46d1634b6cf87dc99a4 TERMUX_PKG_SRCURL=http://download.redis.io/releases/redis-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_CONFFILES="etc/redis.conf" diff --git a/packages/redis/lower-default-values.patch b/packages/redis/lower-default-values.patch deleted file mode 100644 index 827745f0c..000000000 --- a/packages/redis/lower-default-values.patch +++ /dev/null @@ -1,55 +0,0 @@ -Avoid warnings on startup due to trying to set too high maxclients -and tcp-backlog. - -Values observed on a Xperia Z4 Tablet running Android 7.0. -diff -u -r ../redis-3.2.8/redis.conf ./redis.conf ---- ../redis-3.2.8/redis.conf 2017-02-12 16:14:57.000000000 +0100 -+++ ./redis.conf 2017-03-07 14:38:42.825991097 +0100 -@@ -90,7 +90,7 @@ - # will silently truncate it to the value of /proc/sys/net/core/somaxconn so - # make sure to raise both the value of somaxconn and tcp_max_syn_backlog - # in order to get the desired effect. --tcp-backlog 511 -+tcp-backlog 128 - - # Unix socket. - # -@@ -501,7 +501,7 @@ - ################################### LIMITS #################################### - - # Set the max number of connected clients at the same time. By default --# this limit is set to 10000 clients, however if the Redis server is not -+# this limit is set to 4000 clients, however if the Redis server is not - # able to configure the process file limit to allow for the specified limit - # the max number of allowed clients is set to the current file limit - # minus 32 (as Redis reserves a few file descriptors for internal uses). -@@ -509,7 +509,7 @@ - # Once the limit is reached Redis will close all the new connections sending - # an error 'max number of clients reached'. - # --# maxclients 10000 -+# maxclients 4000 - - # Don't use more memory than the specified amount of bytes. - # When the memory limit is reached Redis will try to remove keys -diff -u -r ../redis-3.2.8/src/server.h ./src/server.h ---- ../redis-3.2.8/src/server.h 2017-02-12 16:14:57.000000000 +0100 -+++ ./src/server.h 2017-03-07 14:38:53.357859408 +0100 -@@ -79,7 +79,7 @@ - #define CONFIG_MIN_HZ 1 - #define CONFIG_MAX_HZ 500 - #define CONFIG_DEFAULT_SERVER_PORT 6379 /* TCP port */ --#define CONFIG_DEFAULT_TCP_BACKLOG 511 /* TCP listen backlog */ -+#define CONFIG_DEFAULT_TCP_BACKLOG 128 /* TCP listen backlog */ - #define CONFIG_DEFAULT_CLIENT_TIMEOUT 0 /* default client timeout: infinite */ - #define CONFIG_DEFAULT_DBNUM 16 - #define CONFIG_MAX_LINE 1024 -@@ -94,7 +94,7 @@ - #define AOF_REWRITE_ITEMS_PER_CMD 64 - #define CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN 10000 - #define CONFIG_DEFAULT_SLOWLOG_MAX_LEN 128 --#define CONFIG_DEFAULT_MAX_CLIENTS 10000 -+#define CONFIG_DEFAULT_MAX_CLIENTS 4000 - #define CONFIG_AUTHPASS_MAX_LEN 512 - #define CONFIG_DEFAULT_SLAVE_PRIORITY 100 - #define CONFIG_DEFAULT_REPL_TIMEOUT 60 diff --git a/packages/redis/redis.conf.patch b/packages/redis/redis.conf.patch new file mode 100644 index 000000000..e64bd1a0c --- /dev/null +++ b/packages/redis/redis.conf.patch @@ -0,0 +1,30 @@ +diff -u -r ../redis-5.0.0/redis.conf ./redis.conf +--- ../redis-5.0.0/redis.conf 2018-10-17 15:31:39.000000000 +0000 ++++ ./redis.conf 2018-10-18 17:33:32.672423453 +0000 +@@ -98,7 +98,7 @@ + # will silently truncate it to the value of /proc/sys/net/core/somaxconn so + # make sure to raise both the value of somaxconn and tcp_max_syn_backlog + # in order to get the desired effect. +-tcp-backlog 511 ++tcp-backlog 127 + + # Unix socket. + # +@@ -528,7 +528,7 @@ + ################################### CLIENTS #################################### + + # Set the max number of connected clients at the same time. By default +-# this limit is set to 10000 clients, however if the Redis server is not ++# this limit is set to 512 clients, however if the Redis server is not + # able to configure the process file limit to allow for the specified limit + # the max number of allowed clients is set to the current file limit + # minus 32 (as Redis reserves a few file descriptors for internal uses). +@@ -536,7 +536,7 @@ + # Once the limit is reached Redis will close all the new connections sending + # an error 'max number of clients reached'. + # +-# maxclients 10000 ++# maxclients 512 + + ############################## MEMORY MANAGEMENT ################################ + diff --git a/packages/redis/src-Makefile.patch b/packages/redis/src-Makefile.patch new file mode 100644 index 000000000..e27e943f0 --- /dev/null +++ b/packages/redis/src-Makefile.patch @@ -0,0 +1,12 @@ +diff -u -r ../redis-5.0.0/src/Makefile ./src/Makefile +--- ../redis-5.0.0/src/Makefile 2018-10-17 15:31:39.000000000 +0000 ++++ ./src/Makefile 2018-10-18 17:20:36.811751940 +0000 +@@ -100,7 +100,7 @@ + else + # All the other OSes (notably Linux) + FINAL_LDFLAGS+= -rdynamic +- FINAL_LIBS+=-ldl -pthread -lrt ++ FINAL_LIBS+=-ldl + endif + endif + endif diff --git a/packages/redis/src-server.h.patch b/packages/redis/src-server.h.patch new file mode 100644 index 000000000..30154c3cb --- /dev/null +++ b/packages/redis/src-server.h.patch @@ -0,0 +1,21 @@ +diff -u -r ../redis-5.0.0/src/server.h ./src/server.h +--- ../redis-5.0.0/src/server.h 2018-10-17 15:31:39.000000000 +0000 ++++ ./src/server.h 2018-10-18 17:32:04.424841206 +0000 +@@ -84,7 +84,7 @@ + #define CONFIG_MAX_HZ 500 + #define MAX_CLIENTS_PER_CLOCK_TICK 200 /* HZ is adapted based on that. */ + #define CONFIG_DEFAULT_SERVER_PORT 6379 /* TCP port. */ +-#define CONFIG_DEFAULT_TCP_BACKLOG 511 /* TCP listen backlog. */ ++#define CONFIG_DEFAULT_TCP_BACKLOG 127 /* TCP listen backlog. */ + #define CONFIG_DEFAULT_CLIENT_TIMEOUT 0 /* Default client timeout: infinite */ + #define CONFIG_DEFAULT_DBNUM 16 + #define CONFIG_MAX_LINE 1024 +@@ -100,7 +100,7 @@ + #define AOF_READ_DIFF_INTERVAL_BYTES (1024*10) + #define CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN 10000 + #define CONFIG_DEFAULT_SLOWLOG_MAX_LEN 128 +-#define CONFIG_DEFAULT_MAX_CLIENTS 10000 ++#define CONFIG_DEFAULT_MAX_CLIENTS 512 + #define CONFIG_AUTHPASS_MAX_LEN 512 + #define CONFIG_DEFAULT_SLAVE_PRIORITY 100 + #define CONFIG_DEFAULT_REPL_TIMEOUT 60