# Redis and its bundled modules, built from a single source tarball and # shipped as separate subpackages. # # Why one spec # ------------ # Redis 8.x pins each bundled module to an exact ref in modules/modules.yaml # and builds them through modules/common.mk + scripts/build.sh. Packaging that # as one SRPM means the module versions can never drift from the core they # were tested against, and there is a single place to bump. # # The output is still ordinary split packages -- redis, redis-devel, and one # per module -- so they stay individually installable. `redis-full` is a # metapackage pulling in all of them. # # Source0 is generated by upstream tooling, not by hand: # # git clone https://github.com/redis/redis && cd redis # git checkout %%{version} # make modules-update all # make tarball TAG=%%{version} OUT_PATH=redis-%%{version}-full.tar.gz # # That clones each module at its pinned ref and emits a reproducible tarball # (sorted, owner 0, mtimes from the tag commit). It strips each module's .git, # which matters in %%prep below. # # Offline-build notes (Fedora/Copr buildroots have no network) # ------------------------------------------------------------ # 1. modules/common.mk's `get_source` re-clones a module unless # modules//src/.prepared exists. %%prep touches those markers. # 2. RedisJSON and RediSearch build Rust code with cargo, which wants the # crates.io index. Both get a pre-vendored crate tree (Source1/Source2) # plus a .cargo/config.toml pointing at it. # 3. RediSearch pulls seven dependencies via CMake FetchContent. Six ship as # Source3-Source8 and are wired up with FETCHCONTENT_SOURCE_DIR_*; the # seventh (Boost) comes from the system boost-devel via BOOST_DIR. # # Vector sets need no packaging: upstream compiles them into redis-server # itself (src/Makefile builds hnsw.o/vset.o/vset_config.o under # -DINCLUDE_VEC_SETS=1), so the redis package already provides them. %global _hardened_build 1 %global upstream_ver %{version} %global redis_modules_abi 1 %global redis_modules_dir %{_libdir}/redis/modules %global redis_modules_cfg %{_sysconfdir}/redis/modules # Upstream module refs pinned by modules/modules.yaml for Redis 8.10.1. # Recorded here for provenance: the subpackages carry this spec's version, # since they are built from, and only supported against, this core. %global bloom_ver 8.10.1 %global search_ver 8.10.0 %global json_ver 8.10.0 %global timeseries_ver 8.10.0 # RediSearch CMake FetchContent pins, read from the module's own cmake/*.cmake # at %%{search_ver}. Re-check on every bump: 8.10.0 moved fmt 11.2.0 -> 12.1.0. %global cpu_features_ver 0.10.1 %global eve_ver 2023.02.15 %global robinmap_ver 1.4.0 %global fmt_ver 12.1.0 %global spdlog_ver 1.15.3 %global toml_ver 3.3.0 # Tests can be enabled with --with tests %bcond_with tests Name: redis Version: 8.10.1 Release: 3%{?dist} Summary: A persistent key-value database # License breakdown: # - redis core: AGPL-3.0-only (tri-licensed RSALv2/SSPLv1/AGPLv3, using AGPLv3) # - deps/hiredis: BSD-3-Clause # - deps/jemalloc, deps/linenoise, src/lzf*: BSD-2-Clause # - deps/lua: MIT # - deps/fpconv: BSL-1.0 # - deps/hdr_histogram: CC0-1.0 OR BSD-2-Clause # - deps/xxhash, deps/fast_float: BSD-2-Clause / MIT License: AGPL-3.0-only AND BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: https://redis.io Source0: redis-%{version}-full.tar.gz Source1: redisjson-vendor-%{json_ver}.tar.gz Source2: redisearch-vendor-%{search_ver}.tar.gz Source3: https://github.com/google/cpu_features/archive/refs/tags/v%{cpu_features_ver}.tar.gz#/cpu_features-%{cpu_features_ver}.tar.gz Source4: https://github.com/jfalcou/eve/archive/refs/tags/v%{eve_ver}.tar.gz#/eve-%{eve_ver}.tar.gz Source5: https://github.com/Tessil/robin-map/archive/refs/tags/v%{robinmap_ver}.tar.gz#/robin-map-%{robinmap_ver}.tar.gz Source6: https://github.com/fmtlib/fmt/archive/refs/tags/%{fmt_ver}.tar.gz#/fmt-%{fmt_ver}.tar.gz Source7: https://github.com/gabime/spdlog/archive/refs/tags/v%{spdlog_ver}.tar.gz#/spdlog-%{spdlog_ver}.tar.gz Source8: https://github.com/marzer/tomlplusplus/archive/refs/tags/v%{toml_ver}.tar.gz#/tomlplusplus-%{toml_ver}.tar.gz Source9: redis.logrotate Source10: redis-sentinel.service Source11: redis.service Source12: redis.sysusers Source13: redis.tmpfiles Source14: %{name}.rpmlintrc # Fix default paths in configuration files for the RPM layout, and make # redis.conf include /etc/redis/modules/*.conf so installing a module package # is what activates it. Patch0: redis-conf.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: cmake >= 3.13 BuildRequires: automake BuildRequires: autoconf BuildRequires: libtool BuildRequires: pkgconf-pkg-config BuildRequires: python3 # RedisJSON and RedisTimeSeries build through RedisLabs' `readies` harness, # whose interpreter check (readies/bin/getpy3) exits non-zero unless # `python3 -m pip` works -- python3 alone is not enough. BuildRequires: python3-pip BuildRequires: openssl-devel >= 1.0.2 BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libsystemd) BuildRequires: jq BuildRequires: which # RediSearch: Boost is the one FetchContent dep taken from the system. BuildRequires: boost-devel >= 1.83 BuildRequires: patchelf BuildRequires: clang-devel # Rust for RedisJSON and RediSearch. Crates come from the vendor tarballs, so # no per-crate rust-*-devel BuildRequires are needed. BuildRequires: rust >= 1.80 BuildRequires: cargo %if %{with tests} BuildRequires: procps-ng BuildRequires: tcl8 %endif Requires: logrotate Provides: redis(modules_abi)%{?_isa} = %{redis_modules_abi} Provides: bundled(jemalloc) = 5.3.0 Provides: bundled(hiredis) = 1.2.0 Provides: bundled(lua-libs) = 5.1.5 Provides: bundled(linenoise) = 1.0 Provides: bundled(lzf) Provides: bundled(hdr_histogram) = 0.11.0 Provides: bundled(fast_float) = 6.1.4 Provides: bundled(xxhash) = 0.8.3 Provides: bundled(fpconv) # The companion shared libraries RediSearch ships are private to it: do not # require them from outside, and do not advertise them as system libraries. %global __requires_exclude ^lib(VectorSimilarity|VectorSimilaritySpaces|VectorSimilaritySpaces_no_optimization|cpu_features|hiredis|hiredis_ssl|fmt|spdlog)\\.so %global __provides_exclude_from ^%{redis_modules_dir}/.*$ # The module build scripts only map x86_64 and aarch64. ExclusiveArch: x86_64 aarch64 %description Redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. Vector sets are compiled into the server. The bundled modules are packaged separately from this same source: redisbloom, redisearch, redisjson and redistimeseries. Install redis-full to get all of them. %package devel Summary: Development header for Redis module development Provides: %{name}-static = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header and RPM macros for building modules against this Redis. %package -n redisbloom Summary: Probabilistic data structures for Redis # Upstream RedisBloom %%{bloom_ver}; versioned with the core it ships against. License: AGPL-3.0-only AND MIT AND BSD-3-Clause Requires: %{name}%{?_isa} = %{version}-%{release} Provides: bundled(RedisModulesSDK) Provides: bundled(readies) Provides: bundled(t-digest-c) %description -n redisbloom Bloom filters, cuckoo filters, count-min sketch, top-k and t-digest for Redis. This is upstream RedisBloom %{bloom_ver}. %package -n redisjson Summary: JSON data type support module for Redis License: AGPL-3.0-only AND MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND Zlib AND 0BSD AND BSL-1.0 AND Unicode-DFS-2016 AND Unlicense Requires: %{name}%{?_isa} = %{version}-%{release} Provides: bundled(RedisModulesSDK) %description -n redisjson Native JSON data type for Redis, with JSONPath query support. This is upstream RedisJSON %{json_ver}. %package -n redistimeseries Summary: Time series data structure for Redis License: AGPL-3.0-only AND MIT AND BSD-3-Clause AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) Requires: %{name}%{?_isa} = %{version}-%{release} Provides: bundled(LibMR) Provides: bundled(libevent) Provides: bundled(fast_double_parser) Provides: bundled(dragonbox) Provides: bundled(minunit) Provides: bundled(cpu_features) %description -n redistimeseries Time series data structure for Redis, with downsampling, compaction and aggregation. This is upstream RedisTimeSeries %{timeseries_ver}. %package -n redisearch Summary: Full-text search, vector similarity and secondary indexing for Redis License: AGPL-3.0-only AND MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND Zlib AND 0BSD AND BSL-1.0 AND MPL-2.0 AND (Apache-2.0 WITH LLVM-exception) Requires: %{name}%{?_isa} = %{version}-%{release} Provides: bundled(libuv) Provides: bundled(VectorSimilarity) Provides: bundled(s2geometry) Provides: bundled(hiredis) Provides: bundled(cpu_features) = %{cpu_features_ver} Provides: bundled(eve) = %{eve_ver} Provides: bundled(robin-map) = %{robinmap_ver} Provides: bundled(fmt) = %{fmt_ver} Provides: bundled(spdlog) = %{spdlog_ver} Provides: bundled(tomlplusplus) = %{toml_ver} %description -n redisearch Full-text search, vector similarity search and secondary indexing for Redis. This is upstream RediSearch %{search_ver}. %package -n redis-full Summary: Redis with the full set of bundled modules BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: redisbloom = %{version}-%{release} Requires: redisearch = %{version}-%{release} Requires: redisjson = %{version}-%{release} Requires: redistimeseries = %{version}-%{release} %description -n redis-full Metapackage installing Redis together with every bundled module. It contains no files of its own. Vector sets are part of the redis package. %prep %autosetup -n redis-%{version} -p1 # Hoist bundled licence texts to the top level so %%license can reference them. mv deps/jemalloc/COPYING COPYING-jemalloc mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/hiredis/COPYING COPYING-hiredis mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram mv deps/fpconv/LICENSE.txt LICENSE-fpconv mv deps/xxhash/LICENSE LICENSE-xxhash # `make tarball` strips each module's .git, but modules/common.mk treats a # missing .git as "not cloned yet" and would re-clone over the network. These # markers short-circuit that. for m in redisbloom redisearch redisjson redistimeseries; do touch modules/$m/src/.prepared done # --- RedisJSON: vendored crates ------------------------------------------- tar xzf %{SOURCE1} -C modules/redisjson/src mkdir -p modules/redisjson/src/.cargo cp -a modules/redisjson/src/vendor/.cargo/config.toml \ modules/redisjson/src/.cargo/config.toml # --- RediSearch: vendored crates and FetchContent dependencies ------------- tar xzf %{SOURCE2} -C modules/redisearch/src for s in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8}; do tar xzf "$s" -C modules/redisearch/src done # Some Rust build scripts locate the workspace root by walking up to a .git # directory; the tarball has none. An empty marker is enough. mkdir -p modules/redisearch/src/.git pushd modules/redisearch/src patch -p1 -d tomlplusplus-%{toml_ver} \ < deps/VectorSimilarity/deps/ScalableVectorSearch/cmake/patches/tomlplusplus_v330.patch # Fedora packages must not build with -Werror; newer GCC flags false positives # in robin-map and upstream SVS code. find deps/VectorSimilarity -name CMakeLists.txt -exec sed -i 's/-Werror//g' {} + find . -name '._*' -delete popd # Architecture-specific jemalloc tuning (rhbz#2240293). %ifarch %ix86 %arm x86_64 s390x sed -e 's/--with-lg-quantum/--with-lg-page=12 --with-lg-quantum/' -i deps/Makefile %endif %ifarch ppc64 ppc64le aarch64 sed -e 's/--with-lg-quantum/--with-lg-page=16 --with-lg-quantum/' -i deps/Makefile %endif # Guard against an upstream module ABI bump landing unnoticed. 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}. exit 1 fi cat << 'EOF' | tee macros.redis %%redis_version %{upstream_ver} %%redis_modules_abi %redis_modules_abi %%redis_modules_dir %redis_modules_dir %%redis_modules_cfg %redis_modules_cfg EOF %build # OpenSSL 4.0 (rawhide) deprecates APIs Redis still uses, and Redis builds with # -Werror=deprecated-declarations; keep those warnings non-fatal. %global make_flags DEBUG="" V="echo" BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes REDIS_CFLAGS="-Wno-error=deprecated-declarations" export CARGO_NET_OFFLINE=true # Redis core plus the three modules whose own build systems work offline # directly from the tarball. scripts/build.sh applies each module's build_env # from modules.yaml automatically. %make_build build redisbloom redisjson redistimeseries %{make_flags} PREFIX=%{_prefix} # RediSearch is built with %%cmake rather than through its own build.sh. # build.sh does not propagate Fedora's linker flags: without # %%{build_ldflags} the linker omits --build-id and rpm then fails with # "Missing build-id in .../redisearch.so". %%cmake passes them explicitly. pushd modules/redisearch/src RS_ROOT=$PWD export CXXFLAGS="%{optflags} -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable" %cmake \ -DCOORD_TYPE=oss \ -DBOOST_DIR=%{_includedir} \ -DREDISEARCH_BUILD_SHARED=ON \ -DBUILD_SEARCH_UNIT_TESTS=OFF \ -DVECSIM_BUILD_TESTS=OFF \ -DSVS_SHARED_LIB=OFF \ -DBUILD_INTEL_SVS_OPT=0 \ -DRUST_PROFILE=release \ -DREDISEARCH_GENERATE_HEADERS=OFF \ -DINLINE_LSE_ATOMICS=OFF \ -DFETCHCONTENT_SOURCE_DIR_CPU_FEATURES=$RS_ROOT/cpu_features-%{cpu_features_ver} \ -DFETCHCONTENT_SOURCE_DIR_EVE=$RS_ROOT/eve-%{eve_ver} \ -DFETCHCONTENT_SOURCE_DIR_ROBINMAP=$RS_ROOT/robin-map-%{robinmap_ver} \ -DFETCHCONTENT_SOURCE_DIR_FMT=$RS_ROOT/fmt-%{fmt_ver} \ -DFETCHCONTENT_SOURCE_DIR_SPDLOG=$RS_ROOT/spdlog-%{spdlog_ver} \ -DFETCHCONTENT_SOURCE_DIR_TOMLPLUSPLUS=$RS_ROOT/tomlplusplus-%{toml_ver} \ -DFETCHCONTENT_FULLY_DISCONNECTED=ON %cmake_build popd %check test -x src/redis-server test -f modules/redisbloom/redisbloom.so test -f modules/redisjson/rejson.so test -f modules/redistimeseries/redistimeseries.so test -x modules/redisearch/src/%{__cmake_builddir}/redisearch.so %install %make_install -C src %{make_flags} PREFIX=%{buildroot}%{_prefix} install -d %{buildroot}%{redis_modules_dir} install -d %{buildroot}%{redis_modules_cfg} # --- modules built via upstream common.mk --------------------------------- install -pm 0755 modules/redisbloom/redisbloom.so %{buildroot}%{redis_modules_dir}/redisbloom.so install -pm 0755 modules/redisjson/rejson.so %{buildroot}%{redis_modules_dir}/rejson.so install -pm 0755 modules/redistimeseries/redistimeseries.so %{buildroot}%{redis_modules_dir}/redistimeseries.so # --- RediSearch module plus its companion shared libraries ---------------- # These are not all in one place: hiredis lands in hiredis/, and fmt/spdlog # under _deps/-build. Symlinks are skipped and regenerated by ldconfig. RS_BUILD=modules/redisearch/src/%{__cmake_builddir} install -pm 0755 $RS_BUILD/redisearch.so %{buildroot}%{redis_modules_dir}/redisearch.so find $RS_BUILD \( -name 'libVectorSimilarity*.so' -o -name 'libcpu_features.so' \) \ ! -type l -exec install -pm 0755 {} %{buildroot}%{redis_modules_dir}/ \; for f in $RS_BUILD/hiredis/libhiredis.so.* $RS_BUILD/hiredis/libhiredis_ssl.so.*; do [ -L "$f" ] || [ ! -f "$f" ] || install -pm 0755 "$f" %{buildroot}%{redis_modules_dir}/ done for lib in fmt spdlog; do find $RS_BUILD/_deps/${lib}-build -name "lib${lib}.so*" \ ! -type l -exec install -pm 0755 {} %{buildroot}%{redis_modules_dir}/ \; done # Recreate the soname symlinks skipped above. ldconfig -n %{buildroot}%{redis_modules_dir} # Only libraries that load siblings from their own directory get an $ORIGIN # RPATH. Leaf libraries (hiredis, cpu_features, fmt) must not be patchelf'd -- # it can corrupt simple ELFs lacking complex program headers. spdlog is the # exception: CMake bakes in a build-time RPATH to fmt-build. for f in %{buildroot}%{redis_modules_dir}/redisearch.so \ %{buildroot}%{redis_modules_dir}/libVectorSimilarity.so \ %{buildroot}%{redis_modules_dir}/libVectorSimilaritySpaces.so; do [ -f "$f" ] && patchelf --set-rpath '$ORIGIN' "$f" done for f in %{buildroot}%{redis_modules_dir}/libspdlog.so.*; do [ -f "$f" ] && [ ! -L "$f" ] && patchelf --set-rpath '$ORIGIN' "$f" done # A for-loop whose final test fails would abort %%install; normalise the status. : # --- loadmodule stubs ----------------------------------------------------- # redis.conf includes this directory (Patch0), so installing a module package # is what activates it. for pair in redisbloom:redisbloom.so search:redisearch.so \ redisjson:rejson.so timeseries:redistimeseries.so; do name=${pair%%:*}; lib=${pair#*:} printf '# %s\nloadmodule %s/%s\n' "$name" "%{redis_modules_dir}" "$lib" \ > %{buildroot}%{redis_modules_cfg}/${name}.conf done # --- core system integration ---------------------------------------------- install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysusersdir}/%{name}.conf install -p -D -m 0644 %{SOURCE13} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -pDm 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} mkdir -p %{buildroot}%{_unitdir} install -pm 0644 %{SOURCE11} %{buildroot}%{_unitdir} install -pm 0644 %{SOURCE10} %{buildroot}%{_unitdir} install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_localstatedir}/log/%{name} install -d %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d install -d %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d install -pDm 0640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf install -pDm 0640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf chmod 755 %{buildroot}%{_bindir}/%{name}-* install -pDm 0644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h mkdir -p %{buildroot}%{_rpmmacrodir} install -pDm 0644 macros.redis %{buildroot}%{_rpmmacrodir}/macros.%{name} # Per-module licence texts, kept out of the core package's %%license set. install -pm 0644 modules/redisbloom/src/LICENSE.txt LICENSE-redisbloom.txt install -pm 0644 modules/redisjson/src/LICENSE.txt LICENSE-redisjson.txt install -pm 0644 modules/redisearch/src/LICENSE.txt LICENSE-redisearch.txt install -pm 0644 modules/redistimeseries/src/LICENSE.txt LICENSE-redistimeseries.txt %post %tmpfiles_create %{name}.conf %systemd_post %{name}.service %systemd_post %{name}-sentinel.service %preun %systemd_preun %{name}.service %systemd_preun %{name}-sentinel.service %postun %systemd_postun_with_restart %{name}.service %systemd_postun_with_restart %{name}-sentinel.service %files %license LICENSE.txt %license COPYING-jemalloc %license COPYRIGHT-lua %license COPYING-hiredis %license LICENSE-hdrhistogram %license LICENSE-fpconv %license LICENSE-xxhash %doc 00-RELEASENOTES README.md CONTRIBUTING.md MANIFESTO SECURITY.md %{_bindir}/%{name}-benchmark %{_bindir}/%{name}-check-aof %{_bindir}/%{name}-check-rdb %{_bindir}/%{name}-cli %{_bindir}/%{name}-sentinel %{_bindir}/%{name}-server %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sentinel.service %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(0750, redis, root) %dir %{_sysconfdir}/%{name} %attr(0750, redis, root) %dir %{redis_modules_cfg} %attr(0640, redis, redis) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %attr(0640, redis, redis) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf %dir %{_libdir}/%{name} %dir %{redis_modules_dir} %dir %{_sysconfdir}/systemd/system/%{name}.service.d %dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d %dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} %dir %attr(0750, root, redis) %{_localstatedir}/log/%{name} %files devel %{_includedir}/redismodule.h %{_rpmmacrodir}/macros.%{name} %files -n redisbloom %license LICENSE-redisbloom.txt %{redis_modules_dir}/redisbloom.so %config(noreplace) %{redis_modules_cfg}/redisbloom.conf %files -n redisjson %license LICENSE-redisjson.txt %{redis_modules_dir}/rejson.so %config(noreplace) %{redis_modules_cfg}/redisjson.conf %files -n redistimeseries %license LICENSE-redistimeseries.txt %{redis_modules_dir}/redistimeseries.so %config(noreplace) %{redis_modules_cfg}/timeseries.conf %files -n redisearch %license LICENSE-redisearch.txt %{redis_modules_dir}/redisearch.so %{redis_modules_dir}/lib*.so* %config(noreplace) %{redis_modules_cfg}/search.conf %files -n redis-full %changelog * Thu Aug 27 2026 Angel Yanev - 8.10.1-3 - Build Redis and all bundled modules from a single source tarball, shipping them as subpackages instead of five separate SRPMs - Modules are pinned by upstream modules/modules.yaml, so they can no longer drift from the core they were tested against - Disable INLINE_LSE_ATOMICS for redisearch: the default emits Armv8.1-a LSE instructions that SIGILL on baseline Armv8.0-a aarch64 hardware