[Techtalk] Installing from RPM vs. source

Mandi mandi at linuxchick.org
Sun Feb 23 18:40:26 EST 2003


On Sun, 23 Feb 2003, Brenda Bell wrote:

> How do you figure out which method is appropriate?
> 
> I like installing from RPM's if I can... and for stuff like compilers
> and libraries, it's a no-brainer.  Where I have a problem is
> installing software like MySQL or PHP.  Every once in a while, I come
> across something that I can install using either method; if I build
> from source, there might be options I want to enable or disable, like
> SSL, for example.
> 
> How do you find out exactly what's been enabled in the RPM version?
> 

Get hold of the source rpms.  The filenames end in .src.rpm.  

Install the source rpm with rpm -i.  This will place the .tar.gz files for 
the rpm in /usr/src/redhat/SOURCES or /usr/src/RPM/SOURCES depending on 
distro.  in /usr/src/redhat/SPECS (or equivalent), there will be a 
"specfile".  this is usually called <packagename>.spec, and will contain 
information about how the package is compiled.

specs are divided into sections and have a number of "bookkeeping" 
features in them for the rpm database.  You'll want to look in the %build 
section for the options the package is to be built with.

Usually, if you want stuff compiled in that your vendor doesn't usually 
enable, changing the specfile and using "rpmbuild -ba specfile" will give 
you your own version of the rpms, so you get all the dependencies into 
your database.  You can also upgrade packages to new versions if your 
vendor doesn't.  Especially for stuff like PHP, which is only one tarball, 
throwing the new tarball into /usr/src/redhat/SOURCES and rebuilding is 
pretty simple.

I don't have a good link on rpm right now.  I know there's a book coming 
out in the spring that is supposed to be ok (i know one of the editors), 
but as far as good stuff on the web, it's thin.

HTH!

--mandi



More information about the Techtalk mailing list