diff --git a/0001-add-loongarch-support-for-jemalloc.patch b/0001-add-loongarch-support-for-jemalloc.patch deleted file mode 100644 index 83c7d9b45799faf057f7cb7ab77287b9de2bb478..0000000000000000000000000000000000000000 --- a/0001-add-loongarch-support-for-jemalloc.patch +++ /dev/null @@ -1,62 +0,0 @@ -From aa7f12cec44b2cb6f816bdc2a6b4a857048fa799 Mon Sep 17 00:00:00 2001 -From: Jingyun Hua -Date: Mon, 4 Sep 2023 12:27:06 +0000 -Subject: [PATCH] add loongarch support for jemalloc - ---- - deps/jemalloc/build-aux/config.guess | 3 +++ - deps/jemalloc/build-aux/config.sub | 2 ++ - deps/jemalloc/include/jemalloc/internal/quantum.h | 3 +++ - 3 files changed, 8 insertions(+) - -diff --git a/deps/jemalloc/build-aux/config.guess b/deps/jemalloc/build-aux/config.guess -index 2e9ad7f..8a6075f 100755 ---- a/deps/jemalloc/build-aux/config.guess -+++ b/deps/jemalloc/build-aux/config.guess -@@ -975,6 +975,9 @@ EOF - k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) -+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" -+ exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -diff --git a/deps/jemalloc/build-aux/config.sub b/deps/jemalloc/build-aux/config.sub -index dd2ca93..33fc34c 100755 ---- a/deps/jemalloc/build-aux/config.sub -+++ b/deps/jemalloc/build-aux/config.sub -@@ -268,6 +268,7 @@ case $basic_machine in - | k1om \ - | le32 | le64 \ - | lm32 \ -+ | loongarch32 | loongarch64 | loongarchx32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ -@@ -393,6 +394,7 @@ case $basic_machine in - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ -+ | loongarch32* | loongarch64* | loongarchx32* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -diff --git a/deps/jemalloc/include/jemalloc/internal/quantum.h b/deps/jemalloc/include/jemalloc/internal/quantum.h -index 821086e..a2e0545 100644 ---- a/deps/jemalloc/include/jemalloc/internal/quantum.h -+++ b/deps/jemalloc/include/jemalloc/internal/quantum.h -@@ -30,6 +30,9 @@ - # ifdef __hppa__ - # define LG_QUANTUM 4 - # endif -+# ifdef __loongarch__ -+# define LG_QUANTUM 4 -+# endif - # ifdef __m68k__ - # define LG_QUANTUM 3 - # endif --- -2.40.1 - diff --git a/0002-deps-jemalloc-Do-not-force-building-in-gnu99-mode.patch b/0002-deps-jemalloc-Do-not-force-building-in-gnu99-mode.patch deleted file mode 100644 index a6479b886fb5535315be38e9542d7f18b57719b1..0000000000000000000000000000000000000000 --- a/0002-deps-jemalloc-Do-not-force-building-in-gnu99-mode.patch +++ /dev/null @@ -1,33 +0,0 @@ -From bbace21828d7e82f1c481f0e1caece31b661cbd9 Mon Sep 17 00:00:00 2001 -From: Florian Weimer -Date: Mon, 5 Dec 2022 11:10:37 +0100 -Subject: [PATCH 2/2] deps/jemalloc: Do not force building in gnu99 mode -Content-type: text/plain - -The jemalloc configure logic switches to gnu11 mode if available, -and this explicit flags injection prevents that. The main difference -seems to be that in gnu99 mode, is presumed to be -unavailable and is not used. - -Submitted upstream: - ---- - deps/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deps/Makefile b/deps/Makefile -index 8592e17..d6cb06e 100644 ---- a/deps/Makefile -+++ b/deps/Makefile -@@ -90,7 +90,7 @@ lua: .make-prerequisites - - .PHONY: lua - --JEMALLOC_CFLAGS= -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops $(CFLAGS) -+JEMALLOC_CFLAGS= -Wall -pipe -g3 -O3 -funroll-loops $(CFLAGS) - JEMALLOC_LDFLAGS= $(LDFLAGS) - - ifneq ($(DEB_HOST_GNU_TYPE),) --- -2.38.1 - diff --git a/redis-7.0.15.tar.gz b/redis-7.0.15.tar.gz deleted file mode 100644 index 01f07878d2eaa0a47422168635d19db74d1b0ccb..0000000000000000000000000000000000000000 Binary files a/redis-7.0.15.tar.gz and /dev/null differ diff --git a/redis-7.2.6.tar.gz b/redis-7.2.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..541782905f424a51657411fd15478d2ac29ddace Binary files /dev/null and b/redis-7.2.6.tar.gz differ diff --git a/redis-doc-3541d0e.tar.gz b/redis-doc-3541d0e.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0d320e60a4fa4bcc0cd5e5c11191c8f9eb3e5ab7 Binary files /dev/null and b/redis-doc-3541d0e.tar.gz differ diff --git a/redis-doc-8663f15.tar.gz b/redis-doc-8663f15.tar.gz deleted file mode 100644 index 5860fbc1a8cd7ab06dedf4127a6aa6d21cc96807..0000000000000000000000000000000000000000 Binary files a/redis-doc-8663f15.tar.gz and /dev/null differ diff --git a/redis.spec b/redis.spec index c7d5bb232c89fc7a8d7e1290b71696cba6ebfa25..870a0277c93236bafd5de55facca968753109e87 100644 --- a/redis.spec +++ b/redis.spec @@ -1,19 +1,24 @@ %define anolis_release 1 +# temp workaround to https://bugzilla.redhat.com/2059488 %undefine _package_note_file # Tests fail in mock, not in local build. %bcond_with tests -%global doc_commit 8663f15b294e87f41b7d42d05fee1ec2f1714443 +%global doc_commit 3541d0e20cc4bb7873bdbf51a7717757b806577f %global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7}) %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: redis -Version: 7.0.15 +Version: 7.2.6 Release: %{anolis_release}%{?dist} Summary: A persistent key-value database -License: BSD-3-Clause AND BSD-2-Clause AND MIT +# redis, hiredis: BSD-3-Clause +# hdrhistogram, jemalloc, lzf, linenoise: BSD-2-Clause +# lua: MIT +# fpconv: BSL-1.0 +License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: https://redis.io Source0: https://download.redis.io/releases/%{name}-%{version}.tar.gz Source1: %{name}.logrotate @@ -24,27 +29,36 @@ Source9: macros.%{name} Source10: https://github.com/%{name}/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch -Patch0002: 0002-deps-jemalloc-Do-not-force-building-in-gnu99-mode.patch -Patch0003: 0001-add-loongarch-support-for-jemalloc.patch -BuildRequires: make gcc systemd-devel openssl-devel systemd-rpm-macros +BuildRequires: make +BuildRequires: gcc %if %{with tests} -BuildRequires: procps-ng tcl +BuildRequires: procps-ng +BuildRequires: tcl %endif BuildRequires: pkgconfig(libsystemd) +BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros +BuildRequires: openssl-devel +Obsoletes: redis-trib < 5 Requires: logrotate Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd - -Obsoletes: redis-trib < 5 -Provides: bundled(lzf) -Provides: bundled(hiredis) = 0.14.0 -Provides: bundled(jemalloc) = 5.2.1 +# from deps/hiredis/hiredis.h +Provides: bundled(hiredis) = 1.0.3 +# from deps/jemalloc/VERSION +Provides: bundled(jemalloc) = 5.3.0 +# from deps/lua/src/lua.h 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 +# no version +Provides: bundled(fpconv) %global redis_modules_abi 1 %global redis_modules_dir %{_libdir}/%{name}/modules @@ -94,19 +108,18 @@ Conflicts: redis < 4.0 Manual pages and detailed documentation for many aspects of Redis use, administration and development. + %prep -%setup -q -b 10 -%setup -q +%setup -q -n %{name}-%{version} -b 10 mv ../%{name}-doc-%{doc_commit} doc %patch -P0001 -p1 -%patch -P0002 -p1 -%patch -P0003 -p1 -mv deps/lua/COPYRIGHT COPYRIGHT-lua -mv deps/jemalloc/COPYING COPYING-jemalloc -mv deps/hiredis/COPYING COPYING-hiredis +mv deps/lua/COPYRIGHT COPYRIGHT-lua +mv deps/jemalloc/COPYING COPYING-jemalloc +mv deps/hiredis/COPYING COPYING-hiredis mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram mv deps/hdr_histogram/COPYING.txt COPYING-hdrhistogram +mv deps/fpconv/LICENSE.txt LICENSE-fpconv # Configuration file changes sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf @@ -142,16 +155,26 @@ install -d %{buildroot}%{_localstatedir}/log/%{name} install -d %{buildroot}%{_localstatedir}/run/%{name} install -d %{buildroot}%{redis_modules_dir} -install -pDm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +# Install logrotate file. +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 systemd unit files. mkdir -p %{buildroot}%{_unitdir} -install -pm644 %{SOURCE3} %{buildroot}%{_unitdir} -install -pm644 %{SOURCE2} %{buildroot}%{_unitdir} -install -p -D -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf -install -p -D -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf +install -pm644 %{S:3} %{buildroot}%{_unitdir} +install -pm644 %{S:2} %{buildroot}%{_unitdir} + +# Install systemd limit files (requires systemd >= 204) +install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf +install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf + +# Fix non-standard-executable-perm error. chmod 755 %{buildroot}%{_bindir}/%{name}-* +# Install redis module header install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h # Install man pages @@ -173,7 +196,7 @@ for page in $(find doc -name \*.md | sed -e 's|.md$||g'); do done mkdir -p %{buildroot}%{macrosdir} -install -pDm644 %{SOURCE9} %{buildroot}%{macrosdir}/macros.%{name} +install -pDm644 %{S:9} %{buildroot}%{macrosdir}/macros.%{name} %check %if %{with tests} @@ -181,8 +204,6 @@ taskset -c 1 make %{make_flags} test make %{make_flags} test-sentinel %endif -%generate_compatibility_deps - %pre getent group %{name} &> /dev/null || \ groupadd -r %{name} &> /dev/null @@ -223,26 +244,30 @@ fi %systemd_postun_with_restart %{name}-sentinel.service %files -%license COPYING COPYRIGHT-lua COPYING-jemalloc doc/LICENSE -%license COPYING-hiredis LICENSE-hdrhistogram COPYING-hdrhistogram +%{!?_licensedir:%global license %%doc} +%license COPYING +%license COPYRIGHT-lua +%license COPYING-jemalloc +%license COPYING-hiredis +%license LICENSE-hdrhistogram +%license COPYING-hdrhistogram +%license LICENSE-fpconv %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(0750, redis, root) %dir %{_sysconfdir}/%{name} %attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf %dir %{_libdir}/%{name} %dir %{redis_modules_dir} -%dir %{abidir} %dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} %dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name} %exclude %{macrosdir} %exclude %{_includedir} %exclude %{_docdir}/%{name}/* %{_bindir}/%{name}-* -%{abidir}/%{name}*-option.list -%{_unitdir}/%{name}.service -%{_unitdir}/%{name}-sentinel.service %{_mandir}/man1/%{name}* %{_mandir}/man5/%{name}* +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}-sentinel.service %dir %{_sysconfdir}/systemd/system/%{name}.service.d %config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf %dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d @@ -255,11 +280,16 @@ fi %{macrosdir}/* %files doc +%license doc/LICENSE %docdir %{_docdir}/%{name} %{_docdir}/%{name} %changelog +* Thu Dec 12 2024 mgb01105731 - 7.2.6-1 +- New version 7.2.6 +- For CVE-2024-31449 + * Thu Jan 11 2024 mgb01105731 - 7.0.15-1 - New version 7.0.15