[BACK]Return to ports.html CVS log [TXT][DIR] Up to [local] / www

Annotation of www/ports.html, Revision 1.32

1.11      deraadt     1: <html>
1.25      deraadt     2: <head>
                      3: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                      4: <meta name="resource-type" content="document">
                      5: <meta name="description" CONTENT="How OpenBSD can make use of the FreeBSD ports">
                      6: <meta name="keywords" content="openbsd,ports">
                      7: <meta name="distribution" content="global">
                      8: <meta name="copyright" content="copyright 1997-1999 by the OpenBSD project">
                      9:
1.27      brad       10: <title>OpenBSD Ports and Packages</title>
1.25      deraadt    11: <link rev="made" HREF="mailto:www@openbsd.org">
                     12:
                     13: <body text="#000000" bgcolor="#FFFFFF" link="#23238E">
                     14:
                     15: <img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" >
1.30      espie      16:
1.31      espie      17: <h2><font color=#e00000>The Ports &amp; Packages collection</font><hr></h2>
1.25      deraadt    18:
1.31      espie      19: <h3><font color=#0000e0>Motivation</font></h3>
1.25      deraadt    20:
                     21: OpenBSD is a fairly complete system of its own, but still there is a lot
                     22: of software that one might want see added. However there is the problem
                     23: on where to draw the line as to what to include, as well as the occasional
                     24: licensing and export restriction problems.  As OpenBSD is supposed to be
                     25: a small stand-alone UNIX-like operating system, some things just can't be
                     26: shipped with the system.
                     27:
                     28: <p>
1.31      espie      29: <strong><font color=#e00000>
                     30: The ports &amp; packages collection does NOT go through the thorough security audit that OpenBSD follows.
                     31: Although we strive to keep the quality of the packages collection high, we just do not have enough human
                     32: resources to ensure the same level of robustness and security.
                     33: </font></strong>
1.25      deraadt    34:
                     35: <p>
1.31      espie      36: The port collection, originally borrowed from
                     37: <a href="http://www.freebsd.org/">FreeBSD</a>, fills this gap.
                     38: The concept is to have, for each third-party software, a Makefile that
1.25      deraadt    39: controls
                     40: <ul>
                     41: <li>where to fetch it,
                     42: <li>how to do the fetch,
                     43: <li>what it depends upon (if anything),
                     44: <li>how to alter the sources (if needed),
                     45: <li>and how to configure, build and install it.
                     46: </ul>
                     47: This information is kept in a directory hierarchy under the
                     48: /usr/ports directory.
1.31      espie      49:
                     50: <p>
                     51: Packages are the binary equivalent of ports.  A compiled port becomes
                     52: a package that can be registered into the system using pkg_add(1).
                     53:
                     54: <p>
                     55: <strong><font color=#e00000>
                     56: Packages look like simple <code>.tar.gz</code> bundles, but they should always
                     57: be added using pkg_add(1), as there might be some extra information that only
                     58: pkg_add(1) knows how to handle.</font></strong>
                     59: Tip: you can distinguish between packages and .tar.gz bundles using pkg_info(1).
                     60:
                     61: <h3><font color=#0000e0>Getting packages</font></h3>
                     62:
                     63: A large collection of pre-compiled packages is available for most common
                     64: architectures.
                     65: <ul>
                     66: <li>On the CD-Rom (that you can pre-order <a href="orders.html">here</a>),
                     67: <li>On the <a href=ftp.html>ftp mirror sites</a>.
                     68: </ul>
                     69:
                     70: Adding a package is as easy as
                     71: <code>pkg_add pkgname.tar.gz</code>.
                     72: If you are grabbing packages off a single source (a package repository),
                     73: set PKG_PATH to that repository URL.
                     74:
                     75: <p>
                     76: For instance, to install the gimp package for the 2.7 release on an i386
                     77: machine off the ftp site (including dependencies), do:
                     78:
                     79: <pre>
                     80:     # setenv PKG_PATH ftp://ftp.openbsd.org/pub/OpenBSD/2.7/packages/i386/
                     81:     # pkg_add gimp-1.17.tar.gz
                     82: </pre>
                     83:
                     84: <h3><font color=#0000e0>Managing installed packages</font></h3>
                     85:
                     86: The <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=packages&sektion=7&format=html">packages(7)</a>.
                     87: manual page holds useful information about ways to manage
                     88: installed packages, solve conflicts (files that already exist) and handle
                     89: dependencies.
                     90: <p>
                     91: As of OpenBSD 2.7, to update a package you must:
                     92: <ul>
                     93: <li>Remove the old package using pkg_delete(1)
                     94: <li>Add the new package using pkg_add(1)
                     95: </ul>
                     96: This is slightly inconvenient, as packages may trigger dependencies, and
                     97: you may have to remove a large subset of packages for an update.
                     98:
                     99: <h3><font color=#0000e0>Using ports</font></h3>
                    100:
                    101: If a given package does not exist for your architecture, you may still
                    102: be able to compile the port. Besides, some users will want to compile
                    103: everything from source for various reasons.
                    104:
1.25      deraadt   105: <p>
1.27      brad      106: You can ftp the release version from the pub/OpenBSD/[version] (where
                    107: [version] is the release number) directory on any of the
                    108: <a href=ftp.html>ftp mirror sites</a>.
                    109: The release versions are the ones we ship on our CDROM, and have gone
                    110: through more testing than any snapshot.
1.30      espie     111: Further information is available in the
                    112: <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ports&sektion=7&format=html">ports(7)</a> man page.
                    113:
                    114: <h3><font color=#0000e0>Ports update for an OpenBSD release</font></h3>
1.27      brad      115:
                    116: <p>
1.31      espie     117: The ports tree, like the rest of OpenBSD, is constantly changing.
1.30      espie     118: The normal life cycle of the ports tree is as follows:
                    119: <ul>
                    120: <li>Track the latest release of OpenBSD for a few months after the release
                    121: comes out.
                    122: <li>Switch to tracking OpenBSD-current about two months before the next
                    123: release.
                    124: </ul>
                    125: The change of status will be widely publicized on the
                    126: <a href=mail.html>Mailing lists</a>.
                    127:
                    128: <p>The ports tree works as a single entity. Updating a single directory is
                    129: not guaranteed to work, as package dependencies may force you to update
                    130: and recompile vast portions of the ports tree.
1.31      espie     131: It is strongly suggested that people don't track ports-current unless
1.30      espie     132: they're prepared to deal with various problems.
1.29      espie     133: <a href=mail.html>Mailing lists</a> such as source-changes or tech will
                    134: probably be invaluable.
1.27      brad      135:
                    136: <p>
1.29      espie     137: The ports-current tree can be retrieved via:
1.25      deraadt   138: <ul>
                    139: <li><a href=anoncvs.html>Anonymous CVS</a> (see link).  The command is
                    140: essentially <strong>cvs get ports</strong>.
                    141: <li>Anonymous ftp from
                    142: <a href="ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/ports.tar.gz">
                    143: ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/ports.tar.gz</a>.
1.19      marc      144:        This archive is updated nightly.
1.32    ! naddy     145: <li><a href="cvsup.html">CVSup</a>. See the example for using CVSup in
        !           146:     <a href="cvsup.html#checkout">checkout mode</a>.
1.25      deraadt   147: <li>Your web browser using the
                    148: <a href="http://www.openbsd.org/cgi-bin/cvsweb/ports/">CVS
1.20      marc      149:        web interface</a>.
1.25      deraadt   150: </ul>
                    151:
                    152: <h3><font color=#0000e0>Example use of the Ports tree</font></h3>
                    153:
                    154: <p>
                    155: Let's say you managed to get a ports tree and you want to compile and
                    156: install the archiving utility <code>unzip</code>.  You should be able to
1.23      espie     157:        do something like this:
1.31      espie     158:
1.11      deraadt   159: <pre>
1.31      espie     160:     % cd /usr/ports/archivers/unzip
                    161:     % su
                    162:     # make
                    163:     # make install
                    164:     # exit
1.11      deraadt   165: </pre>
1.25      deraadt   166:
1.31      espie     167: Easy, huh ? Especially considering all that happened in the background:
                    168: <ul>
                    169: <li>Fetch unzip sources from an ftp site,
                    170: <li>Check the source archive integrity,
                    171: <li>Extract the unzip source,
                    172: <li>Apply OpenBSD specific patches,
                    173: <li>Configure and build the program,
                    174: <li>Create a binary package under /usr/ports/packages,
                    175: <li>Install that package.
                    176: </ul>
1.25      deraadt   177:
                    178: <p>
1.31      espie     179: In OpenBSD 2.7, a large proportion of the ports automatically build
                    180: packages when installing.
                    181: In OpenBSD current, almost all ports follow that standard.
                    182:
                    183: <p>
                    184: As ports get built, the /usr/ports/distfiles directory gets filled with
                    185: program sources, and /usr/ports/packages gets filled with binary packages.
                    186: Users with low connectivity may refer to mirror-distfiles(7) for
                    187: an efficient way to grab all distfiles at once.
                    188: Note that the OpenBSD CD only include the ports tree and selected packages.
                    189: If you wish to have the distfiles, you will have to get them through an
                    190: independent way.
1.25      deraadt   191:
                    192: <h3><font color=#0000e0>Creating new ports</font></h3>
                    193: <p>
                    194: If you are interested in helping to expand the OpenBSD ports tree
                    195: you should first read <a href="porting.html">porting.html</a>.
                    196: That page references the porting section of the
                    197: <a href="http://www.freebsd.org/handbook/">FreeBSD handbook</a>
                    198: as well as OpenBSD specific policies and hints.
                    199:
                    200: <h3><font color=#0000e0>Problems and contacts</font></h3>
                    201:
                    202: <p>
1.31      espie     203: If you have trouble with existing ports, or need information about creating new ports,
                    204: please send e-mail to the OpenBSD
1.27      brad      205: ports mailing list, <a href="mailto:ports@openbsd.org">ports@openbsd.org</a>.
1.25      deraadt   206: Corrections are always welcome, but in any case do please provide:
                    207: <ul>
                    208: <li>The output of <code>uname -a</code>,
                    209: <li>Your OpenBSD version, including any patches you may have applied,
                    210: <li>A complete description of the problem.
                    211:
                    212: </ul>
                    213:
                    214: <hr>
                    215: <a href="index.html"><img height=24 width=24 src=back.gif border=0 alt=OpenBSD></a>
                    216: <a href=mailto:www@openbsd.org>www@openbsd.org</a>
1.32    ! naddy     217: <br><small>$OpenBSD: ports.html,v 1.31 2000/06/11 16:40:24 espie Exp $</small>
1.25      deraadt   218: </body>
1.11      deraadt   219: </html>