Hi. This is my test approach to allow redefinition of patch application in old
plain spec files. All references with
```
%patch1 -p1
%patch2 -p1
```
etc. cannot be redefined. There is quite nice %apply_patch macro and
%autopatch, which allows applying all patches in automated way. Unfortunately,
it is not always so simple. One try to solve that is request #626. This is
another improvement, but with more complicated solution. It moves %patchX
handling from rpmbuild to macro definitions. It is then possible to apply
patches with SCM method.
```
# Switch to scm method. Pass file name and file number to patch as arguments.
%__apply_patchx_plain(b:d:o:F:REp:m:)\
%{apply_patch %{-p} -m "%{1}" %{1} %{2}}
%__apply_patchx_uncompress(b:d:o:F:REp:m:)\
%{apply_patch %{-p} -m "%{1}" %{1} %{2}}
```
This allows rebase tool to mark each commit, by patch name it comes from and
patch number. It could allow creation of git repository, where commits could be
marked with original file. After git driven rebase, all patches could be
exported back to patches used by spec, in automated way. Currently, it is
impossible, because patch number is dropped in rpmbuild.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/629#issuecomment-461125526
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint