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).
--
Todd