[redis/epel7] Upstream 2.8.19 (RHBZ #1175232)

Haïkel Guémar hguemar at fedoraproject.org
Fri Feb 27 19:40:40 UTC 2015


commit 836c562d7ec60038fc20899306a1063d88102aa5
Author: Haïkel Guémar <hguemar at fedoraproject.org>
Date:   Thu Feb 26 17:34:32 2015 +0100

    Upstream 2.8.19 (RHBZ #1175232)
    
    Fix permissions (RHBZ #1182913)

 redis-limit-init    |  6 +++++
 redis-limit-systemd |  7 ++++++
 redis.spec          | 66 ++++++++++++++++++++---------------------------------
 3 files changed, 38 insertions(+), 41 deletions(-)
---
diff --git a/redis-limit-init b/redis-limit-init
new file mode 100644
index 0000000..2986bfd
--- /dev/null
+++ b/redis-limit-init
@@ -0,0 +1,6 @@
+# If you need to change max open file limit
+# for example, when you change maxclient in configuration
+# you can change the value below
+# see "man limits.conf" for information
+redis soft nofile 10240
+redis hard nofile 10240
diff --git a/redis-limit-systemd b/redis-limit-systemd
new file mode 100644
index 0000000..8003c2f
--- /dev/null
+++ b/redis-limit-systemd
@@ -0,0 +1,7 @@
+# If you need to change max open file limit
+# for example, when you change maxclient in configuration
+# you can change the LimitNOFILE value below
+# see "man systemd.exec" for information
+
+[Service]
+LimitNOFILE=10240
diff --git a/redis.spec b/redis.spec
index 3c2b553..fce5491 100644
--- a/redis.spec
+++ b/redis.spec
@@ -1,14 +1,7 @@
 %global _hardened_build 1
 %global with_perftools 0
 
-# redis 2.8 sentinel is the first upstream version to work
-# however as packaged here it is entirely broken
-# FIXME: consider removal into a separate package
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
-%global with_sentinel 1
-%endif
-
-%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
 %global with_systemd 1
 %else
 %global with_systemd 0
@@ -18,7 +11,7 @@
 %global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
 
 Name:              redis
-Version:           2.8.18
+Version:           2.8.19
 Release:           1%{?dist}
 Summary:           A persistent key-value database
 License:           BSD
@@ -31,6 +24,8 @@ Source4:           %{name}.tmpfiles
 Source5:           %{name}-sentinel.init
 Source6:           %{name}.init
 Source7:           %{name}-shutdown
+Source8:           %{name}-limit-systemd
+Source9:           %{name}-limit-init
 # To refresh patches:
 # tar xf redis-xxx.tar.gz && cd redis-xxx && git init && git add . && git commit -m "%{version} baseline"
 # git am %{patches}
@@ -145,25 +140,23 @@ install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
 
 # Install configuration files.
 install -pDm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
-%if 0%{?with_sentinel}
 install -pDm644 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
-%endif
 
-# Install Systemd/SysV files.
+# Install Systemd unit files.
 %if 0%{?with_systemd}
 mkdir -p %{buildroot}%{_unitdir}
 install -pm644 %{S:3} %{buildroot}%{_unitdir}
-%if 0%{?with_sentinel}
 install -pm644 %{S:2} %{buildroot}%{_unitdir}
-%endif
 
 # Install systemd tmpfiles config.
 install -pDm644 %{S:4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
-%else
-%if 0%{?with_sentinel}
+# Install systemd limit files (requires systemd >= 204)
+install -p -D -m 644 %{S:8} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf
+install -p -D -m 644 %{S:8} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf
+%else # install SysV service files
 install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name}-sentinel
-%endif
 install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}
+install -p -D -m 644 %{S:9} %{buildroot}%{_sysconfdir}/security/limits.d/95-%{name}.conf
 %endif
 
 # Fix non-standard-executable-perm error.
@@ -171,7 +164,7 @@ chmod 755 %{buildroot}%{_bindir}/%{name}-*
 
 # create redis-sentinel command as described on
 # http://redis.io/topics/sentinel
-ln -s %{name}-server %{buildroot}%{_bindir}/%{name}-sentinel
+ln -sf %{name}-server %{buildroot}%{_bindir}/%{name}-sentinel
 
 # Install redis-shutdown
 install -pDm755 %{S:7} %{buildroot}%{_bindir}/%{name}-shutdown
@@ -179,10 +172,8 @@ install -pDm755 %{S:7} %{buildroot}%{_bindir}/%{name}-shutdown
 %check
 %if 0%{?with_tests}
 make test ||:
-%if 0%{?with_sentinel}
 make test-sentinel ||:
 %endif
-%endif
 
 %pre
 getent group %{name} &> /dev/null || \
@@ -195,44 +186,32 @@ exit 0
 %post
 %if 0%{?with_systemd}
 %systemd_post %{name}.service
-%if 0%{?with_sentinel}
 %systemd_post %{name}-sentinel.service
-%endif
 %else
 chkconfig --add %{name}
-%if 0%{?with_sentinel}
 chkconfig --add %{name}-sentinel
 %endif
-%endif
 
 %preun
 %if 0%{?with_systemd}
 %systemd_preun %{name}.service
-%if 0%{?with_sentinel}
 %systemd_preun %{name}-sentinel.service
-%endif
 %else
 if [ $1 -eq 0 ] ; then
 service %{name} stop &> /dev/null
 chkconfig --del %{name} &> /dev/null
-%if 0%{?with_sentinel}
 service %{name}-sentinel stop &> /dev/null
 chkconfig --del %{name}-sentinel &> /dev/null
 %endif
-%endif
 
 %postun
 %if 0%{?with_systemd}
 %systemd_postun_with_restart %{name}.service
-%if 0%{?with_sentinel}
 %systemd_postun_with_restart %{name}-sentinel.service
-%endif
 %else
 if [ "$1" -ge "1" ] ; then
     service %{name} condrestart >/dev/null 2>&1 || :
-%if 0%{?with_sentinel}
     service %{name}-sentinel condrestart >/dev/null 2>&1 || :
-%endif
 fi
 %endif
 
@@ -242,27 +221,32 @@ fi
 %doc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 %attr(0644, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf
-%if 0%{?with_sentinel}
 %attr(0644, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf
-%endif
-%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
-%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
-%dir %attr(0750, redis, redis) %{_localstatedir}/run/%{name}
+%dir %attr(0755, redis, redis) %{_sharedstatedir}/%{name}
+%dir %attr(0755, redis, redis) %{_localstatedir}/log/%{name}
+%dir %attr(0755, redis, redis) %{_localstatedir}/run/%{name}
 %{_bindir}/%{name}-*
 %if 0%{?with_systemd}
 %{_tmpfilesdir}/%{name}.conf
 %{_unitdir}/%{name}.service
-%if 0%{?with_sentinel}
 %{_unitdir}/%{name}-sentinel.service
-%endif
+%dir %{_sysconfdir}/systemd/system/%{name}.service.d
+%config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf
+%dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d
+%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf
 %else
 %{_initrddir}/%{name}
-%if 0%{?with_sentinel}
 %{_initrddir}/%{name}-sentinel
-%endif
+%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}.conf
 %endif
 
 %changelog
+* Thu Feb 26 2015 Haïkel Guémar <hguemar at fedoraproject.org> - 2.8.19-1
+- Upstream 2.8.19 (RHBZ #1175232)
+- Fix permissions (RHBZ #1182913)
+- Add limits config file
+- Spec cleanups
+
 * Tue Dec 09 2014 Haïkel Guémar <hguemar at fedoraproject.org> - 2.8.18-1
 - Upstream 2.8.18
 - Backport init scripts fixes from rawhide


More information about the scm-commits mailing list