On 31. 03. 23 13:58, Petr Menšík wrote:
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?
%autopatch 1
https://github.com/rpm-software-management/rpm/blob/rpm-4.18.1-release/ma...
%autopatch
Apply patches using %autosetup configured SCM.
Typically used with no arguments to apply all patches in the order
introduced in the spec, but alternatively can be used to apply indvidual
patches in arbitrary order by passing them as arguments.
Also documented in
https://rpm-software-management.github.io/rpm/manual/autosetup.html#autop...
Some examples:
Apply patches with number >= 100
%autopatch -m 100
Apply patches with number <= 400
%autopatch -M 400
Apply patches 80 to 99, inclusive
%autopatch -m 80 -M 99
Apply patches 1, 4 and 6
%autopatch 1 4 6
The individual patch numbers as arguments feature is available since RPM 4.17,
see
https://github.com/rpm-software-management/rpm/pull/1697
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok