OpenBSD ports mechanism


History

OpenBSD is a fairly complete system of its own, but still there are a lot of software that one might want see added. However there is the problem on where to draw the line on what to include and not, as well as licensing and export restrictions problems. Some things just can't be shipped with the system. We wanted to find a way for users to easily get software we don't provide and started to look around. We didn't have to look far as a sibling project, FreeBSD, had an excellent mechanism for exactly this purpose called "The ports collection". After thinking about it for a while we decided to try to use their collection as is, feeding back necessary patches to make the ports work on OpenBSD as well to the FreeBSD maintainers.

Short description and setup

The ports idea is to have, for each piece of software, a Makefile that describes where to fetch it, how to do the fetch, what it is depending upon (if anything), how to alter the sources (if needed) and how to configure, build and install it. Furthermore some patches will have to be kept in the "port" as well as some administration files for the package registry utilities. Normally this information is kept in an hierarchy under /usr/ports (however, this is configurable). I recommend reading the ports chapter in the FreeBSD handbook to get information on how to setup this hierarchy. A current gzipped tar-archive of the FreeBSD ports can be found here .

Example

Let's say you managed to get a ports tree sitting under /usr/ports, then you should be able to something like this:

cd /usr/ports/archivers/unzip
make
su
make install
exit
Easy, huh?

Problems and contacts

As the ports collection really is a FreeBSD thing, there are ports that do not work in OpenBSD for various reasons. If you find such a port contact either Niklas Hallqvist or Warner Losh and give us either patches on how to fix things or, if you cannot do this, point us at the problematic port and tell us what fails and we shall try to fix it.


OpenBSD www@openbsd.org
$OpenBSD: ports.html,v 1.3 1997/02/03 12:55:49 niklas Exp $