[KLUG Members] building from rpm source

Tony Gettig members@kalamazoolinux.org
01 Jun 2002 13:17:56 -0400


Yep, sorry about that. I'm actually doing this (as root):

rpm -ivh mypackage.src.rpm
rpm --rebuild mypackage.src.rpm

<momentary pause as Tony slaps himself for impersonating an end
user...WHACK...ah, that's better :) >

Looking at the man page, I thought maybe rpm -ba would work, but that
requires a spec file. I have no spec file, just the .src.rpm.

But I got to thinking, if I installed the source rpm, where did it go?
Thanks to your message, I got to looking in /usr/src/redhat and found
what looked to be the directory of the source in BUILD. Sure enough, I
found it. rpm --rebuild in here (a .spec file was present now) didn't
work, but configure, make, and make install did. So, now my app is
installed. 

Is there a better method for installing from source rpm? 

Tony

On Sat, 2002-06-01 at 12:37, Dennis wrote:
> Tony Gettig wrote:
> > 
> > I usually just grab the rpm for whatever app I'm trying to install, or
> > grab the tarball and compile it. But I thought hey, I wanna learn how to
> > install from a source rpm. Nothing better to do on a Friday night at
> > 11:40 PM. :)
> > 
> > So here's what I did:
> > 1) rpm -ivh mypackage.rpm
> > 2) rpm --rebuild mypackage.rpm
> > 
> > Well, that fails with the message "tar: Warning: the -I option is not
> > supported; perhaps you meant -j or -T?"
> > 
> > I get the same message when using the --recompile option.
> > 
> > Amy I doing this right? Is there a better way? Any pointers in the right
> > direction are appreciated. A few variations searching for this error on
> > Google didn't give me any ideas. Thanks tons!
> > 
> > --
> > Tony Gettig
> 
> #1 - Don't do #1 yet. And, 'mypackage.rpm' is a .src.rpm, isn't it?
> #2 Did you su to root? I think you have to be root to access
> /usr/src/redhat/RPMS/<i386>, that is where the default of rpm --rebuild
> will put the new rpm, at least on my machine.
> 
> Once you rebuild the src.rpm it will put an rpm in
> /usr/src/redhat/RPMS/<i386> that you can then rpm -ivh
> /usr/src/redhat/RPMS/<i386>/<mypackage.rpm>
> 
> man rpm is your friend.
> -- 
> Dennis