From 0e8a54a51730260907f53e8c0d24d775dc0d7af3 Mon Sep 17 00:00:00 2001 From: Christopher Meng Date: Thu, 17 Jul 2014 09:29:20 +0800 Subject: [PATCH] Update to 2.8.13 --- .gitignore | 1 + redis-sentinel.init | 2 +- redis-sentinel.service | 2 +- redis-server.service | 2 +- redis.spec | 18 ++++++++++++++---- sources | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 16a6665..2ddcfea 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /redis-2.6.16.tar.gz /redis-2.8.11.tar.gz /redis-2.8.12.tar.gz +/redis-2.8.13.tar.gz diff --git a/redis-sentinel.init b/redis-sentinel.init index f50f05a..dd2b7ec 100644 --- a/redis-sentinel.init +++ b/redis-sentinel.init @@ -26,7 +26,7 @@ start() { touch $PIDFILE chown redis:redis $RUNDIR $PIDFILE chmod 750 $RUNDIR - daemon --user ${REDIS_USER-redis} --pidfile=$PIDFILE "$EXEC $SENTINEL_CONFIG --sentinel" + daemon --user ${REDIS_USER-redis} --pidfile=$PIDFILE "$EXEC $SENTINEL_CONFIG" retval=$? echo [ $retval -eq 0 ] && touch $lockfile diff --git a/redis-sentinel.service b/redis-sentinel.service index faa0eb6..f71e33a 100644 --- a/redis-sentinel.service +++ b/redis-sentinel.service @@ -4,7 +4,7 @@ After=network.target [Service] ExecStartPre=/usr/bin/mkdir -p /var/lib/redis -ExecStart=/usr/sbin/redis-sentinel /etc/sentinel.conf +ExecStart=/usr/bin/redis-sentinel /etc/sentinel.conf ExecStop=/usr/bin/redis-cli shutdown User=redis Group=redis diff --git a/redis-server.service b/redis-server.service index 6d7a5f5..a8411b1 100644 --- a/redis-server.service +++ b/redis-server.service @@ -4,7 +4,7 @@ After=network.target [Service] ExecStartPre=/usr/bin/mkdir -p /var/lib/redis -ExecStart=/usr/sbin/redis-server /etc/redis.conf +ExecStart=/usr/bin/redis-server /etc/redis.conf ExecStop=/usr/bin/redis-cli shutdown User=redis Group=redis diff --git a/redis.spec b/redis.spec index fb3f7ab..13063d8 100644 --- a/redis.spec +++ b/redis.spec @@ -3,7 +3,9 @@ %global with_perftools 0 # Prior to redis 2.8 sentinel didn't work correctly. +%if 0%{?fedora} >= 21 || 0%{?el} >= 7 %global with_sentinel 1 +%endif %if 0%{?fedora} >= 15 || 0%{?el} >= 7 %global with_systemd 1 @@ -19,7 +21,7 @@ %endif Name: redis -Version: 2.8.12 +Version: 2.8.13 Release: 1%{?dist} Summary: A persistent caching system, key-value and data structures database License: BSD @@ -91,8 +93,7 @@ You can use Redis from most programming languages also. %prep %setup -q -rm -rvf deps/jemalloc - +rm -frv deps/jemalloc %patch0 -p1 %patch1 -p1 %patch2 -p1 @@ -113,7 +114,7 @@ sed -i -e 's|$(CFLAGS)|%{optflags}|g' deps/linenoise/Makefile sed -i -e 's|$(LDFLAGS)|%{?__global_ldflags}|g' deps/linenoise/Makefile %build -make %{?_smp_mflags} \ +%make_build \ DEBUG="" \ LDFLAGS="%{?__global_ldflags}" \ CFLAGS+="%{optflags}" \ @@ -184,7 +185,9 @@ exit 0 %endif %systemd_post %{name}-server.service %else +%if 0%{?with_sentinel} chkconfig --add %{name}-sentinel +%endif chkconfig --add %{name}-server %endif @@ -196,8 +199,10 @@ chkconfig --add %{name}-server %systemd_preun %{name}-server.service %else if [ $1 -eq 0 ] ; then +%if 0%{?with_sentinel} service %{name}-sentinel stop &> /dev/null chkconfig --del %{name}-sentinel &> /dev/null +%endif service %{name}-server stop &> /dev/null chkconfig --del %{name}-server &> /dev/null %endif @@ -210,7 +215,9 @@ chkconfig --del %{name}-server &> /dev/null %systemd_postun_with_restart %{name}-server.service %else if [ "$1" -ge "1" ] ; then +%if 0%{?with_sentinel} service %{name}-sentinel condrestart >/dev/null 2>&1 || : +%endif service %{name}-server condrestart >/dev/null 2>&1 || : fi %endif @@ -240,6 +247,9 @@ fi %endif %changelog +* Wed Jul 16 2014 Christopher Meng - 2.8.13-1 +- Update to 2.8.13 + * Tue Jun 24 2014 Christopher Meng - 2.8.12-1 - Update to 2.8.12 diff --git a/sources b/sources index f61ae76..80ad124 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -27645ca17ac1c269e67862fcc0f1d2e3 redis-2.8.12.tar.gz +ea92053cbb6f4eb8a4347dbaac7d7dff redis-2.8.13.tar.gz