Adding patches in a SPEC

Eric "Sparks" Christensen sparks at fedoraproject.org
Tue Nov 16 15:43:50 UTC 2010


I've never had to add a patch to a SPEC file before and I can't seem
to make it work.

The patch is to make a modification to the Makefile.  I created the
patch (diff -u) and put that in my SOURCES directory.  I included the
Patch0: line and then called the patch in %prep using %patch0 (no
switches).  When I run rpmbuild I get the following:

[user at system rpmbuild]$ rpmbuild -ba SPECS/gpredict.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ILyyD6
+ umask 022
+ cd /home/user/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/user/rpmbuild/BUILD
+ rm -rf gpredict-1.2
+ /usr/bin/gzip -dc /home/user/rpmbuild/SOURCES/gpredict-1.2.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd gpredict-1.2
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (gpredict-1.2-DSO.patch):'
Patch #0 (gpredict-1.2-DSO.patch):
+ /bin/cat /home/user/rpmbuild/SOURCES/gpredict-1.2-DSO.patch
+ /usr/bin/patch -s -p0 --fuzz=0
The text leading up to this was:
--------------------------
|--- Makefile   2010-11-15 20:07:20.676418835 -0500
|+++ Makefile   2010-11-15 21:35:53.803407014 -0500
--------------------------
File to patch:


It appears to not find Makefile.  Most likely I'm just failing to do
something correctly here.  Can someone point me in the proper
direction?

Thanks,
Eric


More information about the devel mailing list