Update to 2.4.6 and introduce systemd unit.
Signed-off-by: Fabian Deutsch <fabian.deutsch@gmx.de>
This commit is contained in:
parent
45fb6a4a94
commit
ad0d775a93
44
redis-2.4.6-redis.conf.patch
Normal file
44
redis-2.4.6-redis.conf.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
--- 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 @@
|
||||||
|
|
||||||
|
# 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
|
||||||
|
@@ -45,12 +45,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.
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
# 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 #################################
|
||||||
|
|
11
redis.service
Normal file
11
redis.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=A persistent key-value database
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
PIDFile=/var/run/redis/redis.pid
|
||||||
|
ExecStart=/usr/sbin/redis-server
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
20
redis.spec
20
redis.spec
@ -7,7 +7,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: redis
|
Name: redis
|
||||||
Version: 2.2.12
|
Version: 2.4.6
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A persistent key-value database
|
Summary: A persistent key-value database
|
||||||
|
|
||||||
@ -17,9 +17,11 @@ URL: http://redis.io
|
|||||||
Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
|
Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}.logrotate
|
Source1: %{name}.logrotate
|
||||||
Source2: %{name}.init
|
Source2: %{name}.init
|
||||||
|
Source3: %{name}.service
|
||||||
# Update configuration for Fedora
|
# Update configuration for Fedora
|
||||||
Patch0: %{name}-2.2.2-redis.conf.patch
|
Patch0: %{name}-2.4.6-redis.conf.patch
|
||||||
|
|
||||||
|
BuildRequires: systemd-units
|
||||||
%if !0%{?el5}
|
%if !0%{?el5}
|
||||||
BuildRequires: tcl >= 8.5
|
BuildRequires: tcl >= 8.5
|
||||||
%if 0%{?with_perftools}
|
%if 0%{?with_perftools}
|
||||||
@ -49,7 +51,7 @@ different kind of sorting abilities.
|
|||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} \
|
make %{?_smp_mflags} \
|
||||||
DEBUG="" \
|
DEBUG="" \
|
||||||
CFLAGS='%{optflags} -std=c99' \
|
CFLAGS='%{optflags}' \
|
||||||
%if !0%{?el5}
|
%if !0%{?el5}
|
||||||
%if 0%{?with_perftools}
|
%if 0%{?with_perftools}
|
||||||
USE_TCMALLOC=yes \
|
USE_TCMALLOC=yes \
|
||||||
@ -72,6 +74,9 @@ install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}
|
|||||||
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name}
|
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
install -d -m 755 %{buildroot}%{_localstatedir}/run/%{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
|
# Fix non-standard-executable-perm error
|
||||||
chmod 755 %{buildroot}%{_bindir}/%{name}-*
|
chmod 755 %{buildroot}%{_bindir}/%{name}-*
|
||||||
|
|
||||||
@ -97,7 +102,7 @@ fi
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc 00-RELEASENOTES BUGS COPYING Changelog README doc/
|
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING README TODO
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||||
%dir %attr(0755, redis, root) %{_localstatedir}/lib/%{name}
|
%dir %attr(0755, redis, root) %{_localstatedir}/lib/%{name}
|
||||||
@ -106,8 +111,15 @@ fi
|
|||||||
%{_bindir}/%{name}-*
|
%{_bindir}/%{name}-*
|
||||||
%{_sbindir}/%{name}-*
|
%{_sbindir}/%{name}-*
|
||||||
%{_initrddir}/%{name}
|
%{_initrddir}/%{name}
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 12 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 2.4.6-1
|
||||||
|
- Update to 2.4.6
|
||||||
|
- systemd unit file added
|
||||||
|
- Compiler flags changed to compile 2.4.6
|
||||||
|
- Remove doc/ and Changelog
|
||||||
|
|
||||||
* Sun Jul 24 2011 Silas Sewell <silas@sewell.org> - 2.2.12-1
|
* Sun Jul 24 2011 Silas Sewell <silas@sewell.org> - 2.2.12-1
|
||||||
- Update to redis 2.2.12
|
- Update to redis 2.2.12
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user