version 1.30, 2000/05/27 14:51:26 |
version 1.31, 2000/06/11 16:40:24 |
|
|
<body text="#000000" bgcolor="#FFFFFF" link="#23238E"> |
<body text="#000000" bgcolor="#FFFFFF" link="#23238E"> |
|
|
<img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" > |
<img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" > |
<center><h2><font color=#e00000>OpenBSD ports tree is currently tracking OpenBSD 2.7 |
|
(release)</font></h2></center> |
|
<hr> |
|
|
|
<h2><font color=#e00000>Ports and Packages</font><hr></h2> |
<h2><font color=#e00000>The Ports & Packages collection</font><hr></h2> |
|
|
<h3><font color=#0000e0>History</font></h3> |
<h3><font color=#0000e0>Motivation</font></h3> |
|
|
<p> |
|
OpenBSD is a fairly complete system of its own, but still there is a lot |
OpenBSD is a fairly complete system of its own, but still there is a lot |
of software that one might want see added. However there is the problem |
of software that one might want see added. However there is the problem |
on where to draw the line as to what to include, as well as the occasional |
on where to draw the line as to what to include, as well as the occasional |
|
|
shipped with the system. |
shipped with the system. |
|
|
<p> |
<p> |
We wanted to find a way for users to easily get software we don't provide |
<strong><font color=#e00000> |
and started to look around. We didn't have to look far, as sibling project |
The ports & packages collection does NOT go through the thorough security audit that OpenBSD follows. |
<a href="http://www.freebsd.org/">FreeBSD</a> already had an |
Although we strive to keep the quality of the packages collection high, we just do not have enough human |
excellent mechanism |
resources to ensure the same level of robustness and security. |
for exactly this purpose called |
</font></strong> |
<a href="http://www.freebsd.org/ports/">"The ports collection"</a>. |
|
|
|
<p> |
<p> |
At first we tried to use their collection as-is, but due to |
The port collection, originally borrowed from |
incompatibility problems between FreeBSD and OpenBSD we decided to branch |
<a href="http://www.freebsd.org/">FreeBSD</a>, fills this gap. |
out and create our very own OpenBSD Ports Project using FreeBSD's as a |
The concept is to have, for each third-party software, a Makefile that |
starting point. This also allows us to tune the ports better to our |
|
system. |
|
|
|
<h3><font color=#0000e0>Short description and setup</font></h3> |
|
|
|
<p> |
|
The ports idea is to have, for each piece of software, a Makefile that |
|
controls |
controls |
<ul> |
<ul> |
<li>where to fetch it, |
<li>where to fetch it, |
|
|
<li>how to alter the sources (if needed), |
<li>how to alter the sources (if needed), |
<li>and how to configure, build and install it. |
<li>and how to configure, build and install it. |
</ul> |
</ul> |
<p> |
|
This information is kept in a directory hierarchy under the |
This information is kept in a directory hierarchy under the |
/usr/ports directory. |
/usr/ports directory. |
<h3><font color=#0000e0>Getting the Ports tree</font></h3> |
|
<p> |
<p> |
You can ftp the release version from the pub/OpenBSD/[version] (where |
Packages are the binary equivalent of ports. A compiled port becomes |
[version] is the release number) directory on any of the |
a package that can be registered into the system using pkg_add(1). |
<a href=ftp.html>ftp mirror sites</a>. |
|
The release versions are the ones we ship on our CDROM, and have gone |
|
through more testing than any snapshot. |
|
<p> |
<p> |
Further information is available in the |
<strong><font color=#e00000> |
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ports&sektion=7&format=html">ports(7)</a> man page. |
Packages look like simple <code>.tar.gz</code> bundles, but they should always |
|
be added using pkg_add(1), as there might be some extra information that only |
|
pkg_add(1) knows how to handle.</font></strong> |
|
Tip: you can distinguish between packages and .tar.gz bundles using pkg_info(1). |
|
|
<h3><font color=#0000e0>Ports versus packages</font></h3> |
<h3><font color=#0000e0>Getting packages</font></h3> |
|
|
<p> |
A large collection of pre-compiled packages is available for most common |
For common architectures, you don't necessarily have to compile anything |
architectures. |
in the ports tree. With the advent of OpenBSD 2.7, a large set of |
|
pre-compiled packages will be available: |
|
<ul> |
<ul> |
<li>On the CD-Rom (that you can pre-order <a href="orders.html">here</a>), |
<li>On the CD-Rom (that you can pre-order <a href="orders.html">here</a>), |
<li>On the ftp mirrors. |
<li>On the <a href=ftp.html>ftp mirror sites</a>. |
</ul> |
</ul> |
OpenBSD documentation includes more information on the proper use of |
|
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=packages&sektion=7&format=html">packages</a>. |
|
|
|
<h3><font color=#0000e0>Ports update for an OpenBSD release</font></h3> |
Adding a package is as easy as |
|
<code>pkg_add pkgname.tar.gz</code>. |
|
If you are grabbing packages off a single source (a package repository), |
|
set PKG_PATH to that repository URL. |
|
|
<p> |
<p> |
The ports tree, like the rest of OpenBSD, is constantly changing. While |
For instance, to install the gimp package for the 2.7 release on an i386 |
we try to maintain ports compatibility through the lifetime of a particular |
machine off the ftp site (including dependencies), do: |
release, sometimes issues beyond our control occur. For example, particular |
|
versions of the ported package might no longer be available (But this |
|
specific problem should be solved now). |
|
|
|
|
<pre> |
|
# setenv PKG_PATH ftp://ftp.openbsd.org/pub/OpenBSD/2.7/packages/i386/ |
|
# pkg_add gimp-1.17.tar.gz |
|
</pre> |
|
|
|
<h3><font color=#0000e0>Managing installed packages</font></h3> |
|
|
|
The <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=packages&sektion=7&format=html">packages(7)</a>. |
|
manual page holds useful information about ways to manage |
|
installed packages, solve conflicts (files that already exist) and handle |
|
dependencies. |
<p> |
<p> |
|
As of OpenBSD 2.7, to update a package you must: |
|
<ul> |
|
<li>Remove the old package using pkg_delete(1) |
|
<li>Add the new package using pkg_add(1) |
|
</ul> |
|
This is slightly inconvenient, as packages may trigger dependencies, and |
|
you may have to remove a large subset of packages for an update. |
|
|
|
<h3><font color=#0000e0>Using ports</font></h3> |
|
|
|
If a given package does not exist for your architecture, you may still |
|
be able to compile the port. Besides, some users will want to compile |
|
everything from source for various reasons. |
|
|
|
<p> |
|
You can ftp the release version from the pub/OpenBSD/[version] (where |
|
[version] is the release number) directory on any of the |
|
<a href=ftp.html>ftp mirror sites</a>. |
|
The release versions are the ones we ship on our CDROM, and have gone |
|
through more testing than any snapshot. |
|
Further information is available in the |
|
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ports&sektion=7&format=html">ports(7)</a> man page. |
|
|
|
<h3><font color=#0000e0>Ports update for an OpenBSD release</font></h3> |
|
|
|
<p> |
|
The ports tree, like the rest of OpenBSD, is constantly changing. |
The normal life cycle of the ports tree is as follows: |
The normal life cycle of the ports tree is as follows: |
<ul> |
<ul> |
<li>Track the latest release of OpenBSD for a few months after the release |
<li>Track the latest release of OpenBSD for a few months after the release |
|
|
<li>Switch to tracking OpenBSD-current about two months before the next |
<li>Switch to tracking OpenBSD-current about two months before the next |
release. |
release. |
</ul> |
</ul> |
|
|
<p> |
|
The change of status will be widely publicized on the |
The change of status will be widely publicized on the |
<a href=mail.html>Mailing lists</a>. |
<a href=mail.html>Mailing lists</a>. |
|
|
<p>The ports tree works as a single entity. Updating a single directory is |
<p>The ports tree works as a single entity. Updating a single directory is |
not guaranteed to work, as package dependencies may force you to update |
not guaranteed to work, as package dependencies may force you to update |
and recompile vast portions of the ports tree. |
and recompile vast portions of the ports tree. |
|
It is strongly suggested that people don't track ports-current unless |
<p>It is strongly suggested that people don't track ports-current unless |
|
they're prepared to deal with various problems. |
they're prepared to deal with various problems. |
<a href=mail.html>Mailing lists</a> such as source-changes or tech will |
<a href=mail.html>Mailing lists</a> such as source-changes or tech will |
probably be invaluable. |
probably be invaluable. |
|
|
Let's say you managed to get a ports tree and you want to compile and |
Let's say you managed to get a ports tree and you want to compile and |
install the archiving utility <code>unzip</code>. You should be able to |
install the archiving utility <code>unzip</code>. You should be able to |
do something like this: |
do something like this: |
|
|
<pre> |
<pre> |
% cd /usr/ports/archivers/unzip |
% cd /usr/ports/archivers/unzip |
% su |
% su |
# make |
# make |
# make install |
# make install |
# exit |
# exit |
</pre> |
</pre> |
Easy, huh? |
|
|
|
<!-- |
Easy, huh ? Especially considering all that happened in the background: |
<h3><font color=#0000e0>Port status information</font></h3> |
<ul> |
|
<li>Fetch unzip sources from an ftp site, |
|
<li>Check the source archive integrity, |
|
<li>Extract the unzip source, |
|
<li>Apply OpenBSD specific patches, |
|
<li>Configure and build the program, |
|
<li>Create a binary package under /usr/ports/packages, |
|
<li>Install that package. |
|
</ul> |
|
|
<p> |
<p> |
The <a href="portstat.html">ports status page</a> is updated as |
In OpenBSD 2.7, a large proportion of the ports automatically build |
team members add new ports and verify existing ports. Existing |
packages when installing. |
ports are continually verified to validate source availability and |
In OpenBSD current, almost all ports follow that standard. |
proper operation with OpenBSD -current. The page notes the date last |
|
checked and the nature of any change. This is a new resource that is not |
|
yet complete. If you have any information to add to the status page |
|
please send it to |
|
<a href="mailto:ports@openbsd.org">ports@openbsd.org</a>. |
|
--> |
|
|
|
<h3><font color=#0000e0>Creating new ports</font></h3> |
<p> |
|
As ports get built, the /usr/ports/distfiles directory gets filled with |
|
program sources, and /usr/ports/packages gets filled with binary packages. |
|
Users with low connectivity may refer to mirror-distfiles(7) for |
|
an efficient way to grab all distfiles at once. |
|
Note that the OpenBSD CD only include the ports tree and selected packages. |
|
If you wish to have the distfiles, you will have to get them through an |
|
independent way. |
|
|
|
<h3><font color=#0000e0>Creating new ports</font></h3> |
<p> |
<p> |
If you are interested in helping to expand the OpenBSD ports tree |
If you are interested in helping to expand the OpenBSD ports tree |
you should first read <a href="porting.html">porting.html</a>. |
you should first read <a href="porting.html">porting.html</a>. |
|
|
<h3><font color=#0000e0>Problems and contacts</font></h3> |
<h3><font color=#0000e0>Problems and contacts</font></h3> |
|
|
<p> |
<p> |
If you have trouble with ports please send e-mail to the OpenBSD |
If you have trouble with existing ports, or need information about creating new ports, |
|
please send e-mail to the OpenBSD |
ports mailing list, <a href="mailto:ports@openbsd.org">ports@openbsd.org</a>. |
ports mailing list, <a href="mailto:ports@openbsd.org">ports@openbsd.org</a>. |
Corrections are always welcome, but in any case do please provide: |
Corrections are always welcome, but in any case do please provide: |
<ul> |
<ul> |