Bug 56014

Summary: suggestion: %patch can have more options
Product: [Retired] Red Hat Linux Reporter: S P Arif Sahari Wibowo <arifsaha>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
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-11-10 20:48:41 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:

Description S P Arif Sahari Wibowo 2001-11-10 20:01:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.5) Gecko/20011011

Description of problem:
suggestion: %patch macro should be able to pass more options to patch.
In my pasticular case, I need to pass option --ignore-whitespace to patch.

Version-Release number of selected component (if applicable): 4.0

Steps to Reproduce:
1.rpm -bp <spec-file>

Comment 1 Jeff Johnson 2001-11-10 20:48:35 UTC
%patchN was added to rpm for 2 reasons:

    1) patch-2.1 and patch-2.5 had different options
    2) the N in %patchN needed to include a possibly
     compressed patch

There's really no reason in the world why you can't apply
your own patches any which way you choose. Access the full
name of the patch as %{PATCHn}, substituting n as appropriate
from the PatchN: directive, and use patch directly in the %prep section

     cat %{PATCHn} | patch <your options here>

or any of a zillion other variants.