mirror of
https://abf.rosa.ru/djam/redis.git
synced 2025-02-24 06:52:50 +00:00
Updated to a new version
This commit is contained in:
parent
e3a90ddf59
commit
3eb06a42fa
7 changed files with 102 additions and 149 deletions
6
.abf.yml
6
.abf.yml
|
@ -1,3 +1,5 @@
|
|||
removed_sources:
|
||||
redis-2.4.15.tar.gz: 9e388d2c070b15136da1277f4d21f1c788694b12
|
||||
redis-2.4.17.tar.gz: 3d540531b3d7103a511d29661c2ae666dac60522
|
||||
sources:
|
||||
"redis-2.4.15.tar.gz": 9e388d2c070b15136da1277f4d21f1c788694b12
|
||||
"redis-2.4.17.tar.gz": 3d540531b3d7103a511d29661c2ae666dac60522
|
||||
redis-2.8.13.tar.gz: a72925a35849eb2d38a1ea076a3db82072d4ee43
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
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.
|
||||
-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.
|
||||
@@ -27,7 +27,7 @@
|
||||
# If you want you can bind a single interface, if the bind option is not
|
||||
# specified all the interfaces will listen for incoming connections.
|
||||
#
|
||||
-# 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
|
||||
@@ -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)
|
||||
-loglevel verbose
|
||||
+loglevel notice
|
||||
|
||||
# Specify the log file name. Also 'stdout' 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 stdout
|
||||
+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.
|
||||
@@ -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.
|
||||
-dir ./
|
||||
+dir /var/lib/redis/
|
||||
|
||||
################################# REPLICATION #################################
|
||||
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
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
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
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]} {
|
46
redis-2.8.17-config.patch
Normal file
46
redis-2.8.17-config.patch
Normal file
|
@ -0,0 +1,46 @@
|
|||
--- a/redis.conf 2014-12-02 16:22:38.722433643 +0100
|
||||
+++ b/redis.conf 2014-12-02 16:22:16.252249350 +0100
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
# 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 /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 @@
|
||||
# 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
|
||||
@@ -100,7 +100,7 @@
|
||||
# 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 @@
|
||||
# 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 #################################
|
||||
|
||||
@@ -403,6 +403,7 @@
|
||||
# output buffers (but this is not needed if the policy is 'noeviction').
|
||||
#
|
||||
# maxmemory <bytes>
|
||||
+maxmemory 67108864
|
||||
|
||||
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
||||
# is reached. You can select among five behaviors:
|
30
redis-2.8.3-shared.patch
Normal file
30
redis-2.8.3-shared.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 89f607c..536cbc6 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -26,12 +26,7 @@ PREFIX?=/usr/local
|
||||
INSTALL_BIN=$(PREFIX)/bin
|
||||
INSTALL=install
|
||||
|
||||
-# Default allocator
|
||||
-ifeq ($(uname_S),Linux)
|
||||
- MALLOC=jemalloc
|
||||
-else
|
||||
- MALLOC=libc
|
||||
-endif
|
||||
+MALLOC?=jemalloc
|
||||
|
||||
# Backwards compatibility for selecting an allocator
|
||||
ifeq ($(USE_TCMALLOC),yes)
|
||||
@@ -83,9 +78,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
|
||||
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
|
||||
+ FINAL_LIBS+= -ljemalloc -ldl
|
||||
endif
|
||||
|
||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
52
redis.spec
52
redis.spec
|
@ -2,8 +2,8 @@
|
|||
# http://code.google.com/p/redis/issues/detail?id=202
|
||||
|
||||
Name: redis
|
||||
Version: 2.4.17
|
||||
Release: 2
|
||||
Version: 2.8.13
|
||||
Release: 1
|
||||
Summary: A persistent key-value database
|
||||
|
||||
Group: Databases
|
||||
|
@ -14,10 +14,11 @@ 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
|
||||
#Patch0: %{name}-2.0.0-redis.conf.patch
|
||||
Patch0: redis-2.8.3-shared.patch
|
||||
Patch1: redis-2.8.17-config.patch
|
||||
BuildRequires: tcl >= 8.5
|
||||
BuildRequires: jemalloc-devel
|
||||
Requires(post): rpm-helper >= 0.24.1-1
|
||||
Requires(preun): rpm-helper >= 0.24.1-1
|
||||
|
||||
|
@ -33,40 +34,31 @@ Redis supports different kind of sorting abilities.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%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
|
||||
%apply_patches
|
||||
sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' deps/lua/src/Makefile
|
||||
sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile
|
||||
|
||||
%build
|
||||
export LC_ALL=C
|
||||
%make -j1 DEBUG="" CFLAGS='%{optflags} -std=c99' all FORCE_LIBC_MALLOC=yes
|
||||
%make CC="%{__cc}" CFLAGS="%{optflags}" AR="%{__ar} rcu" JEMALLOC_SHARED=yes
|
||||
|
||||
%check
|
||||
tclsh tests/test_helper.tcl
|
||||
|
||||
%install
|
||||
# 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 -p -D -m 0755 src/%{name}-benchmark %{buildroot}%{_bindir}/%{name}-benchmark
|
||||
install -p -D -m 0755 src/%{name}-cli %{buildroot}%{_bindir}/%{name}-cli
|
||||
install -p -D -m 0755 src/%{name}-check-aof %{buildroot}%{_bindir}/%{name}-check-aof
|
||||
install -p -D -m 0755 src/%{name}-check-dump %{buildroot}%{_bindir}/%{name}-check-dump
|
||||
install -p -D -m 0755 src/%{name}-server %{buildroot}%{_sbindir}/%{name}-server
|
||||
# Install misc other
|
||||
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 -p -D -m 0644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
install -p -D -m 0755 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name}
|
||||
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||
|
||||
%pre
|
||||
%_pre_useradd redis %{_sharedstatedir}/redis /sbin/nologin
|
||||
|
|
Loading…
Add table
Reference in a new issue