Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Haïkel Guémar | 66aaed85f1 | |
Haïkel Guémar | cb253899f7 | |
Christopher Meng | 7fdbc54f1f | |
Christopher Meng | e205ef322f |
|
@ -12,4 +12,11 @@
|
||||||
/redis-2.6.7.tar.gz
|
/redis-2.6.7.tar.gz
|
||||||
/redis-2.6.13.tar.gz
|
/redis-2.6.13.tar.gz
|
||||||
/redis-2.6.16.tar.gz
|
/redis-2.6.16.tar.gz
|
||||||
|
/redis-2.6.17.tar.gz
|
||||||
/redis-2.8.11.tar.gz
|
/redis-2.8.11.tar.gz
|
||||||
|
/redis-2.8.12.tar.gz
|
||||||
|
/redis-2.8.13.tar.gz
|
||||||
|
/redis-2.8.14.tar.gz
|
||||||
|
/redis-2.8.15.tar.gz
|
||||||
|
/redis-2.8.17.tar.gz
|
||||||
|
/redis-2.8.18.tar.gz
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
Index: redis-2.8.11/redis.conf
|
From 99c028fdf6723f5a32c3fa5e308f9339f95f66ca Mon Sep 17 00:00:00 2001
|
||||||
===================================================================
|
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||||
--- redis-2.8.11.orig/redis.conf
|
Date: Fri, 5 Dec 2014 14:11:15 +0100
|
||||||
+++ redis-2.8.11/redis.conf
|
Subject: [PATCH 1/5] redis 2.8.18: redis conf
|
||||||
@@ -34,11 +34,11 @@
|
|
||||||
|
---
|
||||||
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
redis.conf | 8 ++++----
|
||||||
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
-daemonize no
|
|
||||||
+daemonize yes
|
diff --git a/redis.conf b/redis.conf
|
||||||
|
index 6c76569..dd0ef34 100644
|
||||||
|
--- a/redis.conf
|
||||||
|
+++ b/redis.conf
|
||||||
|
@@ -38,7 +38,7 @@ daemonize no
|
||||||
|
|
||||||
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
|
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
|
||||||
# default. You can specify a custom pid file location here.
|
# default. You can specify a custom pid file location here.
|
||||||
|
@ -25,15 +29,6 @@ Index: redis-2.8.11/redis.conf
|
||||||
|
|
||||||
# Specify the path for the Unix socket that will be used to listen for
|
# Specify the path for the Unix socket that will be used to listen for
|
||||||
# incoming connections. There is no default, so Redis will not listen
|
# incoming connections. There is no default, so Redis will not listen
|
||||||
@@ -87,7 +87,7 @@ timeout 0
|
|
||||||
# On other kernels the period depends on the kernel configuration.
|
|
||||||
#
|
|
||||||
# A reasonable value for this option is 60 seconds.
|
|
||||||
-tcp-keepalive 0
|
|
||||||
+tcp-keepalive 60
|
|
||||||
|
|
||||||
# Specify the server verbosity level.
|
|
||||||
# This can be one of:
|
|
||||||
@@ -100,7 +100,7 @@ loglevel notice
|
@@ -100,7 +100,7 @@ loglevel notice
|
||||||
# Specify the log file name. Also the empty string can be used to force
|
# 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
|
# Redis to log on the standard output. Note that if you use standard
|
||||||
|
@ -45,10 +40,13 @@ Index: redis-2.8.11/redis.conf
|
||||||
# and optionally update the other syslog parameters to suit your needs.
|
# and optionally update the other syslog parameters to suit your needs.
|
||||||
@@ -184,7 +184,7 @@ dbfilename dump.rdb
|
@@ -184,7 +184,7 @@ dbfilename dump.rdb
|
||||||
# The Append Only File will also be created inside this directory.
|
# The Append Only File will also be created inside this directory.
|
||||||
#
|
#
|
||||||
# Note that you must specify a directory here, not a file name.
|
# Note that you must specify a directory here, not a file name.
|
||||||
-dir ./
|
-dir ./
|
||||||
+dir /var/lib/redis/
|
+dir /var/lib/redis/
|
||||||
|
|
||||||
################################# REPLICATION #################################
|
################################# REPLICATION #################################
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
From 4325ecb8fadeb36c7d09b994360110fa9c7b63a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||||
|
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 +-
|
||||||
|
deps/linenoise/Makefile | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/deps/Makefile b/deps/Makefile
|
||||||
|
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 -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
|
||||||
|
diff --git a/deps/linenoise/Makefile b/deps/linenoise/Makefile
|
||||||
|
index 1dd894b..712f2a6 100644
|
||||||
|
--- a/deps/linenoise/Makefile
|
||||||
|
+++ b/deps/linenoise/Makefile
|
||||||
|
@@ -2,7 +2,7 @@ STD=
|
||||||
|
WARN= -Wall
|
||||||
|
OPT= -Os
|
||||||
|
|
||||||
|
-R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
|
||||||
|
+R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -fPIC
|
||||||
|
R_LDFLAGS= $(LDFLAGS)
|
||||||
|
DEBUG= -g
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From d3cdf6aafbe700cd856440058e3b8a345838d326 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||||
|
Date: Mon, 8 Dec 2014 10:03:40 +0100
|
||||||
|
Subject: [PATCH 3/5] redis 2.8.18: use system jemalloc
|
||||||
|
|
||||||
|
---
|
||||||
|
src/Makefile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/Makefile b/src/Makefile
|
||||||
|
index 8b3e959..af6a4fe 100644
|
||||||
|
--- a/src/Makefile
|
||||||
|
+++ b/src/Makefile
|
||||||
|
@@ -90,8 +90,8 @@ endif
|
||||||
|
|
||||||
|
ifeq ($(MALLOC),jemalloc)
|
||||||
|
DEPENDENCY_TARGETS+= jemalloc
|
||||||
|
- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
|
||||||
|
- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
|
||||||
|
+ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc
|
||||||
|
+ FINAL_LIBS+= -ljemalloc -ldl
|
||||||
|
endif
|
||||||
|
|
||||||
|
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
From 2d056b8da3fb3ee4480b7849eefae6637e9ed22c Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||||
|
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 d1ebde1..369ebc2 100644
|
||||||
|
--- a/tests/test_helper.tcl
|
||||||
|
+++ b/tests/test_helper.tcl
|
||||||
|
@@ -33,7 +33,6 @@ set ::all_tests {
|
||||||
|
integration/replication-2
|
||||||
|
integration/replication-3
|
||||||
|
integration/replication-4
|
||||||
|
- integration/replication-psync
|
||||||
|
integration/aof
|
||||||
|
integration/rdb
|
||||||
|
integration/convert-zipmap-hash-on-load
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 35e87543975c05e3f4d07de7c1dba2f7b88add59 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||||
|
Date: Sat, 13 Sep 2014 14:03:04 +0200
|
||||||
|
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 39d1044..543d40d 100644
|
||||||
|
--- a/sentinel.conf
|
||||||
|
+++ b/sentinel.conf
|
||||||
|
@@ -177,5 +177,10 @@ sentinel failover-timeout mymaster 180000
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# sentinel client-reconfig-script mymaster /var/redis/reconfig.sh
|
||||||
|
+#
|
||||||
|
+# 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 /var/log/redis/sentinel.log
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
Index: redis-2.8.11/deps/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- redis-2.8.11.orig/deps/Makefile
|
|
||||||
+++ redis-2.8.11/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_LDFLAGS+= $(LDFLAGS)
|
|
||||||
|
|
||||||
lua: .make-prerequisites
|
|
||||||
Index: redis-2.8.11/deps/linenoise/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- redis-2.8.11.orig/deps/linenoise/Makefile
|
|
||||||
+++ redis-2.8.11/deps/linenoise/Makefile
|
|
||||||
@@ -2,7 +2,7 @@ STD=
|
|
||||||
WARN= -Wall
|
|
||||||
OPT= -Os
|
|
||||||
|
|
||||||
-R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
|
|
||||||
+R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -fPIC
|
|
||||||
R_LDFLAGS= $(LDFLAGS)
|
|
||||||
DEBUG= -g
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
Index: redis-2.8.11/tests/test_helper.tcl
|
|
||||||
===================================================================
|
|
||||||
--- redis-2.8.11.orig/tests/test_helper.tcl
|
|
||||||
+++ redis-2.8.11/tests/test_helper.tcl
|
|
||||||
@@ -33,7 +33,6 @@ set ::all_tests {
|
|
||||||
integration/replication-2
|
|
||||||
integration/replication-3
|
|
||||||
integration/replication-4
|
|
||||||
- integration/replication-psync
|
|
||||||
integration/aof
|
|
||||||
integration/rdb
|
|
||||||
integration/convert-zipmap-hash-on-load
|
|
|
@ -1,15 +0,0 @@
|
||||||
Index: redis-2.8.11/src/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- redis-2.8.11.orig/src/Makefile
|
|
||||||
+++ redis-2.8.11/src/Makefile
|
|
||||||
@@ -84,8 +84,8 @@ endif
|
|
||||||
|
|
||||||
ifeq ($(MALLOC),jemalloc)
|
|
||||||
DEPENDENCY_TARGETS+= jemalloc
|
|
||||||
- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
|
|
||||||
- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
|
|
||||||
+ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc
|
|
||||||
+ FINAL_LIBS+= -ljemalloc -ldl
|
|
||||||
endif
|
|
||||||
|
|
||||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
|
|
@ -26,7 +26,7 @@ start() {
|
||||||
touch $PIDFILE
|
touch $PIDFILE
|
||||||
chown redis:redis $RUNDIR $PIDFILE
|
chown redis:redis $RUNDIR $PIDFILE
|
||||||
chmod 750 $RUNDIR
|
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=$?
|
retval=$?
|
||||||
echo
|
echo
|
||||||
[ $retval -eq 0 ] && touch $lockfile
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
|
|
@ -3,9 +3,8 @@ Description=Redis Sentinel
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/mkdir -p /var/lib/redis
|
ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --daemonize no
|
||||||
ExecStart=/usr/sbin/redis-sentinel /etc/sentinel.conf
|
ExecStop=/usr/bin/redis-shutdown sentinel
|
||||||
ExecStop=/usr/bin/redis-cli shutdown
|
|
||||||
User=redis
|
User=redis
|
||||||
Group=redis
|
Group=redis
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/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="$2"
|
||||||
|
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 port from config file
|
||||||
|
PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE`
|
||||||
|
|
||||||
|
# Just in case, use default port
|
||||||
|
if [ "$SERVICE_NAME" = redis ]; then
|
||||||
|
PORT=${PORT:-6379}
|
||||||
|
else
|
||||||
|
PORT=${PORT:-26739}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# shutdown the service properly
|
||||||
|
$REDIS_CLI -p $PORT shutdown
|
|
@ -8,11 +8,10 @@
|
||||||
# Source function library.
|
# Source function library.
|
||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
NAME="redis-server"
|
name="redis-server"
|
||||||
EXEC="/usr/bin/$NAME"
|
exec="/usr/bin/$name"
|
||||||
|
pidfile="/var/run/redis/redis.pid"
|
||||||
REDIS_CONFIG="/etc/redis.conf"
|
REDIS_CONFIG="/etc/redis.conf"
|
||||||
RUNDIR="/var/run/redis"
|
|
||||||
PIDFILE="$RUNDIR/redis.pid"
|
|
||||||
|
|
||||||
[ -e /etc/sysconfig/redis ] && . /etc/sysconfig/redis
|
[ -e /etc/sysconfig/redis ] && . /etc/sysconfig/redis
|
||||||
|
|
||||||
|
@ -20,13 +19,9 @@ lockfile=/var/lock/subsys/redis
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -f $REDIS_CONFIG ] || exit 6
|
[ -f $REDIS_CONFIG ] || exit 6
|
||||||
[ -x $EXEC ] || exit 5
|
[ -x $exec ] || exit 5
|
||||||
echo -n $"Starting $NAME: "
|
echo -n $"Starting $name: "
|
||||||
mkdir -p $RUNDIR
|
daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG --daemonize yes --pidfile $pidfile"
|
||||||
touch $PIDFILE
|
|
||||||
chown redis:redis $RUNDIR $PIDFILE
|
|
||||||
chmod 750 $RUNDIR
|
|
||||||
daemon --user ${REDIS_USER-redis} "$EXEC $REDIS_CONFIG"
|
|
||||||
retval=$?
|
retval=$?
|
||||||
echo
|
echo
|
||||||
[ $retval -eq 0 ] && touch $lockfile
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
@ -34,8 +29,8 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo -n $"Stopping $NAME: "
|
echo -n $"Stopping $name: "
|
||||||
killproc -p $PIDFILE $NAME
|
killproc -p $pidfile $name
|
||||||
retval=$?
|
retval=$?
|
||||||
echo
|
echo
|
||||||
[ $retval -eq 0 ] && rm -f $lockfile
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
@ -52,7 +47,7 @@ reload() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rh_status() {
|
rh_status() {
|
||||||
status -p $PIDFILE $NAME
|
status -p $pidfile $name
|
||||||
}
|
}
|
||||||
|
|
||||||
rh_status_q() {
|
rh_status_q() {
|
|
@ -3,11 +3,11 @@ Description=Redis persistent key-value database
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/mkdir -p /var/lib/redis
|
ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no
|
||||||
ExecStart=/usr/sbin/redis-server /etc/redis.conf
|
ExecStop=/usr/bin/redis-shutdown
|
||||||
ExecStop=/usr/bin/redis-cli shutdown
|
|
||||||
User=redis
|
User=redis
|
||||||
Group=redis
|
Group=redis
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
116
redis.spec
116
redis.spec
|
@ -1,42 +1,49 @@
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
%global with_perftools 0
|
%global with_perftools 0
|
||||||
|
|
||||||
# Prior to redis 2.8 sentinel didn't work correctly.
|
# redis 2.8 sentinel is the first upstream version to work
|
||||||
|
# however as packaged here it is entirely broken
|
||||||
|
# FIXME: consider removal into a separate package
|
||||||
|
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
|
||||||
%global with_sentinel 1
|
%global with_sentinel 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} >= 15 || 0%{?el} >= 7
|
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||||
%global with_systemd 1
|
%global with_systemd 1
|
||||||
%else
|
%else
|
||||||
%global with_systemd 0
|
%global with_systemd 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# tcl 8.4 in EL5.
|
# Tests fail in mock, not in local build.
|
||||||
%if 0%{?el} && 0%{?el} <= 5
|
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
|
||||||
%global with_tests 0
|
|
||||||
%else
|
|
||||||
%global with_tests 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: redis
|
Name: redis
|
||||||
Version: 2.8.11
|
Version: 2.8.18
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A persistent caching system, key-value and data structures database
|
Summary: A persistent key-value database
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://redis.io
|
URL: http://redis.io
|
||||||
Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz
|
Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}.logrotate
|
Source1: %{name}.logrotate
|
||||||
Source2: %{name}-sentinel.service
|
Source2: %{name}-sentinel.service
|
||||||
Source3: %{name}-server.service
|
Source3: %{name}.service
|
||||||
Source4: %{name}.tmpfiles
|
Source4: %{name}.tmpfiles
|
||||||
Source5: %{name}-sentinel.init
|
Source5: %{name}-sentinel.init
|
||||||
Source6: %{name}-server.init
|
Source6: %{name}.init
|
||||||
|
Source7: %{name}-shutdown
|
||||||
|
# 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
|
# Update configuration for Fedora
|
||||||
Patch0: redis-2.8.11-redis-conf-location-variables.patch
|
Patch0001: 0001-redis-2.8.18-redis-conf.patch
|
||||||
Patch1: redis-2.8.11-deps-library-fPIC-performance-tuning.patch
|
Patch0002: 0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch
|
||||||
Patch2: redis-2.8.11-use-system-jemalloc.patch
|
Patch0003: 0003-redis-2.8.18-use-system-jemalloc.patch
|
||||||
# tests/integration/replication-psync.tcl failed on slow machines(GITHUB #1417)
|
# tests/integration/replication-psync.tcl failed on slow machines(GITHUB #1417)
|
||||||
Patch3: 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.18-sentinel-configuration-file-fix.patch
|
||||||
%if 0%{?with_perftools}
|
%if 0%{?with_perftools}
|
||||||
BuildRequires: gperftools-devel
|
BuildRequires: gperftools-devel
|
||||||
%else
|
%else
|
||||||
|
@ -51,6 +58,8 @@ BuildRequires: systemd
|
||||||
%if 0%{?with_tests}
|
%if 0%{?with_tests}
|
||||||
BuildRequires: tcl
|
BuildRequires: tcl
|
||||||
%endif
|
%endif
|
||||||
|
# Required for redis-shutdown
|
||||||
|
Requires: /bin/awk
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
@ -91,14 +100,12 @@ You can use Redis from most programming languages also.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
rm -rvf deps/jemalloc
|
rm -frv deps/jemalloc
|
||||||
|
%patch0001 -p1
|
||||||
%patch0 -p1
|
%patch0002 -p1
|
||||||
%patch1 -p1
|
%patch0003 -p1
|
||||||
%patch2 -p1
|
%patch0004 -p1
|
||||||
%if 0%{?with_tests}
|
%patch0005 -p1
|
||||||
%patch3 -p1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# No hidden build.
|
# No hidden build.
|
||||||
sed -i -e 's|\t@|\t|g' deps/lua/src/Makefile
|
sed -i -e 's|\t@|\t|g' deps/lua/src/Makefile
|
||||||
|
@ -156,22 +163,30 @@ install -pDm644 %{S:4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name}-sentinel
|
install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name}-sentinel
|
||||||
%endif
|
%endif
|
||||||
install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}-server
|
install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fix non-standard-executable-perm error.
|
# Fix non-standard-executable-perm error.
|
||||||
chmod 755 %{buildroot}%{_bindir}/%{name}-*
|
chmod 755 %{buildroot}%{_bindir}/%{name}-*
|
||||||
|
|
||||||
|
# create redis-sentinel command as described on
|
||||||
|
# http://redis.io/topics/sentinel
|
||||||
|
ln -s %{name}-server %{buildroot}%{_bindir}/%{name}-sentinel
|
||||||
|
|
||||||
|
# Install redis-shutdown
|
||||||
|
install -pDm755 %{S:7} %{buildroot}%{_bindir}/%{name}-shutdown
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?with_tests}
|
%if 0%{?with_tests}
|
||||||
make test
|
make test ||:
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
make test-sentinel
|
make test-sentinel ||:
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group %{name} &> /dev/null || groupadd -r %{name} &> /dev/null
|
getent group %{name} &> /dev/null || \
|
||||||
|
groupadd -r %{name} &> /dev/null
|
||||||
getent passwd %{name} &> /dev/null || \
|
getent passwd %{name} &> /dev/null || \
|
||||||
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
||||||
-c 'Redis Database Server' %{name} &> /dev/null
|
-c 'Redis Database Server' %{name} &> /dev/null
|
||||||
|
@ -179,72 +194,81 @@ exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%systemd_post %{name}.service
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%systemd_post %{name}-sentinel.service
|
%systemd_post %{name}-sentinel.service
|
||||||
%endif
|
%endif
|
||||||
%systemd_post %{name}-server.service
|
|
||||||
%else
|
%else
|
||||||
|
chkconfig --add %{name}
|
||||||
|
%if 0%{?with_sentinel}
|
||||||
chkconfig --add %{name}-sentinel
|
chkconfig --add %{name}-sentinel
|
||||||
chkconfig --add %{name}-server
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%systemd_preun %{name}.service
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%systemd_preun %{name}-sentinel.service
|
%systemd_preun %{name}-sentinel.service
|
||||||
%endif
|
%endif
|
||||||
%systemd_preun %{name}-server.service
|
|
||||||
%else
|
%else
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
|
service %{name} stop &> /dev/null
|
||||||
|
chkconfig --del %{name} &> /dev/null
|
||||||
|
%if 0%{?with_sentinel}
|
||||||
service %{name}-sentinel stop &> /dev/null
|
service %{name}-sentinel stop &> /dev/null
|
||||||
chkconfig --del %{name}-sentinel &> /dev/null
|
chkconfig --del %{name}-sentinel &> /dev/null
|
||||||
service %{name}-server stop &> /dev/null
|
%endif
|
||||||
chkconfig --del %{name}-server &> /dev/null
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%systemd_postun_with_restart %{name}.service
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%systemd_postun_with_restart %{name}-sentinel.service
|
%systemd_postun_with_restart %{name}-sentinel.service
|
||||||
%endif
|
%endif
|
||||||
%systemd_postun_with_restart %{name}-server.service
|
|
||||||
%else
|
%else
|
||||||
if [ "$1" -ge "1" ] ; then
|
if [ "$1" -ge "1" ] ; then
|
||||||
|
service %{name} condrestart >/dev/null 2>&1 || :
|
||||||
|
%if 0%{?with_sentinel}
|
||||||
service %{name}-sentinel condrestart >/dev/null 2>&1 || :
|
service %{name}-sentinel condrestart >/dev/null 2>&1 || :
|
||||||
service %{name}-server condrestart >/dev/null 2>&1 || :
|
%endif
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING MANIFESTO README
|
%{!?_licensedir:%global license %%doc}
|
||||||
|
%license COPYING
|
||||||
|
%doc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
%attr(0644, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf
|
%attr(0644, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf
|
||||||
%endif
|
%endif
|
||||||
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
|
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
|
||||||
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
|
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
|
||||||
%ghost %dir %attr(0750, redis, redis) %{_localstatedir}/run/%{name}
|
%dir %attr(0750, redis, redis) %{_localstatedir}/run/%{name}
|
||||||
%{_bindir}/%{name}-*
|
%{_bindir}/%{name}-*
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
%{_tmpfilesdir}/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%{_unitdir}/%{name}-sentinel.service
|
%{_unitdir}/%{name}-sentinel.service
|
||||||
%endif
|
%endif
|
||||||
%{_unitdir}/%{name}-server.service
|
|
||||||
%else
|
%else
|
||||||
|
%{_initrddir}/%{name}
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%{_initrddir}/%{name}-sentinel
|
%{_initrddir}/%{name}-sentinel
|
||||||
%endif
|
%endif
|
||||||
%{_initrddir}/%{name}-server
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jun 18 2014 Christopher Meng <rpm@cicku.me> - 2.8.11-1
|
* Fri Dec 05 2014 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8.18-1
|
||||||
- Update to 2.8.11
|
- Upstream 2.8.18 (Redis sentinel 1 is broken according upstream)
|
||||||
|
- Backport changes from F21
|
||||||
|
|
||||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.16-2
|
* Wed Jun 18 2014 Christopher Meng <rpm@cicku.me> - 2.6.17-1
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
- Update to 2.6.17
|
||||||
|
|
||||||
* Fri Sep 06 2013 Fabian Deutsch <fabian.deutsch@gmx.de> - 2.6.16-1
|
* Fri Sep 06 2013 Fabian Deutsch <fabian.deutsch@gmx.de> - 2.6.16-1
|
||||||
- Update to 2.6.16
|
- Update to 2.6.16
|
||||||
|
|
Loading…
Reference in New Issue