Re: %patchN deprecated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would suggest creating at least self-contained change on Fedora to describe what has changed and why. Those syntax might be a little weird, but were used quite often. It would be nice to have some place to read about it. Because frankly it just started warning when used, but I do not remember it announced. When I searched approved changes mentioning this, there were none. Wiki page might provide links to external sources and could be used by other to reference why they are changing %patchX format.

Is there also documented and preferred way to apply just single patch when %autosetup -N -S git is used? I mean, if I want to have all patches applied git-like way, I know I can use -m or -M parameters to %autopatch. But %autopatch -m 1 -M 1 does not look nice.

I haven't found how to do that from comments in /usr/lib/rpm/macros. Can you help?

On 3/29/23 17:58, Todd Zullinger wrote:
Florian Festi wrote:
On 3/29/23 10:31, Michael J Gruber wrote:
Has `%patchN` been deprecated in favour of `%patch N`?
Yes, see %patch section on
https://rpm-software-management.github.io/rpm/manual/spec.html
Quoting that:

     %patch is used to apply patches on top of the just unpacked
     pristine sources. Historically it supported multiple strange
     syntaxes and buggy behaviors, which are no longer
     maintained. To apply patch number 1, the following are
     recognized:

         %patch 1 (since rpm >= 4.18)
         %patch -P1 (all rpm versions)
         %patch1 (deprecated, do not use)

     For new packages, the positional argument form 1) is
     preferred. For maximal compatibility use 2). Both forms can
     be used to apply several patches at once, in the order they
     appear on the line. The third form where the number is a
     part of the directive is deprecated and should not be used
     anymore.

Which gets to Michael's question "which releases can take
it?"

Changing `%patch1` to `%patch 1` limits support to Fedora 37
and above, unless this has been backported to older Fedora
and/or RHEL rpm?  Until it's supported by all current Fedora
and RHEL releases, it's not a change I'd want in the
packages I maintain.  I'd have to go with `%patch -P1`
(anywhere that %autosetup / %autopatch wasn't used).


_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

--
Petr Menšík
Software Engineer, RHEL
Red Hat, https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux