Annotation of htdocs/docs/pkgsrc/introduction.html, revision 1.2

1.1       dsieger     1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                      2: <html>
                      3: <head>
                      4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
                      5: <title>Chapter 1. What is pkgsrc?</title>
1.2     ! rillig      6: <link rel="stylesheet" href="/global.css" type="text/css">
1.1       dsieger     7: <meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
                      8: <link rel="start" href="index.html" title="The pkgsrc guide">
                      9: <link rel="up" href="index.html" title="The pkgsrc guide">
                     10: <link rel="prev" href="index.html" title="The pkgsrc guide">
                     11: <link rel="next" href="users-guide.html" title="Part I. The pkgsrc user's guide">
                     12: </head>
                     13: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
                     14: <div class="navheader">
                     15: <table width="100%" summary="Navigation header">
                     16: <tr><th colspan="3" align="center">Chapter 1. What is pkgsrc?</th></tr>
                     17: <tr>
                     18: <td width="20%" align="left">
                     19: <a accesskey="p" href="index.html">Prev</a> </td>
                     20: <th width="60%" align="center"> </th>
                     21: <td width="20%" align="right"> <a accesskey="n" href="users-guide.html">Next</a>
                     22: </td>
                     23: </tr>
                     24: </table>
                     25: <hr>
                     26: </div>
                     27: <div class="chapter" lang="en">
                     28: <div class="titlepage"><div><div><h2 class="title">
                     29: <a name="introduction"></a>Chapter 1. What is pkgsrc?</h2></div></div></div>
                     30: <div class="toc">
                     31: <p><b>Table of Contents</b></p>
                     32: <dl>
                     33: <dt><span class="sect1"><a href="introduction.html#introduction-section">1.1. Introduction</a></span></dt>
                     34: <dd><dl>
                     35: <dt><span class="sect2"><a href="introduction.html#why-pkgsrc">1.1.1. Why pkgsrc?</a></span></dt>
                     36: <dt><span class="sect2"><a href="introduction.html#intro.platforms">1.1.2. Supported platforms</a></span></dt>
                     37: </dl></dd>
                     38: <dt><span class="sect1"><a href="introduction.html#overview">1.2. Overview</a></span></dt>
                     39: <dt><span class="sect1"><a href="introduction.html#terminology">1.3. Terminology</a></span></dt>
                     40: <dd><dl><dt><span class="sect2"><a href="introduction.html#term.roles">1.3.1. Roles involved in pkgsrc</a></span></dt></dl></dd>
                     41: <dt><span class="sect1"><a href="introduction.html#typography">1.4. Typography</a></span></dt>
                     42: </dl>
                     43: </div>
                     44: <div class="sect1" lang="en">
                     45: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
                     46: <a name="introduction-section"></a>1.1. Introduction</h2></div></div></div>
                     47: <p>There is a lot of software freely available for Unix-based
                     48: systems, which is usually available in form of the source code. Before
                     49: such software can be used, it needs to be configured to the local
                     50: system, compiled and installed, and this is exactly what The NetBSD
                     51: Packages Collection (pkgsrc) does. pkgsrc also has some basic commands
                     52: to handle binary packages, so that not every user has to build the
                     53: packages for himself, which is a time-costly task.</p>
                     54: <p>pkgsrc currently contains several thousand packages,
                     55:       including:</p>
                     56: <div class="itemizedlist"><ul type="disc">
                     57: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/apache/README.html" target="_top"><code class="filename">www/apache</code></a> - The Apache
                     58:          web server</p></li>
                     59: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/firefox/README.html" target="_top"><code class="filename">www/firefox</code></a> - The Firefox
                     60:          web browser</p></li>
                     61: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/README.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a> - The GNOME
                     62:          Desktop Environment</p></li>
                     63: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/kde3/README.html" target="_top"><code class="filename">meta-pkgs/kde3</code></a> - The K
                     64:          Desktop Environment</p></li>
                     65: </ul></div>
                     66: <p>...just to name a few.</p>
                     67: <p>pkgsrc has built-in support for handling varying dependencies,
                     68:       such as pthreads and X11, and extended features such as IPv6 support on
                     69:       a range of platforms.</p>
                     70: <div class="sect2" lang="en">
                     71: <div class="titlepage"><div><div><h3 class="title">
                     72: <a name="why-pkgsrc"></a>1.1.1. Why pkgsrc?</h3></div></div></div>
                     73: <p>
                     74: pkgsrc provides the following key features:
                     75: </p>
                     76: <div class="itemizedlist"><ul type="disc">
                     77: <li><p>Easy building of software from source as well as the creation
                     78:   and installation of binary packages. The source and latest
                     79:   patches are retrieved from a master or mirror download site, checksum
                     80:   verified, then built on your system. Support for binary-only
                     81:   distributions is available for both native platforms and NetBSD
                     82:   emulated platforms.</p></li>
                     83: <li><p>All packages are installed in a consistent directory tree,
                     84:   including binaries, libraries, man pages and other
                     85:   documentation.</p></li>
                     86: <li><p>Package dependencies, including when performing package updates,
                     87:   are handled automatically. The configuration files of various
                     88:   packages are handled automatically during updates, so local changes
                     89:   are preserved.</p></li>
                     90: <li><p>Like NetBSD, pkgsrc is designed with portability in mind and
                     91:   consists of highly portable code. This allows the greatest speed of
                     92:   development when porting to new a platform. This portability also
                     93:   ensures that pkgsrc is <span class="emphasis"><em>consistent across all
                     94:   platforms</em></span>.</p></li>
                     95: <li><p>The installation prefix, acceptable software licenses,
                     96:   international encryption requirements and build-time options for a
                     97:   large number of packages are all set in a simple, central
                     98:   configuration file.</p></li>
                     99: <li><p>The entire source (not including the distribution files) is
                    100:   freely available under a BSD license, so you may extend and adapt
                    101:   pkgsrc to your needs. Support for local packages and patches is
                    102:   available right out of the box, so you can configure it specifically
                    103:   for your environment.</p></li>
                    104: </ul></div>
                    105: <p>The following principles are basic to pkgsrc:</p>
                    106: <div class="itemizedlist"><ul type="disc">
                    107: <li><p>&#8220;<span class="quote">It should only work if it's right.</span>&#8221;
                    108: &mdash; That means, if a package contains bugs, it's better to find
                    109: them and to complain about them rather than to just install the package
                    110: and hope that it works. There are numerous checks in pkgsrc that try to
                    111: find such bugs: Static analysis tools (<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>), build-time checks (portability
                    112: of shell scripts), and post-installation checks (installed files,
                    113: references to shared libraries, script interpreters).</p></li>
                    114: <li><p>&#8220;<span class="quote">If it works, it should work everywhere</span>&#8221;
                    115: &mdash; Like NetBSD has been ported to many hardware architectures,
                    116: pkgsrc has been ported to many operating systems. Care is taken that
                    117: packages behave the same on all platforms.</p></li>
                    118: </ul></div>
                    119: </div>
                    120: <div class="sect2" lang="en">
                    121: <div class="titlepage"><div><div><h3 class="title">
                    122: <a name="intro.platforms"></a>1.1.2. Supported platforms</h3></div></div></div>
                    123: <p>pkgsrc consists of both a source distribution and a binary
                    124: distribution for these operating systems. After retrieving the required
                    125: source or binaries, you can be up and running with pkgsrc in just
                    126: minutes!</p>
                    127: <p>pkgsrc was derived from FreeBSD's ports system, and
                    128:       initially developed for NetBSD only. Since then, pkgsrc has
                    129:       grown a lot, and now supports the following platforms:</p>
                    130: <div class="table">
                    131: <a name="supported-platforms"></a><p class="title"><b>Table 1.1. Platforms supported by pkgsrc</b></p>
                    132: <div class="table-contents"><table summary="Platforms supported by pkgsrc" border="1">
                    133: <colgroup>
                    134: <col>
                    135: <col>
                    136: </colgroup>
                    137: <thead><tr>
                    138: <th>Platform</th>
                    139: <th>Date Support Added</th>
                    140: </tr></thead>
                    141: <tbody>
                    142: <tr>
                    143: <td><a href="http://www.NetBSD.org/" target="_top">NetBSD</a></td>
                    144: <td align="center">Aug 1997</td>
                    145: </tr>
                    146: <tr>
                    147: <td><a href="http://wwws.sun.com/software/solaris/" target="_top">Solaris</a></td>
                    148: <td align="center">Mar 1999</td>
                    149: </tr>
                    150: <tr>
                    151: <td><a href="http://www.kernel.org/" target="_top">Linux</a></td>
                    152: <td align="center">Jun 1999</td>
                    153: </tr>
                    154: <tr>
                    155: <td>
                    156:           <a href="http://developer.apple.com/darwin/" target="_top">Darwin</a>
                    157:           (<a href="http://developer.apple.com/macosx/" target="_top">Mac OS X</a>)
                    158:         </td>
                    159: <td align="center">Oct 2001</td>
                    160: </tr>
                    161: <tr>
                    162: <td><a href="http://www.freebsd.org/" target="_top">FreeBSD</a></td>
                    163: <td align="center">Nov 2002</td>
                    164: </tr>
                    165: <tr>
                    166: <td><a href="http://www.openbsd.org/" target="_top">OpenBSD</a></td>
                    167: <td align="center">Nov 2002</td>
                    168: </tr>
                    169: <tr>
                    170: <td><a href="http://www.sgi.com/software/irix/" target="_top">IRIX</a></td>
                    171: <td align="center">Dec 2002</td>
                    172: </tr>
                    173: <tr>
                    174: <td>BSD/OS</td>
                    175: <td align="center">Dec 2003</td>
                    176: </tr>
                    177: <tr>
                    178: <td><a href="http://www-1.ibm.com/servers/aix/" target="_top">AIX</a></td>
                    179: <td align="center">Dec 2003</td>
                    180: </tr>
                    181: <tr>
                    182: <td>
                    183:           <a href="http://www.microsoft.com/windows/sfu/" target="_top">Interix</a>
                    184:           (Microsoft Windows Services for Unix)
                    185:         </td>
                    186: <td align="center">Mar 2004</td>
                    187: </tr>
                    188: <tr>
                    189: <td><a href="http://www.dragonflybsd.org/" target="_top">DragonFlyBSD</a></td>
                    190: <td align="center">Oct 2004</td>
                    191: </tr>
                    192: <tr>
                    193: <td><a href="http://www.tru64.org/" target="_top">OSF/1</a></td>
                    194: <td align="center">Nov 2004</td>
                    195: </tr>
                    196: <tr>
                    197: <td><a href="http://www.hp.com/products1/unix/" target="_top">HP-UX</a></td>
                    198: <td align="center">Apr 2007</td>
                    199: </tr>
                    200: </tbody>
                    201: </table></div>
                    202: </div>
                    203: <br class="table-break">
                    204: </div>
                    205: </div>
                    206: <div class="sect1" lang="en">
                    207: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
                    208: <a name="overview"></a>1.2. Overview</h2></div></div></div>
                    209: <p>This document is divided into three parts. The first,
                    210:        <a href="users-guide.html" title="Part I. The pkgsrc user's guide">The pkgsrc user's guide</a>,
                    211:        describes how one can use one of the packages in the Package
                    212:        Collection, either by installing a precompiled binary package,
                    213:        or by building one's own copy using the NetBSD package system.
                    214:        The second part, <a href="developers-guide.html" title="Part II. The pkgsrc developer's guide">The pkgsrc developer's guide</a>, explains how to prepare a
                    215:        package so it can be easily built by other NetBSD users without
                    216:        knowing about the package's building details. The third part,
                    217:        <a href="infrastructure.html" title="Part III. The pkgsrc infrastructure internals">The pkgsrc infrastructure internals</a>
                    218:        is intended for those who want to understand how pkgsrc is
                    219:        implemented.</p>
                    220: <p>This document is available in various formats:
                    221:        <span class="simplelist"><a href="index.html" target="_top">HTML</a>, <a href="pkgsrc.pdf" target="_top">PDF</a>, <a href="pkgsrc.ps" target="_top">PS</a>, <a href="pkgsrc.txt" target="_top">TXT</a></span>.</p>
                    222: </div>
                    223: <div class="sect1" lang="en">
                    224: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
                    225: <a name="terminology"></a>1.3. Terminology</h2></div></div></div>
                    226: <p>There has been a lot of talk about &#8220;<span class="quote">ports</span>&#8221;,
                    227:       &#8220;<span class="quote">packages</span>&#8221;, etc. so far. Here is a description of all the
                    228:       terminology used within this document.</p>
                    229: <div class="variablelist"><dl>
                    230: <dt><span class="term">Package</span></dt>
                    231: <dd><p>A set of files and building instructions
                    232:            that describe what's necessary
                    233:            to build a certain piece of software using
                    234:             pkgsrc. Packages are traditionally stored under
                    235:            <code class="filename">/usr/pkgsrc</code>.</p></dd>
                    236: <dt><span class="term">The NetBSD package system</span></dt>
                    237: <dd><p>This is the former name of &#8220;<span class="quote">pkgsrc</span>&#8221;.  It
                    238:          is part of the NetBSD operating system and can be bootstrapped
                    239:          to run on non-NetBSD operating systems as well.  It handles
                    240:          building (compiling), installing, and removing of
                    241:          packages.</p></dd>
                    242: <dt><span class="term">Distfile</span></dt>
                    243: <dd><p>This term describes the file or files that are
                    244:            provided by the author of the piece of software to
                    245:            distribute his work. All the changes necessary to build on
                    246:            NetBSD are reflected in the corresponding package. Usually
                    247:            the distfile is in the form of a compressed tar-archive,
                    248:            but other types are possible, too. Distfiles are usually
                    249:            stored below
                    250:            <code class="filename">/usr/pkgsrc/distfiles</code>.</p></dd>
                    251: <dt><span class="term">Port</span></dt>
                    252: <dd><p>This is the term used by FreeBSD and OpenBSD people
                    253:            for what we call a package.
                    254:            In NetBSD terminology, &#8220;<span class="quote">port</span>&#8221; refers to a different
                    255:            architecture.</p></dd>
                    256: <dt><span class="term">Precompiled/binary package</span></dt>
                    257: <dd>
                    258: <p>A set of binaries built with pkgsrc from a distfile
                    259:            and stuffed together in a single <code class="filename">.tgz</code>
                    260:            file so it can be installed on machines of the same
                    261:            machine architecture without the need to
                    262:            recompile. Packages are usually generated in
                    263:            <code class="filename">/usr/pkgsrc/packages</code>; there is also
                    264:            an archive on <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/" target="_top">ftp.NetBSD.org</a>.</p>
                    265: <p>Sometimes, this is referred to by the term &#8220;<span class="quote">package</span>&#8221; too,
                    266:            especially in the context of precompiled packages.</p>
                    267: </dd>
                    268: <dt><span class="term">Program</span></dt>
                    269: <dd><p>The piece of software to be installed which will be
                    270:          constructed from all the files in the distfile by the
                    271:          actions defined in the corresponding package.</p></dd>
                    272: </dl></div>
                    273: <div class="sect2" lang="en">
                    274: <div class="titlepage"><div><div><h3 class="title">
                    275: <a name="term.roles"></a>1.3.1. Roles involved in pkgsrc</h3></div></div></div>
                    276: <div class="variablelist"><dl>
                    277: <dt><span class="term">pkgsrc users</span></dt>
                    278: <dd>
                    279: <p>The
                    280:        pkgsrc users are people who use the packages provided by pkgsrc.
                    281:        Typically they are system administrators. The people using the
                    282:        software that is inside the packages (maybe called &#8220;<span class="quote">end
                    283:        users</span>&#8221;) are not covered by the pkgsrc guide.</p>
                    284: <p>There are two kinds of pkgsrc users: Some only want to
                    285:        install pre-built binary packages. Others build the pkgsrc
                    286:        packages from source, either for installing them directly or for
                    287:        building binary packages themselves. For pkgsrc users <a href="users-guide.html" title="Part I. The pkgsrc user's guide">Part I, &#8220;The pkgsrc user's guide&#8221;</a> should provide all necessary
                    288:        documentation.</p>
                    289: </dd>
                    290: <dt><span class="term">package maintainers</span></dt>
                    291: <dd><p>A
                    292:        package maintainer creates packages as described in <a href="developers-guide.html" title="Part II. The pkgsrc developer's guide">Part II, &#8220;The pkgsrc developer's guide&#8221;</a>.</p></dd>
                    293: <dt><span class="term">infrastructure developers</span></dt>
                    294: <dd><p>These people are involved in all those files
                    295:        that live in the <code class="filename">mk/</code> directory and below.
                    296:        Only these people should need to read through <a href="infrastructure.html" title="Part III. The pkgsrc infrastructure internals">Part III, &#8220;The pkgsrc infrastructure internals&#8221;</a>, though others might be curious,
                    297:        too.</p></dd>
                    298: </dl></div>
                    299: </div>
                    300: </div>
                    301: <div class="sect1" lang="en">
                    302: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
                    303: <a name="typography"></a>1.4. Typography</h2></div></div></div>
                    304: <p>When giving examples for commands, shell prompts are used to
                    305:       show if the command should/can be issued as root, or if
                    306:       &#8220;<span class="quote">normal</span>&#8221; user privileges are sufficient. We use a
                    307:       <code class="prompt">#</code> for root's shell prompt, and a <code class="prompt">%</code> for users'
                    308:       shell prompt, assuming they use the C-shell or tcsh.</p>
                    309: </div>
                    310: </div>
                    311: <div class="navfooter">
                    312: <hr>
                    313: <table width="100%" summary="Navigation footer">
                    314: <tr>
                    315: <td width="40%" align="left">
                    316: <a accesskey="p" href="index.html">Prev</a> </td>
                    317: <td width="20%" align="center"> </td>
                    318: <td width="40%" align="right"> <a accesskey="n" href="users-guide.html">Next</a>
                    319: </td>
                    320: </tr>
                    321: <tr>
                    322: <td width="40%" align="left" valign="top">The pkgsrc guide </td>
                    323: <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
                    324: <td width="40%" align="right" valign="top"> Part I. The pkgsrc user's guide</td>
                    325: </tr>
                    326: </table>
                    327: </div>
                    328: </body>
                    329: </html>

CVSweb <webmaster@jp.NetBSD.org>