Package Building Procedures

The FreeBSD Ports Management Team

$FreeBSD: doc/en_US.ISO8859-1/articles/portbuild/article.sgml,v 1.23 2007/10/16 01:09:50 linimon Exp $

Table of Contents
1 Introduction and Conventions
2 Build Client Management
3 Chroot Build Environment Setup
4 Starting the Build
5 Anatomy of a Build
6 Interrupting a Build
7 Monitoring the Build
8 Dealing With Build Errors
9 Release Builds
10 Uploading Packages
11 Experimental Patches Builds

1 Introduction and Conventions

In order to provide pre-compiled binaries of third-party applications for FreeBSD, the Ports Collection is regularly built on one of the “Package Building Clusters.” Currently, the main cluster in use is at

Most of the package building magic occurs under the /var/portbuild directory. Unless otherwise specified, all paths will be relative to this location. ${arch} will be used to specify one of the package architectures (amd64, i386™, ia64, and Sparc64®), and ${branch} will be used to specify the build branch (5, 5-exp, 6, 6-exp, 7, 7-exp, 8).

Note: Packages are no longer built for Release 4, nor for the alpha architecture.

The scripts that control all of this live in /var/portbuild/scripts/. These are the checked-out copies from /usr/ports/Tools/portbuild/scripts/.

Typically, incremental builds are done that use previous packages as dependendencies; this takes less time, and puts less load on the mirrors. Full builds are usually only done:

This, and other documents, can be downloaded from

For questions about FreeBSD, read the documentation before contacting <>.
For questions about this documentation, e-mail <>.