diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch | 6 | ||||
-rw-r--r-- | 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch | 29 | ||||
-rw-r--r-- | redis-limit-init | 6 | ||||
-rw-r--r-- | redis-limit-systemd | 11 | ||||
-rw-r--r-- | redis-sentinel.init | 105 | ||||
-rw-r--r-- | redis-sentinel.service | 5 | ||||
-rw-r--r-- | redis-shutdown | 40 | ||||
-rw-r--r-- | redis.init | 105 | ||||
-rw-r--r-- | redis.service | 5 | ||||
-rw-r--r-- | redis.spec | 501 |
11 files changed, 394 insertions, 421 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch b/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch index d18bbb0..f7e3dd1 100644 --- a/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch +++ b/0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch @@ -1,7 +1,7 @@ -From ae2235dab50c86480ee37f50119af6668f312ba3 Mon Sep 17 00:00:00 2001 +From d68953c34d4d6987883ddf6158c3c69e7500667f Mon Sep 17 00:00:00 2001 From: Remi Collet <fedora@famillecollet.com> Date: Thu, 8 Sep 2016 14:51:15 +0200 -Subject: [PATCH 1/2] 1st man pageis for - redis-cli - redis-benchmark - +Subject: [PATCH 1/3] 1st man pageis for - redis-cli - redis-benchmark - redis-check-aof - redis-check-rdb - redis-server - redis.conf as redis-sentinel is a symlink to redis-server, same page can be used (also symlinked) @@ -648,5 +648,5 @@ index 0000000..1e0c9c9 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -2.20.1 +2.24.1 diff --git a/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch b/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch deleted file mode 100644 index 3d90660..0000000 --- a/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 85d847361b519dca524178e3197dbb0ed24e0cb5 Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Fri, 9 Sep 2016 17:23:27 +0200 -Subject: [PATCH 2/2] install redis-check-rdb as a symlink instead of - duplicating the binary - ---- - src/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index 2a68649..585c95b 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -307,9 +307,9 @@ install: all - $(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(INSTALL_BIN) - $(REDIS_INSTALL) $(REDIS_BENCHMARK_NAME) $(INSTALL_BIN) - $(REDIS_INSTALL) $(REDIS_CLI_NAME) $(INSTALL_BIN) -- $(REDIS_INSTALL) $(REDIS_CHECK_RDB_NAME) $(INSTALL_BIN) -- $(REDIS_INSTALL) $(REDIS_CHECK_AOF_NAME) $(INSTALL_BIN) - @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_SENTINEL_NAME) -+ @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_RDB_NAME) -+ @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_AOF_NAME) - - uninstall: - rm -f $(INSTALL_BIN)/{$(REDIS_SERVER_NAME),$(REDIS_BENCHMARK_NAME),$(REDIS_CLI_NAME),$(REDIS_CHECK_RDB_NAME),$(REDIS_CHECK_AOF_NAME),$(REDIS_SENTINEL_NAME)} --- -2.20.1 - diff --git a/redis-limit-init b/redis-limit-init deleted file mode 100644 index 2986bfd..0000000 --- a/redis-limit-init +++ /dev/null @@ -1,6 +0,0 @@ -# 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 index 8003c2f..a792937 100644 --- a/redis-limit-systemd +++ b/redis-limit-systemd @@ -1,7 +1,14 @@ # 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 +# you can change the LimitNOFILE value below. +# See "man systemd.exec" for more information. + +# Slave nodes on large system may take lot of time to start. +# You may need to uncomment TimeoutStartSec and TimeoutStopSec +# directives below and raise their value. +# See "man systemd.service" for more information. [Service] LimitNOFILE=10240 +#TimeoutStartSec=90s +#TimeoutStopSec=90s diff --git a/redis-sentinel.init b/redis-sentinel.init deleted file mode 100644 index 1f8c005..0000000 --- a/redis-sentinel.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# redis init file for starting up the redis-sentinel daemon -# -# chkconfig: - 21 79 -# description: Starts and stops the redis-sentinel daemon. -# -### BEGIN INIT INFO -# Provides: redis-sentinel -# Required-Start: $local_fs $remote_fs $network -# Required-Stop: $local_fs $remote_fs $network -# Short-Description: start and stop Sentinel server -# Description: A persistent key-value database -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -name="redis-sentinel" -exec="/usr/bin/$name" -shut="/usr/libexec/redis-shutdown" -pidfile="/var/run/redis/sentinel.pid" -SENTINEL_CONFIG="/etc/redis-sentinel.conf" - -[ -e /etc/sysconfig/redis-sentinel ] && . /etc/sysconfig/redis-sentinel - -lockfile=/var/lock/subsys/redis - -start() { - [ -f $SENTINEL_CONFIG ] || exit 6 - [ -x $exec ] || exit 5 - echo -n $"Starting $name: " - daemon --user ${REDIS_USER-redis} "$exec $SENTINEL_CONFIG --daemonize yes --pidfile $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $name: " - [ -x $shut ] && $shut $name - retval=$? - if [ -f $pidfile ] - then - # shutdown haven't work, try old way - killproc -p $pidfile $name - retval=$? - else - success "$name shutdown" - fi - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - false -} - -rh_status() { - status -p $pidfile $name -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}" - exit 2 -esac -exit $? diff --git a/redis-sentinel.service b/redis-sentinel.service index 15463cf..0bcc990 100644 --- a/redis-sentinel.service +++ b/redis-sentinel.service @@ -1,10 +1,11 @@ [Unit] Description=Redis Sentinel After=network.target +After=network-online.target +Wants=network-online.target [Service] -ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --supervised systemd -ExecStop=/usr/libexec/redis-shutdown redis-sentinel +ExecStart=/usr/bin/redis-sentinel /etc/redis/sentinel.conf --daemonize no --supervised systemd Type=notify User=redis Group=redis diff --git a/redis-shutdown b/redis-shutdown deleted file mode 100644 index 53b9f09..0000000 --- a/redis-shutdown +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# Wrapper to close properly redis and sentinel -test x"$REDIS_DEBUG" != x && set -x - -REDIS_CLI=/usr/bin/redis-cli - -# Retrieve service name -SERVICE_NAME="$1" -if [ -z "$SERVICE_NAME" ]; then - SERVICE_NAME=redis -fi - -# Get the proper config file based on service name -CONFIG_FILE="/etc/$SERVICE_NAME.conf" - -# Use awk to retrieve host, port from config file -HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE | tail -n1` -PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE | tail -n1` -PASS=`awk '/^[[:blank:]]*requirepass/ { print $2 }' $CONFIG_FILE | tail -n1` -SOCK=`awk '/^[[:blank:]]*unixsocket\s/ { print $2 }' $CONFIG_FILE | tail -n1` - -# Just in case, use default host, port -HOST=${HOST:-127.0.0.1} -if [ "$SERVICE_NAME" = redis ]; then - PORT=${PORT:-6379} -else - PORT=${PORT:-26739} -fi - -# Setup additional parameters -# e.g password-protected redis instances -[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS" - -# shutdown the service properly -if [ -e "$SOCK" ] ; then - $REDIS_CLI -s $SOCK $ADDITIONAL_PARAMS shutdown -else - $REDIS_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown -fi diff --git a/redis.init b/redis.init deleted file mode 100644 index 508a6ec..0000000 --- a/redis.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# redis init file for starting up the redis daemon -# -# chkconfig: - 20 80 -# description: Starts and stops the redis daemon. -# -### BEGIN INIT INFO -# Provides: redis-server -# Required-Start: $local_fs $remote_fs $network -# Required-Stop: $local_fs $remote_fs $network -# Short-Description: start and stop Redis server -# Description: A persistent key-value database -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -name="redis-server" -exec="/usr/bin/$name" -shut="/usr/libexec/redis-shutdown" -pidfile="/var/run/redis/redis.pid" -REDIS_CONFIG="/etc/redis.conf" - -[ -e /etc/sysconfig/redis ] && . /etc/sysconfig/redis - -lockfile=/var/lock/subsys/redis - -start() { - [ -f $REDIS_CONFIG ] || exit 6 - [ -x $exec ] || exit 5 - echo -n $"Starting $name: " - daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG --daemonize yes --pidfile $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $name: " - [ -x $shut ] && $shut - retval=$? - if [ -f $pidfile ] - then - # shutdown haven't work, try old way - killproc -p $pidfile $name - retval=$? - else - success "$name shutdown" - fi - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - false -} - -rh_status() { - status -p $pidfile $name -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}" - exit 2 -esac -exit $? diff --git a/redis.service b/redis.service index 88e9edc..a577c83 100644 --- a/redis.service +++ b/redis.service @@ -1,10 +1,11 @@ [Unit] Description=Redis persistent key-value database After=network.target +After=network-online.target +Wants=network-online.target [Service] -ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd -ExecStop=/usr/libexec/redis-shutdown +ExecStart=/usr/bin/redis-server /etc/redis/redis.conf --daemonize no --supervised systemd Type=notify User=redis Group=redis @@ -9,66 +9,52 @@ # %global _hardened_build 1 -%if 0%{?fedora} >= 29 -%global with_jemalloc 1 -%else -%global with_jemalloc 0 -%endif +# temp workaround to https://bugzilla.redhat.com/2059488 +%undefine _package_note_file -%if 0%{?fedora} < 30 && 0%{?rhel} < 8 -%global with_redistrib 1 -%else -%global with_redistrib 0 -%endif +# to use system libjemalloc +%bcond_with jemalloc -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -%global with_systemd 1 +%if 0%{?fedora} < 30 && 0%{?rhel} < 8 +%bcond_without redistrib %else -%global with_systemd 0 +%bcond_with redistrib %endif # Tests fail in mock, not in local build. -%global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%bcond_with tests -# Pre-version are only available in github -%global upstream_ver 5.0.5 -#global upstream_pre RC6 -%global gh_commit a1e79fc9b2f42f04a8ab59c05c3228931adcd0a6 -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner antirez -%global gh_project redis +%global upstream_ver 7.2.4 +#global upstream_pre rc3 # Commit IDs for the (unversioned) redis-doc repository # https://fedoraproject.org/wiki/Packaging:SourceURL "Commit Revision" -# https://github.com/antirez/redis-doc/commits/master -%global doc_commit 8c322492b0ad14067bd4cebce20f3509d989370d +# https://github.com/redis/redis-doc/commits/master +%global gh_owner redis +%global gh_project redis +%global doc_commit 8663f15b294e87f41b7d42d05fee1ec2f1714443 %global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7}) -# %%{_rpmmacrodir} not usable on EL-6 - EL-7 (without epel-rpm)s-macros) +# %%{_rpmmacrodir} not usable on EL-6 - EL-7 (without epel-rpms-macros) %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: redis Version: %{upstream_ver}%{?upstream_pre:~%{upstream_pre}} Release: 1%{?dist} Summary: A persistent key-value database -Group: Applications/Databases -License: BSD +# redis, hiredis: BSD-3-Clause +# hdrhistogram, jemalloc, lzf, linenoise: BSD-2-Clause +# lua: MIT +# fpconv: BSL-1.0 +License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: http://redis.io -%if 0%{?upstream_pre:1} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_ver}%{upstream_pre}-%{gh_short}.tar.gz -%else -Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz -%endif +Source0: https://download.redis.io/releases/%{name}-%{upstream_ver}%{?upstream_pre:-%{upstream_pre}}.tar.gz Source1: %{name}.logrotate Source2: %{name}-sentinel.service Source3: %{name}.service -Source4: %{name}-sentinel.init -Source5: %{name}.init -Source6: %{name}-shutdown Source7: %{name}-limit-systemd -Source8: %{name}-limit-init Source9: macros.%{name} -Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz +Source10: https://github.com/%{gh_owner}/%{gh_project}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz # To refresh patches: # tar xf redis-xxx.tar.gz && cd redis-xxx && git init && git add . && git commit -m "%%{version} baseline" @@ -76,47 +62,49 @@ Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/ # Then refresh your patches # git format-patch HEAD~<number of expected patches> # Update configuration for Fedora -# https://github.com/antirez/redis/pull/3491 - man pages +# https://github.com/redis/redis/pull/3491 - man pages Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch -# https://github.com/antirez/redis/pull/3494 - symlink -Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch + BuildRequires: gcc -%if %{?with_jemalloc} +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-8-toolchain +BuildRequires: devtoolset-8-libatomic-devel +%endif +%if %{with jemalloc} BuildRequires: jemalloc-devel %else -Provides: bundled(jemalloc) = 5.1.0 +# from deps/jemalloc/VERSION +Provides: bundled(jemalloc) = 5.3.0 %endif -%if 0%{?with_tests} +%if %{with tests} BuildRequires: procps-ng BuildRequires: tcl %endif -%if 0%{?with_systemd} +BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd -%endif +BuildRequires: openssl-devel >= 1.0.2 -%if ! %{?with_redistrib} +%if %{without redistrib} Obsoletes: redis-trib < %{version}-%{release} %endif -# Required for redis-shutdown -Requires: /bin/awk Requires: logrotate Requires(pre): shadow-utils -%if 0%{?with_systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -%else -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts -%endif -Provides: bundled(hiredis) -Provides: bundled(lua-libs) -Provides: bundled(linenoise) +# from deps/hiredis/hiredis.h +Provides: bundled(hiredis) = 1.0.3 +# from deps/lua/src/lua.h +Provides: bundled(lua-libs) = 5.1.5 +# from deps/linenoise/linenoise.h +Provides: bundled(linenoise) = 1.0 Provides: bundled(lzf) +# from deps/hdr_histogram/README.md +Provides: bundled(hdr_histogram) = 0.11.0 +# no version +Provides: bundled(fpconv) %global redis_modules_abi 1 %global redis_modules_dir %{_libdir}/%{name}/modules @@ -158,7 +146,7 @@ API documentation is available in the redis-doc package. %package doc Summary: Documentation for Redis including man pages -License: CC-BY-SA +License: CC-BY-SA-4.0 BuildArch: noarch # http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages" @@ -168,7 +156,7 @@ Conflicts: redis < 4.0 Manual pages and detailed documentation for many aspects of Redis use, administration and development. -%if 0%{?with_redistrib} +%if %{with redistrib} %package trib Summary: Cluster management script for Redis BuildArch: noarch @@ -181,16 +169,11 @@ and removal, status checks, resharding, rebalancing, and other operations. %endif %prep -%if 0%{?upstream_pre:1} -%setup -q -n %{gh_project}-%{gh_commit} -b 10 -%else -%setup -q -b 10 -%endif +%setup -q -n %{name}-%{upstream_ver}%{?upstream_pre:-%{upstream_pre}} -b 10 mv ../%{name}-doc-%{doc_commit} doc -%patch0001 -p1 -%patch0002 -p1 +%patch -P0001 -p1 -%if %{?with_jemalloc} +%if %{with jemalloc} rm -frv deps/jemalloc # Use system jemalloc library sed -i -e '/cd jemalloc && /d' deps/Makefile @@ -199,14 +182,26 @@ sed -i -e 's|-I../deps/jemalloc.*|-DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc %else mv deps/jemalloc/COPYING COPYING-jemalloc %endif -mv deps/lua/COPYRIGHT COPYRIGHT-lua -mv deps/hiredis/COPYING COPYING-hiredis +mv deps/lua/COPYRIGHT COPYRIGHT-lua +mv deps/hiredis/COPYING COPYING-hiredis +mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram +mv deps/hdr_histogram/COPYING.txt COPYING-hdrhistogram +mv deps/fpconv/LICENSE.txt LICENSE-fpconv # Configuration file changes sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf sed -i -e 's|^logfile .*$|logfile /var/log/redis/sentinel.log|g' sentinel.conf sed -i -e 's|^dir .*$|dir /var/lib/redis|g' redis.conf +# See https://bugzilla.redhat.com/2240293 +# See https://src.fedoraproject.org/rpms/jemalloc/blob/rawhide/f/jemalloc.spec#_34 +%ifarch %ix86 %arm x86_64 s390x +sed -e 's/--with-lg-quantum/--with-lg-page=12 --with-lg-quantum/' -i deps/Makefile +%endif +%ifarch ppc64 ppc64le aarch64 +sed -e 's/--with-lg-quantum/--with-lg-page=16 --with-lg-quantum/' -i deps/Makefile +%endif + # Module API version safety check api=`sed -n -e 's/#define REDISMODULE_APIVER_[0-9][0-9]* //p' src/redismodule.h` if test "$api" != "%{redis_modules_abi}"; then @@ -215,18 +210,28 @@ if test "$api" != "%{redis_modules_abi}"; then exit 1 fi -# Fix for old GCC -%if 0%{?rhel} == 6 -sed -e '/GCC diagnostic/d' -i src/lzf_d.c -%endif +%global malloc_flags MALLOC=jemalloc +%global tls_flags BUILD_TLS=yes +%global sysd_flags BUILD_WITH_SYSTEMD=yes +%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} %{?malloc_flags} %{?tls_flags} %{?sysd_flags} +: %{make_flags} -%global malloc_flags MALLOC=jemalloc -%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" %{malloc_flags} INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} %build +%if 0%{?rhel} == 7 +source /opt/rh/devtoolset-8/enable +g++ --version +%endif + make %{?_smp_mflags} %{make_flags} all + %install +%if 0%{?rhel} == 7 +source /opt/rh/devtoolset-8/enable +g++ --version +%endif + make %{make_flags} install # Filesystem. @@ -239,11 +244,10 @@ install -d %{buildroot}%{redis_modules_dir} install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # Install configuration files. -install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf -install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf +install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf # Install systemd unit files. -%if 0%{?with_systemd} mkdir -p %{buildroot}%{_unitdir} install -pm644 %{S:3} %{buildroot}%{_unitdir} install -pm644 %{S:2} %{buildroot}%{_unitdir} @@ -251,22 +255,14 @@ install -pm644 %{S:2} %{buildroot}%{_unitdir} # Install systemd limit files (requires systemd >= 204) install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf -%else # install SysV service files -install -pDm755 %{S:4} %{buildroot}%{_initrddir}/%{name}-sentinel -install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name} -install -p -D -m 644 %{S:8} %{buildroot}%{_sysconfdir}/security/limits.d/95-%{name}.conf -%endif # Fix non-standard-executable-perm error. chmod 755 %{buildroot}%{_bindir}/%{name}-* -# Install redis-shutdown -install -pDm755 %{S:6} %{buildroot}%{_libexecdir}/%{name}-shutdown - # Install redis module header install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h -%if 0%{?with_redistrib} +%if %{with redistrib} # Install redis-trib install -pDm755 src/%{name}-trib.rb %{buildroot}%{_bindir}/%{name}-trib %endif @@ -281,7 +277,7 @@ ln -s redis.conf.5 %{buildroot}%{_mandir}/man5/redis-sentinel.conf.5 # Install documentation and html pages doc=$(echo %{buildroot}/%{_docdir}/%{name}) -for page in 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO; do +for page in 00-RELEASENOTES BUGS MANIFESTO *.md; do install -Dpm644 $page $doc/$page done for page in $(find doc -name \*.md | sed -e 's|.md$||g'); do @@ -294,14 +290,14 @@ mkdir -p %{buildroot}%{macrosdir} install -pDm644 %{S:9} %{buildroot}%{macrosdir}/macros.%{name} %check -%if 0%{?with_tests} -%if ! %{?with_jemalloc} +%if %{with tests} +%if %{without jemalloc} # ERR Active defragmentation cannot be enabled: it requires a Redis server compiled # with a modified Jemalloc like the one shipped by default with the Redis source distribution sed -e '/memefficiency/d' -i tests/test_helper.tcl %endif -# https://github.com/antirez/redis/issues/1417 (for "taskset -c 1") +# https://github.com/redis/redis/issues/1417 (for "taskset -c 1") taskset -c 1 make %{make_flags} test make %{make_flags} test-sentinel %else @@ -316,65 +312,77 @@ useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ -c 'Redis Database Server' %{name} &> /dev/null exit 0 +%if 0%{?fedora} < 34 && 0%{?rhel} < 9 +%posttrans +if [ -f %{_sysconfdir}/%{name}/%{name}.conf -a ! -f %{_sysconfdir}/%{name}.conf ]; then + ln -s %{name}/%{name}.conf %{_sysconfdir}/%{name}.conf +fi +if [ -f %{_sysconfdir}/%{name}/sentinel.conf -a ! -f %{_sysconfdir}/%{name}-sentinel.conf ]; then + ln -s %{name}/sentinel.conf %{_sysconfdir}/%{name}-sentinel.conf +fi +%endif + %post -%if 0%{?with_systemd} +if [ -f %{_sysconfdir}/%{name}.conf -a ! -L %{_sysconfdir}/%{name}.conf ]; then + if [ -f %{_sysconfdir}/%{name}/%{name}.conf.rpmnew ]; then + rm %{_sysconfdir}/%{name}/%{name}.conf.rpmnew + fi + if [ -f %{_sysconfdir}/%{name}/%{name}.conf ]; then + mv %{_sysconfdir}/%{name}/%{name}.conf %{_sysconfdir}/%{name}/%{name}.conf.rpmnew + fi + mv %{_sysconfdir}/%{name}.conf %{_sysconfdir}/%{name}/%{name}.conf + echo -e "\nWarning: %{name} configuration is now in %{_sysconfdir}/%{name} directory\n" +fi +if [ -f %{_sysconfdir}/%{name}-sentinel.conf -a ! -L %{_sysconfdir}/%{name}-sentinel.conf ]; then + if [ -f %{_sysconfdir}/%{name}/sentinel.conf.rpmnew ]; then + rm %{_sysconfdir}/%{name}/sentinel.conf.rpmnew + fi + if [ -f %{_sysconfdir}/%{name}/sentinel.conf ]; then + mv %{_sysconfdir}/%{name}/sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf.rpmnew + fi + mv %{_sysconfdir}/%{name}-sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf +fi + %systemd_post %{name}.service %systemd_post %{name}-sentinel.service -%else -chkconfig --add %{name} -chkconfig --add %{name}-sentinel -%endif %preun -%if 0%{?with_systemd} %systemd_preun %{name}.service %systemd_preun %{name}-sentinel.service -%else -if [ $1 -eq 0 ] ; then - service %{name} stop &> /dev/null - chkconfig --del %{name} &> /dev/null - service %{name}-sentinel stop &> /dev/null - chkconfig --del %{name}-sentinel &> /dev/null -fi -%endif %postun -%if 0%{?with_systemd} %systemd_postun_with_restart %{name}.service %systemd_postun_with_restart %{name}-sentinel.service -%else -if [ "$1" -ge "1" ] ; then - service %{name} condrestart >/dev/null 2>&1 || : - service %{name}-sentinel condrestart >/dev/null 2>&1 || : -fi -%endif + %files %{!?_licensedir:%global license %%doc} %license COPYING %license COPYRIGHT-lua %license COPYING-hiredis -%if ! %{?with_jemalloc} +%license LICENSE-hdrhistogram +%license COPYING-hdrhistogram +%license LICENSE-fpconv +%if %{without jemalloc} %license COPYING-jemalloc %endif %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf -%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf -%dir %attr(0750, redis, redis) %{_libdir}/%{name} -%dir %attr(0750, redis, redis) %{redis_modules_dir} +%attr(0750, redis, root) %dir %{_sysconfdir}/%{name} +%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf +%dir %{_libdir}/%{name} +%dir %{redis_modules_dir} %dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} %dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name} -%if 0%{?with_redistrib} +%if %{with redistrib} %exclude %{_bindir}/%{name}-trib %endif %exclude %{macrosdir} %exclude %{_includedir} %exclude %{_docdir}/%{name}/* %{_bindir}/%{name}-* -%{_libexecdir}/%{name}-* %{_mandir}/man1/%{name}* %{_mandir}/man5/%{name}* -%if 0%{?with_systemd} %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sentinel.service %dir %{_sysconfdir}/systemd/system/%{name}.service.d @@ -382,12 +390,6 @@ fi %dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d %config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf %dir %attr(0755, redis, redis) %ghost %{_localstatedir}/run/%{name} -%else -%{_initrddir}/%{name} -%{_initrddir}/%{name}-sentinel -%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}.conf -%dir %attr(0755, redis, redis) %{_localstatedir}/run/%{name} -%endif %files devel %license COPYING @@ -395,10 +397,11 @@ fi %{macrosdir}/* %files doc +%license doc/LICENSE %docdir %{_docdir}/%{name} %{_docdir}/%{name} -%if 0%{?with_redistrib} +%if %{with redistrib} %files trib %license COPYING %{_bindir}/%{name}-trib @@ -406,6 +409,250 @@ fi %changelog +* Tue Jan 9 2024 Remi Collet <remi@remirepo.net> - 7.2.4-1 +- Redis 7.2.4 Released Tue 09 Jan 2024 10:45:52 IST +- Upgrade urgency SECURITY: CVE-2023-41056 + +* Thu Nov 2 2023 Remi Collet <remi@remirepo.net> - 7.2.3-1 +- Redis 7.2.3 Released Wed 01 Nov 2023 12:00:00 IST +- Upgrade urgency: HIGH, Fixes critical bugs affecting most users. + +* Wed Oct 18 2023 Remi Collet <remi@remirepo.net> - 7.2.2-1 +- Redis 7.2.2 Released Wed 18 Oct 2023 10:33:40 IDT +- Upgrade urgency SECURITY: CVE-2023-45145 + +* Mon Sep 25 2023 Remi Collet <remi@remirepo.net> - 7.2.1-2 +- set jemalloc page size #2240293 + +* Thu Sep 7 2023 Remi Collet <remi@remirepo.net> - 7.2.1-1 +- Redis 7.2.1 Released Wed 06 Sep 2023 15:00:00 IDT +- Upgrade urgency SECURITY: CVE-2023-41053 + +* Wed Aug 16 2023 Remi Collet <remi@remirepo.net> - 7.2.0-1 +- Redis 7.2.0 GA Released Mon Aug 15 12:00:00 IDT 2023 +- Upgrade urgency LOW: This is the first stable Release for Redis 7.2. + +* Mon Jul 10 2023 Remi Collet <remi@remirepo.net> - 7.2~rc3-1 +- Redis 7.2 RC3 (7.1.242) Released Mon July 10 12:00:00 IDT 2023 +- Upgrade urgency LOW: This is the third Release Candidate for Redis 7.2 +- Upgrade urgency SECURITY: If you're using a previous release candidate of 7.2 + +* Tue May 16 2023 Remi Collet <remi@remirepo.net> - 7.2~rc2-1 +- Redis 7.2 RC2 (7.1.241) Released Mon May 15 12:00:00 IST 2023 + +* Thu Mar 30 2023 Remi Collet <remi@remirepo.net> - 7.2~rc1-3 +- fix modules directory ownership and permissions #2176173 + +* Tue Mar 28 2023 Remi Collet <remi@remirepo.net> - 7.2~rc1-2 +- drop redis-shutdown helper and rely on systemd #2181181 + +* Thu Mar 23 2023 Remi Collet <remi@remirepo.net> - 7.2~rc1-1 +- rebuild with upstream sources instead of git snapshot +- refresh documentation + +* Thu Mar 23 2023 Remi Collet <remi@remirepo.net> - 7.2~RC1-1 +- Redis 7.2 RC1 (7.1.240) Released Wed Mar 22 12:00:00 IST 2023 + +* Tue Mar 21 2023 Remi Collet <remi@remirepo.net> - 7.0.10-1 +- Redis 7.0.10 Released Mon Mar 20 16:00:00 IST 2023 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Wed Mar 1 2023 Remi Collet <remi@remirepo.net> - 7.0.9-1 +- Redis 7.0.9 Released Tue Feb 28 12:00:00 IST 2023 +- Upgrade urgency: SECURITY, contains fixes to security issues + +* Tue Jan 17 2023 Remi Collet <remi@remirepo.net> - 7.0.8-1 +- Redis 7.0.8 Released Mon Jan 16 12:00:00 IDT 2023 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Fri Dec 16 2022 Remi Collet <remi@remirepo.net> - 7.0.7-1 +- Redis 7.0.7 Released Fri Dec 16 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, Contains fix for a regression in Geo commands. + +* Tue Dec 13 2022 Remi Collet <remi@remirepo.net> - 7.0.6-1 +- Redis 7.0.6 - Released Mon Dec 12 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, Contains fixes for a few non-critical or unlikely + bugs, and some dramatic optimizations to Geo, EVAL, and Sorted sets commands. + +* Thu Sep 22 2022 Remi Collet <remi@remirepo.net> - 7.0.5-2 +- Redis 7.0.5 - Released Wed Sep 21 20:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. +- refresh documentation + +* Thu Sep 22 2022 Remi Collet <remi@remirepo.net> - 7.0.5-1 +- Redis 7.0.5 - Released Wed Sep 21 20:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Mon Jul 18 2022 Remi Collet <remi@remirepo.net> - 7.0.4-1 +- Redis 7.0.4 - Released Monday Jul 18 12:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Tue Jul 12 2022 Remi Collet <remi@remirepo.net> - 7.0.3-1 +- Redis 7.0.3 - Released Monday Jul 11 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, specifically if you're using a previous release + of Redis 7.0, contains fixes for bugs in previous 7.0 releases. + +* Mon Jun 13 2022 Remi Collet <remi@remirepo.net> - 7.0.2-1 +- Redis 7.0.2 - Released Sunday Jun 12 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, specifically if you're using a previous release of + Redis 7.0, contains fixes for bugs in previous 7.0 releases. + +* Wed Jun 8 2022 Remi Collet <remi@remirepo.net> - 7.0.1-1 +- Redis 7.0.1 - Released Wed Jun 8 12:00:00 IST 2022 +- Upgrade urgency: MODERATE, specifically if you're using a previous release of + Redis 7.0, contains some behavior changes for new 7.0 features and important + fixes for bugs in previous 7.0 releases. + +* Wed Apr 27 2022 Remi Collet <remi@remirepo.net> - 7.0.0-1 +- Redis 7.0.0 GA - Released Wed Apr 27 12:00:00 IST 2022 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Tue Apr 5 2022 Remi Collet <remi@remirepo.net> - 7.0~RC3-1 +- update to 7.0-RC3 (6.9.242) - Released Tue Apr 5 12:00:00 IST 2022 + +* Tue Mar 1 2022 Remi Collet <remi@remirepo.net> - 7.0~RC2-1 +- update to 7.0-RC2 (6.9.241) - Released Mon Feb 28 12:00:00 IST 2022 + +* Mon Jan 31 2022 Remi Collet <remi@remirepo.net> - 7.0~RC1-1 +- update to 7.0-RC1 (6.9.240) - Released Mon Jan 31 12:00:00 IST 2022 + +* Mon Oct 4 2021 Remi Collet <remi@remirepo.net> - 6.2.6-1 +- Redis 6.2.6 - Released Mon Oct 4 12:00:00 IDT 2021 +- Upgrade urgency: SECURITY, contains fixes to security issues. + +* Thu Jul 22 2021 Remi Collet <remi@remirepo.net> - 6.2.5-1 +- Redis 6.2.5 - Released Wed Jul 21 16:32:19 IDT 2021 +- Upgrade urgency: SECURITY, contains fixes to security issues that affect + authenticated client connections on 32-bit versions. MODERATE otherwise. + +* Wed Jun 2 2021 Remi Collet <remi@remirepo.net> - 6.2.4-1 +- Redis 6.2.4 - Released Tue June 1 12:00:00 IST 2021 +- Upgrade urgency: SECURITY, Contains fixes to security issues that affect + authenticated client connections. MODERATE otherwise. + +* Tue May 4 2021 Remi Collet <remi@remirepo.net> - 6.2.3-1 +- Redis 6.2.3 - Released Mon May 3 19:00:00 IST 2021 +- Upgrade urgency: SECURITY, Contains fixes to security issues that affect + authenticated client connections. LOW otherwise. + +* Tue Apr 20 2021 Remi Collet <remi@remirepo.net> - 6.2.2-1 +- Redis 6.2.2 - Released Mon April 19 19:00:00 IST 2021 +- Upgrade urgency: HIGH, if you're using ACL and pub/sub, + CONFIG REWRITE, or suffering from performance regression. + +* Tue Mar 2 2021 Remi Collet <remi@remirepo.net> - 6.2.1-1 +- Redis 6.2.1 - Released Mon Mar 1 17:51:36 IST 2021 +- Upgrade urgency: LOW. + +* Tue Feb 23 2021 Remi Collet <remi@remirepo.net> - 6.2.0-1 +- Redis 6.2.0 GA - Released Tue Feb 22 14:00:00 IST 2021 +- Upgrade urgency: SECURITY if you use 32bit build of redis, + MODERATE if you used earlier versions of Redis 6.2, LOW otherwise + +* Wed Feb 3 2021 Remi Collet <remi@remirepo.net> - 6.2~RC3-1 +- update to 6.2-RC3 (6.1.242) + +* Tue Jan 12 2021 Remi Collet <remi@remirepo.net> - 6.2~RC2-1 +- update to 6.2-RC2 (6.1.241) + +* Tue Dec 15 2020 Remi Collet <remi@remirepo.net> - 6.2~RC1-1 +- update to 6.2-RC1 (6.1.240) + +* Tue Nov 24 2020 Remi Collet <remi@remirepo.net> - 6.0.9-4 +- create symlink for deployment tools + +* Mon Nov 23 2020 Remi Collet <remi@remirepo.net> - 6.0.9-3 +- move configuration in /etc/redis per upstream recommendation + see https://github.com/redis/redis/issues/8051 + +* Mon Nov 16 2020 Remi Collet <remi@remirepo.net> - 6.0.9-2 +- fix broken config rewrite feature using patch from + https://github.com/redis/redis/pull/8058 + +* Tue Oct 27 2020 Remi Collet <remi@remirepo.net> - 6.0.9-1 +- Redis 6.0.9 - Released Mon Oct 26 10:37:47 IST 2020 +- Upgrade urgency: MODERATE. + +* Thu Sep 10 2020 Remi Collet <remi@remirepo.net> - 6.0.8-1 +- Redis 6.0.8 - Released Wed Sep 09 23:34:17 IDT 2020 +- Upgrade urgency HIGH: Anyone who's using Redis 6.0.7 with Sentinel or + CONFIG REWRITE command is affected and should upgrade ASAP. + +* Tue Sep 1 2020 Remi Collet <remi@remirepo.net> - 6.0.7-1 +- Redis 6.0.7 - Released Fri Aug 28 11:05:09 IDT 2020 +- Upgrade urgency MODERATE: several bugs with moderate impact are fixed. +- drop patch merged upstream + +* Tue Jul 21 2020 Remi Collet <remi@remirepo.net> - 6.0.6-1 +- Redis 6.0.6 - Released Mon Jul 20 09:31:30 IDT 2020 +- Upgrade urgency MODERATE: several bugs with moderate impact are fixed here. +- open https://github.com/redis/redis/pull/7543 fix deprecated tail syntax + +* Wed Jun 10 2020 Remi Collet <remi@remirepo.net> - 6.0.5-1 +- Redis 6.0.5 - Released Tue Jun 09 11:56:08 CEST 2020 +- Upgrade urgency MODERATE: several bugs with moderate impact are fixed here. + +* Thu May 28 2020 Remi Collet <remi@remirepo.net> - 6.0.4-2 +- Redis 6.0.4 - Released Thu May 28 11:36:45 CEST 2020 +- Upgrade urgency CRITICAL: this release fixes a severe replication bug. + +* Thu May 28 2020 Remi Collet <remi@remirepo.net> - 6.0.3-3 +- add comment for TimeoutStartSec and TimeoutStopSec in limit.conf +- fix missing notification to systemd for sentinel + patch from https://github.com/antirez/redis/pull/7168 + +* Mon May 18 2020 Pablo Greco <pgreco@centosproject.org> - 6.0.3-2 +- Fix build on armhfp/el7 + +* Sun May 17 2020 Remi Collet <remi@remirepo.net> - 6.0.3-1 +- Redis 6.0.3 - Released Sat May 16 18:10:21 CEST 2020 +- Upgrade urgency CRITICAL: a crash introduced in 6.0.2 is now fixed. + +* Sat May 16 2020 Remi Collet <remi@remirepo.net> - 6.0.2-1 +- Redis 6.0.2 - Released Fri May 15 22:24:36 CEST 2020 +- Upgrade urgency MODERATE: many not critical bugfixes in different areas. + Critical fix to client side caching when keys are evicted from the + tracking table but no notifications are sent. + +* Sat May 2 2020 Remi Collet <remi@remirepo.net> - 6.0.1-1 +- Redis 6.0.1 - Released Sat May 02 00:06:07 CEST 2020 +- Upgrade urgency HIGH: + This release fixes a crash when builiding against Libc malloc. + +* Thu Apr 30 2020 Remi Collet <remi@remirepo.net> - 6.0.0-1 +- Redis 6.0.0 GA - Released Thu Apr 30 14:55:02 CEST 2020 +- Upgrade urgency CRITICAL: many bugs fixed compared to the last RC + +* Fri Apr 17 2020 Remi Collet <remi@remirepo.net> - 6.0.0~RC4-1 +- update to 6.0-RC4 (5.9.104) + +* Wed Apr 1 2020 Remi Collet <remi@remirepo.net> - 6.0.0~RC3-1 +- update to 6.0-RC3 (5.9.103) + +* Thu Mar 5 2020 Remi Collet <remi@remirepo.net> - 6.0.0~RC2-1 +- update to 6.0-RC2 (5.9.102) + +* Tue Mar 3 2020 Remi Collet <remi@remirepo.net> - 6.0.0~RC1-3 +- ensure never daemonized with systemd + see https://github.com/remicollet/remirepo/issues/133 + +* Tue Mar 3 2020 Remi Collet <remi@remirepo.net> - 6.0.0~RC1-2 +- enable TLS support (EL-6 excepted) +- patch extern SDS_NOINIT definition for gcc 10 (F32) + +* Fri Dec 20 2019 Remi Collet <remi@remirepo.net> - 6.0.0~RC1-1 +- update to 6.0-RC1 (5.9.101) +- build using GCC 8 on EL-7, GCC 6 on EL-6 (devtoolset) + +* Wed Nov 20 2019 Remi Collet <remi@remirepo.net> - 5.0.7-1 +- Redis 5.0.7 - Released Tue Nov 19 17:52:44 CET 2019 +- Upgrade urgency HIGH: many issues fixed, some may have an impact. + +* Wed Sep 25 2019 Remi Collet <remi@remirepo.net> - 5.0.6-1 +- Redis 5.0.6 - Released Wed Sep 25 12:33:56 CEST 2019 +- Upgrade urgency CRITICAL: Only in case of exposed instances + to untrusted users. + * Thu May 16 2019 Remi Collet <remi@remirepo.net> - 5.0.5-1 - Redis 5.0.5 - Released Wed May 15 17:57:41 CEST 2019 - Upgrade urgency CRITICAL: This release fixes an important AOF |