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?
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 2to revert to the value found in older versions of RPM in Fedora, but it is generally recommended to avoid doing this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With