On Mon, Nov 13, 2000 at 02:01:20PM +0100, Wolfgang Pfeiffer wrote:
> > Just to give another angle as well: In cases like this I usually get the
> > SRPM instead of the RPM and rebuild that. In most cases the resulting,
> > new RPM will install without problem, as it will have been compiled
> > against the existing libraries.
> > 
> > [ ... ]
> 
> Isn't this (nearly?) the same as
> rpm -Fvh [filename]
> ??
> 
> ... just a question, because until now I do not know how to handle
> an SRPM ... sorry, I'm new to GNU/LINUX ...

Ok, then I'll try to be a bit clearer:

There are basically two types of RPM packages - the binary RPM (for x86
PCs typically ending in .i386.rpm, .i586.rpm or suchlike) which contains
the compiled program, ready to install. As the program is compiled
already, it is dependent on the libraries that were installed at compile
time on the machine it was compiled on, hence, your machine needs to
have the same or compatible libraries installed. That's what rpm is
asking for when it complains about dependencies.

The other type are SRPMs (ending in .src.rpm). Those contain the source
for the application, all necessary patches and extras as well as the
instructions for rpm to build a RPM out of the SRPM. As this is the
source, you can compile it on your own machine and it will then use the
libraries you have installed (if they fulfill the minimum requirements of
the application at all, i.e. a program developped for e.g. gtk+-1.2.8
will most likely not compile with gtk+-1.0.0 and things like that).
In many cases you can simply run the command
rpm --rebuild APPLICATION.src.rpm
to compile the SRPM into an RPM - you don't even have to know much about
compiling. If all goes well, you'll end up with a brandnew
APPLICATION.i386.rpm in /usr/src/redhat/RPMS/i386, which you can then
install the normal way.
Things get a bit more complicated if the rebuild fails - sometimes it's
simply because you haven't a certain library or its "devel" rpm
installed. E.g. an application that needs gtk+ will need the glib-devel
and gtk+-devel RPMs installed to compile successfully. Almost all SRPMs
will need the glibc-devel RPM installed - and of course the compiler
itself. If the failure is down to something like that, it's just a
matter of installing what's missing and rerunning the rebuild.
If that doesn't help, the only possibility would be to install and change
(debug) the SRPM, but that is definitely beyond the scope of a mail.
If you are interested in messing with that (don't worry, it might be
"advanced", but it's far from impossible!), you should have a look at
the RPM-HOWTO and browse the documentation available at
http://www.rpm.org

In the past I have often transferred apps from RHL 6.2 to my RHL 5.2 box
by grabbing the SRPM and rebuilding it, so that would be one example for
how it can be used. It's definitely worthwhile knowing about it.

HTH,

Thomas
-- 
             "Look, Ma, no obsolete quotes and plain text only!"

     Thomas Ribbrock | http://www.bigfoot.com/~kaytan | ICQ#: 15839919
   "You have to live on the edge of reality - to make your dreams come true!"



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to