ensure rustfmt pulls in exact matching rust evr

/usr/bin/rustfmt is linking to an internal rust library and this
results in load errors if rustfmt and rust are at different evrs:

$ rustfmt
rustfmt: error while loading shared libraries: librustc_driver-69c69b1255476b63.so: cannot open shared object file: No such file or directory
$ rpm -q rust rustfmt
rust-1.72.0-1.fc38.x86_64
rustfmt-1.72.1-1.fc38.x86_64

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2023-10-04 10:50:58 +01:00
parent fbe7f8404b
commit afbd2cf0c4
1 changed files with 3 additions and 0 deletions

View File

@ -531,6 +531,9 @@ and ensure that you'll always get a repeatable build.
Summary: Tool to find and fix Rust formatting issues
Requires: cargo
# /usr/bin/rustfmt is dynamically linked against internal rustc libs
Requires: %{name}%{?_isa} = %{version}-%{release}
# The component/package was rustfmt-preview until Rust 1.31.
Obsoletes: rustfmt-preview < 1.0.0
Provides: rustfmt-preview = %{version}-%{release}