From 2d31309b6d648a91e90e0b032e5fa9ccff5e777f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Sat, 13 Sep 2014 15:05:11 +0200 Subject: [PATCH] Upstream 2.8.15 (critical bugfix for sentinel) - Fix to sentinel systemd service and configuration (thanks Remi) - Refresh patch management --- .gitignore | 1 + ...atch => 0001-redis-2.8.11-redis-conf.patch | 6 ++-- ...deps-library-fPIC-performance-tuning.patch | 4 +-- ...003-redis-2.8.11-use-system-jemalloc.patch | 4 +-- ...-disable-test-failed-on-slow-machine.patch | 4 +-- ...8.15-sentinel-configuration-file-fix.patch | 27 ++++++++++++++ redis-sentinel.service | 3 +- redis-shutdown | 2 +- redis.spec | 35 ++++++++++++------- sources | 2 +- 10 files changed, 63 insertions(+), 25 deletions(-) rename redis-2.8.11-redis-conf.patch => 0001-redis-2.8.11-redis-conf.patch (92%) rename redis-2.8.11-deps-library-fPIC-performance-tuning.patch => 0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch (88%) rename redis-2.8.11-use-system-jemalloc.patch => 0003-redis-2.8.11-use-system-jemalloc.patch (85%) rename redis-2.8.11-disable-test-failed-on-slow-machine.patch => 0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch (81%) create mode 100644 0005-redis-2.8.15-sentinel-configuration-file-fix.patch diff --git a/.gitignore b/.gitignore index 5d83980..5af7532 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /redis-2.8.12.tar.gz /redis-2.8.13.tar.gz /redis-2.8.14.tar.gz +/redis-2.8.15.tar.gz diff --git a/redis-2.8.11-redis-conf.patch b/0001-redis-2.8.11-redis-conf.patch similarity index 92% rename from redis-2.8.11-redis-conf.patch rename to 0001-redis-2.8.11-redis-conf.patch index 98fa0e3..eab5c08 100644 --- a/redis-2.8.11-redis-conf.patch +++ b/0001-redis-2.8.11-redis-conf.patch @@ -1,14 +1,14 @@ -From 7a50ab1720aba8fb9efc3be1ac354dfe726ef6d8 Mon Sep 17 00:00:00 2001 +From 81f2f0a7341a5d56202506dd68440710188615cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Thu, 11 Sep 2014 13:40:31 +0200 -Subject: [PATCH 1/4] patch0 +Subject: [PATCH 1/5] redis 2.8.11: redis conf --- redis.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redis.conf b/redis.conf -index 9209ed3..d22e705 100644 +index 24c1b7a..186121a 100644 --- a/redis.conf +++ b/redis.conf @@ -38,7 +38,7 @@ daemonize no diff --git a/redis-2.8.11-deps-library-fPIC-performance-tuning.patch b/0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch similarity index 88% rename from redis-2.8.11-deps-library-fPIC-performance-tuning.patch rename to 0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch index bbfc788..e87bdfa 100644 --- a/redis-2.8.11-deps-library-fPIC-performance-tuning.patch +++ b/0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch @@ -1,7 +1,7 @@ -From 654ea4a4536bd154a58588ede616fe7ddb3b01a1 Mon Sep 17 00:00:00 2001 +From 9083bd267135c4d3404c2f1f4a90e900cc13c097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Thu, 11 Sep 2014 13:40:54 +0200 -Subject: [PATCH 2/4] patch1 +Subject: [PATCH 2/5] redis 2.8.11: deps library fPIC performance tuning --- deps/Makefile | 2 +- diff --git a/redis-2.8.11-use-system-jemalloc.patch b/0003-redis-2.8.11-use-system-jemalloc.patch similarity index 85% rename from redis-2.8.11-use-system-jemalloc.patch rename to 0003-redis-2.8.11-use-system-jemalloc.patch index b070feb..b4ba815 100644 --- a/redis-2.8.11-use-system-jemalloc.patch +++ b/0003-redis-2.8.11-use-system-jemalloc.patch @@ -1,7 +1,7 @@ -From cfc0d8db5d3ca86aff0c2707d51b9180c407f258 Mon Sep 17 00:00:00 2001 +From 50a409c4f9f753c97c49fd10a44fd7c5f737aea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Thu, 11 Sep 2014 13:41:17 +0200 -Subject: [PATCH 3/4] patch2 +Subject: [PATCH 3/5] redis 2.8.11: use system jemalloc --- src/Makefile | 4 ++-- diff --git a/redis-2.8.11-disable-test-failed-on-slow-machine.patch b/0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch similarity index 81% rename from redis-2.8.11-disable-test-failed-on-slow-machine.patch rename to 0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch index e7f59a9..2b095c6 100644 --- a/redis-2.8.11-disable-test-failed-on-slow-machine.patch +++ b/0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch @@ -1,7 +1,7 @@ -From 88d8fa644b2d2fa73802d22fb710181e04c80496 Mon Sep 17 00:00:00 2001 +From 8b0e3e46bc63975d6fc10a65292d1c1400ce38c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Thu, 11 Sep 2014 13:42:01 +0200 -Subject: [PATCH 4/4] patch3 +Subject: [PATCH 4/5] redis 2.8.11: disable test failed on slow machine --- tests/test_helper.tcl | 1 - diff --git a/0005-redis-2.8.15-sentinel-configuration-file-fix.patch b/0005-redis-2.8.15-sentinel-configuration-file-fix.patch new file mode 100644 index 0000000..7d8879f --- /dev/null +++ b/0005-redis-2.8.15-sentinel-configuration-file-fix.patch @@ -0,0 +1,27 @@ +From 39027199f73e7164fb5f64307f491ebc165a2f5f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= +Date: Sat, 13 Sep 2014 14:03:04 +0200 +Subject: [PATCH 5/5] redis 2.8.15: sentinel configuration file fix + +--- + sentinel.conf | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/sentinel.conf b/sentinel.conf +index 4b3b792..1e6a11b 100644 +--- a/sentinel.conf ++++ b/sentinel.conf +@@ -177,5 +177,10 @@ sentinel failover-timeout mymaster 180000 + # Example: + # + # sentinel client-reconfig-script mymaster /var/redis/reconfig.sh ++# ++# 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 + + +-- +1.9.3 + diff --git a/redis-sentinel.service b/redis-sentinel.service index 43d4ad4..d5f7dc0 100644 --- a/redis-sentinel.service +++ b/redis-sentinel.service @@ -3,8 +3,7 @@ Description=Redis Sentinel After=network.target [Service] -ExecStartPre=/usr/bin/mkdir -p /var/lib/redis -ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf +ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --daemonize no ExecStop=/usr/bin/redis-shutdown sentinel User=redis Group=redis diff --git a/redis-shutdown b/redis-shutdown index 4ab3e71..45d6e8f 100644 --- a/redis-shutdown +++ b/redis-shutdown @@ -19,7 +19,7 @@ PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE` # Just in case, use default port if [ "$SERVICE_NAME" = redis ]; then - PORT=${PORT:-6279} + PORT=${PORT:-6379} else PORT=${PORT:-26739} fi diff --git a/redis.spec b/redis.spec index c968ba8..e3385b6 100644 --- a/redis.spec +++ b/redis.spec @@ -18,8 +18,8 @@ %global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: redis -Version: 2.8.14 -Release: 2%{?dist} +Version: 2.8.15 +Release: 1%{?dist} Summary: A persistent key-value database License: BSD URL: http://redis.io @@ -31,12 +31,19 @@ Source4: %{name}.tmpfiles Source5: %{name}-sentinel.init Source6: %{name}.init Source7: %{name}-shutdown +# To refresh patches: +# tar xf redis-xxx.tar.gz && cd redis-xxx && git init && git add . && git commit -m "%{version} baseline" +# git am %{patches} +# Then refresh your patches +# git format-patch HEAD~ # Update configuration for Fedora -Patch0: redis-2.8.11-redis-conf.patch -Patch1: redis-2.8.11-deps-library-fPIC-performance-tuning.patch -Patch2: redis-2.8.11-use-system-jemalloc.patch +Patch0001: 0001-redis-2.8.11-redis-conf.patch +Patch0002: 0002-redis-2.8.11-deps-library-fPIC-performance-tuning.patch +Patch0003: 0003-redis-2.8.11-use-system-jemalloc.patch # tests/integration/replication-psync.tcl failed on slow machines(GITHUB #1417) -Patch3: redis-2.8.11-disable-test-failed-on-slow-machine.patch +Patch0004: 0004-redis-2.8.11-disable-test-failed-on-slow-machine.patch +# Fix sentinel configuration to use a different log file than redis +Patch0005: 0005-redis-2.8.15-sentinel-configuration-file-fix.patch %if 0%{?with_perftools} BuildRequires: gperftools-devel %else @@ -94,12 +101,11 @@ You can use Redis from most programming languages also. %prep %setup -q rm -frv deps/jemalloc -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%if 0%{?with_tests} -%patch3 -p1 -%endif +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch0004 -p1 +%patch0005 -p1 # No hidden build. sed -i -e 's|\t@|\t|g' deps/lua/src/Makefile @@ -257,6 +263,11 @@ fi %endif %changelog +* Sat Sep 13 2014 Haïkel Guémar - 2.8.15-1 +- Upstream 2.8.15 (critical bugfix for sentinel) +- Fix to sentinel systemd service and configuration (thanks Remi) +- Refresh patch management + * Thu Sep 11 2014 Haïkel Guémar - 2.8.14-2 - Cleanup spec - Fix shutdown for redis-{server,sentinel} diff --git a/sources b/sources index 70b9381..c1762ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5005c764bf8760ef661c8b198bb01780 redis-2.8.14.tar.gz +2a02cef123fffac2ee980323df3fcd7f redis-2.8.15.tar.gz