Red Hat Bugzilla – Bug 28648
Make %patch use %__patch rather than hard-code 'patch'
Last modified: 2007-04-18 12:31:38 EDT
This patch makes the %patch macro use the patch binary specified by the
%__patch macro, rather than just hard-coding 'patch'.
(maintainer has previously indicated that this patch is unacceptable, but
here it is anyway)
Created attachment 10683 [details]
Patch for %patch using %__patch
I can't change this without the risk (albeit small) of breaking legacy builds.
FWIW, what really needs doing is to rip out the existing %patchN and %setup
in C and use a macro expansion instead, it's just not that hard to write a line
of shell using macros. There would need to be some changes to the existing
macro expansion, specifically
a) a hack to special case the "N" in %patchN token recognition
b) a way to parse multiple occurences of -a and -b in %setup
into a list.
Oh yeah, there's a small memory leak in your patch, rpmGetPath() return's