diff --git a/SOURCES/0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch b/SOURCES/0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch new file mode 100644 index 0000000..2195780 --- /dev/null +++ b/SOURCES/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/SPECS/rust-packaging.spec b/SPECS/rust-packaging.spec index c8ca151..31b5cb0 100644 --- a/SPECS/rust-packaging.spec +++ b/SPECS/rust-packaging.spec @@ -2,7 +2,7 @@ ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 1; + release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -19,6 +19,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} @@ -92,6 +98,9 @@ pytest-3.11 -vv -k "not test_cargo_prep" %{_fileattrsdir}/cargo_vendor.attr %changelog +* Tue Nov 07 2023 Fabio Valentini - 25.2-2 +- Temporarily accept cargo_prep -V flag for spec compatibiltiy with RHEL + * Wed Oct 04 2023 Arkady L. Shane - 25.2-1 - Rebuilt for MSVSphere 9.2