From baeefbbce1aebe2c2f0492d6350db52dad80b863 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 9 Sep 2016 15:31:56 +0200 Subject: redis: cleanup --- redis.spec | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'redis.spec') diff --git a/redis.spec b/redis.spec index d334d67..77a0096 100644 --- a/redis.spec +++ b/redis.spec @@ -28,7 +28,7 @@ Name: redis Version: 3.2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database Group: Applications/Databases @@ -42,7 +42,6 @@ Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz Source1: %{name}.logrotate Source2: %{name}.init Source3: %{name}.service -Source4: %{name}.tmpfiles Source5: %{name}-sentinel.init Source6: %{name}-sentinel.service Source7: %{name}-shutdown @@ -54,6 +53,9 @@ Patch0: 0001-redis-3.2-redis-conf.patch Patch1: 0002-redis-3.2-deps-library-fPIC-performance-tuning.patch Patch2: 0003-redis-2.8.11-use-system-jemalloc.patch +# https://github.com/antirez/redis/pull/3491 - man pages +Patch3: %{name}-pr3491.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if !0%{?el5} BuildRequires: tcl >= 8.5 @@ -116,6 +118,8 @@ Documentation: http://redis.io/documentation %patch1 -p1 -b .pic %patch2 -p1 -b .jem +%patch3 -p1 + # No hidden build. sed -i -e 's|\t@|\t|g' deps/lua/src/Makefile sed -i -e 's|$(QUIET_CC)||g' src/Makefile @@ -163,8 +167,6 @@ install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name} # Install systemd unit install -p -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service install -p -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-sentinel.service -# Install systemd tmpfiles config, _tmpfilesdir only defined in fedora >= 18 -install -p -D -m 644 %{SOURCE4} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf # this folder requires systemd >= 204 install -p -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf install -p -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf @@ -184,6 +186,14 @@ ln -sf %{name}-server %{buildroot}%{_bindir}/%{name}-sentinel # Install redis-shutdown install -pDm755 %{SOURCE7} %{buildroot}%{_bindir}/%{name}-shutdown +# Install man pages +man=$(dirname %{buildroot}%{_mandir}) +for page in man/man?/*; do + install -Dpm644 $page $man/$page +done +ln -s redis-server.1 %{buildroot}%{_mandir}/man1/redis-sentinel.1 +ln -s redis.conf.5 %{buildroot}%{_mandir}/man5/redis-sentinel.conf.5 + %post %if 0%{?systemd_post:1} @@ -236,14 +246,14 @@ fi %license COPYING %doc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%attr(0644, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf -%attr(0644, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf -%dir %attr(0755, redis, redis) %{_localstatedir}/lib/%{name} -%dir %attr(0755, redis, redis) %{_localstatedir}/log/%{name} -%dir %attr(0755, redis, redis) %{_localstatedir}/run/%{name} +%attr(0600, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf +%attr(0600, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf +%dir %attr(0700, redis, redis) %{_localstatedir}/lib/%{name} +%dir %attr(0700, redis, redis) %{_localstatedir}/log/%{name} %{_bindir}/%{name}-* +%{_mandir}/man1/redis* +%{_mandir}/man5/redis* %if %{with_systemd} -%{_prefix}/lib/tmpfiles.d/%{name}.conf %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sentinel.service %dir %{_sysconfdir}/systemd/system/%{name}.service.d @@ -254,10 +264,16 @@ fi %{_initrddir}/%{name} %{_initrddir}/%{name}-sentinel %config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}.conf +%dir %attr(0700, redis, redis) %{_localstatedir}/run/%{name} %endif %changelog +* Fri Sep 9 2016 Remi Collet - 3.2.3-2 +- add man pages from https://github.com/antirez/redis/pull/3491 +- data and configuration should not be publicly readable +- remove /var/run/redis with systemd + * Tue Aug 2 2016 Remi Collet - 3.2.3-1 - Redis 3.2.3 - Release date: Tue Aug 02 10:55:24 CEST 2016 - Upgrade urgency MODERATE: Fix replication delay and redis-cli -- cgit