From 6fcfc2d4a26144fa85e5077518efc5418c68e96d Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Tue, 17 Jan 2023 14:43:57 -0500 Subject: [PATCH] require perl(MODULE_COMPAT) for Fedora < 38 and RHEL ce294ea (Remove perl(MODULE_COMPAT), it will be replaced by generators, 2023-01-13) removed the `Requires: perl(:MODULE_COMPAT_*)` entirely. This is not suitable for merging to older Fedora or RHEL releases. Make the requirement conditional. --- git.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/git.spec b/git.spec index ca029e2..6988bb2 100644 --- a/git.spec +++ b/git.spec @@ -14,6 +14,13 @@ %bcond_with linkcheck %endif +# Settings for Fedora >= 38 +%if 0%{?fedora} >= 38 +%bcond_with perl_modcompat +%else +%bcond_without perl_modcompat +%endif + # Settings for Fedora and EL >= 9 %if 0%{?fedora} || 0%{?rhel} >= 9 %bcond_without asciidoctor @@ -464,6 +471,9 @@ Requires: git = %{version}-%{release} Summary: Perl interface to Git BuildArch: noarch Requires: git = %{version}-%{release} +%if %{with perl_modcompat} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +%endif %description -n perl-Git %{summary}. @@ -471,6 +481,9 @@ Requires: git = %{version}-%{release} Summary: Perl interface to Git::SVN BuildArch: noarch Requires: git = %{version}-%{release} +%if %{with perl_modcompat} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +%endif %description -n perl-Git-SVN %{summary}.