RPM's or source? (was: Can I upgrade with RPMs?)

R Shapiro yellowdog-general@lists.terrasoftsolutions.com
Thu Jun 20 07:35:01 2002


Graham Leggett writes:
 > Shawn Coomey wrote:
 > 
 >  > Is this a daunting
 > > prospect? Are there any good how-to's around on how to build an RPM?
 > 
 > rpm --rebuild package.src.rpm
 > 
 > That's it.

I think he's asking a different question: how do you build a binary
rpm if you don't have a src rpm?

The first thing to do is to look again for .src.rpm.  Chances are
you'll find one if you look hard enough.  At the very least, look on
rpmfind.net.  If you can't find one, see if the source tar includes a
.spec file.  If it does, try 'rpm --tarbuild' on the tar.

If this fails, you need to create the .spec yourself. This isn't
trivial but it's usually not very hard either.  The full rpm spec
language is fairly large but the commonly used subset is small and
pretty easy to use.  The big win here is that there are a _huge_
number of example .spec files around.  My recommendation is that you
look at some .spec files for packages that are more or less like the
one you're trying to build, and adapt one of them for use with the new
package.  To look at .spec file for package foo, just 'rpm -i' foo's
src.rpm.  The .spec will be installed in /usr/src/rpm/SPECS.

Once you have a work .spec file, put the source tar, patches, etc in
/usr/src/rpm/SOURCES and run 'rpm -ba' on the .spec file.  This will
build both a .ppc.rpm and .src.rpm.


 > > Also- What is the difference between an rpm install and apt-get?
 > 
 > Different products solving the same problem.

Right. The 'apt' system is part of Debian's handling of software
packages.  It's one of the things that distinguishes Debian linux from
RedHat/YellowDog linux.  The 'fink' package system for osx is based on
Debian's approach; it includes apt-get.

-- 
rshapiro@bbn.com