fix(rpm): filter auto-detected CUDA library dependencies

The binary's ELF headers cause rpm to auto-require exact soname
versions of CUDA libraries from the build host, forcing downgrades
on systems with newer compatible versions. Filter these out with
__requires_exclude so consumers can use any compatible CUDA install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 13:38:04 +03:00
parent 6647ed299d
commit 61cdc53e39

View File

@@ -21,11 +21,12 @@ Source2: mistralrs@.conf.example
ExclusiveArch: x86_64 ExclusiveArch: x86_64
# Runtime requirements. We link against the CUDA runtime; consumers must have # Suppress auto-detected CUDA library dependencies. The binary links against
# a matching CUDA installation or the rpmfusion nvidia driver's cuda-libs. # the CUDA runtime, cuDNN, NCCL, etc. but we don't want rpm to pin exact
# We don't hard-require it at the RPM level because consumers may have CUDA # soname versions — consumers may have CUDA from multiple sources (nvidia
# from multiple sources (nvidia direct, rpmfusion, etc.) — failing to load # direct, rpmfusion, etc.) and different compatible versions. A runtime
# libcuda.so at runtime gives a clearer error than RPM dep resolution would. # dlopen failure gives a clearer error than rpm dep resolution would.
%global __requires_exclude ^lib(cuda|cudart|cudnn|cublas|cublasLt|curand|nvrtc|nccl)
Requires: systemd Requires: systemd
# Flavours are mutually exclusive with other flavours of themselves at the # Flavours are mutually exclusive with other flavours of themselves at the