Bug 28648

Summary: Make %patch use %__patch rather than hard-code 'patch'
Product: [Retired] Red Hat Linux Reporter: Joe Orton <jorton>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-21 18:20:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for %patch using %__patch none

Description Joe Orton 2001-02-21 18:19:17 UTC
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)

Comment 1 Joe Orton 2001-02-21 18:20:17 UTC
Created attachment 10683 [details]
Patch for %patch using %__patch

Comment 2 Jeff Johnson 2001-02-22 18:11:35 UTC
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
implemented
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
malloc'd
memory.