From 3e418be6b632963e270c9736c596f631d309e0bc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 15 Jan 2016 17:16:48 +0100 Subject: redis: 3.2-rc1 --- redis-dev.spec | 69 +++++++++++++++++++++++++--------------------------------- 1 file changed, 30 insertions(+), 39 deletions(-) (limited to 'redis-dev.spec') diff --git a/redis-dev.spec b/redis-dev.spec index a2555c6..b68dd82 100644 --- a/redis-dev.spec +++ b/redis-dev.spec @@ -9,30 +9,36 @@ # %global _hardened_build 1 -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 -%global with_systemd 1 -%else -%global with_systemd 0 -%endif # systemd >= 204 with additional service config %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -%global with_systemdmax 1 +%global with_systemd 1 %else -%global with_systemdmax 0 +%global with_systemd 0 %endif # Tests fail in mock, not in local build. %global with_tests %{?_with_tests:1}%{!?_with_tests:0} +# Pre-version are only available in github +%global prever rc1 +%global gh_commit 3955fdee60524234b642c84d7bc88f179e6dea3c +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner antirez +%global gh_project redis + Name: redis -Version: 3.0.6 -Release: 1%{?dist} +Version: 3.2 +Release: 0.1.%{prever}%{?dist} Summary: A persistent key-value database Group: Applications/Databases License: BSD URL: http://redis.io -Source0: http://download.redis.io/releases/%{name}-%{version}%{?prever:-%{prever}}.tar.gz +%if 0%{?prever:1} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +%else +Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz +%endif Source1: %{name}.logrotate Source2: %{name}.init Source3: %{name}.service @@ -44,8 +50,8 @@ Source8: %{name}-limit-systemd Source9: %{name}-limit-init # Update configuration for Fedora -Patch0: 0001-redis-2.8.18-redis-conf.patch -Patch1: 0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch +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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -100,7 +106,12 @@ Documentation: http://redis.io/documentation %prep -%setup -q -n %{name}-%{version}%{?prever:-%{prever}} +%if 0%{?prever:1} +%setup -q -n %{gh_project}-%{gh_commit} +%else +%setup -q -n %{name}-%{version} +%endif + %patch0 -p1 -b .rpmconf %patch1 -p1 -b .pic %patch2 -p1 -b .jem @@ -142,11 +153,9 @@ 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 -%if %{with_systemdmax} # 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 -%endif %else install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name} install -p -D -m 755 %{SOURCE5} %{buildroot}%{_initrddir}/%{name}-sentinel @@ -168,11 +177,8 @@ install -pDm755 %{SOURCE7} %{buildroot}%{_bindir}/%{name}-shutdown %if 0%{?systemd_post:1} %systemd_post redis.service %systemd_post redis-sentinel.service -%endif -# Initial installation (always, for new service) -%if %{with_systemd} -/bin/systemctl daemon-reload >/dev/null 2>&1 || : %else +# Initial installation (always, for new service) /sbin/chkconfig --add redis /sbin/chkconfig --add redis-sentinel %endif @@ -192,19 +198,11 @@ exit 0 %else if [ $1 = 0 ]; then # Package removal, not upgrade -%if %{with_systemd} - /bin/systemctl --no-reload disable redis-sentinel.service >/dev/null 2>&1 || : - /bin/systemctl stop redis-sentinel.service >/dev/null 2>&1 || : - - /bin/systemctl --no-reload disable redis.service >/dev/null 2>&1 || : - /bin/systemctl stop redis.service >/dev/null 2>&1 || : -%else /sbin/service redis-sentinel stop &> /dev/null /sbin/chkconfig --del redis-sentinel &> /dev/null /sbin/service redis stop &> /dev/null /sbin/chkconfig --del redis &> /dev/null -%endif fi %endif @@ -212,27 +210,18 @@ fi %systemd_postun_with_restart redis.service %systemd_postun_with_restart redis-sentinel.service %else -%if %{with_systemd} -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ]; then - # Package upgrade, not uninstall - /bin/systemctl try-restart redis.service >/dev/null 2>&1 || : - /bin/systemctl try-restart redis-sentinel.service >/dev/null 2>&1 || : -fi -%else if [ $1 -ge 1 ]; then /sbin/service redis condrestart >/dev/null 2>&1 || : /sbin/service redis-sentinel condrestart >/dev/null 2>&1 || : fi %endif -%endif %files %defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license COPYING -%doc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README +%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 @@ -244,12 +233,10 @@ fi %{_prefix}/lib/tmpfiles.d/%{name}.conf %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sentinel.service -%if %{with_systemdmax} %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 -%endif %else %{_initrddir}/%{name} %{_initrddir}/%{name}-sentinel @@ -258,6 +245,10 @@ fi %changelog +* Fri Jan 15 2016 Remi Collet - 3.2-0.1.rc1 +- update to 3.2-rc1 (version 3.1.101) + This is the first release candidate of Redis 3.2 + * Sat Dec 26 2015 Remi Collet - 3.0.6-1 - Redis 3.0.6 - Release date: 18 Dec 2015 - Upgrade urgency: MODERATE -- cgit