Hi,
it appears rpm has now deprecated the old %patch syntax in rawhide, which means that any old-style expressions
%patch0 -p1 -b .overflow
must now be written as
%patch 0 -p1 -b .overflow
Unfortunately, all the epel branches, in turn, do not support the new %patch syntax. This means that one either - cannot use the same spec file to build in epel or - must introduce conditionals and duplicate code in the spec files
%if 0%{?epel} < 10 %patch0 -p1 -b .overflow %else %patch 0 -p1 -b .overflow %endif
Is there any hope of fixing this issue, or altenatively, a known workaround that is compatible in both branches?
Susi
The alternative syntax that is backward compatible is using “-P 0" instead of "0".
On Tue, Oct 29, 2024, 10:09 AM Susi Lehtola jussilehtola@fedoraproject.org wrote:
Hi,
it appears rpm has now deprecated the old %patch syntax in rawhide, which means that any old-style expressions
%patch0 -p1 -b .overflow
must now be written as
%patch 0 -p1 -b .overflow
Unfortunately, all the epel branches, in turn, do not support the new %patch syntax. This means that one either
- cannot use the same spec file to build in epel or
- must introduce conditionals and duplicate code in the spec files
%if 0%{?epel} < 10 %patch0 -p1 -b .overflow %else %patch 0 -p1 -b .overflow %endif
Is there any hope of fixing this issue, or altenatively, a known workaround that is compatible in both branches?
Susi
Susi Lehtola Fedora Project Contributor jussilehtola@fedoraproject.org
-- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Hi Susi,
Susi Lehtola jussilehtola@fedoraproject.org writes:
Hi,
it appears rpm has now deprecated the old %patch syntax in rawhide, which means that any old-style expressions
%patch0 -p1 -b .overflow
must now be written as
%patch 0 -p1 -b .overflow
Unfortunately, all the epel branches, in turn, do not support the new %patch syntax. This means that one either
- cannot use the same spec file to build in epel or
- must introduce conditionals and duplicate code in the spec files
%if 0%{?epel} < 10 %patch0 -p1 -b .overflow %else %patch 0 -p1 -b .overflow %endif
Is there any hope of fixing this issue, or altenatively, a known workaround that is compatible in both branches?
The following should work on all rpm versions [1]: %patch -P1
Cheers,
Dan
Footnotes: [1] https://rpm-software-management.github.io/rpm/manual/spec.html#patch-1
On Tue, 29 Oct 2024 11:08:50 +0200 Susi Lehtola jussilehtola@fedoraproject.org wrote:
Unfortunately, all the epel branches, in turn, do not support the new %patch syntax. This means that one either
- cannot use the same spec file to build in epel or
- must introduce conditionals and duplicate code in the spec files
%if 0%{?epel} < 10 %patch0 -p1 -b .overflow %else %patch 0 -p1 -b .overflow %endif
There is another syntax which is compatible with all versions.
%patch -P 0 -p1 -b .overflow
This syntax is supported by all rpm versions in use.
epel-devel@lists.fedoraproject.org