From 66813018f1c969864eb544aa0c41b452b29f11bd Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 1 Feb 2024 13:31:04 -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-rpm-sequoia.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rust-rpm-sequoia.spec b/rust-rpm-sequoia.spec index 2c91761..91ffcfd 100644 --- a/rust-rpm-sequoia.spec +++ b/rust-rpm-sequoia.spec @@ -60,6 +60,9 @@ License: LGPL-2.0-or-later AND Apache-2.0 AND BSL-1.0 AND MIT AND Unicode %files -n %{crate} %license LICENSE.txt %license LICENSE.dependencies +%if 0%{?bundled_rust_deps} +%license cargo-vendor.txt +%endif %doc README.md %{_libdir}/librpm_sequoia.so.1 @@ -74,9 +77,9 @@ Requires: %{crate}%{?_isa} = %{version}-%{release} %{_libdir}/pkgconfig/rpm-sequoia.pc %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version} -p1 %{?bundled_rust_deps:-a1} %if 0%{?bundled_rust_deps} -%cargo_prep -V 1 +%cargo_prep -v vendor %else %cargo_prep @@ -89,8 +92,11 @@ Requires: %{crate}%{?_isa} = %{version}-%{release} export PREFIX="%{_prefix}" export LIBDIR="%{_libdir}" %cargo_build -%{?cargo_license_summary} -%{?cargo_license} > LICENSE.dependencies +%{cargo_license_summary} +%{cargo_license} > LICENSE.dependencies +%if 0%{?bundled_rust_deps} +%cargo_vendor_manifest +%endif %install # install shared library