summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macros.redis2
-rw-r--r--redis-conf.patch29
-rw-r--r--redis.spec23
3 files changed, 36 insertions, 18 deletions
diff --git a/macros.redis b/macros.redis
deleted file mode 100644
index 439cc2c..0000000
--- a/macros.redis
+++ /dev/null
@@ -1,2 +0,0 @@
-%redis_modules_abi 1
-%redis_modules_dir %{_libdir}/redis/modules
diff --git a/redis-conf.patch b/redis-conf.patch
index f4e297f..96664ff 100644
--- a/redis-conf.patch
+++ b/redis-conf.patch
@@ -1,7 +1,16 @@
-diff -up ./redis.conf.rpm ./redis.conf
---- ./redis.conf.rpm 2025-07-10 11:31:26.588797534 +0200
-+++ ./redis.conf 2025-07-10 11:31:26.590823030 +0200
-@@ -153,7 +153,7 @@ tcp-backlog 511
+diff -up ./redis.conf.old ./redis.conf
+--- ./redis.conf.old 2025-07-06 13:59:42.000000000 +0200
++++ ./redis.conf 2025-07-23 14:21:49.223387091 +0200
+@@ -43,6 +43,8 @@
+ # include /path/to/other.conf
+ # include /path/to/fragments/*.conf
+ #
++# Module configuration files
++include /etc/redis/modules/*.conf
+
+ ################################## MODULES #####################################
+
+@@ -153,7 +155,7 @@ tcp-backlog 511
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
@@ -10,7 +19,7 @@ diff -up ./redis.conf.rpm ./redis.conf
# unixsocketperm 700
# Close the connection after a client is idle for N seconds (0 to disable)
-@@ -339,7 +339,7 @@ daemonize no
+@@ -339,7 +341,7 @@ daemonize no
#
# Note that on modern Linux systems "/run/redis.pid" is more conforming
# and should be used instead.
@@ -19,7 +28,7 @@ diff -up ./redis.conf.rpm ./redis.conf
# Specify the server verbosity level.
# This can be one of:
-@@ -353,7 +353,7 @@ loglevel notice
+@@ -353,7 +355,7 @@ loglevel notice
# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
@@ -28,7 +37,7 @@ diff -up ./redis.conf.rpm ./redis.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.
-@@ -513,7 +513,7 @@ rdb-del-sync-files no
+@@ -513,7 +515,7 @@ rdb-del-sync-files no
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
@@ -37,9 +46,9 @@ diff -up ./redis.conf.rpm ./redis.conf
################################# REPLICATION #################################
-diff -up ./sentinel.conf.rpm ./sentinel.conf
---- ./sentinel.conf.rpm 2025-07-10 11:31:26.589683845 +0200
-+++ ./sentinel.conf 2025-07-10 11:31:26.592442565 +0200
+diff -up ./sentinel.conf.old ./sentinel.conf
+--- ./sentinel.conf.old 2025-07-06 13:59:42.000000000 +0200
++++ ./sentinel.conf 2025-07-23 14:20:34.526056727 +0200
@@ -17,7 +17,7 @@ daemonize no
# When running daemonized, Redis Sentinel writes a pid file in
# /var/run/redis-sentinel.pid by default. You can specify a custom pid file
diff --git a/redis.spec b/redis.spec
index 265d516..8c74fcf 100644
--- a/redis.spec
+++ b/redis.spec
@@ -22,7 +22,7 @@
Name: redis
Version: %{upstream_ver}
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A persistent key-value database
# redis: RSALv2 or SSPLv1 or AGPLv3 (only AGPLv3 is OSS)
# hiredis: BSD-3-Clause
@@ -36,7 +36,6 @@ Source0: https://github.com/redis/redis/archive/refs/tags/%{version}.t
Source1: %{name}.logrotate
Source2: %{name}-sentinel.service
Source3: %{name}.service
-Source9: macros.%{name}
# Fix default paths in configuration files for RPM layout
Patch0: %{name}-conf.patch
@@ -85,6 +84,7 @@ Conflicts: valkey-compat-redis
%global redis_modules_abi 1
%global redis_modules_dir %{_libdir}/%{name}/modules
+%global redis_modules_cfg %{_sysconfdir}/redis/modules
Provides: redis(modules_abi)%{?_isa} = %{redis_modules_abi}
%description
@@ -125,7 +125,7 @@ API documentation is available in the redis-doc package.
%prep
%setup -q -n %{name}-%{upstream_ver}
-%patch -P0 -p1
+%patch -P0 -p1 -b .old
%if %{with jemalloc}
rm -frv deps/jemalloc
@@ -155,7 +155,7 @@ sed -e 's/--with-lg-quantum/--with-lg-page=16 --with-lg-quantum/' -i deps/Makefi
api=`sed -n -e 's/#define REDISMODULE_APIVER_[0-9][0-9]* //p' src/redismodule.h`
if test "$api" != "%{redis_modules_abi}"; then
: Error: Upstream API version is now ${api}, expecting %%{redis_modules_abi}.
- : Update the redis_modules_abi macro, the rpmmacros file, and rebuild.
+ : Update the redis_modules_abi macro, and rebuild.
exit 1
fi
@@ -166,6 +166,13 @@ fi
%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} %{?malloc_flags} %{?tls_flags} %{?sysd_flags}
: %{make_flags}
+# Generates macro file
+cat << 'EOF' | tee macros.redis
+%%redis_modules_abi %redis_modules_abi
+%%redis_modules_dir %redis_modules_dir
+%%redis_modules_cfg %redis_modules_cfg
+EOF
+
%build
make %{?_smp_mflags} %{make_flags} all
@@ -188,6 +195,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}%{redis_modules_cfg}
# Install systemd unit files.
mkdir -p %{buildroot}%{_unitdir}
@@ -202,7 +210,7 @@ install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h
# Install rpm macros for redis modules
mkdir -p %{buildroot}%{_rpmmacrodir}
-install -pDm644 %{S:9} %{buildroot}%{_rpmmacrodir}/macros.%{name}
+install -pDm644 macros.redis %{buildroot}%{_rpmmacrodir}/macros.%{name}
%check
%if %{with tests}
@@ -284,6 +292,7 @@ fi
%endif
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0750, redis, root) %dir %{_sysconfdir}/%{name}
+%attr(0750, redis, root) %dir %{redis_modules_cfg}
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf
%dir %{_libdir}/%{name}
@@ -292,7 +301,6 @@ fi
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
%exclude %{_rpmmacrodir}
%exclude %{_includedir}
-%exclude %{_docdir}/%{name}/*
%{_bindir}/%{name}-*
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-sentinel.service
@@ -307,6 +315,9 @@ fi
%changelog
+* Wed Jul 23 2025 Remi Collet <remi@remirepo.net> - 8.0.3-3
+- add /etc/redis/modules drop-in directory for module configuration files
+
* Thu Jul 10 2025 Remi Collet <remi@remirepo.net> - 8.0.3-2
- add missing build requirements
- use patch for config instead of sed