[KLUG Members] Re: srpm packages

Bryan J. Smith members@kalamazoolinux.org
Wed, 06 Feb 2002 13:00:33 -0500


Rusty Yonkers wrote:
> Here is yet another question to show my lowly humbleness in regards to linux
> expertise.
> I see references to source rpm files.  They say that I can download them and
> then run them to create an rpm file.  Does this mean that I download the
> srpm, run it according to the instructions and then run rpm on the resulting
> file to install it?

Yes!  Exactomundo!

E.g., on RedHat:

   rpm --rebuild blah.src.rpm

Usually outputs one or more .i386.rpm files in:

   /usr/src/redhat/RPMS/i386  

Other RPM-based distros have a similar default output location.

Rebuilding from source is a powerful way to get a package written
for one RPM distro to work on another.  *OR*, more specifically to
RedHat, to use an RPM from a newer version (e.g., 7.x) on an older
version (e.g., 6.x), where 6.x doesn't have the newer libraries and
support software of 7.x.

FYI ...

RPM comprises of a bunch of source packages (usually tarballs),
various patches (that are applied to the contents of the packages),
and a "SPEC" file.  The "SPEC" file tell how an RPM is to be built.

If you need to "manually intervene" in the the rebuilding process,
if you run, on RedHat:

   rpm -Uhv blah.src.rpm

You'll get files under:

   /usr/src/redhat/RPMS/SOURCES
   /usr/src/redhat/RPMS/SPECS

You'll want to goto the SPECS directory and issue "-bX" commands
(build).  This will allow you to control various "steps" of the
build process.

-- Bryan

-- 
Bryan J. Smith, Engineer        mailto:b.j.smith@ieee.org   
AbsoluteValue Systems, Inc.     http://www.linux-wlan.org
SmithConcepts, Inc.          http://www.SmithConcepts.com
---------------------------------------------------------
1999 IRS Data:  The top 1% of income earners pay over 36%
of the taxes, but have less than 20% of the total income.