Re: rpmbuild question - follow on to gcc issues [SOLVED]

2009-02-11 Thread Steve

 "Mikkel L. Ellertson"  wrote: 
> Steve wrote:
> >  "Mikkel L. Ellertson"  wrote: 
> >> One way is to create your own patch that is used after the original
> >> patch. Add it to the end of the patch list.
> > 
> > Yukk!! That will get really tiresome really quickly. At this
> > point I don't really know what I'm looking for so I may end up having to
> > add debug statements to several files.
> > 
> > Is there a way to apply all the patches to the source code and
> > them remove them from the spec file?
> > 
> > Steve
> > 
> Well, if you are debugging the program, you would probably be better
> off running "rpmbuild -bp " and then make your changes in
> the build directory. Then run make manually. You can do this all as
> a normal user. Depending on what you are building, you may be able
> to run it as a normal user from the build directory. If not, you are
> probably going to override the make file so it installs relative to
> your home directory. Once you have it debugged, you can transfere
> the changes to the virgin source with a patch, or pass them upstream...

rpmbuild -bp  did the trick.

After running that I went into the BUILD directory and made my modifications. 
Next I ran ./configure with all the options from the spec file and finally ran 

$ make CFLAGS='-fPIC -D_GNU_SOURCE"

I also got the CFLAG options from the spec file. The last thing I had to do was 
set the correct SELinux context for the executable and point the boot script at 
my executable instead of the system one.

Now I can start.

Thanks for the help.
Steve.

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-11 Thread Michael Schwendt
On Tue, 10 Feb 2009 14:00:23 -0500, Steve wrote:

>  "Mikkel L. Ellertson" wrote: 
> > One way is to create your own patch that is used after the original
> > patch. Add it to the end of the patch list.
> 
> Yukk!! That will get really tiresome really quickly. At this point I don't 
> really know what I'm looking for so I may end up having to add debug 
> statements to several files.
> 

Yes, that's in the nature of incremental patches. You would usually try to
get patches merged upstream regularly. And if upstream doesn't do that for a
long time, you may need to rediff patches occasionally. Or join them with
a private working-copy of the source code tree in order to reduce the number
of patches to apply in a src.rpm. With a high number of patches and many
modifications in the same files, maintaining a private patched source code tree
may be the more convenient solution.

> Is there a way to apply all the patches to the source code and them remove 
> them from the spec file?
> 

"rpmbuild -bp foo.spec" and then tar the build dir. That's not what's done
in Fedora, though.

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread stan

Steve wrote:
 "Mikkel L. Ellertson"  wrote: 



One way is to create your own patch that is used after the original
patch. Add it to the end of the patch list.


Yukk!! That will get really tiresome really quickly. At this point I don't 
really know what I'm looking for so I may end up having to add debug statements 
to several files.

Is there a way to apply all the patches to the source code and them remove them 
from the spec file?

Steve

I don't know if this is possible, but if it is it's a lot easier to just change the compile to be a debugging version 
and run gdb on the result.  There should be a switch, but if there isn't just change the CFLAGS to use -ggdb -Wall -O0.


Of course, it depends on what you're debugging as to whether this is feasible.

HTH

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread Kevin Kofler
Steve wrote:
> Is there a way to apply all the patches to the source code and them remove
> them from the spec file?

Yet it's the right way. It's how we packagers always work.

Kevin Kofler

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread Dennis Gilmore
On Tuesday 10 February 2009 09:52:14 am Steve wrote:
> I downloaded a src rpm, built it using rpmbuild and the spec file and ran
> it. So far, so good. Now I want to modify the source to add some debugging
> statements. The problem is that the src rpm contains a number of patches
> and one of the patches is to the file I want to modify. Now when I
> rpmbuild, the patching fails because the source file it is trying to patch
> doesn't look the same.
>
> What is the Fedora way of dealing with this situation?
>
> Let me know if this needs to be moved to the devel list.
do a rpmbuild -bpthen you can can go into the prepared source and 
make you patch toapply in the spec. I almost have a new fedora-packager update 
ready  which will allow anonmous checkouts of fedora packages from cvs  you 
can grab the script from https://fedorahosted.org/fedora-
packager/browser/src/fedora-cvs.py  it requires you have PyOpenSSL and cvs 
installed

Dennis

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread Matthew Saltzman
On Tue, 2009-02-10 at 11:58 -0500, homb...@tips-q.com wrote:
> On Tue, 10 Feb 2009 10:52:14 -0500
> Steve  wrote:
> > the src rpm contains a number of patches
> > and one of the patches is to the file I want to modify.
> > Now when I rpmbuild, the patching fails because the
> > source file it is trying to patch doesn't look the same.
> > 
> > What is the Fedora way of dealing with this situation?
> > 
> Once you modify a package your warranty is null and void ;-)
> 
> Edit the patch and make a note in the spec file. 

I was going to suggest "rpmbuild -bp" which unpacks and applies included
patches.  Then edit the patched file and create a patch of your own.
Add it to the spec file after the other patch, so yours is applied after
the included one.  Then do the full build.

> 
-- 
Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread homburg
On Tue, 10 Feb 2009 14:00:23 -0500
Steve  wrote:

> 
> Is there a way to apply all the patches to the source
> code and them remove them from the spec file?

Have you looked at the patches? At the risk of being
an apostate, you might not need them in the first place.
"fix_errors_rendering_khmen" might not be necessary unless
you live in Cambodia. In that case, you can just comment
them out in the spec file. 

-- 
"Neither Lifestyle nor Agenda"
http://www.tips-Q.com

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread Mikkel L. Ellertson
Steve wrote:
>  "Mikkel L. Ellertson"  wrote: 
>> One way is to create your own patch that is used after the original
>> patch. Add it to the end of the patch list.
> 
> Yukk!! That will get really tiresome really quickly. At this
> point I don't really know what I'm looking for so I may end up having to
> add debug statements to several files.
> 
> Is there a way to apply all the patches to the source code and
> them remove them from the spec file?
> 
> Steve
> 
Well, if you are debugging the program, you would probably be better
off running "rpmbuild -bp " and then make your changes in
the build directory. Then run make manually. You can do this all as
a normal user. Depending on what you are building, you may be able
to run it as a normal user from the build directory. If not, you are
probably going to override the make file so it installs relative to
your home directory. Once you have it debugged, you can transfere
the changes to the virgin source with a patch, or pass them upstream...

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread Steve

 "Mikkel L. Ellertson"  wrote: 
> Steve wrote:
> > I downloaded a src rpm, built it using rpmbuild and the spec file
> > and ran it. So far, so good. Now I want to modify the source to add
> > some debugging statements. The problem is that the src rpm contains
> > a number of patches and one of the patches is to the file I want to
> > modify. Now when I rpmbuild, the patching fails because the source
> > file it is trying to patch doesn't look the same.
> > 
> > What is the Fedora way of dealing with this situation?
> > 
> > Let me know if this needs to be moved to the devel list.
> > 
> > Thanks,
> > Steve.
> > 
> One way is to create your own patch that is used after the original
> patch. Add it to the end of the patch list.

Yukk!! That will get really tiresome really quickly. At this point I don't 
really know what I'm looking for so I may end up having to add debug statements 
to several files.

Is there a way to apply all the patches to the source code and them remove them 
from the spec file?

Steve

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread homburg
On Tue, 10 Feb 2009 12:42:54 -0500
James Kosin  wrote:

> homb...@tips-q.com wrote:
> >> What is the Fedora way of dealing with this situation?
> >>
> > Once you modify a package your warranty is null and
> > void ;-)
> > 
> 
> Actually, there is NO WARRANTY of any sort.
> 
My sarcasm projector is obviously out of warranty ;-)

-- 
"Neither Lifestyle nor Agenda"
http://www.tips-Q.com

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread Mikkel L. Ellertson
Steve wrote:
> I downloaded a src rpm, built it using rpmbuild and the spec file
> and ran it. So far, so good. Now I want to modify the source to add
> some debugging statements. The problem is that the src rpm contains
> a number of patches and one of the patches is to the file I want to
> modify. Now when I rpmbuild, the patching fails because the source
> file it is trying to patch doesn't look the same.
> 
> What is the Fedora way of dealing with this situation?
> 
> Let me know if this needs to be moved to the devel list.
> 
> Thanks,
> Steve.
> 
One way is to create your own patch that is used after the original
patch. Add it to the end of the patch list.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread James Kosin
homb...@tips-q.com wrote:
>> What is the Fedora way of dealing with this situation?
>>
> Once you modify a package your warranty is null and void ;-)
> 

Actually, there is NO WARRANTY of any sort.




signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: rpmbuild question - follow on to gcc issues

2009-02-10 Thread homburg
On Tue, 10 Feb 2009 10:52:14 -0500
Steve  wrote:
> the src rpm contains a number of patches
> and one of the patches is to the file I want to modify.
> Now when I rpmbuild, the patching fails because the
> source file it is trying to patch doesn't look the same.
> 
> What is the Fedora way of dealing with this situation?
> 
Once you modify a package your warranty is null and void ;-)

Edit the patch and make a note in the spec file. 

-- 
"Neither Lifestyle nor Agenda"
http://www.tips-Q.com

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


rpmbuild question - follow on to gcc issues

2009-02-10 Thread Steve
I downloaded a src rpm, built it using rpmbuild and the spec file and ran it. 
So far, so good. Now I want to modify the source to add some debugging 
statements. The problem is that the src rpm contains a number of patches and 
one of the patches is to the file I want to modify. Now when I rpmbuild, the 
patching fails because the source file it is trying to patch doesn't look the 
same.

What is the Fedora way of dealing with this situation?

Let me know if this needs to be moved to the devel list.

Thanks,
Steve.

 

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines