LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2004, 11:45 PM   #1
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
Source RPM help needed


Hi,
I am trying to compile some source RPMS under FC2
I have a tree created ~/rpm .... under it I have the BUILD SOURCES SRPMS RPMS tmp ...
I downloaded a source rpm (libjpeg-6b. ... 31 .. src.rpm)

When I try to install RPM by
rpm -iv lib*.src.rpm
It always extracts to the SOURCES directory.
It doens't really do much execpt to pull out the tarball from the package and dumps it there.
The corrrect behaviour should be that it should create
~/rpm/BUILDS/ libjpeg-6b . .. and un-tar the stuff there.
It does put the .spec file in the SPECS directory.. that's the only right thing it does !!

Now I can move files around by hand and untar and move on, but it's a drag and seems like something is wrong. I can't figure it out.

I do have a ~/.rpmmacros and .rpmrc (standard stuff I pulled out from mandrake howto)

Actually the behaviour seems not to change much no matter how much detail i put
in the rpmmacros
I started with _topdir .. and defined everything else .. (dest/srpm ... etc. )

I tried -vv flag and it doesn't really tell you much.
I have looked at the spec file and it looks fine ... it has the righ .prep commands, actually I tried a bunch of RPMS and all look same (so must be right :-))

All the permissions are 777 EVERYwhere

Am I missiig something . ? any help will be appreciated.
 
Old 10-25-2004, 12:11 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Yes. You are missing something; quite a lot actually. A .src.rpm is just that; source code (think tarball). A .src.rpm consista of a tarball, a spec file, and possibly one or more patch files. You have to compile a .src.rpm to get an installable binary rpm (read 'an application you can run').
When you install a .src.rpm, as you found, you get a tarbal and a spec file. It won't do anything until you compile it to make an installable binary rpm and install it (I respectfully suggest that you do some basic research and reading on the subject - Max-rpm from RedHat would be a good place to start).
Now that I have vented my spleen, here's what to do.
cd to the SPECS directory. You should find there a file called <rpm filename>.spec (substitute the name of the file for <rpm filename>).
Issue the command rpm -bb <filename>.spec (to build an installable binary rpm). If all goes well, at the end, you will find in the RPMS directory, probably in the i386 folder (unless you specified otherwise) and brand-spanking-new installable binary rpm which you can install in the usual maner.
If you don't find it there, look in the default location: /usr/src/<distroname>/RPMS (/usr/src/packages in SuSE). It should be in one of the folders there.
Once again, with respect, from the content of your post, you do not understand the ins and outs of rpm, and .src.rpm. Do yourself a favor and do some homework. Once you have a firm grasp of rpm, the possibilities are awesome. I once couldn't find an upgrade to webmin that I wanted, except in tarball. With Max-rpm and a copy of the spec file from an earlier version which I could edit, I successfully created an rpm which I used to upgrade my webmin installation. From that experience I learned a lot about rpm.
 
Old 10-25-2004, 12:42 PM   #3
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Original Poster
Rep: Reputation: 31
Thanks .. but

I looked for a manual for RPM on redhat site, but you can't find the doc unless you say MAX-RPM .. thanks for that.
I have gone thru the document, it's nice but leaves some questions unanswred.

- there is a slighthly easier path to "install" source RPMS .. (not mentioned AT-ALL in the MAX-RPM "book")

rpmbuild <source_rpm>
with the approrpiate option is cleaner and simpler than multistep operatons of ..
rpm -i <source rpm > to be followed by
rpm -b[abc] <rpm spec file>
(and some hand cleaning to get rid of tarballs and patch files from SOURCES)

The documnetaion is elaborate but doesn't still clarify a couple of questions .. particular installing header files that you would need for dependent packages !!

-
 
  


Reply



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
Idiot's guide to installing 'linux-source.src.rpm' in SuSE 9.1 personal needed! ZephyrAnima Linux - Newbie 1 08-12-2004 11:28 AM
binary vs source RPM (and other RPM questions) calimer Linux - Software 4 06-22-2003 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:47 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