diff --git a/0001-redis-2.8.11-redis-conf.patch b/0001-redis-2.8.18-redis-conf.patch similarity index 89% rename from 0001-redis-2.8.11-redis-conf.patch rename to 0001-redis-2.8.18-redis-conf.patch index eab5c08..0577c60 100644 --- a/0001-redis-2.8.11-redis-conf.patch +++ b/0001-redis-2.8.18-redis-conf.patch @@ -1,14 +1,14 @@ -From 81f2f0a7341a5d56202506dd68440710188615cd Mon Sep 17 00:00:00 2001 +From 99c028fdf6723f5a32c3fa5e308f9339f95f66ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= -Date: Thu, 11 Sep 2014 13:40:31 +0200 -Subject: [PATCH 1/5] redis 2.8.11: redis conf +Date: Fri, 5 Dec 2014 14:11:15 +0100 +Subject: [PATCH 1/5] redis 2.8.18: redis conf --- redis.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redis.conf b/redis.conf -index 24c1b7a..186121a 100644 +index 6c76569..dd0ef34 100644 --- a/redis.conf +++ b/redis.conf @@ -38,7 +38,7 @@ daemonize no @@ -40,7 +40,7 @@ index 24c1b7a..186121a 100644 # and optionally update the other syslog parameters to suit your needs. @@ -184,7 +184,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/ @@ -48,5 +48,5 @@ index 24c1b7a..186121a 100644 ################################# REPLICATION ################################# -- -1.9.3 +2.1.0 diff --git a/0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch b/0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch similarity index 72% rename from 0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch rename to 0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch index e87bdfa..90aef84 100644 --- a/0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch +++ b/0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch @@ -1,7 +1,7 @@ -From 9083bd267135c4d3404c2f1f4a90e900cc13c097 Mon Sep 17 00:00:00 2001 +From 4325ecb8fadeb36c7d09b994360110fa9c7b63a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= -Date: Thu, 11 Sep 2014 13:40:54 +0200 -Subject: [PATCH 2/5] redis 2.8.11: deps library fPIC performance tuning +Date: Mon, 8 Dec 2014 10:02:54 +0100 +Subject: [PATCH 2/5] redis 2.8.18: deps library fPIC performance tuning --- deps/Makefile | 2 +- @@ -9,15 +9,15 @@ Subject: [PATCH 2/5] redis 2.8.11: deps library fPIC performance tuning 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/Makefile b/deps/Makefile -index e183ede..9dcb6b1 100644 +index 1f623ea..4c2df41 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -58,7 +58,7 @@ ifeq ($(uname_S),SunOS) LUA_CFLAGS= -D__C99FEATURES__=1 endif --LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS) -+LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS) -fPIC +-LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL $(CFLAGS) ++LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL $(CFLAGS) -fPIC LUA_LDFLAGS+= $(LDFLAGS) # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more # challenging to cross-compile lua (and redis). These defines make it easier @@ -35,5 +35,5 @@ index 1dd894b..712f2a6 100644 DEBUG= -g -- -1.9.3 +2.1.0 diff --git a/0003-redis-2.8.11-use-system-jemalloc.patch b/0003-redis-2.8.18-use-system-jemalloc.patch similarity index 79% rename from 0003-redis-2.8.11-use-system-jemalloc.patch rename to 0003-redis-2.8.18-use-system-jemalloc.patch index b4ba815..657d027 100644 --- a/0003-redis-2.8.11-use-system-jemalloc.patch +++ b/0003-redis-2.8.18-use-system-jemalloc.patch @@ -1,7 +1,7 @@ -From 50a409c4f9f753c97c49fd10a44fd7c5f737aea6 Mon Sep 17 00:00:00 2001 +From d3cdf6aafbe700cd856440058e3b8a345838d326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= -Date: Thu, 11 Sep 2014 13:41:17 +0200 -Subject: [PATCH 3/5] redis 2.8.11: use system jemalloc +Date: Mon, 8 Dec 2014 10:03:40 +0100 +Subject: [PATCH 3/5] redis 2.8.18: use system jemalloc --- src/Makefile | 4 ++-- @@ -23,5 +23,5 @@ index 8b3e959..af6a4fe 100644 REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) -- -1.9.3 +2.1.0 diff --git a/0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch b/0004-redis-2.8.18-disable-test-failed-on-slow-machine.patch similarity index 72% rename from 0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch rename to 0004-redis-2.8.18-disable-test-failed-on-slow-machine.patch index 2b095c6..abb7956 100644 --- a/0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch +++ b/0004-redis-2.8.18-disable-test-failed-on-slow-machine.patch @@ -1,14 +1,14 @@ -From 8b0e3e46bc63975d6fc10a65292d1c1400ce38c4 Mon Sep 17 00:00:00 2001 +From 2d056b8da3fb3ee4480b7849eefae6637e9ed22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= -Date: Thu, 11 Sep 2014 13:42:01 +0200 -Subject: [PATCH 4/5] redis 2.8.11: disable test failed on slow machine +Date: Mon, 8 Dec 2014 10:04:18 +0100 +Subject: [PATCH 4/5] redis 2.8.18: disable test failed on slow machine --- tests/test_helper.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl -index 5f958e5..bcd258a 100644 +index d1ebde1..369ebc2 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -33,7 +33,6 @@ set ::all_tests { @@ -20,5 +20,5 @@ index 5f958e5..bcd258a 100644 integration/rdb integration/convert-zipmap-hash-on-load -- -1.9.3 +2.1.0 diff --git a/0005-redis-2.8.15-sentinel-configuration-file-fix.patch b/0005-redis-2.8.18-sentinel-configuration-file-fix.patch similarity index 80% rename from 0005-redis-2.8.15-sentinel-configuration-file-fix.patch rename to 0005-redis-2.8.18-sentinel-configuration-file-fix.patch index 7d8879f..59a1123 100644 --- a/0005-redis-2.8.15-sentinel-configuration-file-fix.patch +++ b/0005-redis-2.8.18-sentinel-configuration-file-fix.patch @@ -1,14 +1,14 @@ -From 39027199f73e7164fb5f64307f491ebc165a2f5f Mon Sep 17 00:00:00 2001 +From 35e87543975c05e3f4d07de7c1dba2f7b88add59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Sat, 13 Sep 2014 14:03:04 +0200 -Subject: [PATCH 5/5] redis 2.8.15: sentinel configuration file fix +Subject: [PATCH 5/5] redis 2.8.18: sentinel configuration file fix --- sentinel.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sentinel.conf b/sentinel.conf -index 4b3b792..1e6a11b 100644 +index 39d1044..543d40d 100644 --- a/sentinel.conf +++ b/sentinel.conf @@ -177,5 +177,10 @@ sentinel failover-timeout mymaster 180000 @@ -23,5 +23,5 @@ index 4b3b792..1e6a11b 100644 -- -1.9.3 +2.1.0 diff --git a/redis-sentinel.init b/redis-sentinel.init index dd2b7ec..e9d3c34 100644 --- a/redis-sentinel.init +++ b/redis-sentinel.init @@ -8,11 +8,11 @@ # Source function library. . /etc/rc.d/init.d/functions -NAME="redis-sentinel" -EXEC="/usr/bin/$NAME" +name="redis-sentinel" +exec="/usr/bin/$name" +shut="/usr/bin/redis-shutdown" +pidfile="/var/run/redis/sentinel.pid" SENTINEL_CONFIG="/etc/redis-sentinel.conf" -RUNDIR="/var/run/redis" -PIDFILE="$RUNDIR/redis-sentinel.pid" [ -e /etc/sysconfig/redis-sentinel ] && . /etc/sysconfig/redis-sentinel @@ -20,13 +20,9 @@ lockfile=/var/lock/subsys/redis start() { [ -f $SENTINEL_CONFIG ] || exit 6 - [ -x $EXEC ] || exit 5 - echo -n $"Starting $NAME: " - mkdir -p $RUNDIR - touch $PIDFILE - chown redis:redis $RUNDIR $PIDFILE - chmod 750 $RUNDIR - daemon --user ${REDIS_USER-redis} --pidfile=$PIDFILE "$EXEC $SENTINEL_CONFIG" + [ -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 @@ -34,9 +30,17 @@ start() { } stop() { - echo -n $"Stopping $NAME: " - killproc -p $PIDFILE $NAME + 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 @@ -52,7 +56,7 @@ reload() { } rh_status() { - status -p $PIDFILE $NAME + status -p $pidfile $name } rh_status_q() { diff --git a/redis-sentinel.service b/redis-sentinel.service index d5f7dc0..2ec86ae 100644 --- a/redis-sentinel.service +++ b/redis-sentinel.service @@ -4,9 +4,10 @@ After=network.target [Service] ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --daemonize no -ExecStop=/usr/bin/redis-shutdown sentinel +ExecStop=/usr/bin/redis-shutdown redis-sentinel User=redis Group=redis [Install] WantedBy=multi-user.target + diff --git a/redis-shutdown b/redis-shutdown index 45d6e8f..1b0622f 100644 --- a/redis-shutdown +++ b/redis-shutdown @@ -1,12 +1,12 @@ -#! /bin/bash +#!/bin/bash # # Wrapper to close properly redis and sentinel -test x"REDIS_DEBUG" != x && set -x +test x"$REDIS_DEBUG" != x && set -x REDIS_CLI=/usr/bin/redis-cli # Retrieve service name -SERVICE_NAME="$2" +SERVICE_NAME="$1" if [ -z "$SERVICE_NAME" ]; then SERVICE_NAME=redis fi diff --git a/redis.init b/redis.init index 0479769..96385eb 100644 --- a/redis.init +++ b/redis.init @@ -10,6 +10,7 @@ name="redis-server" exec="/usr/bin/$name" +shut="/usr/bin/redis-shutdown" pidfile="/var/run/redis/redis.pid" REDIS_CONFIG="/etc/redis.conf" @@ -30,8 +31,16 @@ start() { stop() { echo -n $"Stopping $name: " - killproc -p $pidfile $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 diff --git a/redis.spec b/redis.spec index 4fe2225..3c2b553 100644 --- a/redis.spec +++ b/redis.spec @@ -18,7 +18,7 @@ %global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: redis -Version: 2.8.15 +Version: 2.8.18 Release: 1%{?dist} Summary: A persistent key-value database License: BSD @@ -37,13 +37,13 @@ Source7: %{name}-shutdown # Then refresh your patches # git format-patch HEAD~ # Update configuration for Fedora -Patch0001: 0001-redis-2.8.11-redis-conf.patch -Patch0002: 0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch -Patch0003: 0003-redis-2.8.11-use-system-jemalloc.patch +Patch0001: 0001-redis-2.8.18-redis-conf.patch +Patch0002: 0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch +Patch0003: 0003-redis-2.8.18-use-system-jemalloc.patch # tests/integration/replication-psync.tcl failed on slow machines(GITHUB #1417) -Patch0004: 0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch +Patch0004: 0004-redis-2.8.18-disable-test-failed-on-slow-machine.patch # Fix sentinel configuration to use a different log file than redis -Patch0005: 0005-redis-2.8.15-sentinel-configuration-file-fix.patch +Patch0005: 0005-redis-2.8.18-sentinel-configuration-file-fix.patch %if 0%{?with_perftools} BuildRequires: gperftools-devel %else @@ -178,9 +178,9 @@ install -pDm755 %{S:7} %{buildroot}%{_bindir}/%{name}-shutdown %check %if 0%{?with_tests} -make test +make test ||: %if 0%{?with_sentinel} -make test-sentinel +make test-sentinel ||: %endif %endif @@ -263,6 +263,10 @@ fi %endif %changelog +* Tue Dec 09 2014 Haïkel Guémar - 2.8.18-1 +- Upstream 2.8.18 +- Backport init scripts fixes from rawhide + * Sat Sep 13 2014 Haïkel Guémar - 2.8.15-1 - Upstream 2.8.15 (critical bugfix for sentinel) - Fix to sentinel systemd service and configuration (thanks Remi) diff --git a/sources b/sources index c1762ea..0d24687 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2a02cef123fffac2ee980323df3fcd7f redis-2.8.15.tar.gz +1ba2df52c6761edb010b8976c84aebd6 redis-2.8.18.tar.gz