diff --git a/0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch b/0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch new file mode 100644 index 0000000..2195780 --- /dev/null +++ b/0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch @@ -0,0 +1,27 @@ +From c1cb014722147a3373a7d7ebbf99781cbb335cbf Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Fri, 13 Oct 2023 00:31:15 +0200 +Subject: [PATCH] Temporarily accept cargo_prep -V flag for spec compatibiltiy + with RHEL + +--- + macros.d/macros.cargo | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo +index e99f5a6..05159d8 100644 +--- a/macros.d/macros.cargo ++++ b/macros.d/macros.cargo +@@ -54,7 +54,8 @@ + # -v - use vendored sources from instead of + # %%cargo_registry + # -N - Don't set up any registry. Only set up the build configuration. +-%cargo_prep(v:N)\ ++%cargo_prep(V:v:N)\ ++%{-V:%{?fedora:%{error:The -V flag for cargo_prep is not supported in Fedora}}}\ + %{-v:%{-N:%{error:-v and -N are mutually exclusive!}}}\ + (\ + set -euo pipefail\ +-- +2.41.0 + diff --git a/rust-packaging.spec b/rust-packaging.spec index c239e72..b4a4869 100644 --- a/rust-packaging.spec +++ b/rust-packaging.spec @@ -9,6 +9,12 @@ License: MIT URL: https://pagure.io/fedora-rust/rust-packaging Source: %{url}/archive/%{version}/rust-packaging-%{version}.tar.gz +# temporary patch for compatibility with RHEL / ELN: +# The %%cargo_prep macro in RHEL / ELN accepts a -V flag. Using the same spec +# file for both Fedora and ELN would cause spec file parsing errors because +# the -V flag is not known in Fedora. +Patch: 0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch + BuildArch: noarch %if %{with check}