From 04fade0f4dface799db59c3df1125f79816e088d Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Wed, 12 Jun 2024 16:37:52 -0500 Subject: [PATCH 01/43] minor adjustment to compat migration logic, add inline todo --- migrate_redis_to_valkey.sh | 12 ++++++++++-- valkey.spec | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/migrate_redis_to_valkey.sh b/migrate_redis_to_valkey.sh index 949c31b..9c5ce5c 100644 --- a/migrate_redis_to_valkey.sh +++ b/migrate_redis_to_valkey.sh @@ -2,17 +2,25 @@ if [ -f /etc/redis/redis.conf ]; then cp /etc/redis/redis.conf /etc/valkey/valkey.conf mv /etc/redis/redis.conf /etc/redis/redis.conf.rpmsave + chown valkey:root /etc/valkey/valkey.conf sed -i 's|^dir\s.*|dir /var/lib/valkey|g' /etc/valkey/valkey.conf echo "/etc/redis/redis.conf has been copied to /etc/valkey/valkey.conf. pidfile, logfile, and dir are overridden by the config at /etc/sysconfig/valkey. Manual review of valkey.conf is strongly suggested especially if you had modified redis.conf." fi if [ -f /etc/redis/sentinel.conf ]; then cp /etc/redis/sentinel.conf /etc/valkey/sentinel.conf mv /etc/redis/sentinel.conf /etc/redis/sentinel.conf.rpmsave + chown valkey:root /etc/valkey/sentinel.conf echo "/etc/redis/sentinel.conf has been copied to /etc/valkey/sentinel.conf. pidfile, logfile, and dir are overridden by the config at /etc/sysconfig/valkey-sentinel. Manual review of sentinel.conf is strongly suggested especially if you had modified sentinel.conf." fi if [ -d /var/lib/redis ]; then - cp -r /var/lib/redis/* /var/lib/valkey/ + # cp could take a while, and this is a one-way move anyway + mv /var/lib/redis/* /var/lib/valkey/ + # don't leave garbage behind, plus we check if this dir exists when running this script + rm -rf /var/lib/redis chown -R valkey. /var/lib/valkey - mv /var/lib/redis /var/lib/redis.bak echo "On-disk redis dumps copied from /var/lib/redis/ to /var/lib/valkey" fi + +# TODO +# 1. expand logic to read current redis conf for the dir setting. same for sentinel conf. if not stock /var/lib/redis, don't do the mv. redis and sentinel may be using two different paths. + diff --git a/valkey.spec b/valkey.spec index f5b4b05..12b5e70 100644 --- a/valkey.spec +++ b/valkey.spec @@ -99,9 +99,9 @@ Summary: Conversion script and compatibility symlinks for Redis Requires: valkey Conflicts: redis # if change proposal is approved -#%if 0%%{?fedora} > 40 +#%%if 0%%{?fedora} > 40 #Obsoletes: redis <= 7.2.4 -#%endif +#%%endif %description compat-redis %summary From dd022c3977b531c61e0c6ccb87394fa0d12fe4e9 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 17 Jun 2024 20:05:36 -0500 Subject: [PATCH 02/43] drop /etc/sysconfig and migrate configs where possible --- migrate_redis_to_valkey.sh | 6 ++-- valkey-sentinel.sysconfig | 1 - valkey.spec | 73 +++++++++++++++++++++++++++++++------- valkey.sysconfig | 1 - 4 files changed, 63 insertions(+), 18 deletions(-) delete mode 100644 valkey-sentinel.sysconfig delete mode 100644 valkey.sysconfig diff --git a/migrate_redis_to_valkey.sh b/migrate_redis_to_valkey.sh index 9c5ce5c..64f8c0f 100644 --- a/migrate_redis_to_valkey.sh +++ b/migrate_redis_to_valkey.sh @@ -4,13 +4,13 @@ if [ -f /etc/redis/redis.conf ]; then mv /etc/redis/redis.conf /etc/redis/redis.conf.rpmsave chown valkey:root /etc/valkey/valkey.conf sed -i 's|^dir\s.*|dir /var/lib/valkey|g' /etc/valkey/valkey.conf - echo "/etc/redis/redis.conf has been copied to /etc/valkey/valkey.conf. pidfile, logfile, and dir are overridden by the config at /etc/sysconfig/valkey. Manual review of valkey.conf is strongly suggested especially if you had modified redis.conf." + echo "/etc/redis/redis.conf has been copied to /etc/valkey/valkey.conf. Manual review of valkey.conf is strongly suggested especially if you had modified redis.conf." fi if [ -f /etc/redis/sentinel.conf ]; then cp /etc/redis/sentinel.conf /etc/valkey/sentinel.conf mv /etc/redis/sentinel.conf /etc/redis/sentinel.conf.rpmsave chown valkey:root /etc/valkey/sentinel.conf - echo "/etc/redis/sentinel.conf has been copied to /etc/valkey/sentinel.conf. pidfile, logfile, and dir are overridden by the config at /etc/sysconfig/valkey-sentinel. Manual review of sentinel.conf is strongly suggested especially if you had modified sentinel.conf." + echo "/etc/redis/sentinel.conf has been copied to /etc/valkey/sentinel.conf. Manual review of sentinel.conf is strongly suggested especially if you had modified sentinel.conf." fi if [ -d /var/lib/redis ]; then # cp could take a while, and this is a one-way move anyway @@ -18,7 +18,7 @@ if [ -d /var/lib/redis ]; then # don't leave garbage behind, plus we check if this dir exists when running this script rm -rf /var/lib/redis chown -R valkey. /var/lib/valkey - echo "On-disk redis dumps copied from /var/lib/redis/ to /var/lib/valkey" + echo "On-disk redis dumps moved from /var/lib/redis/ to /var/lib/valkey" fi # TODO diff --git a/valkey-sentinel.sysconfig b/valkey-sentinel.sysconfig deleted file mode 100644 index 0203101..0000000 --- a/valkey-sentinel.sysconfig +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="--logfile /var/log/valkey/sentinel.log --unixsocket /var/run/valkey/sentinel.sock --pidfile /var/run/valkey/sentinel.pid" diff --git a/valkey.spec b/valkey.spec index 12b5e70..4cf4072 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 7.2.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -20,8 +20,6 @@ Source4: %{name}.sysusers # could have pulled this out of unpacked sources but # our copy has additional options pre-programmed in Source5: %{name}-limit-systemd -Source6: %{name}.sysconfig -Source7: %{name}-sentinel.sysconfig Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh @@ -36,10 +34,6 @@ BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel Requires: logrotate -Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd # from deps/hiredis/hiredis.h Provides: bundled(hiredis) = 1.0.3 # from deps/jemalloc/VERSION @@ -134,6 +128,22 @@ if test "$api" != "%{valkey_modules_abi}"; then exit 1 fi + +sed -i -e 's|^logfile .*$|logfile /var/log/valkey/valkey.log|g' \ + -e 's|^# unixsocket .*$|unixsocket /run/valkey/valkey.sock|g' \ + -e 's|^pidfile .*$|pidfile /run/valkey/valkey.pid|g' \ + valkey.conf + +sed -i -e 's|^logfile .*$|logfile /var/log/valkey/sentinel.log|g' \ + -e 's|^pidfile .*$|pidfile /run/valkey/sentinel.pid|g' \ + sentinel.conf + +%if (%{defined fedora} && 0%{?fedora} < 42) || (%{defined rhel} && 0%{?rhel} < 10) +# these lines are for conditionals around sysconfig to valkey.conf porting scriptlets to avoid re-runs +echo '# valkey_rpm_conf' >> valkey.conf +echo '# valkey-sentinel_rpm_conf' >> sentinel.conf +%endif + %global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes %build @@ -180,10 +190,6 @@ install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h #mkdir -p %{buildroot}%{_rpmmacrodir} install -pDm644 %{S:8} %{buildroot}%{_rpmmacrodir}/macros.%{name} -# Install sysconfig files -install -Dpm 644 %{S:6} %{buildroot}%{_sysconfdir}/sysconfig/%{name} -install -Dpm 644 %{S:7} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-sentinel - # compat script install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh @@ -200,6 +206,46 @@ make %{make_flags} test-sentinel %post +%if (%{defined fedora} && 0%{?fedora} < 42) || (%{defined rhel} && 0%{?rhel} < 10) +# migrate away from /etc/sysconfig/valkey +# only during upgrades, not installs +if [ $1 -eq 2 ]; then + # if valkey.rpmsave doesn't exist then it wasn't modified by the user + # and we should write our defaults into the config file to ensure continuity of service + # these defaults are what was previously in /etc/sysconfig/valkey + # if there's no .rpmnew file they got the updated default config file so we don't need to sed + if [ ! -f /etc/sysconfig/valkey.rpmsave ] && [ -f /etc/valkey/valkey.conf.rpmnew ] && ! grep -q valkey_rpm_conf /etc/valkey/valkey.conf; then + sed -i -e 's|^logfile ""$|logfile /var/log/valkey/valkey.log|g' \ + -e 's|^pidfile /var/run/valkey_6379.pid$|pidfile /run/valkey/valkey.pid|g' \ + /etc/valkey/valkey.conf + # we need an extra conditional around this one to make sure we don't end up with duplicate + # config lines for unixsocket since the default is commented + if ! grep -q "^unixsocket " /etc/valkey/valkey.conf; then + sed -i 's|^# unixsocket /run/valkey.sock$|unixsocket /run/valkey/valkey.sock|g' /etc/valkey/valkey.conf + fi + echo '# valkey_rpm_conf' >> /etc/valkey/valkey.conf + fi + if [ ! -f /etc/sysconfig/valkey-sentinel.rpmsave ] && [ -f /etc/valkey/valkey-sentinel.conf.rpmnew ] && ! grep -q valkey-sentinel_rpm_conf /etc/valkey/sentinel.conf; then + sed -i -e 's|^logfile ""$|logfile /var/log/valkey/sentinel.log|g' \ + -e 's|^pidfile /var/run/valkey_6379.pid$|pidfile /run/valkey/sentinel.pid|g' \ + /etc/valkey/sentinel.conf + echo '# valkey-sentinel_rpm_conf' >> /etc/valkey/sentinel.conf + fi + + # if valkey.rpmsave does exist then it was modified and we still need it + # becuase we don't know what was modified so we cannot sed the main config + # or remove the sysconfig file. This will detach the sysconfig file from the RPM + # and as long as we keep the line to load it in the service file nothing will break + # for the user + if [ -f /etc/sysconfig/valkey.rpmsave ]; then + mv -n /etc/sysconfig/valkey{.rpmsave,} + fi + if [ -f /etc/sysconfig/valkey-sentinel.rpmsave ]; then + mv -n /etc/sysconfig/valkey-sentinel{.rpmsave,} + fi +fi +%endif + %systemd_post %{name}.service %systemd_post %{name}-sentinel.service @@ -243,8 +289,6 @@ make %{make_flags} test-sentinel %{_unitdir}/%{name}-sentinel.service.d/limit.conf %dir %attr(0755, valkey, valkey) %ghost %{_localstatedir}/run/%{name} %{_sysusersdir}/%{name}.conf -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-sentinel %files devel @@ -260,6 +304,9 @@ make %{make_flags} test-sentinel %changelog +* Mon Jun 17 2024 Jonathan Wright - 7.2.5-6 +- drop /etc/sysconfig/valkey + * Mon Apr 29 2024 Jonathan Wright - 7.2.5-5 - improve migration scripts - rename compat package diff --git a/valkey.sysconfig b/valkey.sysconfig deleted file mode 100644 index 90f3018..0000000 --- a/valkey.sysconfig +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="--dir /var/lib/valkey --logfile /var/log/valkey/valkey.log --unixsocket /var/run/valkey/valkey.sock --pidfile /var/run/valkey/valkey.pid" From 58c4da4f1482bbcfef8c52dae5d061c74f9afd5a Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sat, 22 Jun 2024 04:40:17 -0400 Subject: [PATCH 03/43] Enable automatic replacement of redis with valkey Reference: https://fedoraproject.org/wiki/Changes/Replace_Redis_With_Valkey --- valkey.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/valkey.spec b/valkey.spec index 4cf4072..f700131 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 7.2.5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -90,12 +90,13 @@ Header file required for building loadable Valkey modules. %package compat-redis Summary: Conversion script and compatibility symlinks for Redis -Requires: valkey +Requires: valkey = %{version}-%{release} Conflicts: redis -# if change proposal is approved -#%%if 0%%{?fedora} > 40 -#Obsoletes: redis <= 7.2.4 -#%%endif +%if 0%{?fedora} > 40 || 0%{?rhel} > 9 +Obsoletes: redis <= 7.2.5 +Provides: redis = %{version}-%{release} +%endif +BuildArch: noarch %description compat-redis %summary @@ -304,6 +305,9 @@ fi %changelog +* Sat Jun 22 2024 Neal Gompa - 7.2.5-7 +- Enable automatic replacement of redis with valkey + * Mon Jun 17 2024 Jonathan Wright - 7.2.5-6 - drop /etc/sysconfig/valkey From 2de68b77f681a05effbe8564cd4cbe92815bb51b Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Tue, 2 Jul 2024 12:28:00 -0500 Subject: [PATCH 04/43] enable tests, selectively disable others --- valkey.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/valkey.spec b/valkey.spec index f700131..abd7d99 100644 --- a/valkey.spec +++ b/valkey.spec @@ -1,9 +1,9 @@ # Tests fail in mock, not in local build. -%bcond_with tests +%bcond_without tests Name: valkey Version: 7.2.5 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -98,6 +98,7 @@ Provides: redis = %{version}-%{release} %endif BuildArch: noarch + %description compat-redis %summary @@ -198,8 +199,10 @@ install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh %check %if %{with tests} # https://github.com/redis/redis/issues/1417 (for "taskset -c 1") -taskset -c 1 make %{make_flags} test -make %{make_flags} test-sentinel +taskset -c 1 ./runtest --skiptest "Active defrag - AOF loading" + +# sentinel tests fail in mock, but we want the normal tests above +#./runtest-sentinel %endif %pre @@ -305,6 +308,11 @@ fi %changelog +* Tue Jul 02 2024 Jonathan Wright - 7.2.5-8 +- Enable tests by default + selectively disable tests that fail in mock for redis + disable redis-sentinel tests, they always fail in mock + * Sat Jun 22 2024 Neal Gompa - 7.2.5-7 - Enable automatic replacement of redis with valkey From 3f748b068ec6e083d8006d933660225eed22eba6 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 15 Jul 2024 10:17:49 -0500 Subject: [PATCH 05/43] Fix journal warning rhbz#2297457 --- valkey-sentinel.service | 6 +++--- valkey.service | 6 +++--- valkey.spec | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/valkey-sentinel.service b/valkey-sentinel.service index e9e6caa..5c67392 100644 --- a/valkey-sentinel.service +++ b/valkey-sentinel.service @@ -5,10 +5,10 @@ After=network-online.target Wants=network-online.target [Service] +# ensure var is set +Environment=OPTIONS= EnvironmentFile=-/etc/sysconfig/valkey-sentinel -# moved $OPTIONS to start because the --dir option only overrides the config if it is passed before -# the config to the binary. I think this is a bug and will be reporting it upstream as all other -# opts don't care about the order for the override to work +# we must keep $OPTIONS and the env file as some older installs will still be using /etc/sysconfig/valkey-sentinel ExecStart=/usr/bin/valkey-sentinel /etc/valkey/sentinel.conf --daemonize no --supervised systemd $OPTIONS Type=notify User=valkey diff --git a/valkey.service b/valkey.service index b7d58f3..dcb1f41 100644 --- a/valkey.service +++ b/valkey.service @@ -6,10 +6,10 @@ Wants=network-online.target [Service] WorkingDirectory=/var/lib/valkey +# ensure var is set +Environment=OPTIONS= EnvironmentFile=-/etc/sysconfig/valkey -# moved $OPTIONS to start because the --dir option only overrides the config if it is passed before -# the config to the binary. I think this is a bug and will be reporting it upstream as all other -# opts don't care about the order for the override to work +# we must keep $OPTIONS and the env file as some older installs will still be using /etc/sysconfig/valkey ExecStart=/usr/bin/valkey-server /etc/valkey/valkey.conf --daemonize no --supervised systemd $OPTIONS Type=notify User=valkey diff --git a/valkey.spec b/valkey.spec index abd7d99..8e3ba8d 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 7.2.5 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -308,6 +308,9 @@ fi %changelog +* Mon Jul 15 2024 Jonathan Wright - 7.2.5-9 +- Fix journal warning rhbz#2297457 + * Tue Jul 02 2024 Jonathan Wright - 7.2.5-8 - Enable tests by default selectively disable tests that fail in mock for redis From b164d04368a2e43f62daef683d66a6e200f5983e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:33:53 +0000 Subject: [PATCH 06/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- valkey.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 8e3ba8d..ebdcde4 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 7.2.5 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -308,6 +308,9 @@ fi %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 7.2.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jul 15 2024 Jonathan Wright - 7.2.5-9 - Fix journal warning rhbz#2297457 From 806f2023c4d96db53578241c0f5e94b5184fd755 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Aug 2024 09:20:00 +0200 Subject: [PATCH 07/43] merge limit.conf in main service file --- valkey-limit-systemd | 14 -------------- valkey-sentinel.service | 13 +++++++++++++ valkey.service | 13 +++++++++++++ valkey.spec | 11 ----------- 4 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 valkey-limit-systemd diff --git a/valkey-limit-systemd b/valkey-limit-systemd deleted file mode 100644 index a792937..0000000 --- a/valkey-limit-systemd +++ /dev/null @@ -1,14 +0,0 @@ -# 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 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/valkey-sentinel.service b/valkey-sentinel.service index 5c67392..36093e0 100644 --- a/valkey-sentinel.service +++ b/valkey-sentinel.service @@ -16,6 +16,19 @@ Group=valkey RuntimeDirectory=valkey RuntimeDirectoryMode=0755 +# 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 more information. +LimitNOFILE=10240 + +# 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. +#TimeoutStartSec=90s +#TimeoutStopSec=90s + [Install] WantedBy=multi-user.target diff --git a/valkey.service b/valkey.service index dcb1f41..827f5f2 100644 --- a/valkey.service +++ b/valkey.service @@ -17,6 +17,19 @@ Group=valkey RuntimeDirectory=valkey RuntimeDirectoryMode=0755 +# 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 more information. +LimitNOFILE=10240 + +# 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. +#TimeoutStartSec=90s +#TimeoutStopSec=90s + [Install] WantedBy=multi-user.target diff --git a/valkey.spec b/valkey.spec index ebdcde4..2e92a27 100644 --- a/valkey.spec +++ b/valkey.spec @@ -17,9 +17,6 @@ Source1: %{name}.logrotate Source2: %{name}-sentinel.service Source3: %{name}.service Source4: %{name}.sysusers -# could have pulled this out of unpacked sources but -# our copy has additional options pre-programmed in -Source5: %{name}-limit-systemd Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh @@ -178,10 +175,6 @@ mkdir -p %{buildroot}%{_unitdir} install -pm644 %{S:3} %{buildroot}%{_unitdir} install -pm644 %{S:2} %{buildroot}%{_unitdir} -# Install systemd limit files -install -p -D -m 644 %{S:5} %{buildroot}%{_unitdir}/%{name}.service.d/limit.conf -install -p -D -m 644 %{S:5} %{buildroot}%{_unitdir}/%{name}-sentinel.service.d/limit.conf - # Fix non-standard-executable-perm error. chmod 755 %{buildroot}%{_bindir}/%{name}-* @@ -287,10 +280,6 @@ fi %{_bindir}/%{name}-* %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sentinel.service -%dir %{_unitdir}/%{name}.service.d -%{_unitdir}/%{name}.service.d/limit.conf -%dir %{_unitdir}/%{name}-sentinel.service.d -%{_unitdir}/%{name}-sentinel.service.d/limit.conf %dir %attr(0755, valkey, valkey) %ghost %{_localstatedir}/run/%{name} %{_sysusersdir}/%{name}.conf From 297d9e9358eb8f630607a6d6f86c207fb34865ec Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Aug 2024 16:16:40 +0200 Subject: [PATCH 08/43] fix obsoletes + conflicts --- valkey.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/valkey.spec b/valkey.spec index 2e92a27..6905522 100644 --- a/valkey.spec +++ b/valkey.spec @@ -88,10 +88,11 @@ Header file required for building loadable Valkey modules. %package compat-redis Summary: Conversion script and compatibility symlinks for Redis Requires: valkey = %{version}-%{release} -Conflicts: redis %if 0%{?fedora} > 40 || 0%{?rhel} > 9 -Obsoletes: redis <= 7.2.5 +Obsoletes: redis < 7.4 Provides: redis = %{version}-%{release} +%else +Conflicts: redis < 7.4 %endif BuildArch: noarch From 908f3277a8df9e20d4667662b277a5fdc9c18c91 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Aug 2024 16:41:04 +0200 Subject: [PATCH 09/43] merge limit.conf in main service files fix obsoletes/conflicts up to 7.4 --- valkey.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 6905522..c168480 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 7.2.5 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -298,6 +298,10 @@ fi %changelog +* Thu Aug 1 2024 Remi Collet - 7.2.5-11 +- merge limit.conf in main service files +- fix obsoletes/conflicts up to 7.4 + * Sat Jul 20 2024 Fedora Release Engineering - 7.2.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 6dbb2f1194f0de213435e4dd6771f0d0af769550 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Sun, 4 Aug 2024 20:28:26 -0500 Subject: [PATCH 10/43] update to 7.2.6 --- .gitignore | 1 + sources | 2 +- valkey.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0d0fac7..bee5f1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /valkey-7.2.4-rc1.tar.gz /valkey-7.2.5-rc1.tar.gz /valkey-7.2.5.tar.gz +/valkey-7.2.6.tar.gz diff --git a/sources b/sources index 9377bca..d3970b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (valkey-7.2.5.tar.gz) = 0b684a5ffe045ce51bb2f4f76429928784b8b46ee4817a95b658ffd69313a90b3d0fb12e0ddbb0b4cb57a7e0c79072f603eb4524a9bcce96ecc9ae8f1a5f02c3 +SHA512 (valkey-7.2.6.tar.gz) = 99005b82ecbcdfde38ff823aff149b9f8c97052641b098a3197bab9fb6804b068a3ecedce11b99ef790af4ceb04c2eea25ba3ec37e39be6bb9382319933226af diff --git a/valkey.spec b/valkey.spec index c168480..995e8a6 100644 --- a/valkey.spec +++ b/valkey.spec @@ -2,8 +2,8 @@ %bcond_without tests Name: valkey -Version: 7.2.5 -Release: 11%{?dist} +Version: 7.2.6 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -298,6 +298,9 @@ fi %changelog +* Mon Aug 05 2024 Jonathan Wright - 7.2.6-1 +- update to 7.2.6 rhbz#2302510 + * Thu Aug 1 2024 Remi Collet - 7.2.5-11 - merge limit.conf in main service files - fix obsoletes/conflicts up to 7.4 From a618db3cb512f0f7cc5288815eb6efcd82ff8d7c Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 12 Aug 2024 10:17:49 -0400 Subject: [PATCH 11/43] Add compat-redis-devel subpackage for Redis API Valkey modules Resolves: rhbz#2304083 --- valkey.spec | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 995e8a6..5b4cfd1 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 7.2.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -101,6 +101,27 @@ BuildArch: noarch %summary +%package compat-redis-devel +Summary: Compatibility development header for Redis API Valkey modules +Requires: valkey-devel = %{version}-%{release} +%if 0%{?fedora} > 40 || 0%{?rhel} > 9 +Obsoletes: redis-devel < 7.4 +Provides: redis-devel = %{version}-%{release} +# Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines) +Obsoletes: redis-static < 7.4 +Provides: redis-static = %{version}-%{release} +%else +Conflicts: redis-devel < 7.4 +Conflicts: redis-static < 7.4 +%endif +BuildArch: noarch + + +%description compat-redis-devel +Header file required for building loadable Valkey modules with the legacy +Redis API. + + %prep %autosetup -n %{name}-%{version} -p1 @@ -189,6 +210,9 @@ install -pDm644 %{S:8} %{buildroot}%{_rpmmacrodir}/macros.%{name} # compat script install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh +# compat header +install -pDm644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h + %check %if %{with tests} @@ -297,7 +321,15 @@ fi %{_bindir}/redis-* +%files compat-redis-devel +%{_includedir}/redismodule.h + + %changelog +* Mon Aug 12 2024 Neal Gompa - 7.2.6-2 +- Add compat-redis-devel subpackage for Redis API Valkey modules + Resolves: rhbz#2304083 + * Mon Aug 05 2024 Jonathan Wright - 7.2.6-1 - update to 7.2.6 rhbz#2302510 From 3ce5e318512083c880d9475fcbe8582c204b43c3 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 16 Sep 2024 10:39:11 -0500 Subject: [PATCH 12/43] update to 8.0.0 --- .gitignore | 1 + sources | 2 +- valkey.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bee5f1d..1e5ee2b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /valkey-7.2.5-rc1.tar.gz /valkey-7.2.5.tar.gz /valkey-7.2.6.tar.gz +/valkey-8.0.0.tar.gz diff --git a/sources b/sources index d3970b5..7bdcb58 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (valkey-7.2.6.tar.gz) = 99005b82ecbcdfde38ff823aff149b9f8c97052641b098a3197bab9fb6804b068a3ecedce11b99ef790af4ceb04c2eea25ba3ec37e39be6bb9382319933226af +SHA512 (valkey-8.0.0.tar.gz) = bb1acbbcc6c52a54e77c2341cc01a128c08f08599319bc67997ebf1204d6a2f99d3c70a6234bed9526c553e26bbbb8417bdebdc6369375f22b471181dbc2408c diff --git a/valkey.spec b/valkey.spec index 5b4cfd1..2668a7b 100644 --- a/valkey.spec +++ b/valkey.spec @@ -2,8 +2,8 @@ %bcond_without tests Name: valkey -Version: 7.2.6 -Release: 2%{?dist} +Version: 8.0.0 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -217,7 +217,7 @@ install -pDm644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h %check %if %{with tests} # https://github.com/redis/redis/issues/1417 (for "taskset -c 1") -taskset -c 1 ./runtest --skiptest "Active defrag - AOF loading" +taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading" # sentinel tests fail in mock, but we want the normal tests above #./runtest-sentinel @@ -326,6 +326,9 @@ fi %changelog +* Mon Sep 16 2024 Jonathan Wright - 8.0.0-1 +- update to 8.0.0 + * Mon Aug 12 2024 Neal Gompa - 7.2.6-2 - Add compat-redis-devel subpackage for Redis API Valkey modules Resolves: rhbz#2304083 From d4606453ea5c4627ebe913c7e980007691ae2c04 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 16 Sep 2024 12:34:01 -0500 Subject: [PATCH 13/43] update bz --- valkey.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 2668a7b..974c09c 100644 --- a/valkey.spec +++ b/valkey.spec @@ -327,7 +327,7 @@ fi %changelog * Mon Sep 16 2024 Jonathan Wright - 8.0.0-1 -- update to 8.0.0 +- update to 8.0.0 rhbz#2312577 * Mon Aug 12 2024 Neal Gompa - 7.2.6-2 - Add compat-redis-devel subpackage for Redis API Valkey modules From 1be1a05eb785b44de7c1a970c400148e12efcc5b Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 16 Sep 2024 23:49:46 -0500 Subject: [PATCH 14/43] disable tests in mock due to inconsistency --- valkey.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 974c09c..77b3446 100644 --- a/valkey.spec +++ b/valkey.spec @@ -1,5 +1,5 @@ # Tests fail in mock, not in local build. -%bcond_without tests +%bcond_with tests Name: valkey Version: 8.0.0 From bfacdb0d25c5148091072e88dfff35c1c210618e Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Tue, 24 Sep 2024 16:13:57 -0500 Subject: [PATCH 15/43] add man pages and doc subpackage --- .gitignore | 1 + sources | 1 + valkey.spec | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1e5ee2b..3452b09 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /valkey-7.2.5.tar.gz /valkey-7.2.6.tar.gz /valkey-8.0.0.tar.gz +/valkey-doc-8.0.0.tar.gz diff --git a/sources b/sources index 7bdcb58..cb766b7 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (valkey-8.0.0.tar.gz) = bb1acbbcc6c52a54e77c2341cc01a128c08f08599319bc67997ebf1204d6a2f99d3c70a6234bed9526c553e26bbbb8417bdebdc6369375f22b471181dbc2408c +SHA512 (valkey-doc-8.0.0.tar.gz) = c89dce1761e5c3868cdc10437532d0b0287de655d4ce676567455e0c192fae9f5530392d3d3a09e5766c7b6843442d56301f1daebedacab2fe33c4e1d302b8e0 diff --git a/valkey.spec b/valkey.spec index 77b3446..7af1973 100644 --- a/valkey.spec +++ b/valkey.spec @@ -3,7 +3,7 @@ Name: valkey Version: 8.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -19,6 +19,7 @@ Source3: %{name}.service Source4: %{name}.sysusers Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh +Source50: https://github.com/valkey-io/%{name}-doc/archive/%{version}/%{name}-doc-%{version}.tar.gz BuildRequires: make BuildRequires: gcc @@ -30,6 +31,10 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel +# for docs/man pages +BuildRequires: pandoc +BuildRequires: python3-pyyaml + Requires: logrotate # from deps/hiredis/hiredis.h Provides: bundled(hiredis) = 1.0.3 @@ -122,8 +127,22 @@ Header file required for building loadable Valkey modules with the legacy Redis API. +%package doc +Summary: Documentation and extra man pages for %{name} +BuildArch: noarch +%if 0%{?fedora} > 40 || 0%{?rhel} > 9 +Obsoletes: redis-doc < 7.4 +Provides: redis-doc = %{version}-%{release} +%endif + + +%description doc +%summary + + %prep -%autosetup -n %{name}-%{version} -p1 +# no autosetup due to no support for multiple source extraction +%setup -n %{name}-%{version} -a50 mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -167,11 +186,29 @@ echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes + %build %make_build %{make_flags} +# docs +pushd %{name}-doc-%{version} +# build man pages +%make_build VALKEY_ROOT=../ +# build html docs +%make_build html VALKEY_ROOT=../ +popd + + %install %make_install %{make_flags} +# install docs +pushd %{name}-doc-%{version} +# man pages +%make_install INSTALL_MAN_DIR=%{buildroot}%{_mandir} VALKEY_ROOT=../ +# install html docs +install -d %{buildroot}%{_docdir}/%{name}/ +cp -ra _build/html/* %{buildroot}%{_docdir}/%{name}/ +popd # remove sample confs rm -rf %{buildroot}%{_datadir}/%{name} @@ -307,6 +344,13 @@ fi %{_unitdir}/%{name}-sentinel.service %dir %attr(0755, valkey, valkey) %ghost %{_localstatedir}/run/%{name} %{_sysusersdir}/%{name}.conf +%{_mandir}/man1/%{name}*.gz +%{_mandir}/man5/%{name}.conf.5.gz + + +%files doc +%doc %{_docdir}/valkey/ +%{_mandir}/man{3,7}/*%{name}*.gz %files devel @@ -326,6 +370,10 @@ fi %changelog +* Tue Sep 24 2024 Jonathan Wright - 8.0.0-2 +- add man pages rhbz#2276017 +- add doc subpackage rhbz#2276020 + * Mon Sep 16 2024 Jonathan Wright - 8.0.0-1 - update to 8.0.0 rhbz#2312577 From 8c153451f9aadd3ebde7f4104085e15fd9a9af25 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 27 Sep 2024 10:54:50 -0400 Subject: [PATCH 16/43] Disable docs on RHEL pandoc is not available in RHEL, but is in EPEL. --- valkey.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/valkey.spec b/valkey.spec index 7af1973..859d1cb 100644 --- a/valkey.spec +++ b/valkey.spec @@ -1,9 +1,11 @@ +# Docs require pandoc, which is not included in RHEL +%bcond docs %[%{undefined rhel} || %{defined epel}] # Tests fail in mock, not in local build. -%bcond_with tests +%bcond tests 0 Name: valkey Version: 8.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -31,9 +33,11 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel +%if %{with docs} # for docs/man pages BuildRequires: pandoc BuildRequires: python3-pyyaml +%endif Requires: logrotate # from deps/hiredis/hiredis.h @@ -127,6 +131,7 @@ Header file required for building loadable Valkey modules with the legacy Redis API. +%if %{with docs} %package doc Summary: Documentation and extra man pages for %{name} BuildArch: noarch @@ -138,6 +143,7 @@ Provides: redis-doc = %{version}-%{release} %description doc %summary +%endif %prep @@ -190,6 +196,7 @@ echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %build %make_build %{make_flags} +%if %{with docs} # docs pushd %{name}-doc-%{version} # build man pages @@ -197,10 +204,12 @@ pushd %{name}-doc-%{version} # build html docs %make_build html VALKEY_ROOT=../ popd +%endif %install %make_install %{make_flags} +%if %{with docs} # install docs pushd %{name}-doc-%{version} # man pages @@ -209,6 +218,7 @@ pushd %{name}-doc-%{version} install -d %{buildroot}%{_docdir}/%{name}/ cp -ra _build/html/* %{buildroot}%{_docdir}/%{name}/ popd +%endif # remove sample confs rm -rf %{buildroot}%{_datadir}/%{name} @@ -344,13 +354,17 @@ fi %{_unitdir}/%{name}-sentinel.service %dir %attr(0755, valkey, valkey) %ghost %{_localstatedir}/run/%{name} %{_sysusersdir}/%{name}.conf +%if %{with docs} %{_mandir}/man1/%{name}*.gz %{_mandir}/man5/%{name}.conf.5.gz +%endif +%if %{with docs} %files doc %doc %{_docdir}/valkey/ %{_mandir}/man{3,7}/*%{name}*.gz +%endif %files devel @@ -370,6 +384,9 @@ fi %changelog +* Fri Sep 27 2024 Yaakov Selkowitz - 8.0.0-3 +- Disable docs on RHEL + * Tue Sep 24 2024 Jonathan Wright - 8.0.0-2 - add man pages rhbz#2276017 - add doc subpackage rhbz#2276020 From 7279c838f80f8ffae9cf364a2d6bae0ba7b268a0 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 7 Oct 2024 08:50:04 -0500 Subject: [PATCH 17/43] update to 8.0.1 --- .gitignore | 2 ++ sources | 4 ++-- valkey.spec | 10 ++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3452b09..94004ca 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ /valkey-7.2.6.tar.gz /valkey-8.0.0.tar.gz /valkey-doc-8.0.0.tar.gz +/valkey-8.0.1.tar.gz +/valkey-doc-8.0.1.tar.gz diff --git a/sources b/sources index cb766b7..a389eea 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.0.0.tar.gz) = bb1acbbcc6c52a54e77c2341cc01a128c08f08599319bc67997ebf1204d6a2f99d3c70a6234bed9526c553e26bbbb8417bdebdc6369375f22b471181dbc2408c -SHA512 (valkey-doc-8.0.0.tar.gz) = c89dce1761e5c3868cdc10437532d0b0287de655d4ce676567455e0c192fae9f5530392d3d3a09e5766c7b6843442d56301f1daebedacab2fe33c4e1d302b8e0 +SHA512 (valkey-8.0.1.tar.gz) = 90d489c366a6fbf80802163e51251836a4c1f60b1cf5ffaf6355d4003856647a0935d05b608f767e1a3ddaed3b555325a944318f46d11cee317c3848e9181ca2 +SHA512 (valkey-doc-8.0.1.tar.gz) = 8e77d153afc29fcf9fcb56758930e1294e8bd42fc13cd31002083efe85b59a554c2cda525d4395dc363719bd14217b645df5e309e9ced1740872a5543a0c8261 diff --git a/valkey.spec b/valkey.spec index 859d1cb..ee8c23c 100644 --- a/valkey.spec +++ b/valkey.spec @@ -4,8 +4,8 @@ %bcond tests 0 Name: valkey -Version: 8.0.0 -Release: 3%{?dist} +Version: 8.0.1 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -384,6 +384,12 @@ fi %changelog +* Mon Oct 07 2024 Jonathan Wright - 8.0.1-1 +- update to 8.0.1 rhbz#2316254 + fixes CVE-2024-31449 + fixes CVE-2024-31227 + fixes CVE-2024-31228 + * Fri Sep 27 2024 Yaakov Selkowitz - 8.0.0-3 - Disable docs on RHEL From e33435e8fa23ece656d23547bc9e00035e0fcfe9 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 7 Oct 2024 14:54:18 -0400 Subject: [PATCH 18/43] Fix spec compatibility with EPEL 8 --- valkey.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/valkey.spec b/valkey.spec index ee8c23c..028258e 100644 --- a/valkey.spec +++ b/valkey.spec @@ -1,7 +1,11 @@ # Docs require pandoc, which is not included in RHEL -%bcond docs %[%{undefined rhel} || %{defined epel}] +%if %{undefined rhel} || %{defined epel} +%bcond_without docs +%else +%bcond_with docs +%endif # Tests fail in mock, not in local build. -%bcond tests 0 +%bcond_with tests Name: valkey Version: 8.0.1 From 506edabedef0105fbba1f7a20f5b12a67eae22b9 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 7 Oct 2024 14:40:06 -0500 Subject: [PATCH 19/43] fix spec for epel8 --- valkey.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 028258e..064d5fe 100644 --- a/valkey.spec +++ b/valkey.spec @@ -9,7 +9,7 @@ Name: valkey Version: 8.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -388,6 +388,9 @@ fi %changelog +* Mon Oct 07 2024 Jonathan Wright - 8.0.1-2 +- fix spec for epel8 + * Mon Oct 07 2024 Jonathan Wright - 8.0.1-1 - update to 8.0.1 rhbz#2316254 fixes CVE-2024-31449 From 19e9ecc692aeb03c38165c429c2aa7148c921d5b Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 7 Oct 2024 14:55:14 -0500 Subject: [PATCH 20/43] BR python3 for docs --- valkey.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/valkey.spec b/valkey.spec index 064d5fe..64ee2cc 100644 --- a/valkey.spec +++ b/valkey.spec @@ -40,6 +40,7 @@ BuildRequires: openssl-devel %if %{with docs} # for docs/man pages BuildRequires: pandoc +BuildRequires: python3 BuildRequires: python3-pyyaml %endif @@ -390,6 +391,7 @@ fi %changelog * Mon Oct 07 2024 Jonathan Wright - 8.0.1-2 - fix spec for epel8 +- buildrequires python3 for docs * Mon Oct 07 2024 Jonathan Wright - 8.0.1-1 - update to 8.0.1 rhbz#2316254 From 3f29bcf71c211bf07730c48d30fea917cc38985f Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Wed, 13 Nov 2024 11:59:10 -0600 Subject: [PATCH 21/43] - include license with doc sub-package - include systemd symlinks for redis in compat package --- valkey.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/valkey.spec b/valkey.spec index 64ee2cc..520be6f 100644 --- a/valkey.spec +++ b/valkey.spec @@ -9,7 +9,7 @@ Name: valkey Version: 8.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -140,6 +140,7 @@ Redis API. %package doc Summary: Documentation and extra man pages for %{name} BuildArch: noarch +License: CC-BY-SA-4.0 %if 0%{?fedora} > 40 || 0%{?rhel} > 9 Obsoletes: redis-doc < 7.4 Provides: redis-doc = %{version}-%{release} @@ -222,6 +223,9 @@ pushd %{name}-doc-%{version} # install html docs install -d %{buildroot}%{_docdir}/%{name}/ cp -ra _build/html/* %{buildroot}%{_docdir}/%{name}/ +# install doc license +install -d %{buildroot}%{_defaultlicensedir}/valkey-doc/ +cp -a LICENSE %{buildroot}%{_defaultlicensedir}/valkey-doc/ popd %endif @@ -265,6 +269,10 @@ install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh # compat header install -pDm644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h +# compat systemd symlinks +ln -sr %{buildroot}/usr/lib/systemd/system/valkey.service %{buildroot}/usr/lib/systemd/system/redis.service +ln -sr %{buildroot}/usr/lib/systemd/system/valkey-sentinel.service %{buildroot}/usr/lib/systemd/system/redis-sentinel.service + %check %if %{with tests} @@ -367,6 +375,7 @@ fi %if %{with docs} %files doc +%license LICENSE %doc %{_docdir}/valkey/ %{_mandir}/man{3,7}/*%{name}*.gz %endif @@ -382,13 +391,18 @@ fi %files compat-redis %{_libexecdir}/migrate_redis_to_valkey.sh %{_bindir}/redis-* - +%{_unitdir}/redis.service +%{_unitdir}/redis-sentinel.service %files compat-redis-devel %{_includedir}/redismodule.h %changelog +* Wed Nov 13 2024 Jonathan Wright - 8.0.1-3 +- include license with doc sub-package +- include systemd symlinks for redis in compat package + * Mon Oct 07 2024 Jonathan Wright - 8.0.1-2 - fix spec for epel8 - buildrequires python3 for docs From 27ba4fa0b05af606e866ae7475617301cf44b191 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Wed, 8 Jan 2025 15:14:53 -0600 Subject: [PATCH 22/43] update to 8.0.2 --- .gitignore | 2 ++ sources | 4 ++-- valkey.spec | 9 +++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 94004ca..21c040e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ /valkey-doc-8.0.0.tar.gz /valkey-8.0.1.tar.gz /valkey-doc-8.0.1.tar.gz +/valkey-8.0.2.tar.gz +/valkey-doc-8.0.2.tar.gz diff --git a/sources b/sources index a389eea..052bf71 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.0.1.tar.gz) = 90d489c366a6fbf80802163e51251836a4c1f60b1cf5ffaf6355d4003856647a0935d05b608f767e1a3ddaed3b555325a944318f46d11cee317c3848e9181ca2 -SHA512 (valkey-doc-8.0.1.tar.gz) = 8e77d153afc29fcf9fcb56758930e1294e8bd42fc13cd31002083efe85b59a554c2cda525d4395dc363719bd14217b645df5e309e9ced1740872a5543a0c8261 +SHA512 (valkey-8.0.2.tar.gz) = 432e9b869234b784edcf644b1062bbc0ff1eb79e49c6fb7e66d5db9ddf0e089dfdccf5e5d5201119976699d4dab1b5ddb865767a8087551e9c8f2eff5d157df9 +SHA512 (valkey-doc-8.0.2.tar.gz) = 205eefb7aea66bc7750307b0c9c72c59cc472c12d3f593d4dfcfcc0d68446593c30f84ef697323bccdf5be4518058d13027d414deeebe2330603b22c9c83eb50 diff --git a/valkey.spec b/valkey.spec index 520be6f..da238d1 100644 --- a/valkey.spec +++ b/valkey.spec @@ -8,8 +8,8 @@ %bcond_with tests Name: valkey -Version: 8.0.1 -Release: 3%{?dist} +Version: 8.0.2 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -399,6 +399,11 @@ fi %changelog +* Wed Jan 08 2025 Jonathan Wright - 8.0.2-1 +- update to 8.0.2 rhbz#2336259 + fixes CVE-2024-46981 + fixes CVE-2024-51741 + * Wed Nov 13 2024 Jonathan Wright - 8.0.1-3 - include license with doc sub-package - include systemd symlinks for redis in compat package From bec8cff7989ce1e5fc2c494ccfd01cf42fe743f5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 14:06:09 +0000 Subject: [PATCH 23/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- valkey.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index da238d1..c860eb2 100644 --- a/valkey.spec +++ b/valkey.spec @@ -9,7 +9,7 @@ Name: valkey Version: 8.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -399,6 +399,9 @@ fi %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 8.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jan 08 2025 Jonathan Wright - 8.0.2-1 - update to 8.0.2 rhbz#2336259 fixes CVE-2024-46981 From 19bcd717853d813bd07c36b100f059b97d73ea1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 18:03:12 +0100 Subject: [PATCH 24/43] Drop call to %sysusers_create_compat After https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers, rpm will handle account creation automatically. --- valkey.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/valkey.spec b/valkey.spec index c860eb2..9ab5592 100644 --- a/valkey.spec +++ b/valkey.spec @@ -9,7 +9,7 @@ Name: valkey Version: 8.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -283,8 +283,6 @@ taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading" #./runtest-sentinel %endif -%pre -%sysusers_create_compat %{S:4} %post @@ -399,6 +397,9 @@ fi %changelog +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 8.0.2-3 +- Drop call to %sysusers_create_compat + * Sun Jan 19 2025 Fedora Release Engineering - 8.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From ab458d3b8fc68fb0009f505cf1c7ba894b545276 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 1 Apr 2025 15:39:54 +1100 Subject: [PATCH 25/43] Add tmpfiles.d entries for valkey directories below /var valkey-server currently fails to start within ImageMode RHEL projects - and presumably other rpm-ostree based systems - due to a more relaxed treatment of /var persistence. These issues are addressed through the addition of a systemd tmpfiles.d configuration, which this commit adds. https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html for details of the file format used here. --- valkey.spec | 5 +++++ valkey.tmpfiles | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 valkey.tmpfiles diff --git a/valkey.spec b/valkey.spec index 9ab5592..00d1e79 100644 --- a/valkey.spec +++ b/valkey.spec @@ -23,6 +23,7 @@ Source1: %{name}.logrotate Source2: %{name}-sentinel.service Source3: %{name}.service Source4: %{name}.sysusers +Source5: %{name}.tmpfiles Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh Source50: https://github.com/valkey-io/%{name}-doc/archive/%{version}/%{name}-doc-%{version}.tar.gz @@ -235,6 +236,9 @@ rm -rf %{buildroot}%{_datadir}/%{name} # System user install -p -D -m 0644 %{S:4} %{buildroot}%{_sysusersdir}/%{name}.conf +# Install tmpfiles.d file +install -p -D -m 0644 %{S:5} %{buildroot}%{_tmpfilesdir}/%{name}.conf + # Filesystem. install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_localstatedir}/log/%{name} @@ -365,6 +369,7 @@ fi %{_unitdir}/%{name}-sentinel.service %dir %attr(0755, valkey, valkey) %ghost %{_localstatedir}/run/%{name} %{_sysusersdir}/%{name}.conf +%{_tmpfilesdir}/%{name}.conf %if %{with docs} %{_mandir}/man1/%{name}*.gz %{_mandir}/man5/%{name}.conf.5.gz diff --git a/valkey.tmpfiles b/valkey.tmpfiles new file mode 100644 index 0000000..2383ddb --- /dev/null +++ b/valkey.tmpfiles @@ -0,0 +1,3 @@ +D /run/valkey 0755 valkey valkey - +d /var/lib/valkey 0750 valkey valkey - +d /var/log/valkey 0750 valkey valkey - From 6ae587f09935843e4ada0eeb3f86d38171253192 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 4 Apr 2025 11:15:40 +1100 Subject: [PATCH 26/43] Migrate redis and sentinel .log files also --- migrate_redis_to_valkey.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/migrate_redis_to_valkey.sh b/migrate_redis_to_valkey.sh index 64f8c0f..3934956 100644 --- a/migrate_redis_to_valkey.sh +++ b/migrate_redis_to_valkey.sh @@ -4,12 +4,14 @@ if [ -f /etc/redis/redis.conf ]; then mv /etc/redis/redis.conf /etc/redis/redis.conf.rpmsave chown valkey:root /etc/valkey/valkey.conf sed -i 's|^dir\s.*|dir /var/lib/valkey|g' /etc/valkey/valkey.conf + sed -i 's|logfile /var/log/redis/redis.log|logfile /var/log/valkey/valkey.log|' /etc/valkey/valkey.conf echo "/etc/redis/redis.conf has been copied to /etc/valkey/valkey.conf. Manual review of valkey.conf is strongly suggested especially if you had modified redis.conf." fi if [ -f /etc/redis/sentinel.conf ]; then cp /etc/redis/sentinel.conf /etc/valkey/sentinel.conf mv /etc/redis/sentinel.conf /etc/redis/sentinel.conf.rpmsave chown valkey:root /etc/valkey/sentinel.conf + sed -i 's|logfile /var/log/redis/sentinel.log|logfile /var/log/valkey/sentinel.log|' /etc/valkey/sentinel.conf echo "/etc/redis/sentinel.conf has been copied to /etc/valkey/sentinel.conf. Manual review of sentinel.conf is strongly suggested especially if you had modified sentinel.conf." fi if [ -d /var/lib/redis ]; then @@ -20,7 +22,3 @@ if [ -d /var/lib/redis ]; then chown -R valkey. /var/lib/valkey echo "On-disk redis dumps moved from /var/lib/redis/ to /var/lib/valkey" fi - -# TODO -# 1. expand logic to read current redis conf for the dir setting. same for sentinel conf. if not stock /var/lib/redis, don't do the mv. redis and sentinel may be using two different paths. - From 0aa899dcd04a3af7b4e6a3a1265898d8a420b39c Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 4 Apr 2025 11:19:25 +1100 Subject: [PATCH 27/43] Rebase to 8.1.0 --- .gitignore | 2 ++ sources | 4 ++-- valkey.spec | 9 +++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 21c040e..dbc0dbd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ /valkey-doc-8.0.1.tar.gz /valkey-8.0.2.tar.gz /valkey-doc-8.0.2.tar.gz +/valkey-8.1.0.tar.gz +/valkey-doc-8.1.0.tar.gz diff --git a/sources b/sources index 052bf71..3fbf431 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.0.2.tar.gz) = 432e9b869234b784edcf644b1062bbc0ff1eb79e49c6fb7e66d5db9ddf0e089dfdccf5e5d5201119976699d4dab1b5ddb865767a8087551e9c8f2eff5d157df9 -SHA512 (valkey-doc-8.0.2.tar.gz) = 205eefb7aea66bc7750307b0c9c72c59cc472c12d3f593d4dfcfcc0d68446593c30f84ef697323bccdf5be4518058d13027d414deeebe2330603b22c9c83eb50 +SHA512 (valkey-8.1.0.tar.gz) = 54559ad697992611245aa92e33f976a609c44d7e3f97f4773a09a53cb55226367ac5a47a68c49f1d824b0327850f66ce3ff32e5fe42321c896ed3e33c5bcfe70 +SHA512 (valkey-doc-8.1.0.tar.gz) = 4d378f9495ff10479ad058e826b8916eb925bef59bb8b15dfb348d828daf064aa7b0c92625623bf79da07d31c9562821093981e2b611222d2625e2af4a374c48 diff --git a/valkey.spec b/valkey.spec index 00d1e79..3da03b7 100644 --- a/valkey.spec +++ b/valkey.spec @@ -8,8 +8,8 @@ %bcond_with tests Name: valkey -Version: 8.0.2 -Release: 3%{?dist} +Version: 8.1.0 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -402,6 +402,11 @@ fi %changelog +* Fri Apr 04 2025 Nathan Scott - 8.1.0-1 +- include tmpfiles.d configuration file +- redis.log transition rhbz#2316030 +- update to 8.1.0 rhbz#22356280 + * Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 8.0.2-3 - Drop call to %sysusers_create_compat From 571272adcefa8140bb492917af61d34fa4aecfbe Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 4 Apr 2025 12:09:37 +1100 Subject: [PATCH 28/43] Patch in a workaround for building on s390x and ppc64le Reported upstream https://github.com/valkey-io/valkey/issues/1916 --- used_memory_thread_type.patch | 16 ++++++++++++++++ valkey.spec | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 used_memory_thread_type.patch diff --git a/used_memory_thread_type.patch b/used_memory_thread_type.patch new file mode 100644 index 0000000..29d1365 --- /dev/null +++ b/used_memory_thread_type.patch @@ -0,0 +1,16 @@ +diff -Naurp valkey-8.1.0.orig/src/zmalloc.c valkey-8.1.0/src/zmalloc.c +--- valkey-8.1.0.orig/src/zmalloc.c 2025-04-01 01:56:45.000000000 +1100 ++++ valkey-8.1.0/src/zmalloc.c 2025-04-04 11:39:32.762881364 +1100 +@@ -101,10 +101,11 @@ static thread_local int thread_index = - + #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || defined(__POWERPC__) || defined(__arm__) || \ + defined(__arm64__) + static __attribute__((aligned(CACHE_LINE_SIZE))) size_t used_memory_thread_padded[MAX_THREADS_NUM + PADDING_ELEMENT_NUM]; ++static size_t *used_memory_thread = &used_memory_thread_padded[PADDING_ELEMENT_NUM]; + #else + static __attribute__((aligned(CACHE_LINE_SIZE))) _Atomic size_t used_memory_thread_padded[MAX_THREADS_NUM + PADDING_ELEMENT_NUM]; ++static _Atomic size_t *used_memory_thread = &used_memory_thread_padded[PADDING_ELEMENT_NUM]; + #endif +-static size_t *used_memory_thread = &used_memory_thread_padded[PADDING_ELEMENT_NUM]; + static atomic_int total_active_threads = 0; + /* This is a simple protection. It's used only if some modules create a lot of threads. */ + static atomic_size_t used_memory_for_additional_threads = 0; diff --git a/valkey.spec b/valkey.spec index 3da03b7..f195deb 100644 --- a/valkey.spec +++ b/valkey.spec @@ -28,6 +28,8 @@ Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh Source50: https://github.com/valkey-io/%{name}-doc/archive/%{version}/%{name}-doc-%{version}.tar.gz +Patch0: used_memory_thread_type.patch + BuildRequires: make BuildRequires: gcc %if %{with tests} @@ -156,6 +158,7 @@ Provides: redis-doc = %{version}-%{release} %prep # no autosetup due to no support for multiple source extraction %setup -n %{name}-%{version} -a50 +%autopatch -p1 mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc From 766dfe113d18a2dfdbeadcba433cee46bc4fc97b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Apr 2025 09:52:21 +0200 Subject: [PATCH 29/43] v8.1.1 --- .gitignore | 1 + sources | 2 +- used_memory_thread_type.patch | 16 ---------------- valkey.spec | 16 +++++++++------- 4 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 used_memory_thread_type.patch diff --git a/.gitignore b/.gitignore index dbc0dbd..77f0970 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /valkey-doc-8.0.2.tar.gz /valkey-8.1.0.tar.gz /valkey-doc-8.1.0.tar.gz +/valkey-8.1.1.tar.gz diff --git a/sources b/sources index 3fbf431..77b9efd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.1.0.tar.gz) = 54559ad697992611245aa92e33f976a609c44d7e3f97f4773a09a53cb55226367ac5a47a68c49f1d824b0327850f66ce3ff32e5fe42321c896ed3e33c5bcfe70 +SHA512 (valkey-8.1.1.tar.gz) = 1f84b24839856c8d6cdbe1bca5f571fc41cda2b08f495ee80e9a0a03a8ba737f0effeedcb0508195f8d30570443cbccd3c0cf8f4d93980e57f9f8ac656379327 SHA512 (valkey-doc-8.1.0.tar.gz) = 4d378f9495ff10479ad058e826b8916eb925bef59bb8b15dfb348d828daf064aa7b0c92625623bf79da07d31c9562821093981e2b611222d2625e2af4a374c48 diff --git a/used_memory_thread_type.patch b/used_memory_thread_type.patch deleted file mode 100644 index 29d1365..0000000 --- a/used_memory_thread_type.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naurp valkey-8.1.0.orig/src/zmalloc.c valkey-8.1.0/src/zmalloc.c ---- valkey-8.1.0.orig/src/zmalloc.c 2025-04-01 01:56:45.000000000 +1100 -+++ valkey-8.1.0/src/zmalloc.c 2025-04-04 11:39:32.762881364 +1100 -@@ -101,10 +101,11 @@ static thread_local int thread_index = - - #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || defined(__POWERPC__) || defined(__arm__) || \ - defined(__arm64__) - static __attribute__((aligned(CACHE_LINE_SIZE))) size_t used_memory_thread_padded[MAX_THREADS_NUM + PADDING_ELEMENT_NUM]; -+static size_t *used_memory_thread = &used_memory_thread_padded[PADDING_ELEMENT_NUM]; - #else - static __attribute__((aligned(CACHE_LINE_SIZE))) _Atomic size_t used_memory_thread_padded[MAX_THREADS_NUM + PADDING_ELEMENT_NUM]; -+static _Atomic size_t *used_memory_thread = &used_memory_thread_padded[PADDING_ELEMENT_NUM]; - #endif --static size_t *used_memory_thread = &used_memory_thread_padded[PADDING_ELEMENT_NUM]; - static atomic_int total_active_threads = 0; - /* This is a simple protection. It's used only if some modules create a lot of threads. */ - static atomic_size_t used_memory_for_additional_threads = 0; diff --git a/valkey.spec b/valkey.spec index f195deb..9222962 100644 --- a/valkey.spec +++ b/valkey.spec @@ -4,11 +4,12 @@ %else %bcond_with docs %endif +%global doc_version 8.1.0 # Tests fail in mock, not in local build. %bcond_with tests Name: valkey -Version: 8.1.0 +Version: 8.1.1 Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause @@ -26,9 +27,7 @@ Source4: %{name}.sysusers Source5: %{name}.tmpfiles Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh -Source50: https://github.com/valkey-io/%{name}-doc/archive/%{version}/%{name}-doc-%{version}.tar.gz - -Patch0: used_memory_thread_type.patch +Source50: https://github.com/valkey-io/%{name}-doc/archive/%{doc_version}/%{name}-doc-%{doc_version}.tar.gz BuildRequires: make BuildRequires: gcc @@ -158,7 +157,6 @@ Provides: redis-doc = %{version}-%{release} %prep # no autosetup due to no support for multiple source extraction %setup -n %{name}-%{version} -a50 -%autopatch -p1 mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -208,7 +206,7 @@ echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %if %{with docs} # docs -pushd %{name}-doc-%{version} +pushd %{name}-doc-%{doc_version} # build man pages %make_build VALKEY_ROOT=../ # build html docs @@ -221,7 +219,7 @@ popd %make_install %{make_flags} %if %{with docs} # install docs -pushd %{name}-doc-%{version} +pushd %{name}-doc-%{doc_version} # man pages %make_install INSTALL_MAN_DIR=%{buildroot}%{_mandir} VALKEY_ROOT=../ # install html docs @@ -405,6 +403,10 @@ fi %changelog +* Thu Apr 24 2025 Remi Collet - 8.1.1-1 +- update to 8.1.1 + fixes CVE-2025-21605 + * Fri Apr 04 2025 Nathan Scott - 8.1.0-1 - include tmpfiles.d configuration file - redis.log transition rhbz#2316030 From c22133a9b79a08b872d0bff8838f807c6f389c40 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 18 Jun 2025 14:29:30 +0200 Subject: [PATCH 30/43] v8.1.2 --- .gitignore | 2 ++ sources | 4 ++-- valkey.spec | 9 +++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 77f0970..02507ac 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ /valkey-8.1.0.tar.gz /valkey-doc-8.1.0.tar.gz /valkey-8.1.1.tar.gz +/valkey-8.1.2.tar.gz +/valkey-doc-8.1.1.tar.gz diff --git a/sources b/sources index 77b9efd..a998e5a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.1.1.tar.gz) = 1f84b24839856c8d6cdbe1bca5f571fc41cda2b08f495ee80e9a0a03a8ba737f0effeedcb0508195f8d30570443cbccd3c0cf8f4d93980e57f9f8ac656379327 -SHA512 (valkey-doc-8.1.0.tar.gz) = 4d378f9495ff10479ad058e826b8916eb925bef59bb8b15dfb348d828daf064aa7b0c92625623bf79da07d31c9562821093981e2b611222d2625e2af4a374c48 +SHA512 (valkey-8.1.2.tar.gz) = 04908cd4652a8ba11052fed7c67ae9b23fff91c090e32588a9a22bb921251931bf62860cde2814e9eb51f113a2f62eb7b14e1ad42e3e6de7a516bc3d57f26bda +SHA512 (valkey-doc-8.1.1.tar.gz) = 37b664a4f07c1821df1cd83df0559127588523feef54785400fae3c2a618c93d86e9ef8bc50cc046d0904a853ae52410aa82f79413e05298f42a829b3508d2f9 diff --git a/valkey.spec b/valkey.spec index 9222962..b55b164 100644 --- a/valkey.spec +++ b/valkey.spec @@ -4,12 +4,13 @@ %else %bcond_with docs %endif -%global doc_version 8.1.0 +# See https://github.com/valkey-io/valkey-doc/tags +%global doc_version 8.1.1 # Tests fail in mock, not in local build. %bcond_with tests Name: valkey -Version: 8.1.1 +Version: 8.1.2 Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause @@ -403,6 +404,10 @@ fi %changelog +* Wed Jun 18 2025 Remi Collet - 8.1.2-1 +- update to 8.1.2 + fixes CVE-2025-27151 + * Thu Apr 24 2025 Remi Collet - 8.1.1-1 - update to 8.1.1 fixes CVE-2025-21605 From b0a4d17aaf83e22f21b59197b0570e60f8f4a326 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Jul 2025 10:21:17 +0200 Subject: [PATCH 31/43] v8.1.3 --- .gitignore | 1 + sources | 2 +- valkey.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 02507ac..2922f66 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /valkey-8.1.1.tar.gz /valkey-8.1.2.tar.gz /valkey-doc-8.1.1.tar.gz +/valkey-8.1.3.tar.gz diff --git a/sources b/sources index a998e5a..ae11069 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.1.2.tar.gz) = 04908cd4652a8ba11052fed7c67ae9b23fff91c090e32588a9a22bb921251931bf62860cde2814e9eb51f113a2f62eb7b14e1ad42e3e6de7a516bc3d57f26bda +SHA512 (valkey-8.1.3.tar.gz) = 33b5fe5011aa0d26aa797276f1371d063bd8fef2adb1d405d6ae8c4718d3ed602cf8e4c3a8f423b90e798213ae28a939720d61806a3614477e576b2115973864 SHA512 (valkey-doc-8.1.1.tar.gz) = 37b664a4f07c1821df1cd83df0559127588523feef54785400fae3c2a618c93d86e9ef8bc50cc046d0904a853ae52410aa82f79413e05298f42a829b3508d2f9 diff --git a/valkey.spec b/valkey.spec index b55b164..707b443 100644 --- a/valkey.spec +++ b/valkey.spec @@ -10,7 +10,7 @@ %bcond_with tests Name: valkey -Version: 8.1.2 +Version: 8.1.3 Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause @@ -404,6 +404,10 @@ fi %changelog +* Mon Jul 7 2025 Remi Collet - 8.1.3-1 +- update to 8.1.3 + fixes CVE-2025-CVE-2025-32023 and CVE-2025-48367 + * Wed Jun 18 2025 Remi Collet - 8.1.2-1 - update to 8.1.2 fixes CVE-2025-27151 From 9eef320a122bf24f4023b678ea822bfd34e16bc0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:57:37 +0000 Subject: [PATCH 32/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- valkey.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index 707b443..05e6d52 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 8.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -404,6 +404,9 @@ fi %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 8.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jul 7 2025 Remi Collet - 8.1.3-1 - update to 8.1.3 fixes CVE-2025-CVE-2025-32023 and CVE-2025-48367 From c5ed702b27beed691bdb8a6b062c58bd5a85bdca Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Jul 2025 10:29:21 +0200 Subject: [PATCH 33/43] use patch for configuration changes add /etc/valkey/modules drop-in directory for module configuration files add %valkey_modules_cfg macro --- .gitignore | 1 + macros.valkey | 2 -- valkey-conf.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++++ valkey.spec | 35 +++++++++++++++++---------- 4 files changed, 84 insertions(+), 15 deletions(-) delete mode 100644 macros.valkey create mode 100644 valkey-conf.patch diff --git a/.gitignore b/.gitignore index 2922f66..a646f91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +clog /valkey-7.2.4-rc1.tar.gz /valkey-7.2.5-rc1.tar.gz /valkey-7.2.5.tar.gz diff --git a/macros.valkey b/macros.valkey deleted file mode 100644 index f27c41d..0000000 --- a/macros.valkey +++ /dev/null @@ -1,2 +0,0 @@ -%valkey_modules_abi 1 -%valkey_modules_dir %{_libdir}/valkey/modules diff --git a/valkey-conf.patch b/valkey-conf.patch new file mode 100644 index 0000000..55badf7 --- /dev/null +++ b/valkey-conf.patch @@ -0,0 +1,61 @@ +diff -up ./sentinel.conf.rpm ./sentinel.conf +--- ./sentinel.conf.rpm 2025-07-24 10:05:46.477794769 +0200 ++++ ./sentinel.conf 2025-07-24 10:07:27.023483441 +0200 +@@ -17,7 +17,7 @@ daemonize no + # When running daemonized, Valkey Sentinel writes a pid file in + # /var/run/valkey-sentinel.pid by default. You can specify a custom pid file + # location here. +-pidfile /var/run/valkey-sentinel.pid ++pidfile /run/valkey/sentinel.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -31,7 +31,7 @@ loglevel notice + # Specify the log file name. Also the empty string can be used to force + # Sentinel 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/valkey/sentinel.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. +diff -up ./valkey.conf.rpm ./valkey.conf +--- ./valkey.conf.rpm 2025-07-24 10:05:46.475591081 +0200 ++++ ./valkey.conf 2025-07-24 10:07:23.219331838 +0200 +@@ -43,6 +43,9 @@ + # include /path/to/other.conf + # include /path/to/fragments/*.conf + # ++# Module configuration files ++include /etc/valkey/modules/*.conf ++ + + ################################## MODULES ##################################### + +@@ -153,7 +156,7 @@ tcp-backlog 511 + # incoming connections. There is no default, so the server will not listen + # on a unix socket when not specified. + # +-# unixsocket /run/valkey.sock ++unixsocket /run/valkey/valkey.sock + # unixsocketgroup wheel + # unixsocketperm 700 + +@@ -385,7 +388,7 @@ daemonize no + # + # Note that on modern Linux systems "/run/valkey.pid" is more conforming + # and should be used instead. +-pidfile /var/run/valkey_6379.pid ++pidfile /run/valkey/valkey.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -416,7 +419,7 @@ loglevel notice + # Specify the log file name. Also the empty string can be used to force + # the server 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/valkey/valkey.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. diff --git a/valkey.spec b/valkey.spec index 05e6d52..dc82286 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 8.1.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -26,10 +26,12 @@ Source2: %{name}-sentinel.service Source3: %{name}.service Source4: %{name}.sysusers Source5: %{name}.tmpfiles -Source8: macros.%{name} Source9: migrate_redis_to_valkey.sh Source50: https://github.com/valkey-io/%{name}-doc/archive/%{doc_version}/%{name}-doc-%{doc_version}.tar.gz +# Fix default paths in configuration files for RPM layout +Patch0: %{name}-conf.patch + BuildRequires: make BuildRequires: gcc %if %{with tests} @@ -64,6 +66,7 @@ Provides: bundled(fpconv) %global valkey_modules_abi 1 %global valkey_modules_dir %{_libdir}/%{name}/modules +%global valkey_modules_cfg %{_sysconfdir}/%{name}/modules Provides: valkey(modules_abi)%{?_isa} = %{valkey_modules_abi} ExcludeArch: %{ix86} @@ -158,6 +161,7 @@ Provides: redis-doc = %{version}-%{release} %prep # no autosetup due to no support for multiple source extraction %setup -n %{name}-%{version} -a50 +%patch -P0 -p1 -b.rpm mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -179,19 +183,17 @@ sed -e 's/--with-lg-quantum/--with-lg-page=16 --with-lg-quantum/' -i deps/Makefi api=`sed -n -e 's/#define VALKEYMODULE_APIVER_[0-9][0-9]* //p' src/valkeymodule.h` if test "$api" != "%{valkey_modules_abi}"; then : Error: Upstream API version is now ${api}, expecting %%{valkey_modules_abi}. - : Update the valkey_modules_abi macro, the rpmmacros file, and rebuild. + : Update the valkey_modules_abi macro, and rebuild. exit 1 fi - -sed -i -e 's|^logfile .*$|logfile /var/log/valkey/valkey.log|g' \ - -e 's|^# unixsocket .*$|unixsocket /run/valkey/valkey.sock|g' \ - -e 's|^pidfile .*$|pidfile /run/valkey/valkey.pid|g' \ - valkey.conf - -sed -i -e 's|^logfile .*$|logfile /var/log/valkey/sentinel.log|g' \ - -e 's|^pidfile .*$|pidfile /run/valkey/sentinel.pid|g' \ - sentinel.conf +# Generates macro file +cat << 'EOF' | tee macros.%{name} +%%valkey_version %version +%%valkey_modules_abi %valkey_modules_abi +%%valkey_modules_dir %valkey_modules_dir +%%valkey_modules_cfg %valkey_modules_cfg +EOF %if (%{defined fedora} && 0%{?fedora} < 42) || (%{defined rhel} && 0%{?rhel} < 10) # these lines are for conditionals around sysconfig to valkey.conf porting scriptlets to avoid re-runs @@ -253,6 +255,7 @@ install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # Install configuration files. install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf +install -dm750 %{buildroot}%{valkey_modules_cfg} # Install systemd unit files. mkdir -p %{buildroot}%{_unitdir} @@ -267,7 +270,7 @@ install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h # Install rpm macros for valkey modules #mkdir -p %{buildroot}%{_rpmmacrodir} -install -pDm644 %{S:8} %{buildroot}%{_rpmmacrodir}/macros.%{name} +install -pDm644 macros.%{name} %{buildroot}%{_rpmmacrodir}/macros.%{name} # compat script install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh @@ -360,6 +363,7 @@ fi %license COPYING-hiredis-BSD-3-Clause %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(0750, valkey, root) %dir %{_sysconfdir}/%{name} +%attr(0750, valkey, root) %dir %{valkey_modules_cfg} %attr(0640, valkey, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %attr(0640, valkey, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf %dir %{_libdir}/%{name} @@ -404,6 +408,11 @@ fi %changelog +* Thu Jul 24 2025 Remi Collet - 8.1.3-3 +- use patch for configuration changes +- add /etc/valkey/modules drop-in directory for module configuration files +- add %%valkey_version and %%valkey_modules_cfg macros + * Fri Jul 25 2025 Fedora Release Engineering - 8.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From cd97a3f1a75ab268966fa2fff50f79a04b70a637 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 28 Aug 2025 11:07:39 +0200 Subject: [PATCH 34/43] fix date --- valkey.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index dc82286..3f5355d 100644 --- a/valkey.spec +++ b/valkey.spec @@ -408,7 +408,7 @@ fi %changelog -* Thu Jul 24 2025 Remi Collet - 8.1.3-3 +* Thu Aug 28 2025 Remi Collet - 8.1.3-3 - use patch for configuration changes - add /etc/valkey/modules drop-in directory for module configuration files - add %%valkey_version and %%valkey_modules_cfg macros From 6d890386366c4b059ea7f0675fdbcc7d081efcc2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 9 Sep 2025 11:24:43 +0200 Subject: [PATCH 35/43] fix for ImageMode: ensure ownership of /etc/valkey --- .gitignore | 16 ++-------------- valkey.spec | 5 ++++- valkey.tmpfiles | 7 ++++--- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index a646f91..18985d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,5 @@ clog -/valkey-7.2.4-rc1.tar.gz -/valkey-7.2.5-rc1.tar.gz -/valkey-7.2.5.tar.gz -/valkey-7.2.6.tar.gz -/valkey-8.0.0.tar.gz -/valkey-doc-8.0.0.tar.gz -/valkey-8.0.1.tar.gz -/valkey-doc-8.0.1.tar.gz -/valkey-8.0.2.tar.gz -/valkey-doc-8.0.2.tar.gz -/valkey-8.1.0.tar.gz -/valkey-doc-8.1.0.tar.gz -/valkey-8.1.1.tar.gz -/valkey-8.1.2.tar.gz +valkey-8.0.*.tar.gz +valkey-doc-8.0.*.tar.gz /valkey-doc-8.1.1.tar.gz /valkey-8.1.3.tar.gz diff --git a/valkey.spec b/valkey.spec index 3f5355d..f2c9678 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 8.1.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -408,6 +408,9 @@ fi %changelog +* Tue Sep 9 2025 Remi Collet - 8.1.3-4 +- fix for ImageMode: ensure ownership of /etc/valkey + * Thu Aug 28 2025 Remi Collet - 8.1.3-3 - use patch for configuration changes - add /etc/valkey/modules drop-in directory for module configuration files diff --git a/valkey.tmpfiles b/valkey.tmpfiles index 2383ddb..2c99bad 100644 --- a/valkey.tmpfiles +++ b/valkey.tmpfiles @@ -1,3 +1,4 @@ -D /run/valkey 0755 valkey valkey - -d /var/lib/valkey 0750 valkey valkey - -d /var/log/valkey 0750 valkey valkey - +Z /etc/valkey ~0750 valkey root - +D /run/valkey 0755 valkey valkey - +d /var/lib/valkey 0750 valkey valkey - +d /var/log/valkey 0750 valkey valkey - From dca0ff1ce16e0e0a1a776ae93d87a4bf101c751e Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 26 Sep 2025 15:34:08 +1000 Subject: [PATCH 36/43] enable Remote Direct Memory Access (RDMA) capabilities --- valkey.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/valkey.spec b/valkey.spec index f2c9678..b15dd5b 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 8.1.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -41,6 +41,7 @@ BuildRequires: tcl BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros +BuildRequires: rdma-core-devel BuildRequires: openssl-devel %if %{with docs} # for docs/man pages @@ -201,7 +202,7 @@ echo '# valkey_rpm_conf' >> valkey.conf echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %endif -%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=yes %build @@ -408,6 +409,9 @@ fi %changelog +* Fri Sep 26 2025 Nathan Scott - 8.1.3-5 +- enable Remote Direct Memory Access (RDMA) capabilities + * Tue Sep 9 2025 Remi Collet - 8.1.3-4 - fix for ImageMode: ensure ownership of /etc/valkey From 3fc3880de4c245ba215e21dd103cedd8563c5151 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 30 Sep 2025 14:01:16 +0200 Subject: [PATCH 37/43] add sub-package for rdma module --- valkey.spec | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/valkey.spec b/valkey.spec index b15dd5b..1bfd19c 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 8.1.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -101,10 +101,18 @@ You can use Valkey from most programming languages also. Summary: Development header for Valkey module development # Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines) Provides: %{name}-static = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header file required for building loadable Valkey modules. +%package rdma +Summary: RDMA module for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Supplements: %{name} + +%description rdma +%summary. %package compat-redis Summary: Conversion script and compatibility symlinks for Redis @@ -202,7 +210,13 @@ echo '# valkey_rpm_conf' >> valkey.conf echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %endif -%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=yes +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=module + +: RDMA configuration file +cat << EOF | tee rdma.conf +# RDMA module +loadmodule %{valkey_modules_dir}/rdma.so +EOF %build @@ -283,6 +297,10 @@ install -pDm644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h ln -sr %{buildroot}/usr/lib/systemd/system/valkey.service %{buildroot}/usr/lib/systemd/system/redis.service ln -sr %{buildroot}/usr/lib/systemd/system/valkey-sentinel.service %{buildroot}/usr/lib/systemd/system/redis-sentinel.service +# RDMA module +install -pm755 src/valkey-rdma.so %{buildroot}%{valkey_modules_dir}/rdma.so +install -pm640 rdma.conf %{buildroot}%{valkey_modules_cfg}/rdma.conf + %check %if %{with tests} @@ -391,6 +409,11 @@ fi %endif +%files rdma +%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/rdma.conf +%{valkey_modules_dir}/rdma.so + + %files devel # main package is not required %license COPYING @@ -409,6 +432,9 @@ fi %changelog +* Tue Sep 30 2025 Remi Collet - 8.1.3-6 +- add sub-package for rdma module + * Fri Sep 26 2025 Nathan Scott - 8.1.3-5 - enable Remote Direct Memory Access (RDMA) capabilities From 6bb7032bb5344a745e08fa1e96407fcb86d16e87 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 1 Oct 2025 06:50:40 +0200 Subject: [PATCH 38/43] add sub-package for TLS module --- valkey.spec | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/valkey.spec b/valkey.spec index 1bfd19c..dcac124 100644 --- a/valkey.spec +++ b/valkey.spec @@ -97,6 +97,8 @@ a cache. You can use Valkey from most programming languages also. +See https://valkey.io/topics/ + %package devel Summary: Development header for Valkey module development # Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines) @@ -114,6 +116,18 @@ Supplements: %{name} %description rdma %summary. +See https://valkey.io/topics/RDMA/ + +%package tls +Summary: TLS module for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Supplements: %{name} + +%description tls +%summary. + +See https://valkey.io/topics/encryption/ + %package compat-redis Summary: Conversion script and compatibility symlinks for Redis Requires: valkey = %{version}-%{release} @@ -210,7 +224,7 @@ echo '# valkey_rpm_conf' >> valkey.conf echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %endif -%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=module +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=module BUILD_RDMA=module : RDMA configuration file cat << EOF | tee rdma.conf @@ -218,6 +232,12 @@ cat << EOF | tee rdma.conf loadmodule %{valkey_modules_dir}/rdma.so EOF +: TLS configuration file +cat << EOF | tee tls.conf +# TLS module +loadmodule %{valkey_modules_dir}/tls.so +EOF + %build %make_build %{make_flags} @@ -301,6 +321,10 @@ ln -sr %{buildroot}/usr/lib/systemd/system/valkey-sentinel.service %{buildroot}/ install -pm755 src/valkey-rdma.so %{buildroot}%{valkey_modules_dir}/rdma.so install -pm640 rdma.conf %{buildroot}%{valkey_modules_cfg}/rdma.conf +# TLS module +install -pm755 src/valkey-tls.so %{buildroot}%{valkey_modules_dir}/tls.so +install -pm640 tls.conf %{buildroot}%{valkey_modules_cfg}/tls.conf + %check %if %{with tests} @@ -408,11 +432,13 @@ fi %{_mandir}/man{3,7}/*%{name}*.gz %endif - %files rdma %attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/rdma.conf %{valkey_modules_dir}/rdma.so +%files tls +%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/tls.conf +%{valkey_modules_dir}/tls.so %files devel # main package is not required @@ -432,8 +458,9 @@ fi %changelog -* Tue Sep 30 2025 Remi Collet - 8.1.3-6 -- add sub-package for rdma module +* Wed Oct 1 2025 Remi Collet - 8.1.3-6 +- add sub-package for RDMA module +- add sub-package for TLS module * Fri Sep 26 2025 Nathan Scott - 8.1.3-5 - enable Remote Direct Memory Access (RDMA) capabilities From 17ff7b914d8017de60d2d88ce40eb689087987e9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 4 Oct 2025 07:52:38 +0200 Subject: [PATCH 39/43] Valkey 8.1.4 - Released Fri 09 October 2025 Upgrade urgency SECURITY: CVE-2025-49844 CVE-2025-46817 CVE-2025-46818 CVE-2025-46819 fix CONFIG REWRITE breaks configuration reported as https://github.com/valkey-io/valkey/issues/2678 using patch from https://github.com/valkey-io/valkey/pull/2689 --- .gitignore | 1 + sources | 2 +- valkey-loadmod.patch | 112 +++++++++++++++++++++++++++++++++++++++++++ valkey.spec | 17 +++++-- 4 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 valkey-loadmod.patch diff --git a/.gitignore b/.gitignore index 18985d0..6b099d4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ valkey-8.0.*.tar.gz valkey-doc-8.0.*.tar.gz /valkey-doc-8.1.1.tar.gz /valkey-8.1.3.tar.gz +/valkey-8.1.4.tar.gz diff --git a/sources b/sources index ae11069..006c638 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.1.3.tar.gz) = 33b5fe5011aa0d26aa797276f1371d063bd8fef2adb1d405d6ae8c4718d3ed602cf8e4c3a8f423b90e798213ae28a939720d61806a3614477e576b2115973864 +SHA512 (valkey-8.1.4.tar.gz) = ee44a550a0868dd42ebe3b015bdc2940b00e2e2984b6870f287605399f52986ee87e957193097a07ab5da1a1194a2b7873ed1919a74c9212903f5748d722f5f0 SHA512 (valkey-doc-8.1.1.tar.gz) = 37b664a4f07c1821df1cd83df0559127588523feef54785400fae3c2a618c93d86e9ef8bc50cc046d0904a853ae52410aa82f79413e05298f42a829b3508d2f9 diff --git a/valkey-loadmod.patch b/valkey-loadmod.patch new file mode 100644 index 0000000..15e8489 --- /dev/null +++ b/valkey-loadmod.patch @@ -0,0 +1,112 @@ +From c48838c5086cd3eec40f227ab6fa3ab36450c6ed Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Sat, 4 Oct 2025 07:23:52 +0200 +Subject: [PATCH] Fix #2678 don't add loadmodule when from config + +--- + src/config.c | 2 +- + src/module.c | 15 +++++++++++---- + src/module.h | 2 +- + 3 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/src/config.c b/src/config.c +index d0158b2c4d..9d9ac2608a 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -1605,7 +1605,7 @@ void rewriteConfigLoadmoduleOption(struct rewriteConfigState *state) { + while ((de = dictNext(di)) != NULL) { + struct ValkeyModule *module = dictGetVal(de); + line = moduleLoadQueueEntryToLoadmoduleOptionStr(module, "loadmodule"); +- rewriteConfigRewriteLine(state, "loadmodule", line, 1); ++ if (line) rewriteConfigRewriteLine(state, "loadmodule", line, 1); + } + dictReleaseIterator(di); + /* Mark "loadmodule" as processed in case modules is empty. */ +diff --git a/src/module.c b/src/module.c +index e5afa952fa..42f42ba80c 100644 +--- a/src/module.c ++++ b/src/module.c +@@ -84,6 +84,7 @@ + + struct moduleLoadQueueEntry { + sds path; ++ int conf; + int argc; + robj **argv; + }; +@@ -678,6 +679,7 @@ void moduleEnqueueLoadModule(sds path, sds *argv, int argc) { + loadmod->argv = argc ? zmalloc(sizeof(robj *) * argc) : NULL; + loadmod->path = sdsnew(path); + loadmod->argc = argc; ++ loadmod->conf = 1; + for (i = 0; i < argc; i++) { + loadmod->argv[i] = createRawStringObject(argv[i], sdslen(argv[i])); + } +@@ -688,6 +690,10 @@ sds moduleLoadQueueEntryToLoadmoduleOptionStr(ValkeyModule *module, + const char *config_option_str) { + sds line; + ++ if (module->loadmod->conf) { ++ /* no need to add as already from config */ ++ return NULL; ++ } + line = sdsnew(config_option_str); + line = sdscatlen(line, " ", 1); + line = sdscatsds(line, module->loadmod->path); +@@ -12350,7 +12356,7 @@ void moduleLoadFromQueue(void) { + listRewind(server.loadmodule_queue, &li); + while ((ln = listNext(&li))) { + struct moduleLoadQueueEntry *loadmod = ln->value; +- if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0) == C_ERR) { ++ if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0, 1) == C_ERR) { + serverLog(LL_WARNING, "Can't load module from %s: server aborting", loadmod->path); + exit(1); + } +@@ -12531,7 +12537,7 @@ void moduleUnregisterCleanup(ValkeyModule *module) { + + /* Load a module and initialize it. On success C_OK is returned, otherwise + * C_ERR is returned. */ +-int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex) { ++int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int is_config) { + int (*onload)(void *, void **, int); + void *handle; + +@@ -12606,6 +12612,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa + ctx.module->loadmod->path = sdsnew(path); + ctx.module->loadmod->argv = module_argc ? zmalloc(sizeof(robj *) * module_argc) : NULL; + ctx.module->loadmod->argc = module_argc; ++ ctx.module->loadmod->conf = is_config; + for (int i = 0; i < module_argc; i++) { + ctx.module->loadmod->argv[i] = module_argv[i]; + incrRefCount(ctx.module->loadmod->argv[i]); +@@ -13529,7 +13536,7 @@ void moduleCommand(client *c) { + argv = &c->argv[3]; + } + +- if (moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 0) == C_OK) ++ if (moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 0, 0) == C_OK) + addReply(c, shared.ok); + else + addReplyError(c, "Error loading the extension. Please check the server logs."); +@@ -13544,7 +13551,7 @@ void moduleCommand(client *c) { + /* If this is a loadex command we want to populate server.module_configs_queue with + * sds NAME VALUE pairs. We also want to increment argv to just after ARGS, if supplied. */ + if (parseLoadexArguments((ValkeyModuleString ***)&argv, &argc) == VALKEYMODULE_OK && +- moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 1) == C_OK) ++ moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 1, 0) == C_OK) + addReply(c, shared.ok); + else { + dictEmpty(server.module_configs_queue, NULL); +diff --git a/src/module.h b/src/module.h +index f6c266b592..1a964c1af9 100644 +--- a/src/module.h ++++ b/src/module.h +@@ -180,7 +180,7 @@ void moduleFreeContext(ValkeyModuleCtx *ctx); + void moduleInitModulesSystem(void); + void moduleInitModulesSystemLast(void); + void modulesCron(void); +-int moduleLoad(const char *path, void **argv, int argc, int is_loadex); ++int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int is_config); + int moduleUnload(sds name, const char **errmsg); + void moduleLoadFromQueue(void); + int moduleGetCommandKeysViaAPI(struct serverCommand *cmd, robj **argv, int argc, getKeysResult *result); diff --git a/valkey.spec b/valkey.spec index dcac124..8a0447e 100644 --- a/valkey.spec +++ b/valkey.spec @@ -10,8 +10,8 @@ %bcond_with tests Name: valkey -Version: 8.1.3 -Release: 6%{?dist} +Version: 8.1.4 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -31,6 +31,8 @@ Source50: https://github.com/valkey-io/%{name}-doc/archive/%{doc_versio # Fix default paths in configuration files for RPM layout Patch0: %{name}-conf.patch +# Workaround to https://github.com/valkey-io/valkey/issues/2678 +Patch1: %{name}-loadmod.patch BuildRequires: make BuildRequires: gcc @@ -184,7 +186,8 @@ Provides: redis-doc = %{version}-%{release} %prep # no autosetup due to no support for multiple source extraction %setup -n %{name}-%{version} -a50 -%patch -P0 -p1 -b.rpm +%patch -P0 -p1 -b .rpm +%patch -P1 -p1 -b .loadmod mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -458,6 +461,14 @@ fi %changelog +* Sat Oct 4 2025 Remi Collet - 8.1.4-1 +- Valkey 8.1.4 - Released Fri 09 October 2025 +- Upgrade urgency SECURITY: + CVE-2025-49844 CVE-2025-46817 CVE-2025-46818 CVE-2025-46819 +- fix CONFIG REWRITE breaks configuration + reported as https://github.com/valkey-io/valkey/issues/2678 + using patch from https://github.com/valkey-io/valkey/pull/2689 + * Wed Oct 1 2025 Remi Collet - 8.1.3-6 - add sub-package for RDMA module - add sub-package for TLS module From 4e9254d710ade92699bc2c7e624d99924fa608c8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 6 Oct 2025 03:28:18 +0200 Subject: [PATCH 40/43] improve the patch for loadmodule directive --- valkey-loadmod.patch | 113 ++++++++++++++++++++++++++++--------------- valkey.spec | 5 +- 2 files changed, 78 insertions(+), 40 deletions(-) diff --git a/valkey-loadmod.patch b/valkey-loadmod.patch index 15e8489..3341863 100644 --- a/valkey-loadmod.patch +++ b/valkey-loadmod.patch @@ -1,19 +1,38 @@ -From c48838c5086cd3eec40f227ab6fa3ab36450c6ed Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Sat, 4 Oct 2025 07:23:52 +0200 -Subject: [PATCH] Fix #2678 don't add loadmodule when from config +Adapted for 8.1.4 from +https://github.com/valkey-io/valkey/pull/2689 ---- - src/config.c | 2 +- - src/module.c | 15 +++++++++++---- - src/module.h | 2 +- - 3 files changed, 13 insertions(+), 6 deletions(-) - -diff --git a/src/config.c b/src/config.c -index d0158b2c4d..9d9ac2608a 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -1605,7 +1605,7 @@ void rewriteConfigLoadmoduleOption(struct rewriteConfigState *state) { +diff -up ./src/config.c.loadmod ./src/config.c +--- ./src/config.c.loadmod 2025-10-03 21:17:43.000000000 +0200 ++++ ./src/config.c 2025-10-06 03:06:41.774448336 +0200 +@@ -438,6 +438,8 @@ static int updateClientOutputBufferLimit + * within conf file parsing. This is only needed to support the deprecated + * abnormal aggregate `save T C` functionality. Remove in the future. */ + static int reading_config_file; ++/* support detecting include vs main config file */ ++static int reading_include_file = 0; + + void loadServerConfigFromString(char *config) { + deprecatedConfig deprecated_configs[] = { +@@ -529,7 +531,9 @@ void loadServerConfigFromString(char *co + + /* Execute config directives */ + if (!strcasecmp(argv[0], "include") && argc == 2) { ++ reading_include_file = 1; + loadServerConfig(argv[1], 0, NULL); ++ reading_include_file = 0; + } else if (!strcasecmp(argv[0], "rename-command") && argc == 3) { + struct serverCommand *cmd = lookupCommandBySds(argv[1]); + +@@ -562,7 +566,7 @@ void loadServerConfigFromString(char *co + goto loaderr; + } + } else if (!strcasecmp(argv[0], "loadmodule") && argc >= 2) { +- moduleEnqueueLoadModule(argv[1], &argv[2], argc - 2); ++ moduleEnqueueLoadModule(argv[1], &argv[2], argc - 2, reading_include_file); + } else if (strchr(argv[0], '.')) { + if (argc < 2) { + err = "Module config specified without value"; +@@ -1579,7 +1583,7 @@ void rewriteConfigLoadmoduleOption(struc while ((de = dictNext(di)) != NULL) { struct ValkeyModule *module = dictGetVal(de); line = moduleLoadQueueEntryToLoadmoduleOptionStr(module, "loadmodule"); @@ -22,64 +41,72 @@ index d0158b2c4d..9d9ac2608a 100644 } dictReleaseIterator(di); /* Mark "loadmodule" as processed in case modules is empty. */ -diff --git a/src/module.c b/src/module.c -index e5afa952fa..42f42ba80c 100644 ---- a/src/module.c -+++ b/src/module.c -@@ -84,6 +84,7 @@ +diff -up ./src/module.c.loadmod ./src/module.c +--- ./src/module.c.loadmod 2025-10-03 21:17:43.000000000 +0200 ++++ ./src/module.c 2025-10-06 03:05:36.498290506 +0200 +@@ -83,6 +83,7 @@ struct moduleLoadQueueEntry { sds path; -+ int conf; ++ int from_include; int argc; robj **argv; }; -@@ -678,6 +679,7 @@ void moduleEnqueueLoadModule(sds path, sds *argv, int argc) { +@@ -669,7 +670,7 @@ void freeClientModuleData(client *c) { + c->module_data = NULL; + } + +-void moduleEnqueueLoadModule(sds path, sds *argv, int argc) { ++void moduleEnqueueLoadModule(sds path, sds *argv, int argc, int from_include) { + int i; + struct moduleLoadQueueEntry *loadmod; + +@@ -677,6 +678,7 @@ void moduleEnqueueLoadModule(sds path, s loadmod->argv = argc ? zmalloc(sizeof(robj *) * argc) : NULL; loadmod->path = sdsnew(path); loadmod->argc = argc; -+ loadmod->conf = 1; ++ loadmod->from_include = from_include; for (i = 0; i < argc; i++) { loadmod->argv[i] = createRawStringObject(argv[i], sdslen(argv[i])); } -@@ -688,6 +690,10 @@ sds moduleLoadQueueEntryToLoadmoduleOptionStr(ValkeyModule *module, +@@ -687,6 +689,10 @@ sds moduleLoadQueueEntryToLoadmoduleOpti const char *config_option_str) { sds line; -+ if (module->loadmod->conf) { ++ if (module->loadmod->from_include) { + /* no need to add as already from config */ + return NULL; + } line = sdsnew(config_option_str); line = sdscatlen(line, " ", 1); line = sdscatsds(line, module->loadmod->path); -@@ -12350,7 +12356,7 @@ void moduleLoadFromQueue(void) { +@@ -12188,7 +12194,7 @@ void moduleLoadFromQueue(void) { listRewind(server.loadmodule_queue, &li); while ((ln = listNext(&li))) { struct moduleLoadQueueEntry *loadmod = ln->value; - if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0) == C_ERR) { -+ if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0, 1) == C_ERR) { ++ if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0, loadmod->from_include) == C_ERR) { serverLog(LL_WARNING, "Can't load module from %s: server aborting", loadmod->path); exit(1); } -@@ -12531,7 +12537,7 @@ void moduleUnregisterCleanup(ValkeyModule *module) { +@@ -12369,7 +12375,7 @@ void moduleUnregisterCleanup(ValkeyModul /* Load a module and initialize it. On success C_OK is returned, otherwise * C_ERR is returned. */ -int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex) { -+int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int is_config) { ++int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int from_include) { int (*onload)(void *, void **, int); void *handle; -@@ -12606,6 +12612,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa +@@ -12444,6 +12450,7 @@ int moduleLoad(const char *path, void ** ctx.module->loadmod->path = sdsnew(path); ctx.module->loadmod->argv = module_argc ? zmalloc(sizeof(robj *) * module_argc) : NULL; ctx.module->loadmod->argc = module_argc; -+ ctx.module->loadmod->conf = is_config; ++ ctx.module->loadmod->from_include = from_include; for (int i = 0; i < module_argc; i++) { ctx.module->loadmod->argv[i] = module_argv[i]; incrRefCount(ctx.module->loadmod->argv[i]); -@@ -13529,7 +13536,7 @@ void moduleCommand(client *c) { +@@ -13361,7 +13368,7 @@ void moduleCommand(client *c) { argv = &c->argv[3]; } @@ -88,7 +115,7 @@ index e5afa952fa..42f42ba80c 100644 addReply(c, shared.ok); else addReplyError(c, "Error loading the extension. Please check the server logs."); -@@ -13544,7 +13551,7 @@ void moduleCommand(client *c) { +@@ -13376,7 +13383,7 @@ void moduleCommand(client *c) { /* If this is a loadex command we want to populate server.module_configs_queue with * sds NAME VALUE pairs. We also want to increment argv to just after ARGS, if supplied. */ if (parseLoadexArguments((ValkeyModuleString ***)&argv, &argc) == VALKEYMODULE_OK && @@ -97,16 +124,24 @@ index e5afa952fa..42f42ba80c 100644 addReply(c, shared.ok); else { dictEmpty(server.module_configs_queue, NULL); -diff --git a/src/module.h b/src/module.h -index f6c266b592..1a964c1af9 100644 ---- a/src/module.h -+++ b/src/module.h -@@ -180,7 +180,7 @@ void moduleFreeContext(ValkeyModuleCtx *ctx); +diff -up ./src/module.h.loadmod ./src/module.h +--- ./src/module.h.loadmod 2025-10-03 21:17:43.000000000 +0200 ++++ ./src/module.h 2025-10-06 03:05:36.498698194 +0200 +@@ -169,7 +169,7 @@ static inline void moduleInitDigestConte + memset(mdvar->x, 0, sizeof(mdvar->x)); + } + +-void moduleEnqueueLoadModule(sds path, sds *argv, int argc); ++void moduleEnqueueLoadModule(sds path, sds *argv, int argc, int from_include); + sds moduleLoadQueueEntryToLoadmoduleOptionStr(ValkeyModule *module, + const char *config_option_str); + ValkeyModuleCtx *moduleAllocateContext(void); +@@ -180,7 +180,7 @@ void moduleFreeContext(ValkeyModuleCtx * void moduleInitModulesSystem(void); void moduleInitModulesSystemLast(void); void modulesCron(void); -int moduleLoad(const char *path, void **argv, int argc, int is_loadex); -+int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int is_config); ++int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int from_include); int moduleUnload(sds name, const char **errmsg); void moduleLoadFromQueue(void); int moduleGetCommandKeysViaAPI(struct serverCommand *cmd, robj **argv, int argc, getKeysResult *result); diff --git a/valkey.spec b/valkey.spec index 8a0447e..028de35 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 8.1.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -461,6 +461,9 @@ fi %changelog +* Mon Oct 6 2025 Remi Collet - 8.1.4-2 +- improve the patch for loadmodule directive + * Sat Oct 4 2025 Remi Collet - 8.1.4-1 - Valkey 8.1.4 - Released Fri 09 October 2025 - Upgrade urgency SECURITY: From 4f495819b0774f2ed6b6a61b7dd972f51cf7b16a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Oct 2025 10:12:02 +0200 Subject: [PATCH 41/43] Valkey 9.0.0 GA - October 21, 2025 bundled hiredis replaced by libvalkey --- .gitignore | 9 +++--- sources | 4 +-- valkey-conf.patch | 14 ++++----- valkey-loadmod.patch | 68 ++++++++++++++++++++++++++------------------ valkey.spec | 23 +++++++++------ 5 files changed, 68 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index 6b099d4..52d5805 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ clog -valkey-8.0.*.tar.gz -valkey-doc-8.0.*.tar.gz -/valkey-doc-8.1.1.tar.gz -/valkey-8.1.3.tar.gz -/valkey-8.1.4.tar.gz +valkey-8.*.tar.gz +valkey-doc-8.*.tar.gz +/valkey-9.0.0.tar.gz +/valkey-doc-9.0.0.tar.gz diff --git a/sources b/sources index 006c638..f9f5cbf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-8.1.4.tar.gz) = ee44a550a0868dd42ebe3b015bdc2940b00e2e2984b6870f287605399f52986ee87e957193097a07ab5da1a1194a2b7873ed1919a74c9212903f5748d722f5f0 -SHA512 (valkey-doc-8.1.1.tar.gz) = 37b664a4f07c1821df1cd83df0559127588523feef54785400fae3c2a618c93d86e9ef8bc50cc046d0904a853ae52410aa82f79413e05298f42a829b3508d2f9 +SHA512 (valkey-9.0.0.tar.gz) = 387e8ebf26a307940bf0f26eb4ba51f016445a618435f4c61ec4c8b8d4b7e2cbfc7a7e93b6c35b7c6832e3161981b4b2ce0d09bdc1799dbb5271052cf70654e4 +SHA512 (valkey-doc-9.0.0.tar.gz) = 931c85bc229a24de9b579353a365b1ab46123d190ba84359ec36d95153c1c6c42cdf1dbd2f08d24896e0bef9e71c3c95431fbd8af6fa0260a3e4b00ed6d17ebf diff --git a/valkey-conf.patch b/valkey-conf.patch index 55badf7..a079055 100644 --- a/valkey-conf.patch +++ b/valkey-conf.patch @@ -1,6 +1,6 @@ diff -up ./sentinel.conf.rpm ./sentinel.conf ---- ./sentinel.conf.rpm 2025-07-24 10:05:46.477794769 +0200 -+++ ./sentinel.conf 2025-07-24 10:07:27.023483441 +0200 +--- ./sentinel.conf.rpm 2025-07-07 09:18:20.000000000 +0200 ++++ ./sentinel.conf 2025-08-01 07:57:21.892278834 +0200 @@ -17,7 +17,7 @@ daemonize no # When running daemonized, Valkey Sentinel writes a pid file in # /var/run/valkey-sentinel.pid by default. You can specify a custom pid file @@ -20,8 +20,8 @@ diff -up ./sentinel.conf.rpm ./sentinel.conf # To enable logging to the system logger, just set 'syslog-enabled' to yes, # and optionally update the other syslog parameters to suit your needs. diff -up ./valkey.conf.rpm ./valkey.conf ---- ./valkey.conf.rpm 2025-07-24 10:05:46.475591081 +0200 -+++ ./valkey.conf 2025-07-24 10:07:23.219331838 +0200 +--- ./valkey.conf.rpm 2025-07-07 09:18:20.000000000 +0200 ++++ ./valkey.conf 2025-08-01 07:57:17.825116953 +0200 @@ -43,6 +43,9 @@ # include /path/to/other.conf # include /path/to/fragments/*.conf @@ -32,7 +32,7 @@ diff -up ./valkey.conf.rpm ./valkey.conf ################################## MODULES ##################################### -@@ -153,7 +156,7 @@ tcp-backlog 511 +@@ -163,7 +166,7 @@ tcp-backlog 511 # incoming connections. There is no default, so the server will not listen # on a unix socket when not specified. # @@ -41,7 +41,7 @@ diff -up ./valkey.conf.rpm ./valkey.conf # unixsocketgroup wheel # unixsocketperm 700 -@@ -385,7 +388,7 @@ daemonize no +@@ -409,7 +412,7 @@ daemonize no # # Note that on modern Linux systems "/run/valkey.pid" is more conforming # and should be used instead. @@ -50,7 +50,7 @@ diff -up ./valkey.conf.rpm ./valkey.conf # Specify the server verbosity level. # This can be one of: -@@ -416,7 +419,7 @@ loglevel notice +@@ -440,7 +443,7 @@ loglevel notice # Specify the log file name. Also the empty string can be used to force # the server to log on the standard output. Note that if you use standard # output for logging but daemonize, logs will be sent to /dev/null diff --git a/valkey-loadmod.patch b/valkey-loadmod.patch index 3341863..dad9cb9 100644 --- a/valkey-loadmod.patch +++ b/valkey-loadmod.patch @@ -1,19 +1,31 @@ -Adapted for 8.1.4 from -https://github.com/valkey-io/valkey/pull/2689 +From b40ab88996d0bbe9bdd366af9426f7400b21e19c Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Sat, 4 Oct 2025 07:23:52 +0200 +Subject: [PATCH] Fix #2678 don't add loadmodule when from config -diff -up ./src/config.c.loadmod ./src/config.c ---- ./src/config.c.loadmod 2025-10-03 21:17:43.000000000 +0200 -+++ ./src/config.c 2025-10-06 03:06:41.774448336 +0200 -@@ -438,6 +438,8 @@ static int updateClientOutputBufferLimit +only protect loadmodule from include files + +Signed-off-by: Remi Collet +--- + src/config.c | 8 ++++++-- + src/module.c | 17 ++++++++++++----- + src/module.h | 4 ++-- + 3 files changed, 20 insertions(+), 9 deletions(-) + +diff --git a/src/config.c b/src/config.c +index d0158b2c4d..ab453056df 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -448,6 +448,8 @@ static int updateClientOutputBufferLimit(sds *args, int arg_len, const char **er * within conf file parsing. This is only needed to support the deprecated * abnormal aggregate `save T C` functionality. Remove in the future. */ static int reading_config_file; +/* support detecting include vs main config file */ +static int reading_include_file = 0; - void loadServerConfigFromString(char *config) { + void loadServerConfigFromString(sds config) { deprecatedConfig deprecated_configs[] = { -@@ -529,7 +531,9 @@ void loadServerConfigFromString(char *co +@@ -539,7 +541,9 @@ void loadServerConfigFromString(sds config) { /* Execute config directives */ if (!strcasecmp(argv[0], "include") && argc == 2) { @@ -23,7 +35,7 @@ diff -up ./src/config.c.loadmod ./src/config.c } else if (!strcasecmp(argv[0], "rename-command") && argc == 3) { struct serverCommand *cmd = lookupCommandBySds(argv[1]); -@@ -562,7 +566,7 @@ void loadServerConfigFromString(char *co +@@ -572,7 +576,7 @@ void loadServerConfigFromString(sds config) { goto loaderr; } } else if (!strcasecmp(argv[0], "loadmodule") && argc >= 2) { @@ -32,7 +44,7 @@ diff -up ./src/config.c.loadmod ./src/config.c } else if (strchr(argv[0], '.')) { if (argc < 2) { err = "Module config specified without value"; -@@ -1579,7 +1583,7 @@ void rewriteConfigLoadmoduleOption(struc +@@ -1605,7 +1609,7 @@ void rewriteConfigLoadmoduleOption(struct rewriteConfigState *state) { while ((de = dictNext(di)) != NULL) { struct ValkeyModule *module = dictGetVal(de); line = moduleLoadQueueEntryToLoadmoduleOptionStr(module, "loadmodule"); @@ -41,10 +53,11 @@ diff -up ./src/config.c.loadmod ./src/config.c } dictReleaseIterator(di); /* Mark "loadmodule" as processed in case modules is empty. */ -diff -up ./src/module.c.loadmod ./src/module.c ---- ./src/module.c.loadmod 2025-10-03 21:17:43.000000000 +0200 -+++ ./src/module.c 2025-10-06 03:05:36.498290506 +0200 -@@ -83,6 +83,7 @@ +diff --git a/src/module.c b/src/module.c +index e5afa952fa..f18bc3c6bf 100644 +--- a/src/module.c ++++ b/src/module.c +@@ -84,6 +84,7 @@ struct moduleLoadQueueEntry { sds path; @@ -52,7 +65,7 @@ diff -up ./src/module.c.loadmod ./src/module.c int argc; robj **argv; }; -@@ -669,7 +670,7 @@ void freeClientModuleData(client *c) { +@@ -670,7 +671,7 @@ void freeClientModuleData(client *c) { c->module_data = NULL; } @@ -61,7 +74,7 @@ diff -up ./src/module.c.loadmod ./src/module.c int i; struct moduleLoadQueueEntry *loadmod; -@@ -677,6 +678,7 @@ void moduleEnqueueLoadModule(sds path, s +@@ -678,6 +679,7 @@ void moduleEnqueueLoadModule(sds path, sds *argv, int argc) { loadmod->argv = argc ? zmalloc(sizeof(robj *) * argc) : NULL; loadmod->path = sdsnew(path); loadmod->argc = argc; @@ -69,7 +82,7 @@ diff -up ./src/module.c.loadmod ./src/module.c for (i = 0; i < argc; i++) { loadmod->argv[i] = createRawStringObject(argv[i], sdslen(argv[i])); } -@@ -687,6 +689,10 @@ sds moduleLoadQueueEntryToLoadmoduleOpti +@@ -688,6 +690,10 @@ sds moduleLoadQueueEntryToLoadmoduleOptionStr(ValkeyModule *module, const char *config_option_str) { sds line; @@ -80,7 +93,7 @@ diff -up ./src/module.c.loadmod ./src/module.c line = sdsnew(config_option_str); line = sdscatlen(line, " ", 1); line = sdscatsds(line, module->loadmod->path); -@@ -12188,7 +12194,7 @@ void moduleLoadFromQueue(void) { +@@ -12350,7 +12356,7 @@ void moduleLoadFromQueue(void) { listRewind(server.loadmodule_queue, &li); while ((ln = listNext(&li))) { struct moduleLoadQueueEntry *loadmod = ln->value; @@ -89,7 +102,7 @@ diff -up ./src/module.c.loadmod ./src/module.c serverLog(LL_WARNING, "Can't load module from %s: server aborting", loadmod->path); exit(1); } -@@ -12369,7 +12375,7 @@ void moduleUnregisterCleanup(ValkeyModul +@@ -12531,7 +12537,7 @@ void moduleUnregisterCleanup(ValkeyModule *module) { /* Load a module and initialize it. On success C_OK is returned, otherwise * C_ERR is returned. */ @@ -98,7 +111,7 @@ diff -up ./src/module.c.loadmod ./src/module.c int (*onload)(void *, void **, int); void *handle; -@@ -12444,6 +12450,7 @@ int moduleLoad(const char *path, void ** +@@ -12606,6 +12612,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa ctx.module->loadmod->path = sdsnew(path); ctx.module->loadmod->argv = module_argc ? zmalloc(sizeof(robj *) * module_argc) : NULL; ctx.module->loadmod->argc = module_argc; @@ -106,7 +119,7 @@ diff -up ./src/module.c.loadmod ./src/module.c for (int i = 0; i < module_argc; i++) { ctx.module->loadmod->argv[i] = module_argv[i]; incrRefCount(ctx.module->loadmod->argv[i]); -@@ -13361,7 +13368,7 @@ void moduleCommand(client *c) { +@@ -13529,7 +13536,7 @@ void moduleCommand(client *c) { argv = &c->argv[3]; } @@ -115,7 +128,7 @@ diff -up ./src/module.c.loadmod ./src/module.c addReply(c, shared.ok); else addReplyError(c, "Error loading the extension. Please check the server logs."); -@@ -13376,7 +13383,7 @@ void moduleCommand(client *c) { +@@ -13544,7 +13551,7 @@ void moduleCommand(client *c) { /* If this is a loadex command we want to populate server.module_configs_queue with * sds NAME VALUE pairs. We also want to increment argv to just after ARGS, if supplied. */ if (parseLoadexArguments((ValkeyModuleString ***)&argv, &argc) == VALKEYMODULE_OK && @@ -124,10 +137,11 @@ diff -up ./src/module.c.loadmod ./src/module.c addReply(c, shared.ok); else { dictEmpty(server.module_configs_queue, NULL); -diff -up ./src/module.h.loadmod ./src/module.h ---- ./src/module.h.loadmod 2025-10-03 21:17:43.000000000 +0200 -+++ ./src/module.h 2025-10-06 03:05:36.498698194 +0200 -@@ -169,7 +169,7 @@ static inline void moduleInitDigestConte +diff --git a/src/module.h b/src/module.h +index f6c266b592..1f9e729e56 100644 +--- a/src/module.h ++++ b/src/module.h +@@ -169,7 +169,7 @@ static inline void moduleInitDigestContext(ValkeyModuleDigest *mdvar) { memset(mdvar->x, 0, sizeof(mdvar->x)); } @@ -136,7 +150,7 @@ diff -up ./src/module.h.loadmod ./src/module.h sds moduleLoadQueueEntryToLoadmoduleOptionStr(ValkeyModule *module, const char *config_option_str); ValkeyModuleCtx *moduleAllocateContext(void); -@@ -180,7 +180,7 @@ void moduleFreeContext(ValkeyModuleCtx * +@@ -180,7 +180,7 @@ void moduleFreeContext(ValkeyModuleCtx *ctx); void moduleInitModulesSystem(void); void moduleInitModulesSystemLast(void); void modulesCron(void); diff --git a/valkey.spec b/valkey.spec index 028de35..6815c05 100644 --- a/valkey.spec +++ b/valkey.spec @@ -5,13 +5,13 @@ %bcond_with docs %endif # See https://github.com/valkey-io/valkey-doc/tags -%global doc_version 8.1.1 +%global doc_version 9.0.0 # Tests fail in mock, not in local build. %bcond_with tests Name: valkey -Version: 8.1.4 -Release: 2%{?dist} +Version: 9.0.0 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -53,8 +53,8 @@ BuildRequires: python3-pyyaml %endif Requires: logrotate -# from deps/hiredis/hiredis.h -Provides: bundled(hiredis) = 1.0.3 +# from deps/libvalkey/include/valkey/valkey.h +Provides: bundled(libvalkey) = 0.2.1 # from deps/jemalloc/VERSION Provides: bundled(jemalloc) = 5.3.0 # from deps/lua/src/lua.h @@ -62,8 +62,9 @@ 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 +# from deps/README.md +# e4448cf6d1cd08fff519812d3b1e58bd5a94ac42 +Provides: bundled(hdr_histogram) = 0.11.9 # no version Provides: bundled(fpconv) @@ -191,7 +192,7 @@ Provides: redis-doc = %{version}-%{release} mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc -mv deps/hiredis/COPYING COPYING-hiredis-BSD-3-Clause +mv deps/libvalkey/COPYING COPYING-libvalkey mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram mv deps/hdr_histogram/COPYING.txt COPYING-hdrhistogram mv deps/fpconv/LICENSE.txt LICENSE-fpconv @@ -406,7 +407,7 @@ fi %license LICENSE-hdrhistogram %license COPYING-hdrhistogram %license LICENSE-fpconv -%license COPYING-hiredis-BSD-3-Clause +%license COPYING-libvalkey %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(0750, valkey, root) %dir %{_sysconfdir}/%{name} %attr(0750, valkey, root) %dir %{valkey_modules_cfg} @@ -461,6 +462,10 @@ fi %changelog +* Wed Oct 22 2025 Remi Collet - 9.0.0-1 +- Valkey 9.0.0 GA - October 21, 2025 +- bundled hiredis replaced by libvalkey + * Mon Oct 6 2025 Remi Collet - 8.1.4-2 - improve the patch for loadmodule directive From 3777ce183258f9275f1cbe679ddabbeeab476305 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 27 Nov 2025 08:08:00 +0100 Subject: [PATCH 42/43] build TLS statically as module not supported by sentinel drop sub-package for TLS module --- valkey.spec | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/valkey.spec b/valkey.spec index 6815c05..06a1c88 100644 --- a/valkey.spec +++ b/valkey.spec @@ -11,7 +11,7 @@ Name: valkey Version: 9.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -68,6 +68,10 @@ Provides: bundled(hdr_histogram) = 0.11.9 # no version Provides: bundled(fpconv) +# sub-package was dropped +Obsoletes: valkey-tls < %{version}-%{release} +Provides: valkey-tls = %{version}-%{release} + %global valkey_modules_abi 1 %global valkey_modules_dir %{_libdir}/%{name}/modules %global valkey_modules_cfg %{_sysconfdir}/%{name}/modules @@ -121,15 +125,6 @@ Supplements: %{name} See https://valkey.io/topics/RDMA/ -%package tls -Summary: TLS module for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} -Supplements: %{name} - -%description tls -%summary. - -See https://valkey.io/topics/encryption/ %package compat-redis Summary: Conversion script and compatibility symlinks for Redis @@ -228,7 +223,7 @@ echo '# valkey_rpm_conf' >> valkey.conf echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %endif -%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=module BUILD_RDMA=module +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=module : RDMA configuration file cat << EOF | tee rdma.conf @@ -236,12 +231,6 @@ cat << EOF | tee rdma.conf loadmodule %{valkey_modules_dir}/rdma.so EOF -: TLS configuration file -cat << EOF | tee tls.conf -# TLS module -loadmodule %{valkey_modules_dir}/tls.so -EOF - %build %make_build %{make_flags} @@ -325,10 +314,6 @@ ln -sr %{buildroot}/usr/lib/systemd/system/valkey-sentinel.service %{buildroot}/ install -pm755 src/valkey-rdma.so %{buildroot}%{valkey_modules_dir}/rdma.so install -pm640 rdma.conf %{buildroot}%{valkey_modules_cfg}/rdma.conf -# TLS module -install -pm755 src/valkey-tls.so %{buildroot}%{valkey_modules_dir}/tls.so -install -pm640 tls.conf %{buildroot}%{valkey_modules_cfg}/tls.conf - %check %if %{with tests} @@ -440,10 +425,6 @@ fi %attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/rdma.conf %{valkey_modules_dir}/rdma.so -%files tls -%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/tls.conf -%{valkey_modules_dir}/tls.so - %files devel # main package is not required %license COPYING @@ -462,6 +443,10 @@ fi %changelog +* Thu Nov 27 2025 Remi Collet - 9.0.0-2 +- build TLS statically as module not supported by sentinel +- drop sub-package for TLS module + * Wed Oct 22 2025 Remi Collet - 9.0.0-1 - Valkey 9.0.0 GA - October 21, 2025 - bundled hiredis replaced by libvalkey From 3c0883cd0279ac47b5cf13bcfb790c97cc2b128d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 10 Dec 2025 08:06:39 +0100 Subject: [PATCH 43/43] v9.0.1 --- .gitignore | 2 ++ sources | 4 ++-- valkey.spec | 10 +++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 52d5805..5c9e18c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ valkey-8.*.tar.gz valkey-doc-8.*.tar.gz /valkey-9.0.0.tar.gz /valkey-doc-9.0.0.tar.gz +/valkey-9.0.1.tar.gz +/valkey-doc-9.0.1.tar.gz diff --git a/sources b/sources index f9f5cbf..6d26371 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (valkey-9.0.0.tar.gz) = 387e8ebf26a307940bf0f26eb4ba51f016445a618435f4c61ec4c8b8d4b7e2cbfc7a7e93b6c35b7c6832e3161981b4b2ce0d09bdc1799dbb5271052cf70654e4 -SHA512 (valkey-doc-9.0.0.tar.gz) = 931c85bc229a24de9b579353a365b1ab46123d190ba84359ec36d95153c1c6c42cdf1dbd2f08d24896e0bef9e71c3c95431fbd8af6fa0260a3e4b00ed6d17ebf +SHA512 (valkey-9.0.1.tar.gz) = 99e1ab2abd0e1229df7804ac398088d4b3a8e1b031ab66da56ce98f56d0a97c7365b065bacc29d559194a18f5a85c9bf35c0c54f3a8402ec7c6fdbcf4f89181c +SHA512 (valkey-doc-9.0.1.tar.gz) = 061d3758cd754767bd0a45d6be3d709d82d91b2f7b0591b58cecd98cd39529bc0ec1bd490ef0890fb455f81fde33066412655005e25aa460989417803b15f45d diff --git a/valkey.spec b/valkey.spec index 06a1c88..8b97070 100644 --- a/valkey.spec +++ b/valkey.spec @@ -5,13 +5,13 @@ %bcond_with docs %endif # See https://github.com/valkey-io/valkey-doc/tags -%global doc_version 9.0.0 +%global doc_version 9.0.1 # Tests fail in mock, not in local build. %bcond_with tests Name: valkey -Version: 9.0.0 -Release: 2%{?dist} +Version: 9.0.1 +Release: 1%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -443,6 +443,10 @@ fi %changelog +* Wed Dec 10 2025 Remi Collet - 9.0.1-1 +- Valkey 9.0.1 - December 9, 2025 +- Upgrade urgency MODERATE + * Thu Nov 27 2025 Remi Collet - 9.0.0-2 - build TLS statically as module not supported by sentinel - drop sub-package for TLS module