New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFE] Use file path in %patch macro #629
[RFE] Use file path in %patch macro #629
Conversation
Moves single %patchX from RPM code to macros. This can be then redefined. Similar to apply_patch, but allows all custom flags that can be passed to %__patch utility. Forwards also name and number of a patch. Rename to __apply_patchx_{common,plain,uncompress} Use single macro in two variants, cleanup some parts. Remove default patch flags, they are in common part already.
Hi. This is my test approach to allow redefinition of patch application in old plain spec files. All references with
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.
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. |
Hmm, this is presented as an alternative to #626 but since that was solved, is there something here that you still need? I'm all for simplifying (and even eliminating) the built-in %patch related code, but this seems more like complicating the situation further by adding even more related macros... |
Hmm, maybe I am just missing shorter alternative to %patch123 macro. I can use %apply_patch, but I have to provide both path to patch and number as arguments to that. Is there something like %apply 123 that can be used as simple way to use just one patch? I think I can use I think some shortcut to |
@pemensik You can use This can also be combined in "fun" ways:
|
|
Moves single %patchX from RPM code to macros. This can be then
redefined.
Similar to apply_patch, but allows all custom flags that can be passed
to %__patch utility. Forwards also name and number of a patch.
Rename to _apply_patchx{common,plain,uncompress}
Use single macro in two variants, cleanup some parts.
Remove default patch flags, they are in common part already.