Reputation: 1305
I got error as following in el6 machine:
Patch #4 (test.patch):
+ /bin/cat /path/to/test.patch
+ /usr/bin/patch -s -p0 --fuzz=0
1 out of 4 hunks FAILED -- saving rejects to file ***
1 out of 1 hunk FAILED -- saving rejects to file ***
error: Bad exit status from /var/tmp/rpm-tmp.YeRtKr (%prep)
However, I can apply the patch file with commond as following:
/usr/bin/patch -s -p0 < /path/to/test.patch
.
I note that rpm set --fuzz=0
by default.
Is there some way to let rpm not set --fuzz=0
option?
Upvotes: 3
Views: 2124
Reputation: 303
From the Fedora project wiki:
Try to ensure that your patch match the context exactly. The default "fuzz" value is "0", requiring matches to be exact. You can work around this by adding
%global _default_patch_fuzz 2
to revert to the value found in older versions of RPM in Fedora, but it is generally recommended to avoid doing this.
Upvotes: 5