From 3aa1e1ba3ad6f0bc975369ff04069b10ce7300ca8d3143ae375560d80f5ad0b3 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 24 Feb 2011 22:52:08 +0000 Subject: [PATCH] Accepting request 62671 from home:jnweiger OBS-URL: https://build.opensuse.org/request/show/62671 OBS-URL: https://build.opensuse.org/package/show/server:database/redis?expand=0&rev=18 --- redis-1.2.6.tar.bz2 | 3 --- redis-2.2.1.tar.bz2 | 3 +++ redis-conf.patch | 40 ++++++++++++++++-------------- redis-initscript.patch | 43 +++++++++++++++++--------------- redis-linkargsorder.patch | 49 ++++++++++++++++++++++++++++++++++++ redis.changes | 15 +++++++++++ redis.spec | 52 ++++++++++++++++++++++++++++----------- redis.sysconfig | 2 ++ skip-aof-test.patch | 11 +++++++++ 9 files changed, 163 insertions(+), 55 deletions(-) delete mode 100644 redis-1.2.6.tar.bz2 create mode 100644 redis-2.2.1.tar.bz2 create mode 100644 redis-linkargsorder.patch create mode 100644 redis.sysconfig create mode 100644 skip-aof-test.patch diff --git a/redis-1.2.6.tar.bz2 b/redis-1.2.6.tar.bz2 deleted file mode 100644 index fa761f1..0000000 --- a/redis-1.2.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94903451f66da6d76d0200ae4b4bda20bf7c383a6aad1014dce6d777f118ce40 -size 165821 diff --git a/redis-2.2.1.tar.bz2 b/redis-2.2.1.tar.bz2 new file mode 100644 index 0000000..241851d --- /dev/null +++ b/redis-2.2.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c097aada352d774a0faa36a502c76cd838b2c7074cf707efd0d21d010e5881e +size 335734 diff --git a/redis-conf.patch b/redis-conf.patch index 1b3055b..8386f4b 100644 --- a/redis-conf.patch +++ b/redis-conf.patch @@ -1,44 +1,48 @@ +--- + redis.conf | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + Index: redis.conf =================================================================== --- redis.conf.orig +++ redis.conf -@@ -2,7 +2,7 @@ +@@ -14,7 +14,7 @@ # 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 run as a daemon, Redis write a pid file in /var/run/redis.pid by default. - # You can specify a custom pid file location here. -@@ -14,7 +14,7 @@ port 6379 + # When running daemonized, Redis writes a pid file in /var/run/redis.pid by + # default. You can specify a custom pid file location here. +@@ -27,7 +27,7 @@ port 6379 # If you want you can bind a single interface, if the bind option is not - # specified all the interfaces will listen for connections. + # specified all the interfaces will listen for incoming connections. # -# bind 127.0.0.1 +bind 127.0.0.1 - # Close the connection after a client is idle for N seconds (0 to disable) - timeout 300 -@@ -24,12 +24,12 @@ timeout 300 - # debug (a lot of information, useful for development/testing) + # 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 @@ timeout 300 + # 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 debug +-loglevel verbose +loglevel notice # Specify the log file name. Also 'stdout' can be used to force - # the demon to log on the standard output. Note that if you use standard + # 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 ++logfile /var/log/redis.log - # Set the number of databases. The default database is DB 0, you can select - # a different one on a per-connection basis using SELECT where -@@ -64,7 +64,7 @@ dbfilename dump.rdb - - # For default save/load DB in/from the working directory - # Note that you must specify a directory not a file name. + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. +@@ -103,7 +103,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/ diff --git a/redis-initscript.patch b/redis-initscript.patch index 6ed1098..e9c06fc 100644 --- a/redis-initscript.patch +++ b/redis-initscript.patch @@ -1,8 +1,12 @@ +--- + utils/redis_init_script | 67 +++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 53 insertions(+), 14 deletions(-) + Index: utils/redis_init_script =================================================================== --- utils/redis_init_script.orig +++ utils/redis_init_script -@@ -1,36 +1,75 @@ +@@ -1,35 +1,74 @@ #!/bin/sh +# +# /etc/init.d/redis @@ -39,46 +43,44 @@ Index: utils/redis_init_script - else - echo -n "Starting Redis server...\n" - $EXEC $CONF -+ # Create a logfile the server can write into. + if [ ! -r $LOGFILE ]; then -+ touch $LOGFILE -+ chown redis:redis $LOGFILE -+ fi -+ # Create a pidfile the server can write into. -+ if [ ! -r $PIDFILE ]; then -+ touch $PIDFILE -+ chown redis:redis $PIDFILE ++ touch $LOGFILE ++ chown redis:redis $LOGFILE ++ fi ++ # Create a pidfile the server can write into. ++ if [ ! -r $PIDFILE ]; then ++ touch $PIDFILE ++ chown redis:redis $PIDFILE fi -+ echo -n "Starting service Redis " -+ /sbin/startproc -u redis -g redis -p $PIDFILE -s -e $EXEC $CONF >/dev/null 2>&1 -+ rc_status -v ++ echo -n "Starting service Redis " ++ /sbin/startproc -u redis -g redis -p $PIDFILE -s -e $EXEC $CONF >/dev/null 2>&1 ++ rc_status -v ;; stop) if [ ! -f $PIDFILE ] then - echo -n "$PIDFILE does not exist, process is not running\n" + echo -n "$PIDFILE does not exist, process is not running" -+ rc_failed ++ rc_failed else ++ echo -n "Stopping service Redis..." ++ echo -e "SHUTDOWN\r" | /usr/bin/netcat localhost $REDISPORT & + PID=$(cat $PIDFILE) - echo -n "Stopping ...\n" - echo -n "SHUTDOWN\r\n" | nc localhost $REDISPORT & -+ echo -n "Stopping service Redis ..." -+ echo -e "SHUTDOWN\r" | netcat localhost $REDISPORT & - PID=$(cat $PIDFILE) while [ -x /proc/${PIDFILE} ] do - echo "Waiting for Redis to shutdown ..." sleep 1 done - rm $PIDFILE - echo "Redis stopped" fi -+ rc_status -v ++ rc_status -v + ;; + restart) + $0 stop + $0 start -+ ;; + ;; + reload) + $0 restart + ;; @@ -86,9 +88,10 @@ Index: utils/redis_init_script + echo -n "Checking for service Redis: " + /sbin/checkproc -p $PIDFILE $EXEC + rc_status -v - ;; ++ ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload}" + exit 1 esac +rc_exit ++ diff --git a/redis-linkargsorder.patch b/redis-linkargsorder.patch new file mode 100644 index 0000000..a7914b6 --- /dev/null +++ b/redis-linkargsorder.patch @@ -0,0 +1,49 @@ +--- + src/Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +Index: src/Makefile +=================================================================== +--- src/Makefile.orig ++++ src/Makefile +@@ -19,7 +19,7 @@ ifeq ($(USE_TCMALLOC),yes) + CCLINK+= -ltcmalloc + CFLAGS+= -DUSE_TCMALLOC + endif +-CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF) ++CCOPT= $(CFLAGS) $(ARCH) $(PROF) + + PREFIX= /usr/local + INSTALL_BIN= $(PREFIX)/bin +@@ -111,26 +111,26 @@ dependencies: + cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)" + + redis-server: $(OBJ) +- $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ) ++ $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ) $(CCLINK) + + redis-benchmark: dependencies $(BENCHOBJ) + cd ../deps/hiredis && $(MAKE) static +- $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) ../deps/hiredis/libhiredis.a ++ $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) $(CCLINK) ../deps/hiredis/libhiredis.a + + redis-benchmark.o: + $(CC) -c $(CFLAGS) -I../deps/hiredis $(DEBUG) $(COMPILE_TIME) $< + + redis-cli: dependencies $(CLIOBJ) +- $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ) ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o ++ $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ) $(CCLINK) ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o + + redis-cli.o: + $(CC) -c $(CFLAGS) -I../deps/hiredis -I../deps/linenoise $(DEBUG) $(COMPILE_TIME) $< + + redis-check-dump: $(CHECKDUMPOBJ) +- $(CC) -o $(CHECKDUMPPRGNAME) $(CCOPT) $(DEBUG) $(CHECKDUMPOBJ) ++ $(CC) -o $(CHECKDUMPPRGNAME) $(CCOPT) $(DEBUG) $(CHECKDUMPOBJ) $(CCLINK) + + redis-check-aof: $(CHECKAOFOBJ) +- $(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ) ++ $(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ) $(CCLINK) + + .c.o: + $(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $< diff --git a/redis.changes b/redis.changes index 803a9b1..73b7ff2 100644 --- a/redis.changes +++ b/redis.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Feb 23 18:10:17 UTC 2011 - jw@novell.com + +- updated to 2.2.1 + +------------------------------------------------------------------- +Mon Feb 21 01:02:57 UTC 2011 - jw@novell.com + +- collecting stuff from Virtualization:Cloud:OpenStack, home:jfding:nosql, home:qik + ------------------------------------------------------------------- Thu Jan 27 16:18:42 UTC 2011 - seife+obs@b1-systems.com @@ -9,6 +19,11 @@ Tue Jan 18 21:08:35 UTC 2011 - asn@cryptomilk.org - Added logging to /var/log/redis/redis.log. - Added log rotation. +------------------------------------------------------------------- +Thu Jan 13 10:34:35 UTC 2011 - jfding@gmail.com + +- Upgrade to latest stable 2.0.4 + ------------------------------------------------------------------- Mon Jan 10 16:29:31 CET 2011 - asn@cryptomilk.org diff --git a/redis.spec b/redis.spec index 2e0fa8c..b7bab0d 100644 --- a/redis.spec +++ b/redis.spec @@ -1,4 +1,4 @@ -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,25 +18,31 @@ %define _data_dir %{_var}/lib/%{name} Name: redis -Version: 1.2.6 +Version: 2.2.1 Release: 1 # License: BSD License Group: Productivity/Databases/Servers Summary: Persistent key-value database -Url: http://code.google.com/p/redis/ +Url: http://redis.io/ # Source: http://redis.googlecode.com/files/%{name}-%{version}.tar.bz2 Source1: %{name}.logrotate +Source4: redis.sysconfig # Patch0: %{name}-initscript.patch Patch1: %{name}-conf.patch +Patch2: %{name}-linkargsorder.patch +Patch3: skip-aof-test.patch # BuildRoot: %{_tmppath}/%{name}-%{version}-build # for init script Requires: netcat Requires: logrotate +# for make test +BuildRequires: tcl + %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, @@ -57,6 +63,12 @@ HTML documentation for redis database. %setup -q %patch0 %patch1 +%patch2 + +# skip-aof-test.patch +# Failures: - Fixed AOF: Server should have been started: Expected '1' to equal or match '0' +%patch3 -p1 + mv doc html %build @@ -69,13 +81,15 @@ make PROF="%{optflags}" %{?jobs:-j%jobs} %{buildroot}%{_bindir} \ %{buildroot}%{_libdir} \ %{buildroot}%{_sbindir} \ - %{buildroot}%{_data_dir} \ - %{buildroot}/var/log/redis + %{buildroot}%{_data_dir} -%{__install} -m 0755 redis-benchmark %{buildroot}%{_bindir}/redis-benchmark -%{__install} -m 0755 redis-cli %{buildroot}%{_bindir}/redis-cli -%{__install} -m 0755 redis-server %{buildroot}%{_sbindir}/redis-server -%{__install} -m 0644 redis.conf %{buildroot}%{_sysconfdir}/redis.conf +%{__install} -m 0755 src/redis-benchmark %{buildroot}%{_bindir}/redis-benchmark +%{__install} -m 0755 src/redis-cli %{buildroot}%{_bindir}/redis-cli +%{__install} -m 0755 src/redis-check-dump %{buildroot}%{_bindir}/redis-check-dump +%{__install} -m 0755 src/redis-check-aof %{buildroot}%{_bindir}/redis-check-aof +%{__install} -m 0755 src/redis-server %{buildroot}%{_sbindir}/redis-server +%{__install} -m 0644 redis.conf %{buildroot}%{_sysconfdir}/redis.conf +## %{__install} -Dp -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/redis # # init @@ -89,6 +103,16 @@ make PROF="%{optflags}" %{?jobs:-j%jobs} %{__install} -m 0644 %{S:1} \ %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +%check + +cat <