diff --git a/redis-7.0.8.tar.gz b/redis-7.0.10.tar.gz similarity index 31% rename from redis-7.0.8.tar.gz rename to redis-7.0.10.tar.gz index b53f179106099e4df96997320ece3fb7956dc629..4f0e9f088f9cabae3b9478c1a2dfcf3ccc85f68f 100644 Binary files a/redis-7.0.8.tar.gz and b/redis-7.0.10.tar.gz differ diff --git a/redis-doc-80258ec.tar.gz b/redis-doc-80258ec.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8074b5771900d6db36d30a36e250fa1e6c0cac36 Binary files /dev/null and b/redis-doc-80258ec.tar.gz differ diff --git a/redis-doc-a14b449.tar.gz b/redis-doc-a14b449.tar.gz deleted file mode 100644 index 3c7518d7ebd04a28d4da069cfc9c1a161f8d5031..0000000000000000000000000000000000000000 Binary files a/redis-doc-a14b449.tar.gz and /dev/null differ diff --git a/redis-sentinel.service b/redis-sentinel.service index a055cf5fa7788ad7c02916f16e390270abbd3629..0bcc990c9b4524bb1a77352a561f28c799843acc 100644 --- a/redis-sentinel.service +++ b/redis-sentinel.service @@ -6,7 +6,6 @@ Wants=network-online.target [Service] ExecStart=/usr/bin/redis-sentinel /etc/redis/sentinel.conf --daemonize no --supervised systemd -ExecStop=/usr/libexec/redis-shutdown sentinel Type=notify User=redis Group=redis diff --git a/redis-shutdown b/redis-shutdown deleted file mode 100644 index 1a4335a50bafba44f7363521a02060bd08e06cc2..0000000000000000000000000000000000000000 --- 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/redis/$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.service b/redis.service index 4e59720c432645aac9b113c1b1087ea461939194..a577c8361fbdbb76c0896bfa1a9bbec98fc88f37 100644 --- a/redis.service +++ b/redis.service @@ -6,7 +6,6 @@ Wants=network-online.target [Service] ExecStart=/usr/bin/redis-server /etc/redis/redis.conf --daemonize no --supervised systemd -ExecStop=/usr/libexec/redis-shutdown Type=notify User=redis Group=redis diff --git a/redis.spec b/redis.spec index 3d5bffec08e31b8e45d5e79ba982d8e788cc3ecf..31a1b89e710abdbb49dcbb37da8c37202549c592 100644 --- a/redis.spec +++ b/redis.spec @@ -4,13 +4,13 @@ %bcond_with tests # Commit IDs for the (unversioned) redis-doc repository -%global doc_commit a14b449a95b12874085a1dde6df0cf066d7548b6 +%global doc_commit 80258ecc251e8f7209d480cad77128ba5a43f968 %global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7}) %global macrosdir %{_rpmconfigdir}/macros.d Name: redis -Version: 7.0.8 +Version: 7.0.10 Release: %{anolis_release}%{?dist} Summary: A persistent key-value database # redis, jemalloc, linenoise, lzf, hiredis are BSD @@ -21,7 +21,6 @@ Source0: https://download.redis.io/releases/%{name}-%{version}.tar.gz Source1: %{name}.logrotate Source2: %{name}-sentinel.service Source3: %{name}.service -Source6: %{name}-shutdown Source7: %{name}-limit-systemd Source9: macros.%{name} Source10: https://github.com/%{name}/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz @@ -41,8 +40,6 @@ BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel # redis-trib functionality migrated to redis-cli Obsoletes: redis-trib < 5 -# Required for redis-shutdown -Requires: /bin/awk Requires: logrotate Requires(pre): shadow-utils Requires(post): systemd @@ -167,9 +164,6 @@ install -p -D -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/systemd/system/%{name # 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 @@ -242,7 +236,6 @@ fi %systemd_postun_with_restart %{name}-sentinel.service %files -%{!?_licensedir:%global license %%doc} %license COPYING %license COPYRIGHT-lua %license COPYING-jemalloc @@ -253,13 +246,12 @@ fi %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 %attr(0750, redis, redis) %{_libdir}/%{name} -%dir %attr(0750, redis, redis) %{redis_modules_dir} +%dir %{_libdir}/%{name} +%dir %{redis_modules_dir} %dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} %dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name} %exclude %{_docdir}/%{name} %{_bindir}/%{name}-* -%{_libexecdir}/%{name}-* %{_mandir}/man1/%{name}* %{_mandir}/man5/%{name}* %{_unitdir}/%{name}.service @@ -282,6 +274,10 @@ fi %changelog +* Tue Apr 04 2023 Funda Wang - 7.0.10-1 +- New version 7.0.10 +- drop redis-shutdown helper and rely on systemd + * Tue Jan 17 2023 Funda Wang - 7.0.8-1 - New version 7.0.8