From 42ce083fb43e85dd7be79108c62c0f2c43e1ad79 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Oct 12 2023 19:24:52 +0000 Subject: Handle %cargo_prep -V for compatibility with RHEL With %cargo_prep becoming parameterized in v25, Fedora and RHEL macros became incompatible to the point that a RHEL-ified spec file, even conditionally, cannot be parsed on Fedora. This should limit the error to actual unconditional use of the flag during a Fedora build (which should never happen) until such time that the Fedora and RHEL macros are in sync. --- diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo index e99f5a6..31e07b6 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:-V is not supported in Fedora builds}}}\ %{-v:%{-N:%{error:-v and -N are mutually exclusive!}}}\ (\ set -euo pipefail\