# redis-bundle — Redis plus every bundled module, built from a single source # tarball produced by upstream's own `make tarball TAG=`. # # Why this exists # --------------- # The `redis-full` metapackage only aggregates the separately-packaged # `redis`, `redisbloom`, `redisearch`, `redisjson` and `redistimeseries` RPMs. # This package instead builds all of them together from one source, using the # module build orchestration upstream added in Redis 8.x (modules/modules.yaml # + modules/common.mk + scripts/build.sh), so no separate module RPMs are # needed. # # Source0 is generated by upstream tooling, not by hand: # # git clone https://github.com/redis/redis && cd redis # make modules-update all # make tarball TAG=%%{version} OUT_PATH=redis-%%{version}-full.tar.gz # # That clones each module at the exact ref pinned in modules/modules.yaml and # emits a reproducible tarball (sorted, owner 0, mtimes from the tag commit). # It deliberately strips each module's .git, which matters in %%prep below. # # Offline-build notes (Fedora/Copr buildroots have no network) # ------------------------------------------------------------ # Three upstream behaviours assume network access and are neutralised here: # # 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 handling: upstream compiles them into redis-server # itself (src/Makefile builds hnsw.o/vset.o/vset_config.o under # -DINCLUDE_VEC_SETS=1), so they are present as soon as the server is built. %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 refs pinned by modules/modules.yaml for Redis 8.10.1. redisbloom # tracks the core tag; the other three lag by a patch release. %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, taken from the module's own cmake/*.cmake # at %%{search_ver}. These must be re-checked on every version bump: 8.10.0 # moved fmt from 11.2.0 to 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 Name: redis-bundle Version: 8.10.1 Release: 1%{?dist} Summary: Redis and all bundled modules built from a single source # Aggregate of Redis core and every bundled module, each of which is # AGPL-3.0-only, plus their vendored dependencies. Merged from the licence # breakdowns in the individual redis/redisbloom/redisearch/redisjson/ # redistimeseries spec files. License: AGPL-3.0-only AND BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 AND Apache-2.0 AND ISC AND Zlib AND 0BSD AND Unicode-DFS-2016 AND Unlicense AND MPL-2.0 AND (Apache-2.0 WITH LLVM-exception) URL: https://redis.io # Produced by `make tarball TAG=%%{version}` — see header. Source0: redis-%{version}-full.tar.gz # Vendored Rust crates: `cargo vendor` run against each module's workspace. Source1: redisjson-vendor-%{json_ver}.tar.gz Source2: redisearch-vendor-%{search_ver}.tar.gz # RediSearch FetchContent dependencies, fetched offline via # FETCHCONTENT_SOURCE_DIR_* in %%build. 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 # Service plumbing, shared verbatim with the standalone redis package. 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. Patch0: redis-conf.patch # Core toolchain. 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: 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 Requires: logrotate Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Provides: redis(modules_abi)%{?_isa} = %{redis_modules_abi} # This package ships redis-server and every module .so itself, so it occupies # the same paths as the split packages and cannot be co-installed with them. # Provides are declared so existing `Requires: redis` dependencies still # resolve against the bundle. Provides: redis = %{version}-%{release} Conflicts: redis Provides: redisbloom = %{bloom_ver}-%{release} Conflicts: redisbloom Provides: redisearch = %{search_ver}-%{release} Conflicts: redisearch Provides: redisjson = %{json_ver}-%{release} Conflicts: redisjson Provides: redistimeseries = %{timeseries_ver}-%{release} Conflicts: redistimeseries Conflicts: redis-full # Bundled dependencies, merged from the individual module spec files. 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) Provides: bundled(RedisModulesSDK) Provides: bundled(readies) Provides: bundled(t-digest-c) Provides: bundled(LibMR) Provides: bundled(libevent) Provides: bundled(fast_double_parser) Provides: bundled(dragonbox) Provides: bundled(minunit) Provides: bundled(libuv) Provides: bundled(VectorSimilarity) Provides: bundled(s2geometry) 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} # The companion shared libraries RediSearch installs next to its module are # private to it: neither require them from outside nor advertise them. %global __requires_exclude ^lib(VectorSimilarity|VectorSimilaritySpaces|VectorSimilaritySpaces_no_optimization|cpu_features|hiredis|hiredis_ssl|fmt|spdlog)\\.so %global __provides_exclude_from ^%{redis_modules_dir}/.*$ # Rust and CMake produce artefacts this arch set is known to build; the module # build scripts only map x86_64 and aarch64. ExclusiveArch: x86_64 aarch64 %description Redis is an advanced key-value store, bundled here with the complete set of modules pinned by upstream Redis: RedisBloom, RediSearch, RedisJSON and RedisTimeSeries. Vector sets are compiled into the Redis server itself. Everything is built from a single source tarball produced by upstream's `make tarball`, using the module build orchestration introduced in Redis 8.x, so no separate module packages are required. This package conflicts with the standalone redis and module packages; install either this bundle or the split packages, not both. %prep %autosetup -n redis-%{version} -p1 # `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: the target file exists, so make considers # get_source satisfied. 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 # ScalableVectorSearch requires this patch against tomlplusplus v3.3.0. 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; Redis builds with # -Werror=deprecated-declarations, so 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 # straight from the tarball. scripts/build.sh (behind `make build`) applies # each module's build_env from modules.yaml automatically — notably # REDISEARCH_GENERATE_HEADERS=0 and INLINE_LSE_ATOMICS=0. %make_build build redisbloom redisjson redistimeseries %{make_flags} PREFIX=%{_prefix} # RediSearch is driven directly through its own build.sh rather than # `make build redisearch`: the thin Makefile wrapper only forwards a fixed # allowlist of variables, and the FETCHCONTENT_SOURCE_DIR_* settings needed for # an offline build are not on it. build.sh passes any unrecognised KEY=VALUE # straight through to CMake as -DKEY=VALUE. pushd modules/redisearch/src RS_ROOT=$PWD # Mirrors modules.yaml's build_env for redisearch. GENERATE_HEADERS is off # because header generation needs `cheadergen`, which requires a nightly # toolchain; the checked-in headers are used instead. INLINE_LSE_ATOMICS is off # so the module does not emit Armv8.1-a LSE instructions, which would SIGILL on # baseline Armv8.0-a aarch64 hardware that Fedora still supports. export REDISEARCH_GENERATE_HEADERS=0 export INLINE_LSE_ATOMICS=0 # build.sh does not pick up Fedora's build flags the way %%cmake does, so # export them explicitly. LDFLAGS matters beyond hardening: without # %%{build_ldflags} the linker omits --build-id, and rpm then fails with # "Missing build-id in .../redisearch.so" when generating build-id links. export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags} -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable" export LDFLAGS="%{build_ldflags}" ./build.sh \ COORD=oss \ BOOST_DIR=%{_includedir} \ REDISEARCH_BUILD_SHARED=ON \ BUILD_SEARCH_UNIT_TESTS=OFF \ VECSIM_BUILD_TESTS=OFF \ SVS_SHARED_LIB=OFF \ BUILD_INTEL_SVS_OPT=0 \ RUST_PROFILE=release \ FETCHCONTENT_SOURCE_DIR_CPU_FEATURES=$RS_ROOT/cpu_features-%{cpu_features_ver} \ FETCHCONTENT_SOURCE_DIR_EVE=$RS_ROOT/eve-%{eve_ver} \ FETCHCONTENT_SOURCE_DIR_ROBINMAP=$RS_ROOT/robin-map-%{robinmap_ver} \ FETCHCONTENT_SOURCE_DIR_FMT=$RS_ROOT/fmt-%{fmt_ver} \ FETCHCONTENT_SOURCE_DIR_SPDLOG=$RS_ROOT/spdlog-%{spdlog_ver} \ FETCHCONTENT_SOURCE_DIR_TOMLPLUSPLUS=$RS_ROOT/tomlplusplus-%{toml_ver} \ FETCHCONTENT_FULLY_DISCONNECTED=ON popd %check # Confirm every expected artefact exists before packaging. The module build # systems emit into bin/--release/, and build.sh additionally leaves # an aarch64 -> arm64v8 compatibility symlink, so match on the file itself. test -x src/redis-server test -f modules/redisbloom/redisbloom.so test -f modules/redisjson/rejson.so test -f modules/redistimeseries/redistimeseries.so test -n "$(find modules/redisearch/src/bin -name redisearch.so -type f -print -quit)" %install # Core: same install path as the standalone redis package. %make_install -C src %{make_flags} PREFIX=%{buildroot}%{_prefix} install -d %{buildroot}%{redis_modules_dir} install -d %{buildroot}%{redis_modules_cfg} # Modules whose artefact common.mk already copied to modules//. 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: the module plus the companion shared libraries it links # against. These are NOT all beside redisearch.so -- hiredis lands in # hiredis/, and fmt/spdlog under _deps/-build -- so each is collected # from where its own build system puts it. Symlinks are skipped and # regenerated by ldconfig below. rs_so=$(find modules/redisearch/src/bin -name redisearch.so -type f -print -quit) rs_build=$(dirname "$rs_so") install -pm 0755 "$rs_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 # fmt and spdlog are built by FetchContent; VectorSimilarity links against # them, so ship them rather than silently depending on system packages. 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}/ \; 2>/dev/null || : done # Recreate the soname symlinks that were skipped above. ldconfig -n %{buildroot}%{redis_modules_dir} # Only libraries that dlopen their siblings from the same 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 # that has to be replaced. 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. : # One loadmodule stub per module. redis.conf includes this directory (Patch0), # so dropping the files in is what activates the modules. for pair in redisbloom:redisbloom.so redisearch: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 # System integration, matching the standalone redis package. install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysusersdir}/redis.conf install -p -D -m 0644 %{SOURCE13} %{buildroot}%{_tmpfilesdir}/redis.conf install -pDm 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/redis mkdir -p %{buildroot}%{_unitdir} install -pm 0644 %{SOURCE11} %{buildroot}%{_unitdir} install -pm 0644 %{SOURCE10} %{buildroot}%{_unitdir} install -d %{buildroot}%{_sharedstatedir}/redis install -d %{buildroot}%{_localstatedir}/log/redis install -d %{buildroot}%{_sysconfdir}/systemd/system/redis.service.d install -d %{buildroot}%{_sysconfdir}/systemd/system/redis-sentinel.service.d install -pDm 0640 redis.conf %{buildroot}%{_sysconfdir}/redis/redis.conf install -pDm 0640 sentinel.conf %{buildroot}%{_sysconfdir}/redis/sentinel.conf chmod 755 %{buildroot}%{_bindir}/redis-* install -pDm 0644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h mkdir -p %{buildroot}%{_rpmmacrodir} install -pDm 0644 macros.redis %{buildroot}%{_rpmmacrodir}/macros.redis # Licence texts, gathered from core and each module. mkdir -p licenses-bundle install -pm 0644 LICENSE.txt licenses-bundle/LICENSE-redis.txt install -pm 0644 deps/jemalloc/COPYING licenses-bundle/COPYING-jemalloc install -pm 0644 deps/lua/COPYRIGHT licenses-bundle/COPYRIGHT-lua install -pm 0644 deps/hiredis/COPYING licenses-bundle/COPYING-hiredis install -pm 0644 deps/hdr_histogram/LICENSE.txt licenses-bundle/LICENSE-hdrhistogram install -pm 0644 deps/fpconv/LICENSE.txt licenses-bundle/LICENSE-fpconv install -pm 0644 deps/xxhash/LICENSE licenses-bundle/LICENSE-xxhash install -pm 0644 modules/redisbloom/src/LICENSE.txt licenses-bundle/LICENSE-redisbloom.txt install -pm 0644 modules/redisjson/src/LICENSE.txt licenses-bundle/LICENSE-redisjson.txt install -pm 0644 modules/redisearch/src/LICENSE.txt licenses-bundle/LICENSE-redisearch.txt install -pm 0644 modules/redistimeseries/src/LICENSE.txt licenses-bundle/LICENSE-redistimeseries.txt %post %tmpfiles_create redis.conf %systemd_post redis.service redis-sentinel.service %preun %systemd_preun redis.service redis-sentinel.service %postun %systemd_postun_with_restart redis.service redis-sentinel.service %files %license licenses-bundle/* %doc 00-RELEASENOTES README.md CONTRIBUTING.md MANIFESTO SECURITY.md %{_bindir}/redis-benchmark %{_bindir}/redis-check-aof %{_bindir}/redis-check-rdb %{_bindir}/redis-cli %{_bindir}/redis-sentinel %{_bindir}/redis-server %{_includedir}/redismodule.h %{_rpmmacrodir}/macros.redis %{_unitdir}/redis.service %{_unitdir}/redis-sentinel.service %{_sysusersdir}/redis.conf %{_tmpfilesdir}/redis.conf %config(noreplace) %{_sysconfdir}/logrotate.d/redis %attr(0750, redis, root) %dir %{_sysconfdir}/redis %attr(0750, redis, root) %dir %{redis_modules_cfg} %attr(0640, redis, redis) %config(noreplace) %{_sysconfdir}/redis/redis.conf %attr(0640, redis, redis) %config(noreplace) %{_sysconfdir}/redis/sentinel.conf %config(noreplace) %{redis_modules_cfg}/*.conf %dir %{_libdir}/redis %dir %{redis_modules_dir} %{redis_modules_dir}/*.so* %dir %{_sysconfdir}/systemd/system/redis.service.d %dir %{_sysconfdir}/systemd/system/redis-sentinel.service.d %dir %attr(0750, redis, redis) %{_sharedstatedir}/redis %dir %attr(0750, root, redis) %{_localstatedir}/log/redis %changelog * Thu Aug 27 2026 Angel Yanev - 8.10.1-1 - Initial single-source bundle of Redis 8.10.1 and all pinned modules