redis/redis.spec
Marcus Rueckert a79ff485af - update to 2.2.4
* Return value of OBJECT DEBUG against sorted sets fixed, now is
    "skiplist".
- additional changes from 2.2.3
  * Fixed issue #503. MONITOR + QUIT (and other combinations) could
    crash the server.
  * OBJECT command implemented. See http://redis.io/commands/object
  * Fixed a problem in redis-cli related to escapes in the form
    "\x..".
  * Fixed a minor memory leak in redis-cli
  * Saved RDB on SIGTERM on archs where it was not working properly.
- additional changes from 2.2.2
  * AOF file descriptor leak after the first rewrite fixed.
  * Return value of GETRANGE / SUBSTR is now an empty string if the
    interval specified is not valid, or the key does not exist. Was
    a null bulk reply before, but this is against the Redis way.
- fix the path to the log file in the conf patch to match the rest
  of the package
- created log dir
- changed home dir of the redis user from /var/run/redis to
  /var/lib/redis. the old home dir wasnt created anyway.

OBS-URL: https://build.opensuse.org/package/show/server:database/redis?expand=0&rev=19
2011-04-15 18:35:16 +00:00

153 lines
4.6 KiB
RPMSpec

# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define _data_dir %{_var}/lib/%{name}
%define _log_dir %{_var}/log/%{name}
Name: redis
Version: 2.2.4
Release: 1
#
License: BSD License
Group: Productivity/Databases/Servers
Summary: Persistent key-value database
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,
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.
%package doc
Summary: HTML documentation for redis
Group: Productivity/Databases/Servers
Requires: redis = %{version}
%description doc
HTML documentation for redis database.
%prep
%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
make PROF="%{optflags}" %{?jobs:-j%jobs}
%install
%{__install} -Dd -m 0755 \
%{buildroot}%{_sysconfdir}/init.d \
%{buildroot}%{_sysconfdir}/logrotate.d \
%{buildroot}%{_bindir} \
%{buildroot}%{_libdir} \
%{buildroot}%{_sbindir} \
%{buildroot}%{_log_dir} \
%{buildroot}%{_data_dir}
%{__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 0640 redis.conf %{buildroot}%{_sysconfdir}/redis.conf
## %{__install} -Dp -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/redis
#
# init
#
%{__install} -m 0755 utils/redis_init_script %{buildroot}%{_sysconfdir}/init.d/redis
%{__ln_s} %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
#
# logrotate
#
%{__install} -m 0644 %{S:1} \
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%check
cat <<EOF
---------------------------------------------------
The test suite often fails to start a server, with
'child process exited abnormally' -- sometimes it works.
---------------------------------------------------
EOF
make test && true
%clean
rm -rf %{buildroot}
%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 || :
%post
%fillup_and_insserv %{name}
%restart_on_update %{name}
echo "To start the database server, do:"
echo " sudo rcredis start; insserv redis"
%preun
%stop_on_removal %{name}
%postun
%insserv_cleanup
%files
%defattr(-,root,root)
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING Changelog README TODO
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_bindir}/redis-*
%{_sbindir}/redis-*
%{_sbindir}/rc%{name}
%config(noreplace) %{_sysconfdir}/init.d/redis
%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/redis.conf
%dir %attr(0750, %{name}, %{name}) %{_data_dir}
%dir %attr(0750, %{name}, %{name}) %{_log_dir}
%files doc
%defattr(-,root,root)
%doc html/
%changelog