aperahama Posted July 20, 2004 Report Share Posted July 20, 2004 I was looking for a package recently but only found it as a src.rpm. How am I able to install from src.rpm. I recall seeing some instructions some time ago but I am unable to find them now. Quote Link to comment Share on other sites More sharing options...
spiedra Posted July 20, 2004 Report Share Posted July 20, 2004 From a ternminal, cd to the directory containing the src.rpm su to root rpm --rebuild whatever.src.rpm After it is done compilling, it will leave you with an rpm in /usr/src/RPM/RPMS/i586 Cd to that directory and rpm -ivh whatever.rpm Quote Link to comment Share on other sites More sharing options...
Qchem Posted July 20, 2004 Report Share Posted July 20, 2004 I hate building rpms as root, I prefer creating my own rpmbuild directory for these kind of things: cd ~ cp -a /usr/src/RPM/ rpmbuild echo '%_topdir %(echo $HOME)/rpmbuild' >> .rpmmacros This is slightly adapted from what I did on fedora, I'd assume it'll work on mandrake too. Quote Link to comment Share on other sites More sharing options...
aperahama Posted July 20, 2004 Author Report Share Posted July 20, 2004 Thanks for your help Quote Link to comment Share on other sites More sharing options...
bvc Posted July 20, 2004 Report Share Posted July 20, 2004 rpmbuild --rebuild <name.src.rpm> Used to be different. rpm --rebuild was to be done away with and rpmbuild --rebuild the new way but since rpm --rebuild is still around I'd imagine they do the same/call the same scripts. You use to actual get errors with rpm --rebuild and didn't with rpmbuild --rebuild when nvidia was still available as src.rpm's. Which was proof enough for me that they were different. I don't mess with src.rpms anymore. If I need source I use the tarballs so I don't know what the story is anymore with the 2 commands. Point is, use rpmbuild. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted July 21, 2004 Report Share Posted July 21, 2004 # rpmbuild --rebuild <pack.src.rpm> If anything goes wrong (dependencies that should not be there, or something else), you can try # rpm -i <pack.src.rpm> # cd /usr/src/RPM # <edit with vi or other...> SPECS/<pack>.spec (adapt as needed) # rpm -bb ./SPECS/<pack>.spec If still things go wrong, get sources from /usr/src/RPM/SOURCES. Yves. Quote Link to comment Share on other sites More sharing options...
spiedra Posted July 21, 2004 Report Share Posted July 21, 2004 (edited) Wow fancy that. A new way of rebuilding rpms? Where was I? Edited July 21, 2004 by spiedra Quote Link to comment Share on other sites More sharing options...
bvc Posted July 21, 2004 Report Share Posted July 21, 2004 Wow fancy that. A new way of rebuilding rpms? Where was I? <{POST_SNAPBACK}> :lol: getting married..... ....moving.... ---living--- Quote Link to comment Share on other sites More sharing options...
cptaylor Posted July 21, 2004 Report Share Posted July 21, 2004 (edited) Could some one briefly tell us what the pros and cons are of installing using each of the above methods,ie. binary rpms, source rpms, and source tarball. Obviously binary rpms have the advantage of being the easiest for a newb and it seems the tarballs have the advantage of being available soonest since they are not platform dependent. How about the source rpms? I've never used them. Edited July 21, 2004 by cptaylor Quote Link to comment Share on other sites More sharing options...
Qchem Posted July 21, 2004 Report Share Posted July 21, 2004 A source rpm basically contains the source code, any patches and a SPEC file. The SPEC file allows the creation of a binary rpm as it contains all the necessary data for their production, such as which source code to use, what files will be produced etc. Basically you should only need a src rpm if a binary isn't available or you want to build your own rpm with a newer version of a program or a different patch applied. It is best to build new rpms as a mortal user so processes are unneccessairly running as root from the newly created binary, its more secure.. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted July 21, 2004 Report Share Posted July 21, 2004 RPM are good for dependancy tracking. Using RPM also makes it easier to uninstall, and: - to know what files are part of a given package, - to know what package a file belongs to, - to make sure one package's files won't override another's. ... That's why if you have choice between package-A.B.C.tgz, and package-A.B.C-src.rpm (which is basically the same, plus a spec file), you'd better try first with the src.rpm. And you don't need to download the .tgz file because in case of failure with the src.rpm file, you can break it apart and get the source tarball from inside (see previous post). That being said, I do a lot of tarball installing. But I am very prudent at it: - I always (as far as possible) compile with --prefix=/opt/<packagename>, so that all my compiles end-up under /opt/ after make install. - I wrote a script that "installs" man, bin, sbin, include, lib... from /opt/<prog>/ into /usr/local/ using symlinks (in the spirit of GoboLinux) while taking care of conflicts; And another script that is for uninstall. Yves. Quote Link to comment Share on other sites More sharing options...
spiedra Posted July 21, 2004 Report Share Posted July 21, 2004 (edited) getting married..... ....moving.... ---living--- Ah yes. It's been a busy year. Edited July 21, 2004 by spiedra Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.