LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-10-2003, 04:51 AM   #1
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
how to use the source (rpm)?


It is reletively easier to use the tar ball to install.

While could anybody tell me how to recompile the source rpm?
My specific question is:

1. where can I find the source which rpm installs?
2. how to compile? (gcc or something? do I need additional option?)

Really I am new to this. Thank you for any input.

Qu Chen
 
Old 07-10-2003, 05:01 AM   #2
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 55
you just have to find a whateverprogram.src.rpm package and do:
rpm -i whateverprogram.src.rpm
it will put the files for example if you're using redhat in /usr/src/redhat . Where you will find the spec and source directories. You can create an rpm from there, www.rpm.org,
or just take the source and compile it as always, using ./configure make and make install.
 
Old 07-10-2003, 05:07 AM   #3
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
Really Thank you very much aizkorri.
I am using RH9. Do you mean the rpm command rpm -i whateverprogram.src.rpm, would likely to put everything in /usr/src/redhat/whateverprogram?

And as for the compile, do you mean the process is identical to the "tar.gz" format? if so what is the difference between these two?

Sorry for the basic question but I am really new.

Qu Chen
 
Old 07-10-2003, 05:21 AM   #4
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 55
If you want to install a rpm, you don't have to compile anything, you just look for e.g emacs-20.7-1.i386.rpm in the net if you want to install emacs and then type this as superuser:
rpm -i emacs-20.7-1.i386.rpm --without src

If you want to find the tar.gz files, in /usr/src/redhat you have this directories:
SPECS RPMS SOURCES, and some more. After doing rpm -i
yourFile.src.rpm In SOURCES you'll find the source code, it is actually a tar.gz file.

In the other hand, you can create a new rpm changing what you want or just creating againg the rpm in the way it is explained in the web page I gave to you.
 
Old 07-10-2003, 05:27 AM   #5
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
Ah, again thank you aizkorri.
I now understand the output of rpm -i whateverprogram.src.rpm is a tar.gz file in /usr/src/redhat/SOURCE
Really your explaination helps me a lot

Qu Chen
 
Old 07-10-2003, 06:59 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you'd use "rpm -ta blah.src.rpm" to actually compiel the source rather than just installingt the source, which is generally pretty useless.
 
Old 07-10-2003, 07:15 AM   #7
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
Ah acid_kewpie. Thank you for your message. But would you tell me why installing the source is useless? Actually I have to try all the above thing when going back but I think it is OK if I use "rpm -i" and receive a tar.gz, or, there are some other things I need to know?

Besides, thank you for "rpm -ta blah.src.rpm". I think it will do everything and leave the executable file. While in this way, how could I see the "makefile" to know where the executable file is installed?

Sorry if my question sounds stupid... but sincerely thank you all.

Qu Chen
 
Old 07-10-2003, 07:19 AM   #8
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
And Chris, the number of your post is ...
 
Old 07-10-2003, 07:28 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i think it's -ta... might also be -tb, -ba or -bb, depending on how you want it built...

i just meant it was pointless as -i-ing it will just dump a tar.gz in /usr/src/RPM/SOURCES or similar, in which case you might have just got the source tarball in the first place...

as for where the binaries go.. doesn't matter. it'll be on your path somewhere, so just run it.
 
Old 07-10-2003, 10:32 AM   #10
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
Thanks again Chris. I think your last sentence means the binary would be put into the directory path redefined by some certain file (I forgot the exact name).

Thank you all

Qu Chen
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot build source rpm/ rpm questions kpachopoulos Fedora 3 07-24-2005 09:15 AM
how do I make a binary rpm from a source rpm darkone66669 Linux - Software 3 01-11-2005 10:42 AM
where does it go when rpm a rpm source file feetyouwell Linux - Software 1 09-03-2004 04:14 PM
Difference between src.rpm files and source.rpm files ja_nch Red Hat 2 09-06-2003 06:12 PM
binary vs source RPM (and other RPM questions) calimer Linux - Software 4 06-22-2003 12:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration