discuss: Draft proposed HOWTO on RPM-building trick and traps


Previous by date: 26 Aug 2004 23:39:47 -0000 Draft proposed HOWTO on RPM-building trick and traps, Eric S. Raymond
Next by date: 26 Aug 2004 23:39:47 -0000 Re: Draft proposed HOWTO on RPM-building trick and traps, Binh Nguyen
Previous in thread: 26 Aug 2004 23:39:47 -0000 Draft proposed HOWTO on RPM-building trick and traps, Eric S. Raymond
Next in thread: 26 Aug 2004 23:39:47 -0000 Re: Draft proposed HOWTO on RPM-building trick and traps, Binh Nguyen

Subject: Re: Draft proposed HOWTO on RPM-building trick and traps
From: Saqib Ali ####@####.####
Date: 26 Aug 2004 23:39:47 -0000
Message-Id: <20040826233946.28108.qmail@web13523.mail.yahoo.com>

For easier viewing:

HTML:
http://www.xml-dev.com:8080/tldp/http://www.xml-dev.com/xml/RPM-building.xml

PDF:
http://www.xml-dev.com:8080/tldp_pdf/http://www.xml-dev.com/xml/RPM-building.xml

Thanks.
Saqib Ali
http://validate.sf.net

--- "Eric S. Raymond" ####@####.#### wrote:

> -- 
> 		<a href="http://www.catb.org/~esr/">Eric S.
> Raymond</a>
> > <?xml version="1.0"?>
> <!DOCTYPE article PUBLIC 
>     "-//OASIS//DTD DocBook XML V4.1.2//EN" 
>     "docbook/docbookxx.dtd" [
> <!ENTITY howto         "http://www.tldp.org/HOWTO/">
> <!ENTITY mini-howto   
> "http://www.tldp.org/HOWTO/mini/">
> <!ENTITY home          "http://www.catb.org/~esr/">
> ]>
> 
> <article>
> 
> <articleinfo>
>   <title>RPM Builder's Tricks and Traps
> HOWTO</title>
> 
> <author>
>   <firstname>Eric</firstname>
>   <othername>Steven</othername>
>   <surname>Raymond</surname>
>   <affiliation>
>     <orgname><ulink url="&home;">Thyrsus
> Enterprises</ulink></orgname> 
>   </affiliation>
> </author>
> 
> <revhistory>
>    <revision>
>       <revnumber>1.9</revnumber>
>       <date>2004-08-26</date>
>       <authorinitials>esr</authorinitials>
>        <revremark>
>          First draft.
>        </revremark>
>    </revision>
> </revhistory>
> 
> <abstract>
> <para>Help for the perplexed RPM builder; solution
> recipes, with
> examples, for common RPM-building problems.</para>
> </abstract>
> </articleinfo>
> 
> <sect1><title>Introduction</title>
> 
> <para>Though the RPM package format is a vitally
> important tool for
> open-source package distribution, it is both complex
> and very poorly
> documented.  It has been difficult to discover
> solutions to many 
> common RPM-building problems, and specfile
> composition is something 
> of a black art.  This HOWTO presents solutions to
> common problems, and
> gives examples you can modify to use yourself.  We
> assume basic 
> familiarity with RPM.</para>
> 
> <sect2 id="newversions"><title>New versions of this
> document</title>
> 
> <para>You can also view the latest version of this
> HOWTO on the World Wide Web
> via the URL <ulink
> url="&howto;Linksys-Blue-Box-Router-HOWTO.html">
> &howto;Linksys-Blue-Box-HOWTO.html</ulink>.</para>
> </sect2>
>     
> <sect2 id="license"><title>License and
> Copyright</title>
> 
> <para>Copyright (c) 2004, Eric S. Raymond.</para>
> 
> <para>Permission is granted to copy, distribute
> and/or modify this document
>       under the terms of the GNU Free Documentation
> License, Version 1.2
>       or any later version published by the Free
> Software Foundation;
>       with no Invariant Sections, no Front-Cover
> Texts, and no Back-Cover Texts.
>       A copy of the license is located at <ulink
>
url="http://www.gnu.org/copyleft/fdl.html">www.gnu.org/copyleft/fdl.html</ulink>.</para>
> 
> <para>Feel free to mail any questions or comments
> about this HOWTO to Eric
> S. Raymond, ####@####.####
> </para>
> 
> </sect2>
> 
> </sect1>
> <sect1><title>Frequently-Asked Questions</title>
> 
> <sect2 id='path_macros'><title>How do I make my RPMS
> distro-independent?</title>
> 
> <para>In general this question does not have a
> well-defined answer,
> since you can't know what the installation
> environment for your RPM
> will be.  But there are some practices you can use
> to make it much
> more likely that you'll get a clean install
> anywhere.  One is to use 
> path macros, and the other is to rely only on a
> minimum set of tools
> at RPM installation time.</para>  
> 
> <para>Path macros are supposed to be set up properly
> by your distro
> packager, so that (for example) if Foobaz Linux
> normally puts commands
> in <filename>/foobaz/bin</filename> the macro
> %{_bindir} in your specfile
> will expand to <filename>/foobaz/bin</filename>. 
> The point is for your
> specfile not to have to worry about it.</para>
> 
> <para>So, use path macros instead of absolute paths.
>  Here are some
> lines extracted from a real specfile that illustrate
> how to do
> this:</para>
> 
> <programlisting>
> %files
> %defattr(-,root,root,-)
> %doc README INSTALL COPYING gpsd.xml libgps.xml
> libgpsd.xml HACKING TODO
> %attr(755, root, root) %{_bindir}/gpsd
> %{_mandir}/man1/gpsd.1*
> %{_libdir}/libgps.a
> %{_mandir}/man3/libgps.3*
> %{_mandir}/man3/libgpsd.3*
> </programlisting>
> 
> <para>To find out what path macros are available,
> type <command>rpm
> &ndash;&ndash;showrc</command>. This will dump a lot
> of information to
> standard output, probably more than you want.  You
> can filter it
> effectively with
>
<citerefentry><refentrytitle>grep</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
> Here are a few of the most important ones and what
> they default
> to:</para>
> 
> <informaltable>
> <tgroup cols='2'>
> <thead>
>
<row><entry>Macro</entry><entry>Default</entry><entry>Used
> for</entry></row>
> </thead>
> <tbody>
> <row>
>    <entry>{%_bindir}</entry>
>    <entry>/usr/bin</entry>
>    <entry>User commands</entry>
> </row>
> <row>
>    <entry>{%_libdir}</entry>
>    <entry>/usr/lib</entry>
>    <entry>Libraries</entry>
> </row>
> <row>
>    <entry>{%_mandir}</entry>
>    <entry>/usr/share/man</entry>
>    <entry>Manual pages</entry>
> </row>
> <row>
>    <entry>{%_sysconfdir}</entry>
>    <entry>/etc</entry>
>    <entry>System configuration files</entry>
> </row>
> </tbody>
> </tgroup>
> </informaltable>
> 
> <para>The tools you can rely on having at
> installation time are those
> specified in the <ulink
> url='http://www.linuxbase.org/'>Linux Standard
> Base</ulink>. Look in their Specification for the
> section on
> <citetitle>Commands and Utilities</citetitle>. 
> Note, however, that
> though
>
<citerefentry><refentrytitle>ldconfig</refentrytitle><manvolnum>1</manvolnum></citerefentry>
> is not on that list, you will need to use it when
> installing a
> library.</para>
> 
> </sect2>
> <sect2><title>What is the trick for building RPMs as
> a non-root user?</title>
> 
> <para>There are two things you need to do to build
> RPMs 
=== message truncated ===> ______________________
> http://lists.tldp.org/


=====
In Peace
Saqib Ali
http://validate.sf.net  Online DocBook XML -> HTML/PDF Transformer


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Previous by date: 26 Aug 2004 23:39:47 -0000 Draft proposed HOWTO on RPM-building trick and traps, Eric S. Raymond
Next by date: 26 Aug 2004 23:39:47 -0000 Re: Draft proposed HOWTO on RPM-building trick and traps, Binh Nguyen
Previous in thread: 26 Aug 2004 23:39:47 -0000 Draft proposed HOWTO on RPM-building trick and traps, Eric S. Raymond
Next in thread: 26 Aug 2004 23:39:47 -0000 Re: Draft proposed HOWTO on RPM-building trick and traps, Binh Nguyen


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.