forked from pool/redis
Accepting request 104075 from server:database
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/104075 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/redis?expand=0&rev=2
This commit is contained in:
commit
66e8646191
@ -15,7 +15,7 @@ Index: utils/redis_init_script
|
|||||||
+# Should-Start:
|
+# Should-Start:
|
||||||
+# Required-Stop: $syslog $remote_fs
|
+# Required-Stop: $syslog $remote_fs
|
||||||
+# Should-Stop:
|
+# Should-Stop:
|
||||||
+# Default-Start: 3 4 5
|
+# Default-Start: 3 5
|
||||||
+# Default-Stop: 0 1 2 6
|
+# Default-Stop: 0 1 2 6
|
||||||
+# Short-Description: Redis server
|
+# Short-Description: Redis server
|
||||||
+# Description: Starts and stops the Redis daemon
|
+# Description: Starts and stops the Redis daemon
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 24 09:56:41 UTC 2011 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Correct the 'how to get it running' comment in %post
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 24 09:48:13 UTC 2011 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Don't use runlevel 4 in init script
|
||||||
|
- Compile with RPM_OPT_FLAGS (PROG env var didn't cut it)
|
||||||
|
- Remove outdated %clean section, bogus doc package (there are none)
|
||||||
|
and netcat runtime dependency (for init script?)
|
||||||
|
- Set license to SDPX style
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 24 10:48:19 UTC 2011 - asn@cryptomilk.org
|
Mon Oct 24 10:48:19 UTC 2011 - asn@cryptomilk.org
|
||||||
|
|
||||||
|
87
redis.spec
87
redis.spec
@ -1,3 +1,4 @@
|
|||||||
|
#
|
||||||
# Copyright (c) 2011 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -12,35 +13,30 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# norootforbuild
|
|
||||||
|
|
||||||
%define _data_dir %{_var}/lib/%{name}
|
%define _data_dir %{_localstatedir}/lib/%{name}
|
||||||
%define _log_dir %{_var}/log/%{name}
|
%define _log_dir %{_localstatedir}/log/%{name}
|
||||||
|
|
||||||
Name: redis
|
Name: redis
|
||||||
Version: 2.4.1
|
Version: 2.4.1
|
||||||
Release: 1
|
Release: 0
|
||||||
#
|
License: BSD-3-Clause
|
||||||
License: BSD License
|
|
||||||
Group: Productivity/Databases/Servers
|
|
||||||
Summary: Persistent key-value database
|
Summary: Persistent key-value database
|
||||||
Url: http://redis.io/
|
Url: http://redis.io/
|
||||||
#
|
Group: Productivity/Databases/Servers
|
||||||
Source: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
|
Source: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}.logrotate
|
Source1: %{name}.logrotate
|
||||||
Source4: redis.sysconfig
|
Source4: redis.sysconfig
|
||||||
#
|
# PATCH-FIX-OPENSUSE -- openSUSE-style init script
|
||||||
Patch0: %{name}-initscript.patch
|
Patch0: %{name}-initscript.patch
|
||||||
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch1: %{name}-conf.patch
|
Patch1: %{name}-conf.patch
|
||||||
|
# PATCH-FIX-UPSTREAM -- Fixed AOF: Server should have been started: Expected '1' to equal or match '0'
|
||||||
Patch2: skip-aof-test.patch
|
Patch2: skip-aof-test.patch
|
||||||
#
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
# for init script
|
|
||||||
Requires: netcat
|
|
||||||
Requires: logrotate
|
|
||||||
|
|
||||||
# for make test
|
# for make test
|
||||||
BuildRequires: tcl
|
BuildRequires: tcl
|
||||||
|
Requires: logrotate
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Redis is an advanced key-value store. It is similar to memcached but the dataset
|
Redis is an advanced key-value store. It is similar to memcached but the dataset
|
||||||
@ -50,72 +46,46 @@ with atomic operations to push/pop elements, add/remove elements, perform server
|
|||||||
side union, intersection, difference between sets, and so forth. Redis supports
|
side union, intersection, difference between sets, and so forth. Redis supports
|
||||||
different kind of sorting abilities.
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0
|
||||||
%patch1
|
%patch1
|
||||||
|
|
||||||
# skip-aof-test.patch
|
|
||||||
# Failures: - Fixed AOF: Server should have been started: Expected '1' to equal or match '0'
|
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
|
||||||
# Documents are not available in this build
|
|
||||||
#mv doc html
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make PROF="%{optflags}" %{?jobs:-j%jobs}
|
CFLAGS="%{optflags}" make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__install} -Dd -m 0755 \
|
install -d %{buildroot}%{_log_dir} %{buildroot}%{_data_dir}
|
||||||
%{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 -D -m 0755 src/redis-benchmark %{buildroot}%{_bindir}/redis-benchmark
|
||||||
%{__install} -m 0755 src/redis-cli %{buildroot}%{_bindir}/redis-cli
|
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-dump %{buildroot}%{_bindir}/redis-check-dump
|
||||||
%{__install} -m 0755 src/redis-check-aof %{buildroot}%{_bindir}/redis-check-aof
|
install -m 0755 src/redis-check-aof %{buildroot}%{_bindir}/redis-check-aof
|
||||||
%{__install} -m 0755 src/redis-server %{buildroot}%{_sbindir}/redis-server
|
install -D -m 0755 src/redis-server %{buildroot}%{_sbindir}/redis-server
|
||||||
%{__install} -m 0640 redis.conf %{buildroot}%{_sysconfdir}/redis.conf
|
install -D -m 0640 redis.conf %{buildroot}%{_sysconfdir}/redis.conf
|
||||||
## %{__install} -Dp -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/redis
|
## install -Dp -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/redis
|
||||||
|
|
||||||
#
|
#
|
||||||
# init
|
# init
|
||||||
#
|
#
|
||||||
%{__install} -m 0755 utils/redis_init_script %{buildroot}%{_sysconfdir}/init.d/redis
|
install -D -m 0755 utils/redis_init_script %{buildroot}%{_sysconfdir}/init.d/redis
|
||||||
%{__ln_s} %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
ln -s %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
|
||||||
#
|
#
|
||||||
# logrotate
|
# logrotate
|
||||||
#
|
#
|
||||||
%{__install} -m 0644 %{S:1} \
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
The test suite often fails to start a server, with
|
The test suite often fails to start a server, with
|
||||||
'child process exited abnormally' -- sometimes it works.
|
'child process exited abnormally' -- sometimes it works.
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
EOF
|
EOF
|
||||||
make test && true
|
make test && true
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd -r %{name} &>/dev/null || :
|
/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 || :
|
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "User for Redis key-value store" -d %{_data_dir} %{name} &>/dev/null || :
|
||||||
@ -124,16 +94,17 @@ rm -rf %{buildroot}
|
|||||||
%fillup_and_insserv %{name}
|
%fillup_and_insserv %{name}
|
||||||
%restart_on_update %{name}
|
%restart_on_update %{name}
|
||||||
echo "To start the database server, do:"
|
echo "To start the database server, do:"
|
||||||
echo " sudo rcredis start; insserv redis"
|
echo " sudo rcredis start; sudo insserv redis"
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal %{name}
|
%stop_on_removal %{name}
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%restart_on_update
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING Changelog README TODO
|
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING Changelog README TODO
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%{_bindir}/redis-*
|
%{_bindir}/redis-*
|
||||||
@ -144,8 +115,4 @@ echo " sudo rcredis start; insserv redis"
|
|||||||
%dir %attr(0750, %{name}, %{name}) %{_data_dir}
|
%dir %attr(0750, %{name}, %{name}) %{_data_dir}
|
||||||
%dir %attr(0750, %{name}, %{name}) %{_log_dir}
|
%dir %attr(0750, %{name}, %{name}) %{_log_dir}
|
||||||
|
|
||||||
%files doc
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING Changelog README TODO
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user