summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-12 17:19:37 +0100
committerRemi Collet <remi@remirepo.net>2021-01-12 17:19:37 +0100
commit75ed6068ac89347b0f99b536a4883983ee8614a1 (patch)
tree2c55dfef1a9413529daf9c351990f928322aae02
parent5b3d14712c42a868726178d13339f6e4c9a8fddc (diff)
update to 6.2-RC2 (6.1.241)
-rw-r--r--0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch29
-rw-r--r--redis-limit-init6
-rw-r--r--redis-sentinel.init105
-rw-r--r--redis.init105
-rw-r--r--redis.spec95
5 files changed, 7 insertions, 333 deletions
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 d43be3b..0000000
--- a/0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 79ed52edf84676786e5817cddb8914c5925144c7 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/3] 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.24.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-sentinel.init b/redis-sentinel.init
deleted file mode 100644
index d75f1c9..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.init b/redis.init
deleted file mode 100644
index 4f11d52..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/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.spec b/redis.spec
index 83df9e3..4d13a9e 100644
--- a/redis.spec
+++ b/redis.spec
@@ -18,25 +18,13 @@
%bcond_with redistrib
%endif
-%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
-%bcond_without systemd
-%else
-%bcond_with systemd
-%endif
-
-%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7
-%bcond_without tls
-%else
-%bcond_with tls
-%endif
-
# Tests fail in mock, not in local build.
%bcond_with tests
# Pre-version are only available in github
%global upstream_ver 6.2
-%global upstream_pre RC1
-%global gh_commit b8c67ce41b51247c02a639929e4fab20189afa1e
+%global upstream_pre RC2
+%global gh_commit ec2d180739aa3877a45ec54438c68a7659be5159
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner redis
%global gh_project redis
@@ -44,7 +32,7 @@
# Commit IDs for the (unversioned) redis-doc repository
# https://fedoraproject.org/wiki/Packaging:SourceURL "Commit Revision"
# https://github.com/redis/redis-doc/commits/master
-%global doc_commit 05631514745ea9f0a2ccc8aa6286f7ce2f29b266
+%global doc_commit da92d05e9cc0f935f65392ca6daf2702f7bf70d8
%global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7})
# %%{_rpmmacrodir} not usable on EL-6 - EL-7 (without epel-rpms-macros)
@@ -65,11 +53,8 @@ Source0: https://download.redis.io/releases/%{name}-%{version}.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/%{gh_owner}/%{gh_project}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz
@@ -81,14 +66,9 @@ Source10: https://github.com/%{gh_owner}/%{gh_project}-doc/archive/%{do
# Update configuration for Fedora
# https://github.com/antirez/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 0%{?rhel} == 6
-BuildRequires: devtoolset-6-toolchain
-%endif
%if 0%{?rhel} == 7
BuildRequires: devtoolset-8-toolchain
BuildRequires: devtoolset-8-libatomic-devel
@@ -103,13 +83,9 @@ Provides: bundled(jemalloc) = 5.1.0
BuildRequires: procps-ng
BuildRequires: tcl
%endif
-%if %{with systemd}
BuildRequires: pkgconfig(libsystemd)
BuildRequires: systemd
-%endif
-%if %{with tls}
BuildRequires: openssl-devel >= 1.0.2
-%endif
%if %{without redistrib}
Obsoletes: redis-trib < %{version}-%{release}
@@ -119,16 +95,9 @@ Obsoletes: redis-trib < %{version}-%{release}
Requires: /bin/awk
Requires: logrotate
Requires(pre): shadow-utils
-%if %{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
# from deps/hiredis/hiredis.h
Provides: bundled(hiredis) = 1.0.0
# from deps/lua/src/lua.h
@@ -207,7 +176,6 @@ and removal, status checks, resharding, rebalancing, and other operations.
%endif
mv ../%{name}-doc-%{doc_commit} doc
%patch0001 -p1
-%patch0002 -p1
%if %{with jemalloc}
rm -frv deps/jemalloc
@@ -234,28 +202,14 @@ 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
-%if %{with tls}
%global tls_flags BUILD_TLS=yes
-%endif
-%if %{with systemd}
%global sysd_flags BUILD_WITH_SYSTEMD=yes
-%endif
-
%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}
%build
-%if 0%{?rhel} == 6
-source /opt/rh/devtoolset-6/enable
-g++ --version
-%endif
%if 0%{?rhel} == 7
source /opt/rh/devtoolset-8/enable
g++ --version
@@ -265,10 +219,6 @@ make %{?_smp_mflags} %{make_flags} all
%install
-%if 0%{?rhel} == 6
-source /opt/rh/devtoolset-6/enable
-g++ --version
-%endif
%if 0%{?rhel} == 7
source /opt/rh/devtoolset-8/enable
g++ --version
@@ -289,7 +239,6 @@ install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf
-%if %{with systemd}
# Install systemd unit files.
mkdir -p %{buildroot}%{_unitdir}
install -pm644 %{S:3} %{buildroot}%{_unitdir}
@@ -298,12 +247,6 @@ 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}-*
@@ -395,37 +338,17 @@ if [ -f %{_sysconfdir}/%{name}-sentinel.conf -a ! -L %{_sysconfdir}/%{name}-sen
mv %{_sysconfdir}/%{name}-sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf
fi
-%if %{with systemd}
%systemd_post %{name}.service
%systemd_post %{name}-sentinel.service
-%else
-chkconfig --add %{name}
-chkconfig --add %{name}-sentinel
-%endif
%preun
-%if %{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 %{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}
@@ -453,7 +376,6 @@ fi
%{_libexecdir}/%{name}-*
%{_mandir}/man1/%{name}*
%{_mandir}/man5/%{name}*
-%if %{with systemd}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-sentinel.service
%dir %{_sysconfdir}/systemd/system/%{name}.service.d
@@ -461,12 +383,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
@@ -485,6 +401,9 @@ fi
%changelog
+* Tue Dec 15 2020 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)