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
|
From 654ea4a4536bd154a58588ede616fe7ddb3b01a1 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/deps/Makefile
|
Date: Thu, 11 Sep 2014 13:40:54 +0200
|
||||||
+++ redis-2.8.11/deps/Makefile
|
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)
|
@@ -58,7 +58,7 @@ ifeq ($(uname_S),SunOS)
|
||||||
LUA_CFLAGS= -D__C99FEATURES__=1
|
LUA_CFLAGS= -D__C99FEATURES__=1
|
||||||
endif
|
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)
|
||||||
+LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS) -fPIC
|
+LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS) -fPIC
|
||||||
LUA_LDFLAGS+= $(LDFLAGS)
|
LUA_LDFLAGS+= $(LDFLAGS)
|
||||||
|
# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more
|
||||||
lua: .make-prerequisites
|
# challenging to cross-compile lua (and redis). These defines make it easier
|
||||||
Index: redis-2.8.11/deps/linenoise/Makefile
|
diff --git a/deps/linenoise/Makefile b/deps/linenoise/Makefile
|
||||||
===================================================================
|
index 1dd894b..712f2a6 100644
|
||||||
--- redis-2.8.11.orig/deps/linenoise/Makefile
|
--- a/deps/linenoise/Makefile
|
||||||
+++ redis-2.8.11/deps/linenoise/Makefile
|
+++ b/deps/linenoise/Makefile
|
||||||
@@ -2,7 +2,7 @@ STD=
|
@@ -2,7 +2,7 @@ STD=
|
||||||
WARN= -Wall
|
WARN= -Wall
|
||||||
OPT= -Os
|
OPT= -Os
|
||||||
@ -24,3 +34,6 @@ Index: redis-2.8.11/deps/linenoise/Makefile
|
|||||||
R_LDFLAGS= $(LDFLAGS)
|
R_LDFLAGS= $(LDFLAGS)
|
||||||
DEBUG= -g
|
DEBUG= -g
|
||||||
|
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
Index: 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>
|
||||||
--- redis-2.8.11.orig/tests/test_helper.tcl
|
Date: Thu, 11 Sep 2014 13:42:01 +0200
|
||||||
+++ redis-2.8.11/tests/test_helper.tcl
|
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 {
|
@@ -33,7 +33,6 @@ set ::all_tests {
|
||||||
integration/replication-2
|
integration/replication-2
|
||||||
integration/replication-3
|
integration/replication-3
|
||||||
@ -10,3 +19,6 @@ Index: redis-2.8.11/tests/test_helper.tcl
|
|||||||
integration/aof
|
integration/aof
|
||||||
integration/rdb
|
integration/rdb
|
||||||
integration/convert-zipmap-hash-on-load
|
integration/convert-zipmap-hash-on-load
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
Index: redis-2.8.11/src/Makefile
|
From cfc0d8db5d3ca86aff0c2707d51b9180c407f258 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/src/Makefile
|
Date: Thu, 11 Sep 2014 13:41:17 +0200
|
||||||
+++ redis-2.8.11/src/Makefile
|
Subject: [PATCH 3/4] patch2
|
||||||
@@ -84,8 +84,8 @@ endif
|
|
||||||
|
---
|
||||||
|
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)
|
ifeq ($(MALLOC),jemalloc)
|
||||||
DEPENDENCY_TARGETS+= jemalloc
|
DEPENDENCY_TARGETS+= jemalloc
|
||||||
@ -13,3 +22,6 @@ Index: redis-2.8.11/src/Makefile
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
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
|
%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
|
||||||
%if 0%{?fedora} >= 21 || 0%{?el} >= 7
|
# 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
|
%global with_sentinel 1
|
||||||
%endif
|
%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.
|
# tcl 8.4 in EL5.
|
||||||
%if 0%{?el} && 0%{?el} <= 5
|
%if 0%{?el5}
|
||||||
%global with_tests 0
|
%global with_tests 0
|
||||||
%else
|
%else
|
||||||
%global with_tests 1
|
%global with_tests 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: redis
|
Name: redis
|
||||||
Version: 2.8.13
|
Version: 2.8.14
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A persistent caching system, key-value and data structures database
|
Summary: A persistent caching system, key-value and data structures 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
|
||||||
# Update configuration for Fedora
|
# 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
|
Patch1: redis-2.8.11-deps-library-fPIC-performance-tuning.patch
|
||||||
Patch2: redis-2.8.11-use-system-jemalloc.patch
|
Patch2: redis-2.8.11-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)
|
||||||
@ -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
|
sed -i -e 's|$(LDFLAGS)|%{?__global_ldflags}|g' deps/linenoise/Makefile
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build \
|
make %{?_smp_mflags} \
|
||||||
DEBUG="" \
|
DEBUG="" \
|
||||||
LDFLAGS="%{?__global_ldflags}" \
|
LDFLAGS="%{?__global_ldflags}" \
|
||||||
CFLAGS+="%{optflags}" \
|
CFLAGS+="%{optflags}" \
|
||||||
@ -157,7 +159,7 @@ 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.
|
||||||
@ -183,12 +185,12 @@ exit 0
|
|||||||
%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
|
%systemd_post %{name}.service
|
||||||
%else
|
%else
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
chkconfig --add %{name}-sentinel
|
chkconfig --add %{name}-sentinel
|
||||||
%endif
|
%endif
|
||||||
chkconfig --add %{name}-server
|
chkconfig --add %{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
@ -196,15 +198,15 @@ chkconfig --add %{name}-server
|
|||||||
%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
|
%systemd_preun %{name}.service
|
||||||
%else
|
%else
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
%if 0%{?with_sentinel}
|
%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
|
||||||
%endif
|
%endif
|
||||||
service %{name}-server stop &> /dev/null
|
service %{name} stop &> /dev/null
|
||||||
chkconfig --del %{name}-server &> /dev/null
|
chkconfig --del %{name} &> /dev/null
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
@ -212,13 +214,13 @@ chkconfig --del %{name}-server &> /dev/null
|
|||||||
%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
|
%systemd_postun_with_restart %{name}.service
|
||||||
%else
|
%else
|
||||||
if [ "$1" -ge "1" ] ; then
|
if [ "$1" -ge "1" ] ; then
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
service %{name}-sentinel condrestart >/dev/null 2>&1 || :
|
service %{name}-sentinel condrestart >/dev/null 2>&1 || :
|
||||||
%endif
|
%endif
|
||||||
service %{name}-server condrestart >/dev/null 2>&1 || :
|
service %{name} condrestart >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -231,24 +233,27 @@ fi
|
|||||||
%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
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%{_unitdir}/%{name}-sentinel.service
|
%{_unitdir}/%{name}-sentinel.service
|
||||||
%endif
|
%endif
|
||||||
%{_unitdir}/%{name}-server.service
|
%{_unitdir}/%{name}.service
|
||||||
%else
|
%else
|
||||||
%if 0%{?with_sentinel}
|
%if 0%{?with_sentinel}
|
||||||
%{_initrddir}/%{name}-sentinel
|
%{_initrddir}/%{name}-sentinel
|
||||||
%endif
|
%endif
|
||||||
%{_initrddir}/%{name}-server
|
%{_initrddir}/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.13-2
|
* Thu Sep 11 2014 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8.14-1
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
- 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
|
* Wed Jul 16 2014 Christopher Meng <rpm@cicku.me> - 2.8.13-1
|
||||||
- Update to 2.8.13
|
- Update to 2.8.13
|
||||||
|
Loading…
Reference in New Issue
Block a user