From 12b58663746654ac0e1f47363a4ea27de04c78d2 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 1 Feb 2024 13:54:26 -0500 Subject: [PATCH] Update Rust macro usage 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. --- rust-sevctl.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rust-sevctl.spec b/rust-sevctl.spec index decf5db..e8dafbe 100644 --- a/rust-sevctl.spec +++ b/rust-sevctl.spec @@ -57,14 +57,18 @@ License: Apache-2.0 AND MIT %files -n %{crate} %license LICENSE +%license LICENSE.dependencies +%if 0%{?bundled_rust_deps} +%license cargo-vendor.txt +%endif %doc README.md %{_bindir}/sevctl %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %{?bundled_rust_deps:-a2} cp -pav %{SOURCE1} . %if 0%{?bundled_rust_deps} -%cargo_prep -V 2 +%cargo_prep -v vendor %else %cargo_prep @@ -74,6 +78,11 @@ cp -pav %{SOURCE1} . %build %cargo_build +%cargo_license_summary +%{cargo_license} > LICENSE.dependencies +%if 0%{?bundled_rust_deps} +%cargo_vendor_manifest +%endif %install %cargo_install