version update 2.4.17

This commit is contained in:
Alexander Khryukin 2012-10-05 06:59:54 +04:00
parent ae1ed6e594
commit c035cb4cd8
8 changed files with 142 additions and 170 deletions

View file

@ -1,2 +1,3 @@
sources:
"redis-2.4.14.tar.gz": 3f0a2ac2eef9319edb0d789d3553f77b2a3dc31d
"redis-2.4.15.tar.gz": 9e388d2c070b15136da1277f4d21f1c788694b12
"redis-2.4.17.tar.gz": 3d540531b3d7103a511d29661c2ae666dac60522

View file

@ -1,6 +1,13 @@
--- redis-2.4.6/redis.conf.orig 2012-01-13 09:01:20.032263652 +0100
+++ redis-2.4.6/redis.conf 2012-01-13 09:02:57.223037913 +0100
@@ -18,7 +18,7 @@
Index: redis.conf
===================================================================
--- redis.conf
+++ redis.conf 2011-04-17 12:15:56.000000000 +0200
@@ -14,11 +14,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.
@ -18,7 +25,7 @@
# 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
@@ -45,12 +45,12 @@
@@ -44,12 +44,12 @@
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
@ -33,7 +40,7 @@
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
@@ -104,7 +104,7 @@
@@ -86,7 +86,7 @@ dbfilename dump.rdb
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
@ -42,3 +49,4 @@
################################# REPLICATION #################################

50
redis-2.4.17-tcl86.patch Normal file
View file

@ -0,0 +1,50 @@
diff --git a/runtest b/runtest
index 2ea4d39..257a55b 100755
--- a/runtest
+++ b/runtest
@@ -1,5 +1,5 @@
#!/bin/bash
-TCL=tclsh8.5
+TCL=tclsh8.6
which $TCL
if [ "$?" != "0" ]
then
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
index 803d9b5..cae0d91 100644
--- a/tests/integration/replication.tcl
+++ b/tests/integration/replication.tcl
@@ -74,7 +74,7 @@ start_server {tags {"repl"}} {
}
proc start_write_load {host port seconds} {
- exec tclsh8.5 tests/helpers/gen_write_load.tcl $host $port $seconds &
+ exec tclsh8.6 tests/helpers/gen_write_load.tcl $host $port $seconds &
}
proc stop_write_load {handle} {
diff --git a/tests/integration/replication.tcl.orig b/tests/integration/replication.tcl.orig
index 278496a..0284946 100644
--- a/tests/integration/replication.tcl.orig
+++ b/tests/integration/replication.tcl.orig
@@ -74,7 +74,7 @@ start_server {tags {"repl"}} {
}
proc start_write_load {host port seconds} {
- exec tclsh8.5 tests/helpers/gen_write_load.tcl $host $port $seconds &
+ exec tclsh8.6 tests/helpers/gen_write_load.tcl $host $port $seconds &
}
proc stop_write_load {handle} {
diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl
index d390624..e7c35c5 100644
--- a/tests/test_helper.tcl
+++ b/tests/test_helper.tcl
@@ -180,7 +180,7 @@ proc test_server_main {} {
set start_port [expr {$::port+100}]
for {set j 0} {$j < $::numclients} {incr j} {
set start_port [find_available_port $start_port]
- set p [exec tclsh8.5 [info script] {*}$::argv \
+ set p [exec tclsh8.6 [info script] {*}$::argv \
--client $port --port $start_port &]
lappend ::clients_pids $p
incr start_port 10

View file

@ -0,0 +1,15 @@
https://github.com/antirez/redis/commit/459e2975f40b9d4e0ddc488d45d39e0cdd334f5c
diff -Nurp redis-2.4.8.orig/tests/integration/replication.tcl redis-2.4.8/tests/integration/replication.tcl
--- redis-2.4.8.orig/tests/integration/replication.tcl 2012-02-22 15:23:43.000000000 +0200
+++ redis-2.4.8/tests/integration/replication.tcl 2012-04-28 18:48:32.188691658 +0300
@@ -97,7 +97,7 @@ start_server {tags {"repl"}} {
[lindex $slaves 2] slaveof $master_host $master_port
# Wait for all the three slaves to reach the "online" state
- set retry 100
+ set retry 500
while {$retry} {
set info [r -3 info]
if {[string match {*slave0:*,online*slave1:*,online*slave2:*,online*} $info]} {

View file

@ -1,88 +0,0 @@
#!/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/sbin/$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"
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 $?

View file

@ -3,6 +3,7 @@ Description=A persistent key-value database
After=syslog.target network.target
[Service]
Type=forking
PIDFile=/var/run/redis/redis.pid
ExecStart=/usr/sbin/redis-server /etc/redis.conf
User=redis

View file

@ -1,109 +1,93 @@
%define _data_dir %{_var}/lib/%{name}
%define _log_dir %{_var}/log/%{name}
# Check for status of man pages
# http://code.google.com/p/redis/issues/detail?id=202
Name: redis
Version: 2.4.14
Release: %mkrel 1
License: BSD License
Group: Databases
Summary: Persistent key-value database
Url: http://redis.io/
Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
Requires: netcat
Patch0: %{name}-2.4.6-redis.conf.patch
Source1: %{name}.logrotate
Source2: %{name}.init
Source3: %{name}.service
Name: redis
Version: 2.4.17
Release: %mkrel 1
Summary: A persistent key-value database
Requires: logrotate
BuildRequires: tcl
Group: Databases
License: BSD
URL: http://redis.io/
Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: %{name}.logrotate
Source2: %{name}.tmpfiles
Source3: %{name}.service
# Update configuration for Fedora
Patch0: %{name}-2.0.0-redis.conf.patch
Patch1: redis-2.4.8-extend-timeout-on-replication-test.patch
Patch2: redis-2.4.17-tcl86.patch
BuildRequires: tcl >= 8.6
Requires(post): rpm-helper >= 0.24.1-1
Requires(preun): rpm-helper >= 0.24.1-1
%description
Redis is an advanced key-value store.
It is similar to memcached but the dataset
is not volatile, and values can be
strings, exactly like in memcached,
but also lists, sets, and ordered sets.
All this data types can be manipulated
with atomic operations to push/pop elements,
add/remove elements, perform server
side union, intersection, difference between
sets, and so forth. Redis supports
different kind of sorting abilities.
It is similar to memcached but the data set is not
volatile, and values can be strings, exactly like in
memcached, but also lists, sets, and ordered sets.
All this data types can be manipulated with atomic operations
to push/pop elements, add/remove elements, perform server side
union, intersection, difference between sets, and so forth.
Redis supports different kind of sorting abilities.
%prep
%setup -q
%patch0 -p1
%patch0 -p0
%patch1 -p1
%patch2 -p1
# Remove integration tests
sed -i '/ execute_tests "integration\/replication"/d' tests/test_helper.tcl
sed -i '/ execute_tests "integration\/aof"/d' tests/test_helper.tcl
%build
%make all
export LC_ALL=C
%make -j1 DEBUG="" CFLAGS='%{optflags} -std=c99' all FORCE_LIBC_MALLOC=yes
%check
cat <<EOF
---------------------------------------------------
The test suite often fails to start a server, with
'child process exited abnormally' -- sometimes it works.
---------------------------------------------------
EOF
make test && true
tclsh tests/test_helper.tcl
%install
make install PREFIX=%{buildroot}%{_prefix}
# Install binaries
install -p -D -m 755 src/%{name}-benchmark %{buildroot}%{_bindir}/%{name}-benchmark
install -p -D -m 755 src/%{name}-cli %{buildroot}%{_bindir}/%{name}-cli
install -p -D -m 755 src/%{name}-check-aof %{buildroot}%{_bindir}/%{name}-check-aof
install -p -D -m 755 src/%{name}-check-dump %{buildroot}%{_bindir}/%{name}-check-dump
install -p -D -m 755 src/%{name}-server %{buildroot}%{_sbindir}/%{name}-server
# Install misc other
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}
install -p -D -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -d -m 755 %{buildroot}%{_sysconfdir}
install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -d -m 755 %{buildroot}%{_prefix}/lib/tmpfiles.d
install -m 755 %{SOURCE2} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
install -d -m 755 %{buildroot}%{_unitdir}
install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name}
install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name}
# Install systemd unit
install -p -D -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
# Fix non-standard-executable-perm error
chmod 755 %{buildroot}%{_bindir}/%{name}-*
# Ensure redis-server location doesn't change
mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/%{name}-server %{buildroot}%{_sbindir}/%{name}-server
#==========================================================
%pre
/usr/sbin/groupadd -r %{name} &>/dev/null || :
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "User for Redis key-value store" -d %{_data_dir} %{name} &>/dev/null || :
%_pre_useradd redis %{_sharedstatedir}/redis /sbin/nologin
%post
%_post_service %{name}
echo "To start the database server, do:"
echo " sudo rcredis start; insserv redis"
systemd-tmpfiles --create %{name}.conf
%_post_service redis
%preun
%_preun_service %{name}
%_preun_service redis
%postun
%_postun_userdel redis
%files
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING README
%doc 00-RELEASENOTES BUGS COPYING README
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/%{name}.conf
%dir %attr(0755, redis, root) %{_localstatedir}/lib/%{name}
%dir %attr(0755, redis, root) %{_localstatedir}/log/%{name}
%dir %attr(0755, redis, root) %{_localstatedir}/run/%{name}
%{_bindir}/%{name}-*
%{_sbindir}/%{name}-*
%{_initrddir}/%{name}
%{_prefix}/lib/tmpfiles.d/%{name}.conf
%{_unitdir}/%{name}.service
%changelog
* Thu May 31 2012 Alexander Khrukin <akhrukin@mandriva.org> 2.4.14-1mdv2012.0
+ Revision: 801550
- version update 2.4.14
* Thu Jun 09 2011 Antoine Ginies <aginies@mandriva.com> 2.2.8-1
+ Revision: 683424
- fix group in subpackages
- fix group
- import redis

1
redis.tmpfiles Normal file
View file

@ -0,0 +1 @@
D /var/run/redis 0710 redis redis -