Upstream 2.8.14
backport spec from EPEL7 (thanks Warren)
This commit is contained in:
parent
00d13348af
commit
b25082a3ce
@ -1,7 +1,17 @@
|
||||
Index: redis-2.8.11/deps/Makefile
|
||||
===================================================================
|
||||
--- redis-2.8.11.orig/deps/Makefile
|
||||
+++ redis-2.8.11/deps/Makefile
|
||||
From 654ea4a4536bd154a58588ede616fe7ddb3b01a1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||
Date: Thu, 11 Sep 2014 13:40:54 +0200
|
||||
Subject: [PATCH 2/4] patch1
|
||||
|
||||
---
|
||||
deps/Makefile | 2 +-
|
||||
deps/linenoise/Makefile | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/deps/Makefile b/deps/Makefile
|
||||
index e183ede..9dcb6b1 100644
|
||||
--- a/deps/Makefile
|
||||
+++ b/deps/Makefile
|
||||
@@ -58,7 +58,7 @@ ifeq ($(uname_S),SunOS)
|
||||
LUA_CFLAGS= -D__C99FEATURES__=1
|
||||
endif
|
||||
@ -9,12 +19,12 @@ Index: redis-2.8.11/deps/Makefile
|
||||
-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
|
||||
# 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
|
||||
@ -24,3 +34,6 @@ Index: redis-2.8.11/deps/linenoise/Makefile
|
||||
R_LDFLAGS= $(LDFLAGS)
|
||||
DEBUG= -g
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
||||
|
@ -1,7 +1,16 @@
|
||||
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
|
||||
From 88d8fa644b2d2fa73802d22fb710181e04c80496 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||
Date: Thu, 11 Sep 2014 13:42:01 +0200
|
||||
Subject: [PATCH 4/4] patch3
|
||||
|
||||
---
|
||||
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
|
||||
--- a/tests/test_helper.tcl
|
||||
+++ b/tests/test_helper.tcl
|
||||
@@ -33,7 +33,6 @@ set ::all_tests {
|
||||
integration/replication-2
|
||||
integration/replication-3
|
||||
@ -10,3 +19,6 @@ Index: redis-2.8.11/tests/test_helper.tcl
|
||||
integration/aof
|
||||
integration/rdb
|
||||
integration/convert-zipmap-hash-on-load
|
||||
--
|
||||
1.9.3
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
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
|
||||
From cfc0d8db5d3ca86aff0c2707d51b9180c407f258 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
|
||||
Date: Thu, 11 Sep 2014 13:41:17 +0200
|
||||
Subject: [PATCH 3/4] patch2
|
||||
|
||||
---
|
||||
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
|
||||
@ -13,3 +22,6 @@ Index: redis-2.8.11/src/Makefile
|
||||
endif
|
||||
|
||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
||||
--
|
||||
1.9.3
|
||||
|
||||
|
88
redis.init
Normal file
88
redis.init
Normal file
@ -0,0 +1,88 @@
|
||||
#!/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"
|
||||
pidfile="/var/run/redis/redis.pid"
|
||||
REDIS_CONFIG="/etc/redis.conf"
|
||||
|
||||
[ -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: "
|
||||
daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG --daemonize yes --pidfile $pidfile"
|
||||
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 $?
|
12
redis.service
Normal file
12
redis.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Redis persistent key-value database
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no
|
||||
User=redis
|
||||
Group=redis
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
51
redis.spec
51
redis.spec
@ -2,39 +2,41 @@
|
||||
|
||||
%global with_perftools 0
|
||||
|
||||
# Prior to redis 2.8 sentinel didn't work correctly.
|
||||
%if 0%{?fedora} >= 21 || 0%{?el} >= 7
|
||||
# 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} >= 21 || 0%{?rhel} >= 7
|
||||
%global with_sentinel 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 15 || 0%{?el} >= 7
|
||||
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||
%global with_systemd 1
|
||||
%else
|
||||
%global with_systemd 0
|
||||
%endif
|
||||
|
||||
# tcl 8.4 in EL5.
|
||||
%if 0%{?el} && 0%{?el} <= 5
|
||||
%if 0%{?el5}
|
||||
%global with_tests 0
|
||||
%else
|
||||
%global with_tests 1
|
||||
%endif
|
||||
|
||||
Name: redis
|
||||
Version: 2.8.13
|
||||
Release: 2%{?dist}
|
||||
Version: 2.8.14
|
||||
Release: 1%{?dist}
|
||||
Summary: A persistent caching system, key-value and data structures database
|
||||
License: BSD
|
||||
URL: http://redis.io
|
||||
Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}.logrotate
|
||||
Source2: %{name}-sentinel.service
|
||||
Source3: %{name}-server.service
|
||||
Source3: %{name}.service
|
||||
Source4: %{name}.tmpfiles
|
||||
Source5: %{name}-sentinel.init
|
||||
Source6: %{name}-server.init
|
||||
Source6: %{name}.init
|
||||
# Update configuration for Fedora
|
||||
Patch0: redis-2.8.11-redis-conf-location-variables.patch
|
||||
Patch0: redis-2.8.11-redis-conf.patch
|
||||
Patch1: redis-2.8.11-deps-library-fPIC-performance-tuning.patch
|
||||
Patch2: redis-2.8.11-use-system-jemalloc.patch
|
||||
# tests/integration/replication-psync.tcl failed on slow machines(GITHUB #1417)
|
||||
@ -114,7 +116,7 @@ sed -i -e 's|$(CFLAGS)|%{optflags}|g' deps/linenoise/Makefile
|
||||
sed -i -e 's|$(LDFLAGS)|%{?__global_ldflags}|g' deps/linenoise/Makefile
|
||||
|
||||
%build
|
||||
%make_build \
|
||||
make %{?_smp_mflags} \
|
||||
DEBUG="" \
|
||||
LDFLAGS="%{?__global_ldflags}" \
|
||||
CFLAGS+="%{optflags}" \
|
||||
@ -157,7 +159,7 @@ install -pDm644 %{S:4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
%if 0%{?with_sentinel}
|
||||
install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name}-sentinel
|
||||
%endif
|
||||
install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}-server
|
||||
install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}
|
||||
%endif
|
||||
|
||||
# Fix non-standard-executable-perm error.
|
||||
@ -183,12 +185,12 @@ exit 0
|
||||
%if 0%{?with_sentinel}
|
||||
%systemd_post %{name}-sentinel.service
|
||||
%endif
|
||||
%systemd_post %{name}-server.service
|
||||
%systemd_post %{name}.service
|
||||
%else
|
||||
%if 0%{?with_sentinel}
|
||||
chkconfig --add %{name}-sentinel
|
||||
%endif
|
||||
chkconfig --add %{name}-server
|
||||
chkconfig --add %{name}
|
||||
%endif
|
||||
|
||||
%preun
|
||||
@ -196,15 +198,15 @@ chkconfig --add %{name}-server
|
||||
%if 0%{?with_sentinel}
|
||||
%systemd_preun %{name}-sentinel.service
|
||||
%endif
|
||||
%systemd_preun %{name}-server.service
|
||||
%systemd_preun %{name}.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
|
||||
service %{name} stop &> /dev/null
|
||||
chkconfig --del %{name} &> /dev/null
|
||||
%endif
|
||||
|
||||
%postun
|
||||
@ -212,13 +214,13 @@ chkconfig --del %{name}-server &> /dev/null
|
||||
%if 0%{?with_sentinel}
|
||||
%systemd_postun_with_restart %{name}-sentinel.service
|
||||
%endif
|
||||
%systemd_postun_with_restart %{name}-server.service
|
||||
%systemd_postun_with_restart %{name}.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 || :
|
||||
service %{name} condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
@ -231,24 +233,27 @@ fi
|
||||
%endif
|
||||
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{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}-*
|
||||
%if 0%{?with_systemd}
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%if 0%{?with_sentinel}
|
||||
%{_unitdir}/%{name}-sentinel.service
|
||||
%endif
|
||||
%{_unitdir}/%{name}-server.service
|
||||
%{_unitdir}/%{name}.service
|
||||
%else
|
||||
%if 0%{?with_sentinel}
|
||||
%{_initrddir}/%{name}-sentinel
|
||||
%endif
|
||||
%{_initrddir}/%{name}-server
|
||||
%{_initrddir}/%{name}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
* Thu Sep 11 2014 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8.14-1
|
||||
- Upstream 2.8.14 (RHBZ #1136287)
|
||||
- Bugfix for lua scripting users (server crash)
|
||||
- Refresh patches
|
||||
- backport spec from EPEL7 (thanks Warren)
|
||||
|
||||
* Wed Jul 16 2014 Christopher Meng <rpm@cicku.me> - 2.8.13-1
|
||||
- Update to 2.8.13
|
||||
|
Loading…
Reference in New Issue
Block a user