Adding patches in a SPEC

Itamar Reis Peixoto itamar at ispbrasil.com.br
Tue Nov 16 16:15:58 UTC 2010


On Tue, Nov 16, 2010 at 1:43 PM, Eric "Sparks" Christensen
<sparks at fedoraproject.org> wrote:
> 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
> --
> devel mailing list
> devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
>

Makefile is a autotools generated file, you should not patch it.

I think you should patch Makefile.in or Makefile.am

-- 
------------

Itamar Reis Peixoto
msn, google talk: itamar at ispbrasil.com.br
+55 11 4063 5033 (FIXO SP)
+55 34 9158 9329 (TIM)
+55 34 8806 3989 (OI)
+55 34 3221 8599 (FIXO MG)



   23rt


More information about the devel mailing list