diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch | 652 | ||||
-rw-r--r-- | 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch | 29 | ||||
-rw-r--r-- | 0003-Notify-systemd-on-sentinel-startup.patch | 24 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | macros.redis | 2 | ||||
-rw-r--r-- | redis-conf.patch | 69 | ||||
-rw-r--r-- | redis-limit-init | 6 | ||||
-rw-r--r-- | redis-limit-systemd | 14 | ||||
-rw-r--r-- | redis-loadmod.patch | 252 | ||||
-rw-r--r-- | redis-sentinel.init | 105 | ||||
-rw-r--r-- | redis-sentinel.service | 18 | ||||
-rw-r--r-- | redis-shutdown | 40 | ||||
-rw-r--r-- | redis.init | 105 | ||||
-rw-r--r-- | redis.service | 18 | ||||
-rw-r--r-- | redis.spec | 669 | ||||
-rw-r--r-- | redis.sysusers | 1 | ||||
-rw-r--r-- | redis.tmpfiles | 4 |
18 files changed, 758 insertions, 1254 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch b/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch deleted file mode 100644 index f7e3dd1..0000000 --- a/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch +++ /dev/null @@ -1,652 +0,0 @@ -From d68953c34d4d6987883ddf6158c3c69e7500667f Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 8 Sep 2016 14:51:15 +0200 -Subject: [PATCH 1/3] 1st man pageis for - redis-cli - redis-benchmark - - redis-check-aof - redis-check-rdb - redis-server - redis.conf - -as redis-sentinel is a symlink to redis-server, same page can be used (also symlinked) -redis.conf can also be used for sentinel.conf ---- - man/man1/redis-benchmark.1 | 132 ++++++++++++++++++++++++++++ - man/man1/redis-check-aof.1 | 60 +++++++++++++ - man/man1/redis-check-rdb.1 | 53 ++++++++++++ - man/man1/redis-cli.1 | 171 +++++++++++++++++++++++++++++++++++++ - man/man1/redis-server.1 | 117 +++++++++++++++++++++++++ - man/man5/redis.conf.5 | 57 +++++++++++++ - 6 files changed, 590 insertions(+) - create mode 100644 man/man1/redis-benchmark.1 - create mode 100644 man/man1/redis-check-aof.1 - create mode 100644 man/man1/redis-check-rdb.1 - create mode 100644 man/man1/redis-cli.1 - create mode 100644 man/man1/redis-server.1 - create mode 100644 man/man5/redis.conf.5 - -diff --git a/man/man1/redis-benchmark.1 b/man/man1/redis-benchmark.1 -new file mode 100644 -index 0000000..a3e4c62 ---- /dev/null -+++ b/man/man1/redis-benchmark.1 -@@ -0,0 +1,132 @@ -+.TH REDIS-BENCHMARK 1 "2016" "Redis" "User commands" -+.SH NAME -+redis\-benchmark \- Redis benchmark -+ -+.SH SYNOPSIS -+.B redis\-benchmark -+[ options ] -+.LP -+ -+.SH DESCRIPTION -+\fBRedis\fP is an open source (BSD licensed), in-memory data structure store, -+used as database, cache and message broker, found at -+.B http://redis.io/ -+ -+The \fBredis\-benchmark\fP command is a command to benchmark redis-server. -+ -+.SH OPTIONS -+.TP 15 -+.B \-h \fIhostname\fP -+Server hostname (default: 127.0.0.1). -+.TP -+.B \-p \fIport\fP -+Server port (default: 6379). -+.TP -+.B \-s \fIsocket\fP -+Server socket (overrides hostname and port). -+.TP -+.B \-a \fIpassword\fP -+Password to use when connecting to the server. -+.TP -+.B \-c \fIclients\fP -+Number of parallel connections (default 50) -+.TP -+.B \-dnnum \fIdb\fP -+SELECT the specified db number (default 0) -+.TP -+.B \-k \fIboolean\fP -+1=keep alive 0=reconnect (default 1) -+.TP -+.B \-r \fIkeyspacelen\fP -+Use random keys for SET/GET/INCR, random values for SADD -+Using this option the benchmark will expand the string __rand_int__ -+inside an argument with a 12 digits number in the specified range -+from 0 to keyspacelen-1. The substitution changes every time a command -+is executed. Default tests use this to hit random keys in the -+specified range. -+.TP -+.B \-P \fInumreq\fP -+Pipeline <numreq> requests. Default 1 (no pipeline). -+.TP -+.B \-e -+If server replies with errors, show them on stdout. -+(no more than 1 error per second is displayed) -+.TP -+.B \-q -+Quiet. Just show query/sec values -+.TP -+.B \-\-csv -+Output in CSV format -+.TP -+.B \-l -+Loop. Run the tests forever -+.TP -+.B \-t \fItests\fP -+Only run the comma separated list of tests. The test -+names are the same as the ones produced as output. -+.TP -+.B \-I -+Idle mode. Just open N idle connections and wait. -+ -+.SH EXAMPLES -+.TP 5 -+Run the benchmark with the default configuration against 127.0.0.1:6379: -+$ redis\-benchmark -+.TP -+Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1: -+$ redis-benchmark \-h 192.168.1.1 \-p 6379 \-n 100000 \-c 20 -+.TP -+Fill 127.0.0.1:6379 with about 1 million keys only using the SET test: -+$ redis\-benchmark \-t set \-n 1000000 \-r 100000000 -+.TP -+Benchmark 127.0.0.1:6379 for a few commands producing CSV output: -+$ redis\-benchmark \-t ping,set,get \-n 100000 \-\-csv -+.TP -+Benchmark a specific command line: -+$ redis\-benchmark \-r 10000 \-n 10000 eval 'return redis.call("ping")' 0 -+.TP -+Fill a list with 10000 random elements: -+$ redis\-benchmark \-r 10000 \-n 10000 lpush mylist __rand_int__ -+.TP -+On user specified command lines __rand_int__ is replaced with a random integer -+with a range of values selected by the -r option. -+ -+ -+.SH BUGS -+See: -+.PD 0 -+.B http://redis.io/support -+and -+.B https://github.com/antirez/redis/issues -+ -+.SH COPYRIGHT -+Copyright \(co 2006\-2016 -+Salvatore Sanfilippo -+.P -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+.TP 2 -+* -+Redistributions of source code must retain the above copyright notice, -+this list of conditions and the following disclaimer. -+.TP -+* -+Redistributions in binary form must reproduce the above copyright -+notice, this list of conditions and the following disclaimer in the -+documentation and/or other materials provided with the distribution. -+.TP -+* -+Neither the name of Redis nor the names of its contributors may be used -+to endorse or promote products derived from this software without specific -+prior written permission. -+.P -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -diff --git a/man/man1/redis-check-aof.1 b/man/man1/redis-check-aof.1 -new file mode 100644 -index 0000000..1569fd9 ---- /dev/null -+++ b/man/man1/redis-check-aof.1 -@@ -0,0 +1,60 @@ -+.TH REDIS-CHECK-AOF 1 "2016" "Redis" "User commands" -+.SH NAME -+redis\-check\-aof \- Redis AOF file checker and repairer -+ -+.SH SYNOPSIS -+.B redis\-check\-aof -+[\-\-fix] -+.IR file.aof -+ -+.SH DESCRIPTION -+\fBRedis\fP is an open source (BSD licensed), in-memory data structure store, -+used as database, cache and message broker, found at -+.B http://redis.io/ -+ -+The \fBredis\-check\-aof\fP command to check or repair redis-server AOF files. -+ -+.SH OPTIONS -+.TP 15 -+.B \-\-fix -+Fix the file -+ -+ -+.SH BUGS -+See: -+.PD 0 -+.B http://redis.io/support -+and -+.B https://github.com/antirez/redis/issues -+ -+.SH COPYRIGHT -+Copyright \(co 2006\-2016 -+Salvatore Sanfilippo -+.P -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+.TP 2 -+* -+Redistributions of source code must retain the above copyright notice, -+this list of conditions and the following disclaimer. -+.TP -+* -+Redistributions in binary form must reproduce the above copyright -+notice, this list of conditions and the following disclaimer in the -+documentation and/or other materials provided with the distribution. -+.TP -+* -+Neither the name of Redis nor the names of its contributors may be used -+to endorse or promote products derived from this software without specific -+prior written permission. -+.P -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -diff --git a/man/man1/redis-check-rdb.1 b/man/man1/redis-check-rdb.1 -new file mode 100644 -index 0000000..0e798ab ---- /dev/null -+++ b/man/man1/redis-check-rdb.1 -@@ -0,0 +1,53 @@ -+.TH REDIS-CHECK-RDB 1 "2016" "Redis" "User commands" -+.SH NAME -+redis\-check\-aof \- Redis RDB file checker -+ -+.SH SYNOPSIS -+.B redis\-check\-aof -+.IR file.rdb -+ -+.SH DESCRIPTION -+\fBRedis\fP is an open source (BSD licensed), in-memory data structure store, -+used as database, cache and message broker, found at -+.B http://redis.io/ -+ -+The \fBredis\-check\-rdb\fP command to check redis-server RDB files. -+ -+.SH BUGS -+See: -+.PD 0 -+.B http://redis.io/support -+and -+.B https://github.com/antirez/redis/issues -+ -+.SH COPYRIGHT -+Copyright \(co 2006\-2016 -+Salvatore Sanfilippo -+.P -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+.TP 2 -+* -+Redistributions of source code must retain the above copyright notice, -+this list of conditions and the following disclaimer. -+.TP -+* -+Redistributions in binary form must reproduce the above copyright -+notice, this list of conditions and the following disclaimer in the -+documentation and/or other materials provided with the distribution. -+.TP -+* -+Neither the name of Redis nor the names of its contributors may be used -+to endorse or promote products derived from this software without specific -+prior written permission. -+.P -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -diff --git a/man/man1/redis-cli.1 b/man/man1/redis-cli.1 -new file mode 100644 -index 0000000..14f84df ---- /dev/null -+++ b/man/man1/redis-cli.1 -@@ -0,0 +1,171 @@ -+.TH REDIS-CLI 1 "2016" "Redis" "User commands" -+.SH NAME -+redis\-cli \- Redis client -+ -+.SH SYNOPSIS -+.B redis\-cli -+[ options ] [cmd [arg [arg ...]]] -+.LP -+ -+.SH DESCRIPTION -+\fBRedis\fP is an open source (BSD licensed), in-memory data structure store, -+used as database, cache and message broker, found at -+.B http://redis.io/ -+ -+The \fBredis-cli\fP command is a command line client to redis-server. -+ -+.SH OPTIONS -+.TP 15 -+.B \-h \fIhostname\fP -+Server hostname (default: 127.0.0.1). -+.TP -+.B \-p \fIport\fP -+Server port (default: 6379). -+.TP -+.B \-s \fIsocket\fP -+Server socket (overrides hostname and port). -+.TP -+.B \-a \fIpassword\fP -+Password to use when connecting to the server. -+.TP -+.B \-r \fIrepeat\fP -+Execute specified command N times. -+.TP -+.B \-i \fIinterval\fP -+When -r is used, waits \fIinterval\fP seconds per command. -+It is possible to specify sub-second times like -i 0.1. -+.TP -+.B \-n \fIdb\fP -+Database number. -+.TP -+.B \-x -+Read last argument from STDIN. -+.TP -+.B \-d \fIdelimiter\fP -+Multi-bulk delimiter in for raw formatting (default: \n). -+.TP -+.B \-c -+Enable cluster mode (follow -ASK and -MOVED redirections). -+.TP -+.B \-\-raw -+Use raw formatting for replies (default when STDOUT is not a tty). -+.TP -+.B \-\-no\-raw -+Force formatted output even when STDOUT is not a tty. -+.TP -+.B \-\-csv -+Output in CSV format. -+.TP -+.B \-\-stat -+Print rolling stats about server: mem, clients, ... -+.TP -+.B \-\-latency -+Enter a special mode continuously sampling latency. -+.TP -+.B \-\-latency\-history -+Like \-\-latency but tracking latency changes over time. -+Default time interval is 15 sec. Change it using -i. -+.TP -+.B \-\-latency\-dist -+Shows latency as a spectrum, requires xterm 256 colors. -+Default time interval is 1 sec. Change it using -i. -+.TP -+.B \-\-lru\-test -+Simulate a cache workload with an 80-20 distribution. -+.TP -+.B \-\-slave -+Simulate a slave showing commands received from the master. -+.TP -+.B \-\-rdb \fIfilename\fP -+Transfer an RDB dump from remote server to local file. -+.TP -+.B \-\-pipe -+Transfer raw Redis protocol from stdin to server. -+.TP -+.B \-\-pipe-timeout \fIn\fP -+In --pipe mode, abort with error if after sending all data. -+no reply is received within \fIn\fP seconds. -+Default timeout: 30. Use 0 to wait forever. -+.TP -+.B \-\-bigkeys -+Sample Redis keys looking for big keys. -+.TP -+.B \-\-scan -+List all keys using the SCAN command. -+.TP -+.B \-\-pattern \fIpat\fP -+Useful with --scan to specify a SCAN pattern. -+.TP -+.B \-\-intrinsic-latency \fIsec\fP -+Run a test to measure intrinsic system latency. -+The test will run for the specified amount of seconds. -+.TP -+.B \-\-eval \fIfile\fP -+Send an EVAL command using the Lua script at \fIfile\fP. -+.TP -+.B \-\-ldb -+Used with --eval enable the Redis Lua debugger. -+.TP -+.B \-\-ldb-sync-mode -+Like --ldb but uses the synchronous Lua debugger, in -+this mode the server is blocked and script changes are -+are not rolled back from the server memory. -+.TP -+.B \-\-help -+Output this help and exit. -+.TP -+.B \-\-version -+Output version and exit. -+ -+.SH EXAMPLES -+.TP -+cat /etc/passwd | redis-cli -x set mypasswd -+.TP -+redis-cli get mypasswd -+.TP -+redis-cli \-r 100 lpush mylist x -+.TP -+redis-cli \-r 100 \-i 1 info | grep used_memory_human: -+.TP -+redis-cli \-\-eval myscript.lua key1 key2 , arg1 arg2 arg3 -+.TP -+redis-cli \-\-scan \-\-pattern '*:12345*' -+ -+.SH BUGS -+See: -+.PD 0 -+.B http://redis.io/support -+and -+.B https://github.com/antirez/redis/issues -+ -+.SH COPYRIGHT -+Copyright \(co 2006\-2016 -+Salvatore Sanfilippo -+.P -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+.TP 2 -+* -+Redistributions of source code must retain the above copyright notice, -+this list of conditions and the following disclaimer. -+.TP -+* -+Redistributions in binary form must reproduce the above copyright -+notice, this list of conditions and the following disclaimer in the -+documentation and/or other materials provided with the distribution. -+.TP -+* -+Neither the name of Redis nor the names of its contributors may be used -+to endorse or promote products derived from this software without specific -+prior written permission. -+.P -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -diff --git a/man/man1/redis-server.1 b/man/man1/redis-server.1 -new file mode 100644 -index 0000000..d6edd25 ---- /dev/null -+++ b/man/man1/redis-server.1 -@@ -0,0 +1,117 @@ -+.TH REDIS-SERVER 1 "2016" "Redis" "User commands" -+.SH NAME -+redis\-server, redis\-sentinel \- Redis server -+ -+.SH SYNOPSIS -+.B redis\-server -+[ -+.IR configuration_file -+] [ options ] [ \-\-sentinel ] -+.LP -+.B redis\-sentinel -+[ -+.IR configuration_file -+] [ options ] -+ -+ -+.SH DESCRIPTION -+\fBRedis\fP is an open source (BSD licensed), in-memory data structure store, -+used as database, cache and message broker, found at -+.B http://redis.io/ -+.LP -+The \fBredis\-server\fP command is a command line to launch a Redis server. -+.LP -+The \fBredis\-sentinel\fP command is a symbolic link to the \fBredis\-server\fP -+command which imply the \fB\-\-sentionel\fP option. -+ -+.SH OPTIONS -+.TP 15 -+.B \- -+Read configuration from stdin. -+.TP -+.TP 15 -+.B \-\-sentinel -+Run in sentinel mode -+.TP -+.B \-\-test-memory \fImegabytes\fP -+Run a memory check and exit. -+.TP -+.PD 0 -+.B \-\-help -+.TP -+.PD 1 -+.B \-h -+Output this help and exit. -+.TP -+.PD 0 -+.B \-\-version -+.TP -+.PD 1 -+.B \-v -+Output version and exit. -+.P -+All parameters described in \fBredis.conf\fR file can be passed as -+command line option, e.g. -+.B \-\-port -+.IR port -+. -+ -+.SH EXAMPLES -+.TP 5 -+Run the server with default conf -+redis-server -+.TP -+Run the server with a configuration file -+redis-server /etc/redis/6379.conf -+.TP -+Run the server changing some default options -+redis-server --port 7777 --slaveof 127.0.0.1 8888 -+.TP -+Run the server with a configuration file and changing some options -+redis-server /etc/myredis.conf --loglevel verbose -+.TP -+Run in sentinel mode -+redis-server /etc/sentinel.conf --sentinel -+ -+.SH "SEE ALSO" -+.PP -+\fBredis.conf\fR(5) -+ -+.SH BUGS -+See: -+.PD 0 -+.B http://redis.io/support -+and -+.B https://github.com/antirez/redis/issues -+ -+.SH COPYRIGHT -+Copyright \(co 2006\-2016 -+Salvatore Sanfilippo -+.P -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+.TP 2 -+* -+Redistributions of source code must retain the above copyright notice, -+this list of conditions and the following disclaimer. -+.TP -+* -+Redistributions in binary form must reproduce the above copyright -+notice, this list of conditions and the following disclaimer in the -+documentation and/or other materials provided with the distribution. -+.TP -+* -+Neither the name of Redis nor the names of its contributors may be used -+to endorse or promote products derived from this software without specific -+prior written permission. -+.P -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -diff --git a/man/man5/redis.conf.5 b/man/man5/redis.conf.5 -new file mode 100644 -index 0000000..1e0c9c9 ---- /dev/null -+++ b/man/man5/redis.conf.5 -@@ -0,0 +1,57 @@ -+.TH REDIS.CONF 5 "2016" "Redis" "Configuration files" -+.SH NAME -+redis.conf, sentinel.conf - redis server configuration files. -+ -+.SH PARAMETERS -+.TP -+All empty lines or lines beginning with '#' are ignored. -+.TP -+See inline comments for parameters description. -+ -+.SH DESCRIPTION -+.TP -+\fBredis-server\fP read the configuration file passed as first argument. -+ -+.SH "SEE ALSO" -+.PP -+\fBredis\-server\fR(1) -+ -+ -+.SH BUGS -+See: -+.PD 0 -+.B http://redis.io/support -+and -+.B https://github.com/antirez/redis/issues -+ -+.SH COPYRIGHT -+Copyright \(co 2006\-2016 -+Salvatore Sanfilippo -+.P -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+.TP 2 -+* -+Redistributions of source code must retain the above copyright notice, -+this list of conditions and the following disclaimer. -+.TP -+* -+Redistributions in binary form must reproduce the above copyright -+notice, this list of conditions and the following disclaimer in the -+documentation and/or other materials provided with the distribution. -+.TP -+* -+Neither the name of Redis nor the names of its contributors may be used -+to endorse or promote products derived from this software without specific -+prior written permission. -+.P -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- -2.24.1 - diff --git a/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch b/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch deleted file mode 100644 index d43be3b..0000000 --- a/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 79ed52edf84676786e5817cddb8914c5925144c7 Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Fri, 9 Sep 2016 17:23:27 +0200 -Subject: [PATCH 2/3] install redis-check-rdb as a symlink instead of - duplicating the binary - ---- - src/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index 2a68649..585c95b 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -307,9 +307,9 @@ install: all - $(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(INSTALL_BIN) - $(REDIS_INSTALL) $(REDIS_BENCHMARK_NAME) $(INSTALL_BIN) - $(REDIS_INSTALL) $(REDIS_CLI_NAME) $(INSTALL_BIN) -- $(REDIS_INSTALL) $(REDIS_CHECK_RDB_NAME) $(INSTALL_BIN) -- $(REDIS_INSTALL) $(REDIS_CHECK_AOF_NAME) $(INSTALL_BIN) - @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_SENTINEL_NAME) -+ @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_RDB_NAME) -+ @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_AOF_NAME) - - uninstall: - rm -f $(INSTALL_BIN)/{$(REDIS_SERVER_NAME),$(REDIS_BENCHMARK_NAME),$(REDIS_CLI_NAME),$(REDIS_CHECK_RDB_NAME),$(REDIS_CHECK_AOF_NAME),$(REDIS_SENTINEL_NAME)} --- -2.24.1 - diff --git a/0003-Notify-systemd-on-sentinel-startup.patch b/0003-Notify-systemd-on-sentinel-startup.patch deleted file mode 100644 index ee58b56..0000000 --- a/0003-Notify-systemd-on-sentinel-startup.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 16dbe5168224b9f8a2b193f014f3dbf7e9604516 Mon Sep 17 00:00:00 2001 -From: Daniel Murnane <dmurnane@eitccorp.com> -Date: Fri, 1 May 2020 08:19:28 -0400 -Subject: [PATCH] Notify systemd on sentinel startup - ---- - src/server.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/server.c b/src/server.c -index 659604ef363..7ab7c39fd0a 100644 ---- a/src/server.c -+++ b/src/server.c -@@ -5111,6 +5111,10 @@ int main(int argc, char **argv) { - } else { - InitServerLast(); - sentinelIsRunning(); -+ if (server.supervised_mode == SUPERVISED_SYSTEMD) { -+ redisCommunicateSystemd("STATUS=Ready to accept connections\n"); -+ redisCommunicateSystemd("READY=1\n"); -+ } - } - - /* Warning the user about suspicious maxmemory setting. */ @@ -1,4 +1,4 @@ SRCDIR := $(shell pwd) NAME := $(shell basename $(SRCDIR)) -include ../common/Makefile +include ../../common/Makefile diff --git a/macros.redis b/macros.redis deleted file mode 100644 index 439cc2c..0000000 --- a/macros.redis +++ /dev/null @@ -1,2 +0,0 @@ -%redis_modules_abi 1 -%redis_modules_dir %{_libdir}/redis/modules diff --git a/redis-conf.patch b/redis-conf.patch new file mode 100644 index 0000000..96664ff --- /dev/null +++ b/redis-conf.patch @@ -0,0 +1,69 @@ +diff -up ./redis.conf.old ./redis.conf +--- ./redis.conf.old 2025-07-06 13:59:42.000000000 +0200 ++++ ./redis.conf 2025-07-23 14:21:49.223387091 +0200 +@@ -43,6 +43,8 @@ + # include /path/to/other.conf + # include /path/to/fragments/*.conf + # ++# Module configuration files ++include /etc/redis/modules/*.conf + + ################################## MODULES ##################################### + +@@ -153,7 +155,7 @@ tcp-backlog 511 + # incoming connections. There is no default, so Redis will not listen + # on a unix socket when not specified. + # +-# unixsocket /run/redis.sock ++unixsocket /run/redis/redis.sock + # unixsocketperm 700 + + # Close the connection after a client is idle for N seconds (0 to disable) +@@ -339,7 +341,7 @@ daemonize no + # + # Note that on modern Linux systems "/run/redis.pid" is more conforming + # and should be used instead. +-pidfile /var/run/redis_6379.pid ++pidfile /run/redis/redis.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -353,7 +355,7 @@ loglevel notice + # Specify the log file name. Also the empty string can be used to force + # Redis to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile "" ++logfile /var/log/redis/redis.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. +@@ -513,7 +515,7 @@ rdb-del-sync-files no + # The Append Only File will also be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redis + + ################################# REPLICATION ################################# + +diff -up ./sentinel.conf.old ./sentinel.conf +--- ./sentinel.conf.old 2025-07-06 13:59:42.000000000 +0200 ++++ ./sentinel.conf 2025-07-23 14:20:34.526056727 +0200 +@@ -17,7 +17,7 @@ daemonize no + # When running daemonized, Redis Sentinel writes a pid file in + # /var/run/redis-sentinel.pid by default. You can specify a custom pid file + # location here. +-pidfile /var/run/redis-sentinel.pid ++pidfile /run/redis/sentinel.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -31,7 +31,7 @@ loglevel notice + # Specify the log file name. Also the empty string can be used to force + # Sentinel to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile "" ++logfile /var/log/redis/sentinel.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. diff --git a/redis-limit-init b/redis-limit-init deleted file mode 100644 index 2986bfd..0000000 --- a/redis-limit-init +++ /dev/null @@ -1,6 +0,0 @@ -# If you need to change max open file limit -# for example, when you change maxclient in configuration -# you can change the value below -# see "man limits.conf" for information -redis soft nofile 10240 -redis hard nofile 10240 diff --git a/redis-limit-systemd b/redis-limit-systemd deleted file mode 100644 index a792937..0000000 --- a/redis-limit-systemd +++ /dev/null @@ -1,14 +0,0 @@ -# If you need to change max open file limit -# for example, when you change maxclient in configuration -# you can change the LimitNOFILE value below. -# See "man systemd.exec" for more information. - -# Slave nodes on large system may take lot of time to start. -# You may need to uncomment TimeoutStartSec and TimeoutStopSec -# directives below and raise their value. -# See "man systemd.service" for more information. - -[Service] -LimitNOFILE=10240 -#TimeoutStartSec=90s -#TimeoutStopSec=90s diff --git a/redis-loadmod.patch b/redis-loadmod.patch new file mode 100644 index 0000000..d84a0b2 --- /dev/null +++ b/redis-loadmod.patch @@ -0,0 +1,252 @@ +From 7ef0383905b75f070a0d9cbfc1bd47d773a44d3d Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Sat, 4 Oct 2025 11:02:35 +0200 +Subject: [PATCH 1/2] Fix #14404 don't add loadmodule when from config + +--- + src/config.c | 3 +++ + src/module.c | 16 +++++++++------- + src/server.h | 5 +++-- + 3 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/src/config.c b/src/config.c +index 2606d065027..973a31a5100 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -362,6 +362,7 @@ void queueLoadModule(sds path, sds *argv, int argc) { + loadmod->argv = argc ? zmalloc(sizeof(robj*)*argc) : NULL; + loadmod->path = sdsnew(path); + loadmod->argc = argc; ++ loadmod->conf = 1; + for (i = 0; i < argc; i++) { + loadmod->argv[i] = createRawStringObject(argv[i],sdslen(argv[i])); + } +@@ -1570,6 +1571,8 @@ void rewriteConfigLoadmoduleOption(struct rewriteConfigState *state) { + struct RedisModule *module = dictGetVal(de); + /* Internal modules doesn't have path and are not part of the configuration file */ + if (sdslen(module->loadmod->path) == 0) continue; ++ /* ignore when loaded from config */ ++ if (module->loadmod->conf) continue; + + line = sdsnew("loadmodule "); + line = sdscatsds(line, module->loadmod->path); +diff --git a/src/module.c b/src/module.c +index ab8cafb191a..2d3b8a4eb3e 100644 +--- a/src/module.c ++++ b/src/module.c +@@ -12333,7 +12333,7 @@ int VectorSets_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc); + /* Load internal data types that bundled as modules */ + void moduleLoadInternalModules(void) { + #ifdef INCLUDE_VEC_SETS +- int retval = moduleOnLoad((int (*)(void *, void **, int)) VectorSets_OnLoad, NULL, NULL, NULL, 0, 0); ++ int retval = moduleOnLoad((int (*)(void *, void **, int)) VectorSets_OnLoad, NULL, NULL, NULL, 0, 0, 1); + serverAssert(retval == C_OK); + #endif + } +@@ -12354,7 +12354,7 @@ void moduleLoadFromQueue(void) { + listRewind(server.loadmodule_queue,&li); + while((ln = listNext(&li))) { + struct moduleLoadQueueEntry *loadmod = ln->value; +- if (moduleLoad(loadmod->path,(void **)loadmod->argv,loadmod->argc, 0) ++ if (moduleLoad(loadmod->path,(void **)loadmod->argv, loadmod->argc, 0, loadmod->conf) + == C_ERR) + { + serverLog(LL_WARNING, +@@ -12543,7 +12543,7 @@ void moduleUnregisterCleanup(RedisModule *module) { + + /* Load a module by path and initialize it. On success C_OK is returned, otherwise + * C_ERR is returned. */ +-int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex) { ++int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int is_config) { + int (*onload)(void *, void **, int); + void *handle; + +@@ -12570,12 +12570,12 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa + return C_ERR; + } + +- return moduleOnLoad(onload, path, handle, module_argv, module_argc, is_loadex); ++ return moduleOnLoad(onload, path, handle, module_argv, module_argc, is_loadex, is_config); + } + + /* Load a module by its 'onload' callback and initialize it. On success C_OK is returned, otherwise + * C_ERR is returned. */ +-int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex) { ++int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex, int is_config) { + RedisModuleCtx ctx; + moduleCreateContext(&ctx, NULL, REDISMODULE_CTX_TEMP_CLIENT); /* We pass NULL since we don't have a module yet. */ + if (onload((void*)&ctx,module_argv,module_argc) == REDISMODULE_ERR) { +@@ -12599,6 +12599,8 @@ int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *ha + ctx.module->loadmod->path = sdsnew(path); + ctx.module->loadmod->argv = module_argc ? zmalloc(sizeof(robj*)*module_argc) : NULL; + ctx.module->loadmod->argc = module_argc; ++ ctx.module->loadmod->conf = is_config; ++ + for (int i = 0; i < module_argc; i++) { + ctx.module->loadmod->argv[i] = module_argv[i]; + incrRefCount(ctx.module->loadmod->argv[i]); +@@ -13910,7 +13912,7 @@ NULL + argv = &c->argv[3]; + } + +- if (moduleLoad(c->argv[2]->ptr,(void **)argv,argc, 0) == C_OK) ++ if (moduleLoad(c->argv[2]->ptr,(void **)argv,argc, 0, 0) == C_OK) + addReply(c,shared.ok); + else + addReplyError(c, +@@ -13926,7 +13928,7 @@ NULL + /* If this is a loadex command we want to populate server.module_configs_queue with + * sds NAME VALUE pairs. We also want to increment argv to just after ARGS, if supplied. */ + if (parseLoadexArguments((RedisModuleString ***) &argv, &argc) == REDISMODULE_OK && +- moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 1) == C_OK) ++ moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 1, 0) == C_OK) + addReply(c,shared.ok); + else { + dictEmpty(server.module_configs_queue, NULL); +diff --git a/src/server.h b/src/server.h +index a5cf8a73fe0..d724f09e193 100644 +--- a/src/server.h ++++ b/src/server.h +@@ -1499,6 +1499,7 @@ struct saveparam { + + struct moduleLoadQueueEntry { + sds path; ++ int conf; + int argc; + robj **argv; + }; +@@ -2745,8 +2746,8 @@ void populateCommandLegacyRangeSpec(struct redisCommand *c); + void moduleInitModulesSystem(void); + void moduleInitModulesSystemLast(void); + void modulesCron(void); +-int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex); +-int moduleLoad(const char *path, void **argv, int argc, int is_loadex); ++int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex, int is_config); ++int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int is_config); + int moduleUnload(sds name, const char **errmsg, int forced_unload); + void moduleLoadInternalModules(void); + void moduleLoadFromQueue(void); + +From 92d7e87872db47edc07e6349fcdadacde9a1d8ef Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 6 Oct 2025 02:52:16 +0200 +Subject: [PATCH 2/2] only protect loadmodule from include files + +--- + src/config.c | 9 +++++++-- + src/module.c | 10 +++++----- + src/server.h | 6 +++--- + 3 files changed, 15 insertions(+), 10 deletions(-) + +diff --git a/src/config.c b/src/config.c +index 973a31a5100..ea8b8dab55b 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -354,6 +354,9 @@ void resetServerSaveParams(void) { + server.saveparamslen = 0; + } + ++/* support detecting include vs main config file */ ++static int reading_include_file = 0; ++ + void queueLoadModule(sds path, sds *argv, int argc) { + int i; + struct moduleLoadQueueEntry *loadmod; +@@ -362,7 +365,7 @@ void queueLoadModule(sds path, sds *argv, int argc) { + loadmod->argv = argc ? zmalloc(sizeof(robj*)*argc) : NULL; + loadmod->path = sdsnew(path); + loadmod->argc = argc; +- loadmod->conf = 1; ++ loadmod->from_include = reading_include_file;; + for (i = 0; i < argc; i++) { + loadmod->argv[i] = createRawStringObject(argv[i],sdslen(argv[i])); + } +@@ -522,7 +525,9 @@ void loadServerConfigFromString(char *config) { + + /* Execute config directives */ + if (!strcasecmp(argv[0],"include") && argc == 2) { ++ reading_include_file = 1; + loadServerConfig(argv[1], 0, NULL); ++ reading_include_file = 0; + } else if (!strcasecmp(argv[0],"rename-command") && argc == 3) { + struct redisCommand *cmd = lookupCommandBySds(argv[1]); + int retval; +@@ -1572,7 +1577,7 @@ void rewriteConfigLoadmoduleOption(struct rewriteConfigState *state) { + /* Internal modules doesn't have path and are not part of the configuration file */ + if (sdslen(module->loadmod->path) == 0) continue; + /* ignore when loaded from config */ +- if (module->loadmod->conf) continue; ++ if (module->loadmod->from_include) continue; + + line = sdsnew("loadmodule "); + line = sdscatsds(line, module->loadmod->path); +diff --git a/src/module.c b/src/module.c +index 2d3b8a4eb3e..d8c887fcdbf 100644 +--- a/src/module.c ++++ b/src/module.c +@@ -12354,7 +12354,7 @@ void moduleLoadFromQueue(void) { + listRewind(server.loadmodule_queue,&li); + while((ln = listNext(&li))) { + struct moduleLoadQueueEntry *loadmod = ln->value; +- if (moduleLoad(loadmod->path,(void **)loadmod->argv, loadmod->argc, 0, loadmod->conf) ++ if (moduleLoad(loadmod->path,(void **)loadmod->argv, loadmod->argc, 0, loadmod->from_include) + == C_ERR) + { + serverLog(LL_WARNING, +@@ -12543,7 +12543,7 @@ void moduleUnregisterCleanup(RedisModule *module) { + + /* Load a module by path and initialize it. On success C_OK is returned, otherwise + * C_ERR is returned. */ +-int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int is_config) { ++int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int from_include) { + int (*onload)(void *, void **, int); + void *handle; + +@@ -12570,12 +12570,12 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa + return C_ERR; + } + +- return moduleOnLoad(onload, path, handle, module_argv, module_argc, is_loadex, is_config); ++ return moduleOnLoad(onload, path, handle, module_argv, module_argc, is_loadex, from_include); + } + + /* Load a module by its 'onload' callback and initialize it. On success C_OK is returned, otherwise + * C_ERR is returned. */ +-int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex, int is_config) { ++int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex, int from_include) { + RedisModuleCtx ctx; + moduleCreateContext(&ctx, NULL, REDISMODULE_CTX_TEMP_CLIENT); /* We pass NULL since we don't have a module yet. */ + if (onload((void*)&ctx,module_argv,module_argc) == REDISMODULE_ERR) { +@@ -12599,7 +12599,7 @@ int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *ha + ctx.module->loadmod->path = sdsnew(path); + ctx.module->loadmod->argv = module_argc ? zmalloc(sizeof(robj*)*module_argc) : NULL; + ctx.module->loadmod->argc = module_argc; +- ctx.module->loadmod->conf = is_config; ++ ctx.module->loadmod->from_include = from_include; + + for (int i = 0; i < module_argc; i++) { + ctx.module->loadmod->argv[i] = module_argv[i]; +diff --git a/src/server.h b/src/server.h +index d724f09e193..f3c836c9edc 100644 +--- a/src/server.h ++++ b/src/server.h +@@ -1499,7 +1499,7 @@ struct saveparam { + + struct moduleLoadQueueEntry { + sds path; +- int conf; ++ int from_include; + int argc; + robj **argv; + }; +@@ -2746,8 +2746,8 @@ void populateCommandLegacyRangeSpec(struct redisCommand *c); + void moduleInitModulesSystem(void); + void moduleInitModulesSystemLast(void); + void modulesCron(void); +-int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex, int is_config); +-int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int is_config); ++int moduleOnLoad(int (*onload)(void *, void **, int), const char *path, void *handle, void **module_argv, int module_argc, int is_loadex, int from_include); ++int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int from_include); + int moduleUnload(sds name, const char **errmsg, int forced_unload); + void moduleLoadInternalModules(void); + void moduleLoadFromQueue(void); diff --git a/redis-sentinel.init b/redis-sentinel.init deleted file mode 100644 index 1f8c005..0000000 --- a/redis-sentinel.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# redis init file for starting up the redis-sentinel daemon -# -# chkconfig: - 21 79 -# description: Starts and stops the redis-sentinel daemon. -# -### BEGIN INIT INFO -# Provides: redis-sentinel -# Required-Start: $local_fs $remote_fs $network -# Required-Stop: $local_fs $remote_fs $network -# Short-Description: start and stop Sentinel server -# Description: A persistent key-value database -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -name="redis-sentinel" -exec="/usr/bin/$name" -shut="/usr/libexec/redis-shutdown" -pidfile="/var/run/redis/sentinel.pid" -SENTINEL_CONFIG="/etc/redis-sentinel.conf" - -[ -e /etc/sysconfig/redis-sentinel ] && . /etc/sysconfig/redis-sentinel - -lockfile=/var/lock/subsys/redis - -start() { - [ -f $SENTINEL_CONFIG ] || exit 6 - [ -x $exec ] || exit 5 - echo -n $"Starting $name: " - daemon --user ${REDIS_USER-redis} "$exec $SENTINEL_CONFIG --daemonize yes --pidfile $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $name: " - [ -x $shut ] && $shut $name - retval=$? - if [ -f $pidfile ] - then - # shutdown haven't work, try old way - killproc -p $pidfile $name - retval=$? - else - success "$name shutdown" - fi - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - false -} - -rh_status() { - status -p $pidfile $name -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}" - exit 2 -esac -exit $? diff --git a/redis-sentinel.service b/redis-sentinel.service index ec4ade4..ffb748a 100644 --- a/redis-sentinel.service +++ b/redis-sentinel.service @@ -1,16 +1,30 @@ [Unit] Description=Redis Sentinel After=network.target +After=network-online.target +Wants=network-online.target [Service] -ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --daemonize no --supervised systemd -ExecStop=/usr/libexec/redis-shutdown redis-sentinel +ExecStart=/usr/bin/redis-sentinel /etc/redis/sentinel.conf --daemonize no --supervised systemd Type=notify User=redis Group=redis RuntimeDirectory=redis RuntimeDirectoryMode=0755 +# If you need to change max open file limit +# for example, when you change maxclient in configuration +# you can change the LimitNOFILE value below. +# See "man systemd.exec" for more information. +LimitNOFILE=10240 + +# Slave nodes on large system may take lot of time to start. +# You may need to uncomment TimeoutStartSec and TimeoutStopSec +# directives below and raise their value. +# See "man systemd.service" for more information. +#TimeoutStartSec=90s +#TimeoutStopSec=90s + [Install] WantedBy=multi-user.target diff --git a/redis-shutdown b/redis-shutdown deleted file mode 100644 index 53b9f09..0000000 --- a/redis-shutdown +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# Wrapper to close properly redis and sentinel -test x"$REDIS_DEBUG" != x && set -x - -REDIS_CLI=/usr/bin/redis-cli - -# Retrieve service name -SERVICE_NAME="$1" -if [ -z "$SERVICE_NAME" ]; then - SERVICE_NAME=redis -fi - -# Get the proper config file based on service name -CONFIG_FILE="/etc/$SERVICE_NAME.conf" - -# Use awk to retrieve host, port from config file -HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE | tail -n1` -PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE | tail -n1` -PASS=`awk '/^[[:blank:]]*requirepass/ { print $2 }' $CONFIG_FILE | tail -n1` -SOCK=`awk '/^[[:blank:]]*unixsocket\s/ { print $2 }' $CONFIG_FILE | tail -n1` - -# Just in case, use default host, port -HOST=${HOST:-127.0.0.1} -if [ "$SERVICE_NAME" = redis ]; then - PORT=${PORT:-6379} -else - PORT=${PORT:-26739} -fi - -# Setup additional parameters -# e.g password-protected redis instances -[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS" - -# shutdown the service properly -if [ -e "$SOCK" ] ; then - $REDIS_CLI -s $SOCK $ADDITIONAL_PARAMS shutdown -else - $REDIS_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown -fi diff --git a/redis.init b/redis.init deleted file mode 100644 index 508a6ec..0000000 --- a/redis.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# redis init file for starting up the redis daemon -# -# chkconfig: - 20 80 -# description: Starts and stops the redis daemon. -# -### BEGIN INIT INFO -# Provides: redis-server -# Required-Start: $local_fs $remote_fs $network -# Required-Stop: $local_fs $remote_fs $network -# Short-Description: start and stop Redis server -# Description: A persistent key-value database -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -name="redis-server" -exec="/usr/bin/$name" -shut="/usr/libexec/redis-shutdown" -pidfile="/var/run/redis/redis.pid" -REDIS_CONFIG="/etc/redis.conf" - -[ -e /etc/sysconfig/redis ] && . /etc/sysconfig/redis - -lockfile=/var/lock/subsys/redis - -start() { - [ -f $REDIS_CONFIG ] || exit 6 - [ -x $exec ] || exit 5 - echo -n $"Starting $name: " - daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG --daemonize yes --pidfile $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $name: " - [ -x $shut ] && $shut - retval=$? - if [ -f $pidfile ] - then - # shutdown haven't work, try old way - killproc -p $pidfile $name - retval=$? - else - success "$name shutdown" - fi - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - false -} - -rh_status() { - status -p $pidfile $name -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}" - exit 2 -esac -exit $? diff --git a/redis.service b/redis.service index 94ef85b..093cfd4 100644 --- a/redis.service +++ b/redis.service @@ -1,16 +1,30 @@ [Unit] Description=Redis persistent key-value database After=network.target +After=network-online.target +Wants=network-online.target [Service] -ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no --supervised systemd -ExecStop=/usr/libexec/redis-shutdown +ExecStart=/usr/bin/redis-server /etc/redis/redis.conf --daemonize no --supervised systemd Type=notify User=redis Group=redis RuntimeDirectory=redis RuntimeDirectoryMode=0755 +# If you need to change max open file limit +# for example, when you change maxclient in configuration +# you can change the LimitNOFILE value below. +# See "man systemd.exec" for more information. +LimitNOFILE=10240 + +# Slave nodes on large system may take lot of time to start. +# You may need to uncomment TimeoutStartSec and TimeoutStopSec +# directives below and raise their value. +# See "man systemd.service" for more information. +#TimeoutStartSec=90s +#TimeoutStopSec=90s + [Install] WantedBy=multi-user.target @@ -9,136 +9,87 @@ # %global _hardened_build 1 -%if 0 -%global with_jemalloc 1 -%else -%global with_jemalloc 0 -%endif - -%if 0%{?fedora} < 30 && 0%{?rhel} < 8 -%global with_redistrib 1 -%else -%global with_redistrib 0 -%endif +# temp workaround to https://bugzilla.redhat.com/2059488 +%undefine _package_note_file -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -%global with_systemd 1 -%else -%global with_systemd 0 -%endif - -%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7 -%global with_tls 1 -%else -%global with_tls 0 -%endif +# to use system libjemalloc +%bcond_with jemalloc # Tests fail in mock, not in local build. -%global with_tests %{?_with_tests:1}%{!?_with_tests:0} - -# Pre-version are only available in github -%global upstream_ver 6.0.4 -#global upstream_pre RC4 -%global gh_commit f092dd3227cc74978853e379c0a7731bdaa324af -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner antirez -%global gh_project redis - -# Commit IDs for the (unversioned) redis-doc repository -# https://fedoraproject.org/wiki/Packaging:SourceURL "Commit Revision" -# https://github.com/antirez/redis-doc/commits/master -%global doc_commit c0853c162defc400e3fba311dbde2622a29653a4 -%global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7}) +%bcond_with tests -# %%{_rpmmacrodir} not usable on EL-6 - EL-7 (without epel-rpm)s-macros) -%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) +%global upstream_ver 8.2.2 Name: redis -Version: %{upstream_ver}%{?upstream_pre:~%{upstream_pre}} -Release: 2%{?dist} +Version: %{upstream_ver} +Release: 3%{?dist} Summary: A persistent key-value database -Group: Applications/Databases -License: BSD +# redis: RSALv2 or SSPLv1 or AGPLv3 (only AGPLv3 is OSS) +# hiredis: BSD-3-Clause +# hdrhistogram, jemalloc, lzf, linenoise: BSD-2-Clause +# lua, fast_float: MIT +# fpconv: BSL-1.0 +License: AGPL-3.0-only AND BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: http://redis.io -%if 0%{?upstream_pre:1} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_ver}%{upstream_pre}-%{gh_short}.tar.gz -%else -Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz -%endif +#ource0: https://download.redis.io/releases/%%{name}-%%{upstream_ver}.tar.gz +Source0: https://github.com/redis/redis/archive/refs/tags/%{version}.tar.gz Source1: %{name}.logrotate Source2: %{name}-sentinel.service Source3: %{name}.service -Source4: %{name}-sentinel.init -Source5: %{name}.init -Source6: %{name}-shutdown -Source7: %{name}-limit-systemd -Source8: %{name}-limit-init -Source9: macros.%{name} -Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz - -# To refresh patches: -# tar xf redis-xxx.tar.gz && cd redis-xxx && git init && git add . && git commit -m "%%{version} baseline" -# git am %%{patches} -# Then refresh your patches -# git format-patch HEAD~<number of expected patches> -# Update configuration for Fedora -# https://github.com/antirez/redis/pull/3491 - man pages -Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch -# https://github.com/antirez/redis/pull/3494 - symlink -Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch -# https://github.com/antirez/redis/pull/7168 - notify systemd -Patch0003: 0003-Notify-systemd-on-sentinel-startup.patch +Source4: %{name}.sysusers +Source5: %{name}.tmpfiles + +# Fix default paths in configuration files for RPM layout +Patch0: %{name}-conf.patch +# Workaround to https://github.com/redis/redis/issues/14404 +Patch1: %{name}-loadmod.patch BuildRequires: gcc -%if 0%{?rhel} == 6 -BuildRequires: devtoolset-6-toolchain -%endif -%if 0%{?rhel} == 7 -BuildRequires: devtoolset-8-toolchain -BuildRequires: devtoolset-8-libatomic-devel -%endif -%if %{?with_jemalloc} +BuildRequires: gcc-c++ +BuildRequires: libstdc++-devel +%if %{with jemalloc} BuildRequires: jemalloc-devel %else -Provides: bundled(jemalloc) = 5.1.0 +# from deps/jemalloc/VERSION +Provides: bundled(jemalloc) = 5.3.0 %endif -%if 0%{?with_tests} +%if %{with tests} BuildRequires: procps-ng BuildRequires: tcl %endif -%if 0%{?with_systemd} BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd -%endif -%if 0%{?with_tls} +%sysusers_requires_compat +BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel >= 1.0.2 -%endif -%if ! %{?with_redistrib} -Obsoletes: redis-trib < %{version}-%{release} -%endif +Obsoletes: redis-trib < 8 +Obsoletes: redis-doc < 8 -# Required for redis-shutdown -Requires: /bin/awk Requires: logrotate -Requires(pre): shadow-utils -%if 0%{?with_systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -%else -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts -%endif -Provides: bundled(hiredis) -Provides: bundled(lua-libs) -Provides: bundled(linenoise) +# from deps/hiredis/hiredis.h +Provides: bundled(hiredis) = 1.2.0 +# from deps/lua/src/lua.h +Provides: bundled(lua-libs) = 5.1.5 +# from deps/linenoise/linenoise.h +Provides: bundled(linenoise) = 1.0 +# unkown, see src/lzf.h Provides: bundled(lzf) +# from deps/hdr_histogram/README.md +Provides: bundled(hdr_histogram) = 0.11.0 +# from deps/fast_float/README.md +Provides: bundled(fast_float) = 6.1.4 +# no version +Provides: bundled(fpconv) + +Conflicts: valkey-compat-redis %global redis_modules_abi 1 %global redis_modules_dir %{_libdir}/%{name}/modules +%global redis_modules_cfg %{_sysconfdir}/redis/modules Provides: redis(modules_abi)%{?_isa} = %{redis_modules_abi} %description @@ -170,47 +121,19 @@ You can use Redis from most programming languages also. Summary: Development header for Redis module development # Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines) Provides: %{name}-static = %{version}-%{release} +Conflicts: valkey-compat-redis-devel %description devel Header file required for building loadable Redis modules. Detailed API documentation is available in the redis-doc package. -%package doc -Summary: Documentation for Redis including man pages -License: CC-BY-SA -BuildArch: noarch - -# http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages" -Conflicts: redis < 4.0 - -%description doc -Manual pages and detailed documentation for many aspects of Redis use, -administration and development. - -%if 0%{?with_redistrib} -%package trib -Summary: Cluster management script for Redis -BuildArch: noarch -Requires: ruby -Requires: rubygem-redis - -%description trib -Redis cluster management utility providing cluster creation, node addition -and removal, status checks, resharding, rebalancing, and other operations. -%endif %prep -%if 0%{?upstream_pre:1} -%setup -q -n %{gh_project}-%{gh_commit} -b 10 -%else -%setup -q -b 10 -%endif -mv ../%{name}-doc-%{doc_commit} doc -%patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 +%setup -q -n %{name}-%{upstream_ver} +%patch -P0 -p1 -b .old +%patch -P1 -p1 -b .loadmod -%if %{?with_jemalloc} +%if %{with jemalloc} rm -frv deps/jemalloc # Use system jemalloc library sed -i -e '/cd jemalloc && /d' deps/Makefile @@ -219,138 +142,100 @@ sed -i -e 's|-I../deps/jemalloc.*|-DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc %else mv deps/jemalloc/COPYING COPYING-jemalloc %endif -mv deps/lua/COPYRIGHT COPYRIGHT-lua -mv deps/hiredis/COPYING COPYING-hiredis - -# Configuration file changes -sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf -sed -i -e 's|^logfile .*$|logfile /var/log/redis/sentinel.log|g' sentinel.conf -sed -i -e 's|^dir .*$|dir /var/lib/redis|g' redis.conf +mv deps/lua/COPYRIGHT COPYRIGHT-lua +mv deps/hiredis/COPYING COPYING-hiredis +mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram +mv deps/hdr_histogram/COPYING.txt COPYING-hdrhistogram +mv deps/fpconv/LICENSE.txt LICENSE-fpconv + +# See https://bugzilla.redhat.com/2240293 +# See https://src.fedoraproject.org/rpms/jemalloc/blob/rawhide/f/jemalloc.spec#_34 +%ifarch %ix86 %arm x86_64 s390x +sed -e 's/--with-lg-quantum/--with-lg-page=12 --with-lg-quantum/' -i deps/Makefile +%endif +%ifarch ppc64 ppc64le aarch64 +sed -e 's/--with-lg-quantum/--with-lg-page=16 --with-lg-quantum/' -i deps/Makefile +%endif # Module API version safety check api=`sed -n -e 's/#define REDISMODULE_APIVER_[0-9][0-9]* //p' src/redismodule.h` if test "$api" != "%{redis_modules_abi}"; then : Error: Upstream API version is now ${api}, expecting %%{redis_modules_abi}. - : Update the redis_modules_abi macro, the rpmmacros file, and rebuild. + : Update the redis_modules_abi macro, and rebuild. exit 1 fi -# Fix for old GCC -%if 0%{?rhel} == 6 -sed -e '/GCC diagnostic/d' -i src/lzf_d.c -%endif - +# not using BUILD_WITH_MODULES=yes which requires ONLINE build (git, rust, ...) %global malloc_flags MALLOC=jemalloc -%if 0%{?with_tls} %global tls_flags BUILD_TLS=yes -%endif -%if 0%{?with_systemd} %global sysd_flags BUILD_WITH_SYSTEMD=yes -%endif - %global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} %{?malloc_flags} %{?tls_flags} %{?sysd_flags} : %{make_flags} +# Generates macro file +cat << 'EOF' | tee macros.redis +%%redis_modules_abi %redis_modules_abi +%%redis_modules_dir %redis_modules_dir +%%redis_modules_cfg %redis_modules_cfg +EOF + +: List bundled modules +grep MODULE_VERSION modules/*/Makefile -%build -%if 0%{?rhel} == 6 -source /opt/rh/devtoolset-6/enable -g++ --version -%endif -%if 0%{?rhel} == 7 -source /opt/rh/devtoolset-8/enable -g++ --version -%endif +%build make %{?_smp_mflags} %{make_flags} all %install -%if 0%{?rhel} == 6 -source /opt/rh/devtoolset-6/enable -g++ --version -%endif -%if 0%{?rhel} == 7 -source /opt/rh/devtoolset-8/enable -g++ --version -%endif - make %{make_flags} install +# System user +install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{name}.conf + +# Install tmpfiles.d file +install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf + # Filesystem. install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_localstatedir}/log/%{name} install -d %{buildroot}%{_localstatedir}/run/%{name} install -d %{buildroot}%{redis_modules_dir} +install -d %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d +install -d %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d # Install logrotate file. install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # Install configuration files. -install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf -install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf +install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf +install -dm750 %{buildroot}%{redis_modules_cfg} -%if 0%{?with_systemd} # Install systemd unit files. mkdir -p %{buildroot}%{_unitdir} install -pm644 %{S:3} %{buildroot}%{_unitdir} install -pm644 %{S:2} %{buildroot}%{_unitdir} -# Install systemd limit files (requires systemd >= 204) -install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf -install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf -%else -# install SysV service files -install -pDm755 %{S:4} %{buildroot}%{_initrddir}/%{name}-sentinel -install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name} -install -p -D -m 644 %{S:8} %{buildroot}%{_sysconfdir}/security/limits.d/95-%{name}.conf -%endif - # Fix non-standard-executable-perm error. chmod 755 %{buildroot}%{_bindir}/%{name}-* -# Install redis-shutdown -install -pDm755 %{S:6} %{buildroot}%{_libexecdir}/%{name}-shutdown - # Install redis module header install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h -%if 0%{?with_redistrib} -# Install redis-trib -install -pDm755 src/%{name}-trib.rb %{buildroot}%{_bindir}/%{name}-trib -%endif - -# Install man pages -man=$(dirname %{buildroot}%{_mandir}) -for page in man/man?/*; do - install -Dpm644 $page $man/$page -done -ln -s redis-server.1 %{buildroot}%{_mandir}/man1/redis-sentinel.1 -ln -s redis.conf.5 %{buildroot}%{_mandir}/man5/redis-sentinel.conf.5 - -# Install documentation and html pages -doc=$(echo %{buildroot}/%{_docdir}/%{name}) -for page in 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO; do - install -Dpm644 $page $doc/$page -done -for page in $(find doc -name \*.md | sed -e 's|.md$||g'); do - base=$(echo $page | sed -e 's|doc/||g') - install -Dpm644 $page.md $doc/$base.md -done - # Install rpm macros for redis modules -mkdir -p %{buildroot}%{macrosdir} -install -pDm644 %{S:9} %{buildroot}%{macrosdir}/macros.%{name} +mkdir -p %{buildroot}%{_rpmmacrodir} +install -pDm644 macros.redis %{buildroot}%{_rpmmacrodir}/macros.%{name} %check -%if 0%{?with_tests} -%if ! %{?with_jemalloc} +%if %{with tests} +%if %{without jemalloc} # ERR Active defragmentation cannot be enabled: it requires a Redis server compiled # with a modified Jemalloc like the one shipped by default with the Redis source distribution sed -e '/memefficiency/d' -i tests/test_helper.tcl %endif -# https://github.com/antirez/redis/issues/1417 (for "taskset -c 1") +# https://github.com/redis/redis/issues/1417 (for "taskset -c 1") taskset -c 1 make %{make_flags} test make %{make_flags} test-sentinel %else @@ -358,103 +243,343 @@ make %{make_flags} test-sentinel %endif %pre -getent group %{name} &> /dev/null || \ -groupadd -r %{name} &> /dev/null -getent passwd %{name} &> /dev/null || \ -useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ --c 'Redis Database Server' %{name} &> /dev/null +%sysusers_create_compat %{SOURCE4} exit 0 +%if 0%{?fedora} < 34 && 0%{?rhel} < 9 +%posttrans +if [ -f %{_sysconfdir}/%{name}/%{name}.conf -a ! -f %{_sysconfdir}/%{name}.conf ]; then + ln -s %{name}/%{name}.conf %{_sysconfdir}/%{name}.conf +fi +if [ -f %{_sysconfdir}/%{name}/sentinel.conf -a ! -f %{_sysconfdir}/%{name}-sentinel.conf ]; then + ln -s %{name}/sentinel.conf %{_sysconfdir}/%{name}-sentinel.conf +fi +%endif + %post -%if 0%{?with_systemd} +if [ -f %{_sysconfdir}/%{name}.conf -a ! -L %{_sysconfdir}/%{name}.conf ]; then + if [ -f %{_sysconfdir}/%{name}/%{name}.conf.rpmnew ]; then + rm %{_sysconfdir}/%{name}/%{name}.conf.rpmnew + fi + if [ -f %{_sysconfdir}/%{name}/%{name}.conf ]; then + mv %{_sysconfdir}/%{name}/%{name}.conf %{_sysconfdir}/%{name}/%{name}.conf.rpmnew + fi + mv %{_sysconfdir}/%{name}.conf %{_sysconfdir}/%{name}/%{name}.conf + echo -e "\nWarning: %{name} configuration is now in %{_sysconfdir}/%{name} directory\n" +fi +if [ -f %{_sysconfdir}/%{name}-sentinel.conf -a ! -L %{_sysconfdir}/%{name}-sentinel.conf ]; then + if [ -f %{_sysconfdir}/%{name}/sentinel.conf.rpmnew ]; then + rm %{_sysconfdir}/%{name}/sentinel.conf.rpmnew + fi + if [ -f %{_sysconfdir}/%{name}/sentinel.conf ]; then + mv %{_sysconfdir}/%{name}/sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf.rpmnew + fi + mv %{_sysconfdir}/%{name}-sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf +fi + %systemd_post %{name}.service %systemd_post %{name}-sentinel.service -%else -chkconfig --add %{name} -chkconfig --add %{name}-sentinel -%endif %preun -%if 0%{?with_systemd} %systemd_preun %{name}.service %systemd_preun %{name}-sentinel.service -%else -if [ $1 -eq 0 ] ; then - service %{name} stop &> /dev/null - chkconfig --del %{name} &> /dev/null - service %{name}-sentinel stop &> /dev/null - chkconfig --del %{name}-sentinel &> /dev/null -fi -%endif %postun -%if 0%{?with_systemd} %systemd_postun_with_restart %{name}.service %systemd_postun_with_restart %{name}-sentinel.service -%else -if [ "$1" -ge "1" ] ; then - service %{name} condrestart >/dev/null 2>&1 || : - service %{name}-sentinel condrestart >/dev/null 2>&1 || : -fi -%endif + %files -%{!?_licensedir:%global license %%doc} -%license COPYING +%doc 00-RELEASENOTES +%doc *.md +%license LICENSE.txt %license COPYRIGHT-lua %license COPYING-hiredis -%if ! %{?with_jemalloc} +%license LICENSE-hdrhistogram +%license COPYING-hdrhistogram +%license LICENSE-fpconv +%if %{without jemalloc} %license COPYING-jemalloc %endif %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf -%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf -%dir %attr(0750, redis, redis) %{_libdir}/%{name} -%dir %attr(0750, redis, redis) %{redis_modules_dir} +%attr(0750, redis, root) %dir %{_sysconfdir}/%{name} +%attr(0750, redis, root) %dir %{redis_modules_cfg} +%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf +%dir %{_libdir}/%{name} +%dir %{redis_modules_dir} %dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} %dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name} -%if 0%{?with_redistrib} -%exclude %{_bindir}/%{name}-trib -%endif -%exclude %{macrosdir} +%exclude %{_rpmmacrodir} %exclude %{_includedir} -%exclude %{_docdir}/%{name}/* %{_bindir}/%{name}-* -%{_libexecdir}/%{name}-* -%{_mandir}/man1/%{name}* -%{_mandir}/man5/%{name}* -%if 0%{?with_systemd} %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sentinel.service %dir %{_sysconfdir}/systemd/system/%{name}.service.d -%config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf %dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d -%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf %dir %attr(0755, redis, redis) %ghost %{_localstatedir}/run/%{name} -%else -%{_initrddir}/%{name} -%{_initrddir}/%{name}-sentinel -%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}.conf -%dir %attr(0755, redis, redis) %{_localstatedir}/run/%{name} -%endif +%{_sysusersdir}/%{name}.conf +%{_tmpfilesdir}/%{name}.conf %files devel -%license COPYING +%license LICENSE.txt %{_includedir}/%{name}module.h -%{macrosdir}/* +%{_rpmmacrodir}/* -%files doc -%docdir %{_docdir}/%{name} -%{_docdir}/%{name} -%if 0%{?with_redistrib} -%files trib -%license COPYING -%{_bindir}/%{name}-trib -%endif +%changelog +* Mon Oct 6 2025 Remi Collet <remi@fedoraproject.org> - 8.2.2-3 +- improve the patch for loadmodule directive +* Sun Oct 5 2025 Remi Collet <remi@remirepo.net> - 8.2.2-2 +- fix CONFIG REWRITE breaks configuration + reported as https://github.com/redis/redis/issues/14404 + using patch from https://github.com/redis/redis/pull/14407 + +* Fri Oct 3 2025 Remi Collet <remi@remirepo.net> - 8.2.2-1 +- Redis 8.2.2 Released Fri 3 Oct 2025 10:00:00 IST +- Update urgency: SECURITY: + CVE-2025-49844 CVE-2025-46817 CVE-2025-46818 CVE-2025-46819 + +* Tue Aug 19 2025 Remi Collet <remi@remirepo.net> - 8.2.1-1 +- Redis 8.2.1 (v8.2.1) Released Mon 18 Aug 2025 12:00:00 IST +- Update urgency: MODERATE: Program an upgrade of the server, but it's not urgent. + +* Mon Aug 4 2025 Remi Collet <remi@remirepo.net> - 8.2.0-1 +- Redis 8.2 GA (v8.2.0) Released Mon 4 Aug 2025 15:00:00 IST + +* Mon Jul 28 2025 Remi Collet <remi@remirepo.net> - 8.0.3-4 +- add sysusers.d file for user management +- add tmpfiles.d file for temporary dir management + +* Wed Jul 23 2025 Remi Collet <remi@remirepo.net> - 8.0.3-3 +- add /etc/redis/modules drop-in directory for module configuration files + +* Thu Jul 10 2025 Remi Collet <remi@remirepo.net> - 8.0.3-2 +- add missing build requirements +- use patch for config instead of sed +- fix pidfile path in /run/redis +- set unixsocket + +* Mon Jul 7 2025 Remi Collet <remi@remirepo.net> - 8.0.3-1 +- Redis 8.0.3 Released Sun 6 Jul 2025 12:00:00 IST +- Update urgency: SECURITY: CVE-2025-32023 and CVE-2025-48367 + +* Thu Jun 19 2025 Remi Collet <remi@remirepo.net> - 8.0.2-2 +- remove limit.conf config files + +* Wed May 28 2025 Remi Collet <remi@remirepo.net> - 8.0.2-1 +- Redis 8.0.2 Released Tue 27 May 2025 12:00:00 IST +- Update urgency: SECURITY: CVE-2025-27151 + +* Tue May 13 2025 Remi Collet <remi@remirepo.net> - 8.0.1-1 +- Redis 8.0.1 Released Tue 13 May 2025 16:00:00 IST +- Update urgency: MODERATE + +* Mon May 5 2025 Remi Collet <remi@remirepo.net> - 8.0.0-1 +- Redis 8.0 GA (v8.0.0) Released Fri 2 May 2025 12:00:00 IST +- drop doc sub-package +- drop man pages + +* Thu Apr 24 2025 Remi Collet <remi@remirepo.net> - 7.2.8-1 +- Redis 7.2.8 Released Wed 23 Apr 2025 12:00:00 IST +- Update urgency SECURITY: CVE-2025-21605 + +* Mon Jan 6 2025 Remi Collet <remi@remirepo.net> - 7.2.7-1 +- Redis 7.2.7 Released Mon 6 Jan 2025 12:30:00 IDT +- Upgrade urgency SECURITY: CVE-2024-46981 and CVE-2024-5174 + +* Thu Oct 3 2024 Remi Collet <remi@remirepo.net> - 7.2.6-1 +- Redis Community Edition 7.2.6 Released Wed 02 Oct 2024 20:17:04 IDT +- Upgrade urgency SECURITY: CVE-2024-31449, CVE-2024-31227 and CVE-2024-31228 + +* Mon May 20 2024 Remi Collet <remi@remirepo.net> - 7.2.5-1 +- Redis 7.2.5 Released Thu 16 May 2024 12:00:00 IST +- Upgrade urgency MODERATE + +* Tue Jan 9 2024 Remi Collet <remi@remirepo.net> - 7.2.4-1 +- Redis 7.2.4 Released Tue 09 Jan 2024 10:45:52 IST +- Upgrade urgency SECURITY: CVE-2023-41056 + +* Thu Nov 2 2023 Remi Collet <remi@remirepo.net> - 7.2.3-1 +- Redis 7.2.3 Released Wed 01 Nov 2023 12:00:00 IST +- Upgrade urgency: HIGH, Fixes critical bugs affecting most users. + +* Wed Oct 18 2023 Remi Collet <remi@remirepo.net> - 7.2.2-1 +- Redis 7.2.2 Released Wed 18 Oct 2023 10:33:40 IDT +- Upgrade urgency SECURITY: CVE-2023-45145 + +* Mon Sep 25 2023 Remi Collet <remi@remirepo.net> - 7.2.1-2 +- set jemalloc page size #2240293 + +* Thu Sep 7 2023 Remi Collet <remi@remirepo.net> - 7.2.1-1 +- Redis 7.2.1 Released Wed 06 Sep 2023 15:00:00 IDT +- Upgrade urgency SECURITY: CVE-2023-41053 + +* Wed Aug 16 2023 Remi Collet <remi@remirepo.net> - 7.2.0-1 +- Redis 7.2.0 GA Released Mon Aug 15 12:00:00 IDT 2023 +- Upgrade urgency LOW: This is the first stable Release for Redis 7.2. + +* Mon Jul 10 2023 Remi Collet <remi@remirepo.net> - 7.2~rc3-1 +- Redis 7.2 RC3 (7.1.242) Released Mon July 10 12:00:00 IDT 2023 +- Upgrade urgency LOW: This is the third Release Candidate for Redis 7.2 +- Upgrade urgency SECURITY: If you're using a previous release candidate of 7.2 + +* Tue May 16 2023 Remi Collet <remi@remirepo.net> - 7.2~rc2-1 +- Redis 7.2 RC2 (7.1.241) Released Mon May 15 12:00:00 IST 2023 + +* Thu Mar 30 2023 Remi Collet <remi@remirepo.net> - 7.2~rc1-3 +- fix modules directory ownership and permissions #2176173 + +* Tue Mar 28 2023 Remi Collet <remi@remirepo.net> - 7.2~rc1-2 +- drop redis-shutdown helper and rely on systemd #2181181 + +* Thu Mar 23 2023 Remi Collet <remi@remirepo.net> - 7.2~rc1-1 +- rebuild with upstream sources instead of git snapshot +- refresh documentation + +* Thu Mar 23 2023 Remi Collet <remi@remirepo.net> - 7.2~RC1-1 +- Redis 7.2 RC1 (7.1.240) Released Wed Mar 22 12:00:00 IST 2023 + +* Tue Mar 21 2023 Remi Collet <remi@remirepo.net> - 7.0.10-1 +- Redis 7.0.10 Released Mon Mar 20 16:00:00 IST 2023 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Wed Mar 1 2023 Remi Collet <remi@remirepo.net> - 7.0.9-1 +- Redis 7.0.9 Released Tue Feb 28 12:00:00 IST 2023 +- Upgrade urgency: SECURITY, contains fixes to security issues + +* Tue Jan 17 2023 Remi Collet <remi@remirepo.net> - 7.0.8-1 +- Redis 7.0.8 Released Mon Jan 16 12:00:00 IDT 2023 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Fri Dec 16 2022 Remi Collet <remi@remirepo.net> - 7.0.7-1 +- Redis 7.0.7 Released Fri Dec 16 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, Contains fix for a regression in Geo commands. + +* Tue Dec 13 2022 Remi Collet <remi@remirepo.net> - 7.0.6-1 +- Redis 7.0.6 - Released Mon Dec 12 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, Contains fixes for a few non-critical or unlikely + bugs, and some dramatic optimizations to Geo, EVAL, and Sorted sets commands. + +* Thu Sep 22 2022 Remi Collet <remi@remirepo.net> - 7.0.5-2 +- Redis 7.0.5 - Released Wed Sep 21 20:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. +- refresh documentation + +* Thu Sep 22 2022 Remi Collet <remi@remirepo.net> - 7.0.5-1 +- Redis 7.0.5 - Released Wed Sep 21 20:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Mon Jul 18 2022 Remi Collet <remi@remirepo.net> - 7.0.4-1 +- Redis 7.0.4 - Released Monday Jul 18 12:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Tue Jul 12 2022 Remi Collet <remi@remirepo.net> - 7.0.3-1 +- Redis 7.0.3 - Released Monday Jul 11 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, specifically if you're using a previous release + of Redis 7.0, contains fixes for bugs in previous 7.0 releases. + +* Mon Jun 13 2022 Remi Collet <remi@remirepo.net> - 7.0.2-1 +- Redis 7.0.2 - Released Sunday Jun 12 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, specifically if you're using a previous release of + Redis 7.0, contains fixes for bugs in previous 7.0 releases. + +* Wed Jun 8 2022 Remi Collet <remi@remirepo.net> - 7.0.1-1 +- Redis 7.0.1 - Released Wed Jun 8 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, specifically if you're using a previous release of + Redis 7.0, contains some behavior changes for new 7.0 features and important + fixes for bugs in previous 7.0 releases. + +* Wed Apr 27 2022 Remi Collet <remi@remirepo.net> - 7.0.0-1 +- Redis 7.0.0 GA - Released Wed Apr 27 12:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Tue Apr 5 2022 Remi Collet <remi@remirepo.net> - 7.0~RC3-1 +- update to 7.0-RC3 (6.9.242) - Released Tue Apr 5 12:00:00 IST 2022 + +* Tue Mar 1 2022 Remi Collet <remi@remirepo.net> - 7.0~RC2-1 +- update to 7.0-RC2 (6.9.241) - Released Mon Feb 28 12:00:00 IST 2022 + +* Mon Jan 31 2022 Remi Collet <remi@remirepo.net> - 7.0~RC1-1 +- update to 7.0-RC1 (6.9.240) - Released Mon Jan 31 12:00:00 IST 2022 + +* Mon Oct 4 2021 Remi Collet <remi@remirepo.net> - 6.2.6-1 +- Redis 6.2.6 - Released Mon Oct 4 12:00:00 IDT 2021 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Thu Jul 22 2021 Remi Collet <remi@remirepo.net> - 6.2.5-1 +- Redis 6.2.5 - Released Wed Jul 21 16:32:19 IDT 2021 +- Upgrade urgency: SECURITY, contains fixes to security issues that affect + authenticated client connections on 32-bit versions. MODERATE otherwise. + +* Wed Jun 2 2021 Remi Collet <remi@remirepo.net> - 6.2.4-1 +- Redis 6.2.4 - Released Tue June 1 12:00:00 IST 2021 +- Upgrade urgency: SECURITY, Contains fixes to security issues that affect + authenticated client connections. MODERATE otherwise. + +* Tue May 4 2021 Remi Collet <remi@remirepo.net> - 6.2.3-1 +- Redis 6.2.3 - Released Mon May 3 19:00:00 IST 2021 +- Upgrade urgency: SECURITY, Contains fixes to security issues that affect + authenticated client connections. LOW otherwise. + +* Tue Apr 20 2021 Remi Collet <remi@remirepo.net> - 6.2.2-1 +- Redis 6.2.2 - Released Mon April 19 19:00:00 IST 2021 +- Upgrade urgency: HIGH, if you're using ACL and pub/sub, + CONFIG REWRITE, or suffering from performance regression. + +* Tue Mar 2 2021 Remi Collet <remi@remirepo.net> - 6.2.1-1 +- Redis 6.2.1 - Released Mon Mar 1 17:51:36 IST 2021 +- Upgrade urgency: LOW. + +* Tue Feb 23 2021 Remi Collet <remi@remirepo.net> - 6.2.0-1 +- Redis 6.2.0 GA - Released Tue Feb 22 14:00:00 IST 2021 +- Upgrade urgency: SECURITY if you use 32bit build of redis, + MODERATE if you used earlier versions of Redis 6.2, LOW otherwise + +* Wed Feb 3 2021 Remi Collet <remi@remirepo.net> - 6.2~RC3-1 +- update to 6.2-RC3 (6.1.242) + +* Tue Jan 12 2021 Remi Collet <remi@remirepo.net> - 6.2~RC2-1 +- update to 6.2-RC2 (6.1.241) + +* Tue Dec 15 2020 Remi Collet <remi@remirepo.net> - 6.2~RC1-1 +- update to 6.2-RC1 (6.1.240) + +* Tue Nov 24 2020 Remi Collet <remi@remirepo.net> - 6.0.9-4 +- create symlink for deployment tools + +* Mon Nov 23 2020 Remi Collet <remi@remirepo.net> - 6.0.9-3 +- move configuration in /etc/redis per upstream recommendation + see https://github.com/redis/redis/issues/8051 + +* Mon Nov 16 2020 Remi Collet <remi@remirepo.net> - 6.0.9-2 +- fix broken config rewrite feature using patch from + https://github.com/redis/redis/pull/8058 + +* Tue Oct 27 2020 Remi Collet <remi@remirepo.net> - 6.0.9-1 +- Redis 6.0.9 - Released Mon Oct 26 10:37:47 IST 2020 +- Upgrade urgency: MODERATE. + +* Thu Sep 10 2020 Remi Collet <remi@remirepo.net> - 6.0.8-1 +- Redis 6.0.8 - Released Wed Sep 09 23:34:17 IDT 2020 +- Upgrade urgency HIGH: Anyone who's using Redis 6.0.7 with Sentinel or + CONFIG REWRITE command is affected and should upgrade ASAP. + +* Tue Sep 1 2020 Remi Collet <remi@remirepo.net> - 6.0.7-1 +- Redis 6.0.7 - Released Fri Aug 28 11:05:09 IDT 2020 +- Upgrade urgency MODERATE: several bugs with moderate impact are fixed. +- drop patch merged upstream + +* Tue Jul 21 2020 Remi Collet <remi@remirepo.net> - 6.0.6-1 +- Redis 6.0.6 - Released Mon Jul 20 09:31:30 IDT 2020 +- Upgrade urgency MODERATE: several bugs with moderate impact are fixed here. +- open https://github.com/redis/redis/pull/7543 fix deprecated tail syntax + +* Wed Jun 10 2020 Remi Collet <remi@remirepo.net> - 6.0.5-1 +- Redis 6.0.5 - Released Tue Jun 09 11:56:08 CEST 2020 +- Upgrade urgency MODERATE: several bugs with moderate impact are fixed here. -%changelog * Thu May 28 2020 Remi Collet <remi@remirepo.net> - 6.0.4-2 - Redis 6.0.4 - Released Thu May 28 11:36:45 CEST 2020 - Upgrade urgency CRITICAL: this release fixes a severe replication bug. diff --git a/redis.sysusers b/redis.sysusers new file mode 100644 index 0000000..0494785 --- /dev/null +++ b/redis.sysusers @@ -0,0 +1 @@ +u redis - "Redis Database Server" /var/lib/redis /sbin/nologin diff --git a/redis.tmpfiles b/redis.tmpfiles new file mode 100644 index 0000000..75ba125 --- /dev/null +++ b/redis.tmpfiles @@ -0,0 +1,4 @@ +Z /etc/redis ~0750 redis root - +D /run/redis 0755 redis redis - +d /var/lib/redis 0750 redis redis - +d /var/log/redis 0750 redis redis - |