Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Rep:
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.
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.
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Original Poster
Rep:
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 !!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.