The rust-toolset macros in RHEL 10 are now compatible with Fedora's
in terms of handling vendoring and automatic generation of license
information and bundled provides.
The package was last generated from an old Rust package template (v16),
the latest version is v25.
- The `%__cargo_skip_build` macro is unused and no longer has any effect.
- SPDX license expressions are the default since rust2rpm v22 (and in
Fedora in general).
- The `%rust_arches` macro is unused and no longer has any effect.
- The `%cargo_license` and `%cargo_license_summary` macros can be used
to generate a correct and up-to-date license summary (not available
in RHEL).
I made some additional small changes:
- Replaced a `%define` with a `%global`. There didn't seem to be a
reason for using `%define`, and if there's no reason, `%global` should
be used instead.
- Replaced the expanded form of `%{crates_source}` with the actual
macro. It's available everywhere.
- Dropped a stray additional newline at the end of the `%_description`.
- Moved package definitions into one place instead of both *before*
**and** *after* the scriptlets.
- Dropped the workaround for the test SIGSEGV on s390x (RHBZ#1883457),
which is no longer needed.
- Made some entries in the `%files` lists less overly globby, which is
discouraged in the Packaging Guidelines.
Since the RHEL rust toolbox does not support feature flags and
keeping a patch updated per release impacts automation. Add logic
to the %prep section to set the feature in the cargo.toml file.
The eln macro requires ELN SIG approval, and there is no need to differ
from RHEL here. More importantly, we don't want the dynamic
buildrequires in ELN either.
RHEL/ELN cargo macros do not support -f, so import the RHEL/c9s patch
which adds rdcore to the default features.
While we're at it, use the RHEL %%cargo_prep -V to handle vendoring
rather than manually modifing the cargo config.
We want to use `%cargo_install` for the main binary to match the use of
`%cargo_build`, but for everything else let's just use the same
dependent make targets.
I was perusing Brew build logs to debug packaging issues and to my
dismay realized that during the `%install` phase, we were actually
*rebuilding* and installing coreos-installer in debug mode. The reason
was that we weren't specifying `RELEASE=1` here. The deeper reason is
that the `install` target triggers `all` (see
https://github.com/coreos/coreos-installer/pull/634 for discussions
about that).
Anyway, for now let's just fix it here.
Fixes 511b4a3 ("Vendor rust dependencies on RHEL only & add
coreos-installer-dracut subpackage").
We've done a lot of modifications to this spec file now since it was
generated. Make it clear that we're no longer regenerating from
`rust2rpm` everytime.