[Techtalk] RPM proceedures & practices

Mandi mandi at linuxchick.org
Fri Jan 24 16:47:27 EST 2003


On Fri, 24 Jan 2003, Andrew wrote:

> 	Hi All,
> 	I have rpm issues(-:  Is it ok to rpmbuild --rebuild a existing (plain) rpm? 

rpmbuild is for use with source rpms:  srpm or src.rpm files.  it creates 
binary packages (what you normally think of as an rpm) from the source 
rpm.  you can also sometimes use it with tarballs.

with a plain rpm, rpmbuild won't know what to do, as it's looking for a 
specification ("spec") file that will tell the rpmbuild process how to 
treat the source code in the package.

> So to be sure it will work? Or is there another way to insure the rpm 
> just downloaded is more likely to work with your current system?

if you have an rpm you want to install or upgrade, you can add the --test 
option to rpm, and it will give you some notion as to whether anything 
heinous is going to go on.  

> 	Is it better to simply leave it alone. I downloaded what I hope is the 
> correct rpm for my mandrake dist. 
> 	

mandrake packages hundreds of packages.  if you're sure the package you 
want wasn't available for your release, you may want to try getting the 
source rpm and making sure the .spec file actually has requirements in it.

for example, the section of the openssh spec file that deals with this 
looks like:

Provides:   ssh
PreReq:     openssl >= 0.9.5a
BuildRequires:  perl openssl-devel tcp_wrappers-devel pam-devel 
gnome-libs-devel db1-devel zlib-devel

meaning that the package will provide ssh, to install it you will have to 
have openssl newer than 0.9.5a, and to build it you will need a whole 
buncha libraries.  rpm will warn me if my system doesn't meet this 
minimum.  however, if the spec file for the package you want to install 
doesn't have any listings for PreReq especially, you may want to build 
from source but not install to see if you come across any odd behavior 
before installing the rpm.

developers are far more adept now at building rpms than they were four or 
five years ago.  i haven't pulled anything off the net in the past couple 
years that has been really destructive, though i got a couple where the 
spec file wasn't really complete

--mandi



More information about the Techtalk mailing list