Commit 1d3f8beb authored by Henrik Triem's avatar Henrik Triem
Browse files

Starting point from Suse Build

parents
Index: redis.conf
===================================================================
--- redis.conf.orig
+++ redis.conf
@@ -133,7 +133,7 @@ tcp-keepalive 300
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize no
+daemonize yes
# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
@@ -144,7 +144,7 @@ daemonize no
# UPSTART_JOB or NOTIFY_SOCKET environment variables
# Note: these supervision methods only signal "process is ready."
# They do not enable continuous liveness pings back to your supervisor.
-supervised no
+supervised systemd
# If a pid file is specified, Redis writes it where specified at startup
# and removes it at exit.
@@ -155,7 +155,7 @@ supervised no
#
# Creating a pid file is best effort: if Redis is not able to create it
# nothing bad happens, the server will start and run normally.
-pidfile /var/run/redis_6379.pid
+pidfile /var/run/redis/default.pid
# Specify the server verbosity level.
# This can be one of:
@@ -168,7 +168,8 @@ 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 ""
+logfile /var/log/redis/default.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.
@@ -260,7 +261,7 @@ dbfilename dump.rdb
# 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/default/
################################# REPLICATION #################################
Index: sentinel.conf
===================================================================
--- sentinel.conf.orig
+++ sentinel.conf
@@ -1,4 +1,8 @@
# Example sentinel.conf
+#
+pidfile /var/run/redis/sentinel-default.pid
+loglevel notice
+logfile /var/log/redis/sentinel-default.log
# *** IMPORTANT ***
#
--- tests/test_helper.tcl.orig 2018-04-17 18:04:29.778303392 +0200
+++ tests/test_helper.tcl 2018-04-17 18:04:46.688365379 +0200
@@ -40,7 +40,6 @@ set ::all_tests {
integration/aof
integration/rdb
integration/convert-zipmap-hash-on-load
- integration/logging
integration/psync2
integration/psync2-reg
unit/pubsub
Index: src/config.h
===================================================================
--- src/config.h.orig
+++ src/config.h
@@ -65,8 +65,10 @@
#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \
defined(__FreeBSD__) || (defined(__OpenBSD__) && defined(USE_BACKTRACE))\
|| defined(__DragonFly__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined (__arm__)
#define HAVE_BACKTRACE 1
#endif
+#endif
/* MSG_NOSIGNAL. */
#ifdef __linux__
Index: utils/redis_init_script
===================================================================
--- utils/redis_init_script.orig
+++ utils/redis_init_script
@@ -1,50 +1,133 @@
#!/bin/sh
-#
-# Simple Redis init.d script conceived to work on Linux systems
-# as it does use of the /proc filesystem.
+# System startup script for Redis for OpenSUSE >= 11.4
+#
+# Author: Marcello Barnaba <m.barnaba@ifad.org>
+# Tue Jul 31 17:32:27 CEST 2012
+#
+# LSB-compatible service control script; see http://www.linuxbase.org/spec/
+# Install it in /etc/init.d/redis and run insserv /etc/init.d/redis
+# Define configurations in /etc/init.d/redis/NAME.conf
+#
+# Source: https://gist.github.com/804026
+#
### BEGIN INIT INFO
-# Provides: redis_6379
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Redis data structure server
-# Description: Redis data structure server. See https://redis.io
+# Provides: redis
+# Required-Start: $syslog $remote_fs
+# Required-Stop: $syslog $remote_fs
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Redis server
+# Description: Starts and stops the configured Redis instances
### END INIT INFO
-REDISPORT=6379
-EXEC=/usr/local/bin/redis-server
-CLIEXEC=/usr/local/bin/redis-cli
+EXEC=/usr/sbin/redis-server
+USER=redis
+STATE=/var/run/redis
+CONF=/etc/redis
+
+. /etc/rc.status
+
+if [ ! -d $STATE ]; then
+ install -d $state -o $USER -g $USER -m 0755 $STATE
+fi
+
+_get_env() {
+ INSTANCE=$1
+ PIDFILE=${STATE}/${INSTANCE}.pid
+ CONFIG=${CONF}/${INSTANCE}.conf
+}
+
+_foreach_config() {
+ command=$1
+
+ if [ -n "$2" ]; then
+ $command $2
+ else
+ for file in /etc/redis/*.conf; do
+ $command `basename "$file" .conf`
+ done
+ fi
+}
+
+start() {
+ _get_env $1
+
+ echo -n "Starting Redis server '${INSTANCE}'... "
+
+ if [ ! -f ${CONFIG} ]; then
+ echo "$CONFIG not found"
+ rc_failed
+
+ elif [ -f ${PIDFILE} ] && [ -x /proc/`cat ${PIDFILE}` ]; then
+ echo -n "already running (PID `cat ${PIDFILE}`)"
+
+ else
+ rm -f ${PIDFILE}
+ sudo -u $USER $EXEC $CONFIG
+ fi
+ rc_status -v
+}
+
+stop() {
+ _get_env $1
+
+ echo -n "Stopping Redis server '${INSTANCE}' ... "
+
+ if [ ! -f $PIDFILE ]; then
+ echo -n "not running"
+ else
+ PID=`cat $PIDFILE`
+ CLI='/usr/bin/redis-cli'
+ PASS=`grep ^requirepass $CONFIG | awk '{print $2}'`
+ PORT=`grep ^port $CONFIG | awk '{print $2}'`
+ BIND=`grep ^bind $CONFIG | awk '{print $2}'`
+
+ CLI="$CLI -p $PORT"
+ [ -n "$PASS" ] && CLI="$CLI -a $PASS"
+ [ -n "$BIND" ] && CLI="$CLI -h $BIND"
+
+ $CLI shutdown
+ echo -n "Waiting... "
+
+ while [ -x /proc/${PID} ]; do
+ sleep 1
+ echo -n '.'
+ done
+ rm -f ${PIDFILE}
+ fi
+ rc_status -v
+}
+
+status() {
+ _get_env $1
+
+ echo -n "Checking for redis '${INSTANCE}'"
+ /sbin/checkproc -p $PIDFILE $EXEC
+ rc_status -v
+}
-PIDFILE=/var/run/redis_${REDISPORT}.pid
-CONF="/etc/redis/${REDISPORT}.conf"
case "$1" in
start)
- if [ -f $PIDFILE ]
- then
- echo "$PIDFILE exists, process is already running or crashed"
- else
- echo "Starting Redis server..."
- $EXEC $CONF
- fi
- ;;
+ _foreach_config start $2
+ ;;
+
stop)
- if [ ! -f $PIDFILE ]
- then
- echo "$PIDFILE does not exist, process is not running"
- else
- PID=$(cat $PIDFILE)
- echo "Stopping ..."
- $CLIEXEC -p $REDISPORT shutdown
- while [ -x /proc/${PID} ]
- do
- echo "Waiting for Redis to shutdown ..."
- sleep 1
- done
- echo "Redis stopped"
- fi
- ;;
+ _foreach_config stop $2
+ ;;
+
+ status)
+ _foreach_config status $2
+ ;;
+
+ restart)
+ $0 stop $2
+ $0 start $2
+ ;;
+
*)
- echo "Please use start or stop as first argument"
- ;;
+ echo "Usage: $0 <start|stop|restart|status>"
+ exit 1
+ ;;
esac
[Unit]
Description=Redis Sentinel target allowing to start/stop all redis-sentinel@.service instances at once
[Unit]
Description=Redis for Icinga
After=network.target
PartOf=icinga-redis-sentinel.target
[Service]
Type=notify
User=icinga-redis
Group=icinga-redis
PrivateTmp=true
PIDFile=/var/run/icinga-redis/sentinel-%i.pid
ExecStart=/usr/sbin/icinga-redis-sentinel /etc/icinga-redis/sentinel-%i.conf
LimitNOFILE=10240
Restart=on-failure
[Install]
WantedBy=multi-user.target icinga-redis.target
-------------------------------------------------------------------
Thu Jun 6 20:43:34 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
- update to 5.0.5
Major changes from the Redis 5 series:
1. The new Stream data type.
https://redis.io/topics/streams-intro
2. New Redis modules APIs: Timers, Cluster and Dictionary APIs.
3. RDB now store LFU and LRU information.
4. The cluster manager was ported from Ruby (redis-trib.rb) to C
code inside redis-cli. Check `redis-cli --cluster help` for
more info.
5. New sorted set commands: ZPOPMIN/MAX and blocking variants.
6. Active defragmentation version 2.
7. Improvemenets in HyperLogLog implementations.
8. Better memory reporting capabilities.
9. Many commands with sub-commands now have an HELP subcommand.
10. Better performances when clients connect and disconnect
often.
11. Many bug fixes and other random improvements.
12. Jemalloc was upgraded to version 5.1
13. CLIENT UNBLOCK and CLIENT ID.
14. The LOLWUT command was added. http://antirez.com/news/123
15. We no longer use the "slave" word if not for API backward
compatibility.
16. Differnet optimizations in the networking layer.
17. Lua improvements:
- Better propagation of Lua scripts to replicas / AOF.
- Lua scripts can now timeout and get in -BUSY state in the
replica as well.
18. Dynamic HZ to balance idle CPU usage with responsiveness.
19. The Redis core was refactored and improved in many ways.
However the list above really does not do justice to the changes
of Redis 5 since the core was improved in many ways during the
development of the new version. However certain changes were back
ported into Redis 4 once they were sensed as safe, because many
improvements were hard to distinguish from fixes.
The most important user facing improvement is without doubts the
introduction of the new general purpose data type after years:
the streams.
Note that we worked to improve and fix streams till a few hours
ago, so while we are not aware of critical bugs in this release,
surely there is to handle it with some care for the first weeks.
Bug reporting will be highly appreciated and we are ready to work
immediately to release 5.0.1 once there is enough important stuff
to justify a new release (probably soon).
People not using the streams can have probably a better
production-ready experience with Redis 5, also because many
internals are shared with Redis 4 so the jump is not as big as it
was between 3.2 and 4 in terms of how things internally work.
Well, many thanks to the Redis community and the developers that
made this release possible, contributing bug reports, patches,
new features, working on the clients, sometimes debugging
problems for days. Also thank to everybody that adopted Redis for
their use cases making things work for users worldwide.
see installed /usr/share/doc/packages/redis/00-RELEASENOTES
- refreshed patches to apply cleanly again:
redis-conf.patch
redis-enable-bactrace-on-x86-ia64-and_arm32_only.patch
reproducible.patch
-------------------------------------------------------------------
Mon Nov 26 16:27:53 UTC 2018 - Andrey Karepin <egdfree@opensuse.org>
- update systemd unit file to fix redis shutdown immedaiate after start
-------------------------------------------------------------------
Fri Sep 7 12:03:31 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
- make sure that disabling/restarting servers works
https://nordisch.org/posts/hooking-up-instantiated-services-with-rpm/
-------------------------------------------------------------------
Thu Sep 6 19:03:06 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
- make check && true -> make check || true
This was probably meant to catch an error in the test suite, but
with && it would only return true if it would return true
already.
-------------------------------------------------------------------
Thu Sep 6 17:01:14 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
- added systemd unit file file redis-sentinel
- the unit file uses the same multiple instance mechanism as the
normal redis unit file
systemctl start redis-sentinel@default will look for
/etc/redis/sentinel-default.conf
and expects a pid file
/var/run/redis/sentinel-default.pid
Please make sure your sentinel config sets the pid file.
- adapted the default sentinel.conf.example to set the pid file
and the log file similar to the normal redis.conf:
/var/log/redis/sentinel-<instancename>.log
/var/run/redis/sentinel-<instancename>.pid
The unit file checks for the pid file so please adapt your
local sentinel configs.
Changed: redis-conf.patch
- adapt and restructure README.SUSE
- move the LimitNoFile to the service file itself so the user
do not have to manually do that step for every instance
- move the apache integration into its own section
- add section for redis-sentinel
- install sentinel example config with group write permissions
to indicate that the actually config needs to be writable.
-------------------------------------------------------------------
Thu Sep 6 15:08:28 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
- replace some duplicate binaries with symlinks similar to what the
fedora package does
-------------------------------------------------------------------
Fri Aug 17 00:33:26 UTC 2018 - ilya@ilya.pp.ua
- Refresh spec-file.
- Update to 4.0.11
* https://raw.githubusercontent.com/antirez/redis/4.0.11/00-RELEASENOTES
* The disconnection time between the master and slave was reset
in an incorrect place, sometimes a good slave will not be able
to failover because it claims it was disconnected for too much
time from the master.
* A replication bug, rare to trigger but non impossible, is in
Redis for years. It was lately discovered at Redis Labs and
fixed by Oran Agra. It may cause disconnections,
desynchronizations and other issues.
* RANDOMKEY may go in infinite loop on rare situations. Now fixed.
* EXISTS now works in a more consistent way on slaves.
* Sentinel: backport of an option to deny a potential security
problem when the SENTINEL command is used to configure an
arbitrary script to execute.
-------------------------------------------------------------------
Wed Jul 11 17:08:01 UTC 2018 - bwiedemann@suse.com
- Add reproducible.patch to have fixed hostname and date (boo#1047218)
-------------------------------------------------------------------
Fri Jun 15 10:17:06 UTC 2018 - mrueckert@suse.de
- update to 4.0.10 (boo#1097430) CVE-2018-11218 CVE-2018-11219
https://raw.githubusercontent.com/antirez/redis/4.0.10/00-RELEASENOTES
- Important security issues related to the Lua scripting engine.
Please check https://github.com/antirez/redis/issues/5017 for
more information.
- A bug with SCAN, SSCAN, HSCAN and ZSCAN, that may not return
all the elements. We also add a regression test that can
trigger the issue often when present, and may in theory be able
to find unrelated regressions.
- A PSYNC2 bug is fixed: Redis should not expire keys when saving
RDB files because otherwise it is no longer possible to use
such RDB file as a base for partial resynchronization. It no
longer represents the right state.
- Compatibility of AOF with RDB preamble when the RDB checksum is
disabled.
- Sentinel bug that in some cases prevented Sentinel to detect
that the master was down immediately. A delay was added to the
detection.
- refreshed patches to apply cleanly again
redis-conf.patch
redis-initscript.patch
-------------------------------------------------------------------
Tue Apr 17 16:13:17 UTC 2018 - guillaume.gardet@opensuse.org
- Update redis-enable-bactrace-on-x86-and-ia64-only.patch to handle
arm and rename it to redis-enable-bactrace-on-x86-ia64-and_arm32_only.patch
- Add redis-disable_integration_logging.patch to disable logging test
when backtrace is not enabled
-------------------------------------------------------------------
Thu Apr 12 13:13:49 UTC 2018 - ilya@ilya.pp.ua
- Update to 4.0.9
* https://raw.githubusercontent.com/antirez/redis/4.0.9/00-RELEASENOTES
* Critical upgrade for users using AOF with the fsync policy set to "always".
* Latency monitor could report wrong latencies under certain conditions.
* AOF rewriting could fail when a backgronud rewrite is triggered and
at the same time the AOF is switched on/off.
* Redis Cluster crash-recovery safety improved.
* Redis Cluster has now the ability to configure certain slaves so that
they'll never attempt a failover.
* Keyspace notifications API in modules.
* RM_Call() is now faster by reusing the same client.
* Tracking of the percentage of keys already logically expired but yet
not evicted.
-------------------------------------------------------------------
Thu Feb 8 23:23:58 UTC 2018 - ilya@ilya.pp.ua
- Update to 4.0.8
* Release notes: https://raw.githubusercontent.com/antirez/redis/4.0.8/00-RELEASENOTES
* Fix crash Redis Cluster instances during deletions.
-------------------------------------------------------------------
Sun Jan 28 15:24:25 UTC 2018 - ilya@ilya.pp.ua
- Update to 4.0.7
* Release notes: https://raw.githubusercontent.com/antirez/redis/4.0.7/00-RELEASENOTES
* Many 32 bit overflows were addressed in order to allow to use Redis with
a very significant amount of data, memory size permitting.
* MEMORY USAGE fixed for the list type.
* Allow read-only scripts in Redis Cluster.
* Fix AOF pipes setup in edge case.
* AUTH option for MIGRATE.
* HyperLogLogs are no longer converted from sparse to dense in order
to be merged.
* Fix AOF rewrite dead loop under edge cases.
* Fix processing of large bulk strings (>= 2GB).
* Added RM_UnlinkKey in modules API.
* Fix Redis Cluster crashes when certain commands with a variable number
of arguments are called in an improper way.
* Fix memory leak in lazyfree engine.
* Fix many potentially successful partial synchronizations that end
doing a full SYNC, because of a bug destroying the replication
backlog on the slave. So after a failover the slave was often not able
to PSYNC with masters, and a full SYNC was triggered. The bug only
happened after 1 hour of uptime so escaped the unit tests.
* Improve anti-affinity in master/slave allocation for Redis Cluster
when the cluster is created.
* Improve output buffer handling for slaves, by not limiting the amount
of writes a slave could receive.
-------------------------------------------------------------------
Thu Jan 4 15:47:48 UTC 2018 - ilya@ilya.pp.ua
- Update to 4.0.6
* Release notes: https://raw.githubusercontent.com/antirez/redis/4.0.6/00-RELEASENOTES
* PSYNC2: More errors in the fixes for PSYNC2 (CRITICAL).
* Quicklist: change the len of quicklist to unsigned long.
* Quicklist: fix the return value of quicklistCount.
* Refactoring: improve luaCreateFunction() API.
* Remove useless variable check from luaCreateFunction().
* Fix issue #4505, Lua RDB AUX field loading of existing scripts.
* Regression test for #4505 (Lua AUX field loading).
* DEBUG change-repl-id implemented.
* Buffer overflows occurring reading redis.conf CVE-2017-15047 (bsc#1061967)
-------------------------------------------------------------------
Wed Nov 1 09:01:44 UTC 2017 - mpluskal@suse.com
- Update changelog with CVE reference
-------------------------------------------------------------------
Sun Oct 8 15:22:54 UTC 2017 - ilya@ilya.pp.ua
- Drop SLE 11 support.
- Refresh spec-file.
- Update to 4.0.2
* Release notes: https://raw.githubusercontent.com/antirez/redis/4.0.2/00-RELEASENOTES
* Different replication fixes to PSYNC2, the new 4.0 replication engine.
* Modules thread safe contexts were introduced. They are an experimental
API right now, but the API is considered to be stable and usable when needed.
* SLOWLOG now logs the offending client name and address. Note that this is a
backward compatibility breakage in case old code assumes that the slowlog
entry is composed of exactly three entries.
* The modules native data types RDB format changed.
* The AOF check utility is now able to deal with RDB preambles.
* GEORADIUS_RO and GEORADIUSBYMEMBER_RO variants, not supporting the STORE option,
were added in order to allow read-only scaling of such queries.
* HSET is now variadic, and HMSET is considered deprecated
(but will be supported for years to come). Please use HSET in new code.
* GEORADIUS huge radius (>= ~6000 km) corner cases fixed,
certain elements near the edges were not returned.
* DEBUG DIGEST modules API added.
* HyperLogLog commands no longer crash on certain input (non HLL) strings.
* Fixed SLAVEOF inside MULTI/EXEC blocks.
* Many other minor bug fixes and improvements.
-------------------------------------------------------------------
Wed Jun 21 16:28:36 UTC 2017 - chris@computersalat.de
- cleanup service file
- add redis.sysctl file
- update README.SUSE
* add info for socket usage per service
* add info for limits per service (LimitNOFILE=10240)
-------------------------------------------------------------------
Thu May 18 12:43:42 UTC 2017 - vsistek@suse.com
- Update to version 3.2.9
* A few rarely harmful bugs were fixed.
- Changes accumulated from 3.2.8
Two important bug fixes, the first of one is critical:
* Apparently Jemalloc 4.4.0 may contain a deadlock under
particular conditions. See
https://github.com/antirez/redis/issues/3799.
We reverted back to the previously used Jemalloc versions and
plan to upgrade Jemalloc again after having more info about the
cause of the bug.
* MIGRATE could crash the server after a socket error. See for
reference: https://github.com/antirez/redis/issues/3796.
-------------------------------------------------------------------
Wed Feb 1 12:33:53 UTC 2017 - mpluskal@suse.com
- Update to version 3.2.7
* This release fixes important security and correctness issues
(boo#1064980 CVE-2016-10517)
-------------------------------------------------------------------
Fri Jan 20 10:29:19 UTC 2017 - rmaliska@suse.com
- update to redis 3.2.6
* fixes for GEORADIUS, BITFIELD and Redis Cluster minor fixes.
- update 3.2.5
* This release only fixes a compilation issue due to the
missing -ldl at linking time.
-------------------------------------------------------------------
Mon Oct 24 08:39:02 UTC 2016 - astieger@suse.com
- update to redis 3.2.4, including fixes for security issues:
* CVE-2016-8339: CONFIG SET client-output-buffer-limit Code
Execution Vulnerability [boo#1002351]
- bug fixes:
* TCP binding bug fixed when only certain addresses were available
for a given port
* improved crash report
* Fix for Redis Cluster redis-trib displaying of info after
creating a new cluster.
-------------------------------------------------------------------
Fri Aug 5 18:17:24 UTC 2016 - astieger@suse.com
- redis 3.2.3:
* fix replication delay issue
* drop CVE-2013-7458.patch, upstream
-------------------------------------------------------------------
Sat Jul 30 12:30:02 UTC 2016 - jengelh@inai.de
- Test for user/group existence before creating them.
Request shadow to be present for the scriptlet.
-------------------------------------------------------------------
Sat Jul 30 10:06:22 UTC 2016 - astieger@suse.com
- Fix CVE-2013-7458: unsafe permissions of command line history
boo#991250, adding CVE-2013-7458.patch
-------------------------------------------------------------------
Sat Jul 30 09:59:59 UTC 2016 - astieger@suse.com