On Tue, Jul 23, 2002 at 04:01:01AM -0000, Rob Wellesley <[EMAIL PROTECTED]> wrote:
> 
> Hi all
> 
> Examining the guts of existing RPMs seems like a good way to start
> learning how to build them. How do I get beyond rpm -qip or - ql and
> actually read the internal scripts?

Well, the *direct* answer is "rpm -q --scripts", but that's going
about things the wrong way.

What you want to do is get the *source* RPMs and install them, and
take a look at what they contain. A source RPM (*.src.rpm) isn't a
ready-to-run program, and installing it doesn't install the program on
your system - it just sticks the bits of the source RPM in the right
place in your development area ready to be modified and then built
into "normal" RPMs.

Step One of this document

  http://www.e-smith.org/content/howto/e-smith-interface_rpm.html

shows you how to set up a development area on a Red Hat system so you
don't have to work with source RPMs as root. Once you've done that,
just install the source RPM --

   rpm -i foo-1.0-1.src.rpm

and take a look at the source and patches in $HOME/rpms/SOURCES/, and
the spec file from which it is built in $HOME/rpms/SPECS/.

One useful tutorial on RPM building is the free book (!) "Maximum
RPM", available at http://www.rpm.org/max-rpm/ -- the chapter on
developing RPMs begins at http://www.rpm.org/max-rpm/p5208.html .

Hope this helps,

  -Rich

-- 
------------------------------ Rich Lafferty ---------------------------
 Systems Administrator/Support Engineer, Network Server Solutions Group
    Mitel Networks, Ottawa, ON                 +1 613 592 2122 (x2513)
---------------------------- [EMAIL PROTECTED]  ------------------------

--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to