This was dropped in
bdc2be1e01
but it's needed for EPEL 10, so adding it back.
Resolves: RHEL-60808
Signed-off-by: Davide Cavalca <dcavalca@centosproject.org>
This bring RHEL rust-toolset in sync with the latest Fedora
rust-packaging, most importantly:
* Fedora's new style (-v vendor) vendoring is implemented. The old RHEL
style (-V #) vendoring is still supported, at least until we can convert
everything in ELN.
* Automatic generation of bundled provides using %cargo_vendor_manifest.
However, instead of depending on cargo2rpm, a very stripped-down version
of just its parse-vendor-manifest command is provided as a private
script, along with a fileattr to call it.
Other changes incorporated in this commit:
* -Cstrip=none added to %build_rustflags.
* --profile rpm is used instead of --release.
* Errors in spawned commands are now caught.
* Comments and whitespace are synced for easier comparison with Fedora.
* --target all is dropped from license and vendor macros, to avoid false
alarms from windows crates.
rust-srpm-macros is a dependency of redhat-rpm-config so that Rust-based
SRPMs can rely on these particular macros. In RHEL 9 and earlier,
rust-srpm-macros was a separate source package which was included in
RHEL. Since then, it became a subpackage of rust-packaging in Fedora.
In order to not pull in any part of rust-packaging into RHEL 10, thereby
allowing it to be maintained separately in EPEL, those macros are
provided here instead.
/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>
The coconut-svsm project which provides a low level firmware for AMD
SEV-SNP virtual machines uses 'x86_64-unknown-none' as its build
target and has recently removed the requirement to use rust nightly[1].
Thus adding 'x86_64-unknown-none' as a build target will enable us to
build coconut-svsm in Fedora using the standard Rust toolchain packages.
[1] https://github.com/coconut-svsm/svsm/pull/81
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This supports depending on a variable target using something like
the following since the other target stdlib subpackages are named
by this convention.
BuildRequires: rust-std-static-%{cargo_target}