summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-08-01 08:16:11 +0200
committerRemi Collet <remi@php.net>2025-08-01 08:16:11 +0200
commit3a59cb457039c2da005d75d43acacdac114eefc4 (patch)
treee73bf3d705ae15811085b575e569ee22fb096b0b
parent3e97c942aeed3cb45fb8cda3d294c8927cd29f98 (diff)
remove compatibility stuff
-rw-r--r--valkey-conf.patch17
-rw-r--r--valkey.spec127
2 files changed, 20 insertions, 124 deletions
diff --git a/valkey-conf.patch b/valkey-conf.patch
index d714e01..a6723a1 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
@@ -59,3 +59,12 @@ diff -up ./valkey.conf.rpm ./valkey.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.
+@@ -606,7 +609,7 @@ rdb-del-sync-files no
+ # Note that modifying 'dir' during runtime may have unexpected behavior,
+ # for example when a child process is running, related file operations may
+ # have unexpected effects.
+-dir ./
++dir /var/lib/valkey
+
+ ################################# REPLICATION #################################
+
diff --git a/valkey.spec b/valkey.spec
index 1096472..b9a6fd7 100644
--- a/valkey.spec
+++ b/valkey.spec
@@ -1,14 +1,12 @@
# Docs require pandoc, which is not included in RHEL
-%if %{undefined rhel} || %{defined epel}
%bcond_without docs
-%else
-%bcond_with docs
-%endif
-# 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
+# See https://github.com/valkey-io/valkey-doc/tags
+%global doc_version 8.1.1
+
Name: valkey
Version: 8.1.3
Release: 2%{?dist}
@@ -26,7 +24,6 @@ Source2: %{name}-sentinel.service
Source3: %{name}.service
Source4: %{name}.sysusers
Source5: %{name}.tmpfiles
-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
@@ -105,53 +102,11 @@ Provides: %{name}-static = %{version}-%{release}
Header file required for building loadable Valkey modules.
-%package compat-redis
-Summary: Conversion script and compatibility symlinks for Redis
-Requires: valkey = %{version}-%{release}
-%if 0%{?fedora} > 40 || 0%{?rhel} > 9
-Obsoletes: redis < 7.4
-Provides: redis = %{version}-%{release}
-%else
-Conflicts: redis < 7.4
-%endif
-BuildArch: noarch
-
-
-%description compat-redis
-%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.
-
-
%if %{with docs}
%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}
-%endif
-
%description doc
%summary
@@ -194,12 +149,6 @@ cat << 'EOF' | tee macros.%{name}
%%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
-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
@@ -271,15 +220,8 @@ install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h
#mkdir -p %{buildroot}%{_rpmmacrodir}
install -pDm644 macros.%{name} %{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
-
-# 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
+# Clean-up redis compatibility commands as redis package exists
+rm %{buildroot}%{_bindir}/redis-*
%check
@@ -292,56 +234,10 @@ taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading"
%endif
-
-%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
-%post compat-redis
-%{_libexecdir}/migrate_redis_to_valkey.sh
-
-
%preun
%systemd_preun %{name}.service
%systemd_preun %{name}-sentinel.service
@@ -396,21 +292,12 @@ fi
%{_rpmmacrodir}/macros.%{name}
-%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
* Thu Jul 24 2025 Remi Collet <remi@fedoraproject.org> - 8.1.3-2
- use patch for configuration changes
- add /etc/valkey/modules drop-in directory for module configuration files
- add %%valkey_modules_cfg macro
+- remove compatibility stuff
* Mon Jul 7 2025 Remi Collet <remi@fedoraproject.org> - 8.1.3-1
- update to 8.1.3