Add missing files to git.
This commit is contained in:
parent
dde8ff44ac
commit
af410060c8
26
redis-2.8.11-deps-library-fPIC-performance-tuning.patch
Normal file
26
redis-2.8.11-deps-library-fPIC-performance-tuning.patch
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
|
12
redis-2.8.11-disable-test-failed-on-slow-machine.patch
Normal file
12
redis-2.8.11-disable-test-failed-on-slow-machine.patch
Normal file
@ -0,0 +1,12 @@
|
||||
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
|
54
redis-2.8.11-redis-conf-location-variables.patch
Normal file
54
redis-2.8.11-redis-conf-location-variables.patch
Normal file
@ -0,0 +1,54 @@
|
||||
Index: redis-2.8.11/redis.conf
|
||||
===================================================================
|
||||
--- redis-2.8.11.orig/redis.conf
|
||||
+++ redis-2.8.11/redis.conf
|
||||
@@ -34,11 +34,11 @@
|
||||
|
||||
# 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
|
||||
|
||||
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
|
||||
# default. You can specify a custom pid file location here.
|
||||
-pidfile /var/run/redis.pid
|
||||
+pidfile /var/run/redis/redis.pid
|
||||
|
||||
# Accept connections on the specified port, default is 6379.
|
||||
# If port 0 is specified Redis will not listen on a TCP socket.
|
||||
@@ -61,7 +61,7 @@ tcp-backlog 511
|
||||
# Examples:
|
||||
#
|
||||
# bind 192.168.1.100 10.0.0.1
|
||||
-# bind 127.0.0.1
|
||||
+bind 127.0.0.1
|
||||
|
||||
# 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
|
||||
@@ -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
|
||||
# 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.
|
||||
@@ -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/
|
||||
|
||||
################################# REPLICATION #################################
|
||||
|
15
redis-2.8.11-use-system-jemalloc.patch
Normal file
15
redis-2.8.11-use-system-jemalloc.patch
Normal file
@ -0,0 +1,15 @@
|
||||
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)
|
93
redis-sentinel.init
Normal file
93
redis-sentinel.init
Normal file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# redis init file for starting up the redis-sentinel daemon
|
||||
#
|
||||
# chkconfig: - 21 79
|
||||
# description: Starts and stops the redis-sentinel daemon.
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
NAME="redis-sentinel"
|
||||
EXEC="/usr/bin/$NAME"
|
||||
SENTINEL_CONFIG="/etc/redis-sentinel.conf"
|
||||
RUNDIR="/var/run/redis"
|
||||
PIDFILE="$RUNDIR/redis-sentinel.pid"
|
||||
|
||||
[ -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: "
|
||||
mkdir -p $RUNDIR
|
||||
touch $PIDFILE
|
||||
chown redis:redis $RUNDIR $PIDFILE
|
||||
chmod 750 $RUNDIR
|
||||
daemon --user ${REDIS_USER-redis} --pidfile=$PIDFILE "$EXEC $SENTINEL_CONFIG --sentinel"
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $NAME: "
|
||||
killproc -p $PIDFILE $NAME
|
||||
retval=$?
|
||||
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 $?
|
13
redis-sentinel.service
Normal file
13
redis-sentinel.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Redis Sentinel
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/mkdir -p /var/lib/redis
|
||||
ExecStart=/usr/sbin/redis-sentinel /etc/sentinel.conf
|
||||
ExecStop=/usr/bin/redis-cli shutdown
|
||||
User=redis
|
||||
Group=redis
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
93
redis-server.init
Normal file
93
redis-server.init
Normal file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# redis init file for starting up the redis daemon
|
||||
#
|
||||
# chkconfig: - 20 80
|
||||
# description: Starts and stops the redis daemon.
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
NAME="redis-server"
|
||||
EXEC="/usr/bin/$NAME"
|
||||
REDIS_CONFIG="/etc/redis.conf"
|
||||
RUNDIR="/var/run/redis"
|
||||
PIDFILE="$RUNDIR/redis.pid"
|
||||
|
||||
[ -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: "
|
||||
mkdir -p $RUNDIR
|
||||
touch $PIDFILE
|
||||
chown redis:redis $RUNDIR $PIDFILE
|
||||
chmod 750 $RUNDIR
|
||||
daemon --user ${REDIS_USER-redis} "$EXEC $REDIS_CONFIG"
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $NAME: "
|
||||
killproc -p $PIDFILE $NAME
|
||||
retval=$?
|
||||
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 $?
|
13
redis-server.service
Normal file
13
redis-server.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Redis persistent key-value database
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/mkdir -p /var/lib/redis
|
||||
ExecStart=/usr/sbin/redis-server /etc/redis.conf
|
||||
ExecStop=/usr/bin/redis-cli shutdown
|
||||
User=redis
|
||||
Group=redis
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user