Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21e5b6edfa | |||
| 48ac7fdd87 |
@ -1 +0,0 @@
|
|||||||
1
|
|
||||||
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,9 +1 @@
|
|||||||
/valkey-7.2.5.tar.gz
|
SOURCES/valkey-8.0.4.tar.gz
|
||||||
/valkey-7.2.6.tar.gz
|
|
||||||
/valkey-8.0.2.tar.gz
|
|
||||||
/valkey-8.0.3.tar.gz
|
|
||||||
/valkey-8.0.4.tar.gz
|
|
||||||
/valkey-8.0.6.tar.gz
|
|
||||||
/valkey-8.0.7.tar.gz
|
|
||||||
/valkey-8.1.6.tar.gz
|
|
||||||
/valkey-8.1.7.tar.gz
|
|
||||||
|
|||||||
1
.valkey.metadata
Normal file
1
.valkey.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
e8c4b2736e6c1957890dd758e8617747f76399d2 SOURCES/valkey-8.0.4.tar.gz
|
||||||
2
SOURCES/macros.valkey
Normal file
2
SOURCES/macros.valkey
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
%valkey_modules_abi 1
|
||||||
|
%valkey_modules_dir %{_libdir}/valkey/modules
|
||||||
34
SOURCES/valkey-cve-2025-27151.patch
Normal file
34
SOURCES/valkey-cve-2025-27151.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 73696bf6e2cf754acc3ec24eaf9ca6b879bfc5d7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Madelyn Olson <madelyneolson@gmail.com>
|
||||||
|
Date: Thu, 29 May 2025 00:06:23 +0100
|
||||||
|
Subject: [PATCH] Incorporate Redis CVE for CVE-2025-27151 (#2146)
|
||||||
|
|
||||||
|
Resolves https://github.com/valkey-io/valkey/issues/2145
|
||||||
|
|
||||||
|
Incorporate the CVE patch that was sent to us by Redis Ltd.
|
||||||
|
|
||||||
|
---------
|
||||||
|
|
||||||
|
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
|
||||||
|
Co-authored-by: Ping Xie <pingxie@outlook.com>
|
||||||
|
---
|
||||||
|
src/valkey-check-aof.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/valkey-check-aof.c b/src/valkey-check-aof.c
|
||||||
|
index ed0eb2b49d..a6e4b97c6d 100644
|
||||||
|
--- a/src/valkey-check-aof.c
|
||||||
|
+++ b/src/valkey-check-aof.c
|
||||||
|
@@ -556,6 +556,12 @@ int redis_check_aof_main(int argc, char **argv) {
|
||||||
|
goto invalid_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* Check if filepath is longer than PATH_MAX */
|
||||||
|
+ if (strnlen(filepath, PATH_MAX + 1) > PATH_MAX) {
|
||||||
|
+ printf("Error: filepath is too long (exceeds PATH_MAX)\n");
|
||||||
|
+ goto invalid_args;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* In the glibc implementation dirname may modify their argument. */
|
||||||
|
memcpy(temp_filepath, filepath, strlen(filepath) + 1);
|
||||||
|
dirpath = dirname(temp_filepath);
|
||||||
@ -2,8 +2,8 @@
|
|||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
|
|
||||||
Name: valkey
|
Name: valkey
|
||||||
Version: 8.1.7
|
Version: 8.0.4
|
||||||
Release: 1%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: A persistent key-value database
|
Summary: A persistent key-value database
|
||||||
# valkey: BSD-3-Clause
|
# valkey: BSD-3-Clause
|
||||||
# hiredis: BSD-3-Clause
|
# hiredis: BSD-3-Clause
|
||||||
@ -18,14 +18,10 @@ Source2: %{name}-sentinel.service
|
|||||||
Source3: %{name}.service
|
Source3: %{name}.service
|
||||||
Source4: %{name}.sysusers
|
Source4: %{name}.sysusers
|
||||||
Source5: %{name}.tmpfiles
|
Source5: %{name}.tmpfiles
|
||||||
|
Source8: macros.%{name}
|
||||||
Source9: migrate_redis_to_valkey.sh
|
Source9: migrate_redis_to_valkey.sh
|
||||||
|
|
||||||
# Fix default paths in configuration files for RPM layout
|
Patch1: valkey-cve-2025-27151.patch
|
||||||
Patch2: %{name}-conf.patch
|
|
||||||
# Workaround to https://github.com/valkey-io/valkey/issues/2678
|
|
||||||
Patch3: %{name}-loadmod.patch
|
|
||||||
#Fix linker flags: https://github.com/valkey-io/valkey/pull/3344
|
|
||||||
Patch4: %{name}-bindnow.patch
|
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -36,7 +32,6 @@ BuildRequires: tcl
|
|||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: rdma-core-devel
|
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
# from deps/hiredis/hiredis.h
|
# from deps/hiredis/hiredis.h
|
||||||
@ -55,7 +50,6 @@ Provides: bundled(fpconv)
|
|||||||
|
|
||||||
%global valkey_modules_abi 1
|
%global valkey_modules_abi 1
|
||||||
%global valkey_modules_dir %{_libdir}/%{name}/modules
|
%global valkey_modules_dir %{_libdir}/%{name}/modules
|
||||||
%global valkey_modules_cfg %{_sysconfdir}/%{name}/modules
|
|
||||||
Provides: valkey(modules_abi)%{?_isa} = %{valkey_modules_abi}
|
Provides: valkey(modules_abi)%{?_isa} = %{valkey_modules_abi}
|
||||||
|
|
||||||
ExcludeArch: %{ix86}
|
ExcludeArch: %{ix86}
|
||||||
@ -89,20 +83,10 @@ You can use Valkey from most programming languages also.
|
|||||||
Summary: Development header for Valkey module development
|
Summary: Development header for Valkey module development
|
||||||
# Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines)
|
# Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines)
|
||||||
Provides: %{name}-static = %{version}-%{release}
|
Provides: %{name}-static = %{version}-%{release}
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Header file required for building loadable Valkey modules.
|
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.
|
|
||||||
|
|
||||||
See https://valkey.io/topics/RDMA/
|
|
||||||
|
|
||||||
%package compat-redis
|
%package compat-redis
|
||||||
Summary: Conversion script and compatibility symlinks for Redis
|
Summary: Conversion script and compatibility symlinks for Redis
|
||||||
@ -122,9 +106,7 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{name}-%{version}
|
%setup -qn %{name}-%{version}
|
||||||
%patch -P2 -p1 -b.rpm
|
%patch -P1 -p1
|
||||||
%patch -P3 -p1 -b .loadmod
|
|
||||||
%patch -P4 -p1 -b .bindnow
|
|
||||||
|
|
||||||
mv deps/lua/COPYRIGHT COPYRIGHT-lua
|
mv deps/lua/COPYRIGHT COPYRIGHT-lua
|
||||||
mv deps/jemalloc/COPYING COPYING-jemalloc
|
mv deps/jemalloc/COPYING COPYING-jemalloc
|
||||||
@ -146,17 +128,19 @@ 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`
|
api=`sed -n -e 's/#define VALKEYMODULE_APIVER_[0-9][0-9]* //p' src/valkeymodule.h`
|
||||||
if test "$api" != "%{valkey_modules_abi}"; then
|
if test "$api" != "%{valkey_modules_abi}"; then
|
||||||
: Error: Upstream API version is now ${api}, expecting %%{valkey_modules_abi}.
|
: Error: Upstream API version is now ${api}, expecting %%{valkey_modules_abi}.
|
||||||
: Update the valkey_modules_abi macro, and rebuild.
|
: Update the valkey_modules_abi macro, the rpmmacros file, and rebuild.
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generates macro file
|
|
||||||
cat << 'EOF' | tee macros.%{name}
|
sed -i -e 's|^logfile .*$|logfile /var/log/valkey/valkey.log|g' \
|
||||||
%%valkey_version %version
|
-e 's|^# unixsocket .*$|unixsocket /run/valkey/valkey.sock|g' \
|
||||||
%%valkey_modules_abi %valkey_modules_abi
|
-e 's|^pidfile .*$|pidfile /run/valkey/valkey.pid|g' \
|
||||||
%%valkey_modules_dir %valkey_modules_dir
|
valkey.conf
|
||||||
%%valkey_modules_cfg %valkey_modules_cfg
|
|
||||||
EOF
|
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)
|
%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
|
# these lines are for conditionals around sysconfig to valkey.conf porting scriptlets to avoid re-runs
|
||||||
@ -164,13 +148,8 @@ echo '# valkey_rpm_conf' >> valkey.conf
|
|||||||
echo '# valkey-sentinel_rpm_conf' >> sentinel.conf
|
echo '# valkey-sentinel_rpm_conf' >> sentinel.conf
|
||||||
%endif
|
%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=yes
|
||||||
|
|
||||||
: RDMA configuration file
|
|
||||||
cat << EOF | tee rdma.conf
|
|
||||||
# RDMA module
|
|
||||||
loadmodule %{valkey_modules_dir}/rdma.so
|
|
||||||
EOF
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build %{make_flags}
|
%make_build %{make_flags}
|
||||||
@ -200,7 +179,6 @@ install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|||||||
# Install configuration files.
|
# Install configuration files.
|
||||||
install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
||||||
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf
|
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf
|
||||||
install -dm750 %{buildroot}%{valkey_modules_cfg}
|
|
||||||
|
|
||||||
# Install systemd unit files.
|
# Install systemd unit files.
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
@ -215,15 +193,11 @@ install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h
|
|||||||
|
|
||||||
# Install rpm macros for valkey modules
|
# Install rpm macros for valkey modules
|
||||||
#mkdir -p %{buildroot}%{_rpmmacrodir}
|
#mkdir -p %{buildroot}%{_rpmmacrodir}
|
||||||
install -pDm644 macros.%{name} %{buildroot}%{_rpmmacrodir}/macros.%{name}
|
install -pDm644 %{S:8} %{buildroot}%{_rpmmacrodir}/macros.%{name}
|
||||||
|
|
||||||
# compat script
|
# compat script
|
||||||
install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh
|
install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh
|
||||||
|
|
||||||
# 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
|
%check
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -267,7 +241,6 @@ taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading"
|
|||||||
%license COPYING-hiredis-BSD-3-Clause
|
%license COPYING-hiredis-BSD-3-Clause
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%attr(0750, valkey, root) %dir %{_sysconfdir}/%{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}/%{name}.conf
|
||||||
%attr(0640, valkey, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf
|
%attr(0640, valkey, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
@ -281,9 +254,6 @@ taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading"
|
|||||||
%{_sysusersdir}/%{name}.conf
|
%{_sysusersdir}/%{name}.conf
|
||||||
%{_tmpfilesdir}/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
|
|
||||||
%files rdma
|
|
||||||
%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/rdma.conf
|
|
||||||
%{valkey_modules_dir}/rdma.so
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
# main package is not required
|
# main package is not required
|
||||||
@ -298,28 +268,7 @@ taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading"
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue May 19 2026 Petr Khartskhaev <pkhartsk@redhat.com> - 8.1.7-1
|
* Tue Sep 9 2025 Remi Collet <remi@fedoraproject.org> - 8.0.4-3
|
||||||
- Rebase to 8.1.7 for CVE-2026-23479 CVE-2026-25243 CVE-2026-23631
|
|
||||||
|
|
||||||
* Wed Mar 04 2026 Lukas Javorsky <ljavorsk@redhat.com> - 8.1.6-1
|
|
||||||
- Rebase to version 8.1
|
|
||||||
- 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
|
|
||||||
- add sub-package for rdma module
|
|
||||||
- use patch for configuration changes
|
|
||||||
- add /etc/valkey/modules drop-in directory for module configuration files
|
|
||||||
- add %%valkey_version and %%valkey_modules_cfg macros
|
|
||||||
- fix module linker flags using patch from
|
|
||||||
https://github.com/valkey-io/valkey/pull/3344
|
|
||||||
|
|
||||||
* Mon Mar 02 2026 Lukas Javorsky <ljavorsk@redhat.com> - 8.0.7-1
|
|
||||||
- Rebase to 8.0.7 for CVE-2026-21863 CVE-2025-67733
|
|
||||||
|
|
||||||
* Fri Oct 17 2025 Remi Collet <remi@fedoraproject.org> - 8.0.6-2
|
|
||||||
- rebase to 8.0.6 for CVE-2025-49844 CVE-2025-46817 CVE-2025-46818 CVE-2025-46819
|
|
||||||
|
|
||||||
* Mon Sep 8 2025 Remi Collet <remi@fedoraproject.org> - 8.0.4-3
|
|
||||||
- fix ImageMode: ensure ownership of /etc/valkey
|
- fix ImageMode: ensure ownership of /etc/valkey
|
||||||
|
|
||||||
* Fri Aug 1 2025 Remi Collet <remi@fedoraproject.org> - 8.0.4-2
|
* Fri Aug 1 2025 Remi Collet <remi@fedoraproject.org> - 8.0.4-2
|
||||||
26
gating.yaml
26
gating.yaml
@ -1,26 +0,0 @@
|
|||||||
# gating branched Fedora
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- fedora-*
|
|
||||||
decision_context: bodhi_update_push_testing
|
|
||||||
subject_type: koji_build
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
|
|
||||||
|
|
||||||
# gating Fedora Rawhide
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- fedora-*
|
|
||||||
decision_context: bodhi_update_push_stable
|
|
||||||
subject_type: koji_build
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
|
|
||||||
|
|
||||||
# gating rhel
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-*
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
summary: Internal Tier1 tests plan
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
url: https://pkgs.devel.redhat.com/git/tests/valkey
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
adjust:
|
|
||||||
enabled: false
|
|
||||||
when: distro == centos-stream or distro == fedora
|
|
||||||
because: No access to internal git repositories
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
summary: Public Tier1 tests plan
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
url: https://gitlab.com/redhat/centos-stream/tests/valkey
|
|
||||||
filter: 'tag:-nogating'
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
1
sources
1
sources
@ -1 +0,0 @@
|
|||||||
SHA512 (valkey-8.1.7.tar.gz) = b4fc78e7315c04229b50e088884f3ce42985317a12baf43dd7afcad00956e85912eb01824ba2e8566b07e8378d3a4d5c5085e17c90018fdd5101d77f04801041
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
Adapted for 8.1/9.0 from
|
|
||||||
|
|
||||||
|
|
||||||
From 8051de740dd38172476b04e892e5517630e3eaed Mon Sep 17 00:00:00 2001
|
|
||||||
From: Remi Collet <remi@remirepo.net>
|
|
||||||
Date: Wed, 11 Mar 2026 11:40:15 +0100
|
|
||||||
Subject: [PATCH] Inherit LDFLAGS for TLS and RDMA modules (#3344)
|
|
||||||
|
|
||||||
With current Makefile, `LDFLAGS` are not used for modules.
|
|
||||||
|
|
||||||
This results in security options not applied.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ annocheck /usr/lib64/valkey/modules/rdma.so
|
|
||||||
annocheck: Version 12.99.
|
|
||||||
Hardened: rdma.so: FAIL: bind-now test because not linked with -Wl,-z,now
|
|
||||||
Hardened: Rerun annocheck with --verbose to see more information on the tests.
|
|
||||||
Hardened: rdma.so: Overall: FAIL.
|
|
||||||
```
|
|
||||||
|
|
||||||
With this patch
|
|
||||||
|
|
||||||
```
|
|
||||||
$ annocheck /usr/lib64/valkey/modules/rdma.so
|
|
||||||
annocheck: Version 12.99.
|
|
||||||
Hardened: rdma.so: PASS.
|
|
||||||
```
|
|
||||||
|
|
||||||
Signed-off-by: Remi Collet <remi@remirepo.net>
|
|
||||||
---
|
|
||||||
src/Makefile | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Makefile b/src/Makefile
|
|
||||||
index eb4a6e939a..5d3814d019 100644
|
|
||||||
--- a/src/Makefile
|
|
||||||
+++ b/src/Makefile
|
|
||||||
@@ -524,11 +524,11 @@ $(ENGINE_CHECK_AOF_NAME): $(SERVER_NAME)
|
|
||||||
|
|
||||||
# valkey-tls.so
|
|
||||||
$(TLS_MODULE_NAME): $(SERVER_NAME)
|
|
||||||
- $(QUIET_CC)$(CC) -o $@ tls.c -shared -fPIC $(TLS_MODULE_CFLAGS) $(TLS_CLIENT_LIBS)
|
|
||||||
+ $(QUIET_CC)$(CC) $(LDFLAGS) -o $@ tls.c -shared -fPIC $(TLS_MODULE_CFLAGS) $(TLS_CLIENT_LIBS)
|
|
||||||
|
|
||||||
# valkey-rdma.so
|
|
||||||
$(RDMA_MODULE_NAME): $(SERVER_NAME)
|
|
||||||
- $(QUIET_CC)$(CC) -o $@ rdma.c -shared -fPIC $(RDMA_MODULE_CFLAGS)
|
|
||||||
+ $(QUIET_CC)$(CC) $(LDFLAGS) -o $@ rdma.c -shared -fPIC $(RDMA_MODULE_CFLAGS)
|
|
||||||
|
|
||||||
# valkey-cli
|
|
||||||
$(ENGINE_CLI_NAME): $(ENGINE_CLI_OBJ)
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
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.
|
|
||||||
@ -1,147 +0,0 @@
|
|||||||
Adapted for 8.1.4 from
|
|
||||||
https://github.com/valkey-io/valkey/pull/2689
|
|
||||||
|
|
||||||
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");
|
|
||||||
- rewriteConfigRewriteLine(state, "loadmodule", line, 1);
|
|
||||||
+ if (line) rewriteConfigRewriteLine(state, "loadmodule", line, 1);
|
|
||||||
}
|
|
||||||
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 @@
|
|
||||||
|
|
||||||
struct moduleLoadQueueEntry {
|
|
||||||
sds path;
|
|
||||||
+ int from_include;
|
|
||||||
int argc;
|
|
||||||
robj **argv;
|
|
||||||
};
|
|
||||||
@@ -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->from_include = from_include;
|
|
||||||
for (i = 0; i < argc; i++) {
|
|
||||||
loadmod->argv[i] = createRawStringObject(argv[i], sdslen(argv[i]));
|
|
||||||
}
|
|
||||||
@@ -687,6 +689,10 @@ sds moduleLoadQueueEntryToLoadmoduleOpti
|
|
||||||
const char *config_option_str) {
|
|
||||||
sds line;
|
|
||||||
|
|
||||||
+ 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);
|
|
||||||
@@ -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, loadmod->from_include) == C_ERR) {
|
|
||||||
serverLog(LL_WARNING, "Can't load module from %s: server aborting", loadmod->path);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
@@ -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 from_include) {
|
|
||||||
int (*onload)(void *, void **, int);
|
|
||||||
void *handle;
|
|
||||||
|
|
||||||
@@ -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->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]);
|
|
||||||
@@ -13361,7 +13368,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.");
|
|
||||||
@@ -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 &&
|
|
||||||
- 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 -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 from_include);
|
|
||||||
int moduleUnload(sds name, const char **errmsg);
|
|
||||||
void moduleLoadFromQueue(void);
|
|
||||||
int moduleGetCommandKeysViaAPI(struct serverCommand *cmd, robj **argv, int argc, getKeysResult *result);
|
|
||||||
Loading…
Reference in New Issue
Block a user