From f5d29ff5168f92d1808bd73f421f475ebe6dffc4 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 8 Nov 2023 11:04:42 -0500 Subject: [PATCH] Fix build with rust-toolset RHEL/ELN rust-toolset is currently disparate from Fedora rust-packaging. While we are working on bringing them in sync, right now we need to handle the current state so that this builds. --- bootc.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bootc.spec b/bootc.spec index 67ded9e..e7fe751 100644 --- a/bootc.spec +++ b/bootc.spec @@ -21,7 +21,7 @@ Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar BuildRequires: make BuildRequires: ostree-devel BuildRequires: openssl-devel -%if 0%{?rhel} && !0%{?eln} +%if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: cargo-rpm-macros >= 25 @@ -38,13 +38,19 @@ Recommends: bootupd %prep %autosetup -p1 -a1 +%if 0%{?rhel} +%cargo_prep -V 1 +%else %cargo_prep -v vendor +%endif %build %cargo_build +%if !0%{?rhel} %cargo_vendor_manifest %cargo_license_summary %{cargo_license} > LICENSE.dependencies +%endif %install %make_install INSTALL="install -p -c" @@ -57,8 +63,10 @@ Recommends: bootupd %files %license LICENSE-MIT %license LICENSE-APACHE +%if !0%{?rhel} %license LICENSE.dependencies %license cargo-vendor.txt +%endif %doc README.md %{_bindir}/bootc %{_prefix}/lib/bootc/