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 --- 0001-redis-3.2-redis-conf.patch | 36 +++++++++++ ...-3.2-deps-library-fPIC-performance-tuning.patch | 36 +++++++++++ redis-dev.spec | 69 ++++++++++------------ 3 files changed, 102 insertions(+), 39 deletions(-) create mode 100644 0001-redis-3.2-redis-conf.patch create mode 100644 0002-redis-3.2-deps-library-fPIC-performance-tuning.patch diff --git a/0001-redis-3.2-redis-conf.patch b/0001-redis-3.2-redis-conf.patch new file mode 100644 index 0000000..2803349 --- /dev/null +++ b/0001-redis-3.2-redis-conf.patch @@ -0,0 +1,36 @@ +diff -up ./redis.conf.rpmconf ./redis.conf +--- ./redis.conf.rpmconf 2015-12-23 13:35:32.000000000 +0100 ++++ ./redis.conf 2016-01-15 16:32:22.491355290 +0100 +@@ -140,7 +140,7 @@ loglevel notice + # Specify the log file name. Also the empty string 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 "" ++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. +@@ -224,7 +224,7 @@ dbfilename dump.rdb + # The Append Only File will also be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redis/ + + ################################# REPLICATION ################################# + +diff -up ./sentinel.conf.rpmconf ./sentinel.conf +--- ./sentinel.conf.rpmconf 2015-12-23 13:35:32.000000000 +0100 ++++ ./sentinel.conf 2016-01-15 16:32:22.491355290 +0100 +@@ -4,6 +4,11 @@ + # The port that this sentinel instance will run on + port 26379 + ++# Specify the log file name. Also the empty string 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 /var/log/redis/sentinel.log ++ + # sentinel announce-ip + # sentinel announce-port + # diff --git a/0002-redis-3.2-deps-library-fPIC-performance-tuning.patch b/0002-redis-3.2-deps-library-fPIC-performance-tuning.patch new file mode 100644 index 0000000..acac994 --- /dev/null +++ b/0002-redis-3.2-deps-library-fPIC-performance-tuning.patch @@ -0,0 +1,36 @@ +diff -up ./deps/geohash-int/Makefile.pic ./deps/geohash-int/Makefile +--- ./deps/geohash-int/Makefile.pic 2016-01-15 16:47:38.818294577 +0100 ++++ ./deps/geohash-int/Makefile 2016-01-15 16:48:23.641486461 +0100 +@@ -2,7 +2,7 @@ STD= + WARN= -Wall + OPT= -O2 + +-R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) ++R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -fPIC + R_LDFLAGS= $(LDFLAGS) + DEBUG= -g + +diff -up ./deps/linenoise/Makefile.pic ./deps/linenoise/Makefile +--- ./deps/linenoise/Makefile.pic 2015-12-23 13:35:32.000000000 +0100 ++++ ./deps/linenoise/Makefile 2016-01-15 16:44:52.561582851 +0100 +@@ -2,7 +2,7 @@ STD= + WARN= -Wall + OPT= -Os + +-R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) ++R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -fPIC + R_LDFLAGS= $(LDFLAGS) + DEBUG= -g + +diff -up ./deps/Makefile.pic ./deps/Makefile +--- ./deps/Makefile.pic 2015-12-23 13:35:32.000000000 +0100 ++++ ./deps/Makefile 2016-01-15 16:44:52.561582851 +0100 +@@ -59,7 +59,7 @@ ifeq ($(uname_S),SunOS) + LUA_CFLAGS= -D__C99FEATURES__=1 + endif + +-LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' $(CFLAGS) ++LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' $(CFLAGS) -fPIC + LUA_LDFLAGS+= $(LDFLAGS) + # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more + # challenging to cross-compile lua (and redis). These defines make it easier 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