Mike Burger wrote:
> 
> Yup...you just "rpm -i this-program-version.src.rpm" (I think I wrote this
> in another message).
> 
> This drops a tar.gz file in /usr/src/redhat/SOURCES which you can monkey
> with.
> 
> On Fri, 29 Dec 2000, rpjday wrote:
> 
> > On Thu, 28 Dec 2000, Michael Burger wrote:
> >
> > > It's actually a 2 step process.
> > >
> > > First, you "rpm --rebuild this-program-version.src.rpm"
> > >
> > > This will unpack the source code, and compile it into an i386.rpm,
> > > usually located in /usr/src/redhat/RPMS/i386.
> >
> > perhaps i'm overlooking the obvious, but is there an option to
> > just unpack a src.rpm file under /usr/src/redhat if i wanted to
> > poke around the source -- no compiling or installing.
> >
> > rday

  It's a bit more complex that that.  Installing a src.rpm installs the
sources, patches, and spec file used to build the rpm.  Patches, and
sources are stored in SOURCES, while psec files are in SPECS.  There
always is a spec file, while source files and patch files are optional.
Patches are generally diff applied via patch, while source files are
often tar files.  It's important to realize that you can do some really
wierd stuff in a spec file.  I've seen patches that were sed scripts,
and source file that were replacement .c files.  It's even possible for
old patches, and source files to be included in a src.rpm, but not
actual used in the build proccess.

  In order to get the source used to build a binary rpm you may need to
look at the spec file to see what patches were applied in what order. 
It's also handy to look at the commands used to compile and install.  I
generally cheat if I'm not building a rpm.  I cd in
/usr/src/redhat/SPECS and do a "rpm -ba <rpm name>".  Then I wait untill
the rpm build proccess finishes untaring, patching, and starts
compiling.  I then kill the build, and cd into the BUILD directory.  Now
you have the same source used to make the rpm.


-- 
Solving people's computer problems always
requires more hardware be given to you.
(The Second Rule of Hardware Acquisition)
Samuel J. Flory  <[EMAIL PROTECTED]>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to