Installing Ports and Source Code

If you intend to build your own OpenBSD releases or heavily customize OpenBSD, you’ll need the operating system source code (see Chapter 18, Chapter 19, and Chapter 20). If you intend to build your own packages (covered in Chapter 13), you’ll need the ports tree. Both the ports tree and the system source code are specific to an OpenBSD release, and if you need them, install them when you install the system.

The ports tree is the compressed file ports.tar.gz in the release directory where you stored OpenBSD—either on the mirror site or the CD. All architectures share one ports tree. Download this file to your home directory and extract it in /usr.

# cd /usr/
# tar -xzvf $HOME/ports.tar.gz

This extracts the ports ...

Get Absolute OpenBSD, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.