The FreeBSD Ports collection is a
package management system for the
FreeBSD operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
. Ports in the collection vary with contributed software. There were 38,487 ports available in February 2020 and 36,504 in September 2024. It has also been adopted by
NetBSD as the basis of its
pkgsrc system.
Installing from source
The
ports collection uses
Makefile
In software development, Make is a command-line interface software tool that performs actions ordered by configured Dependence analysis, dependencies as defined in a configuration file called a ''makefile''. It is commonly used for build automati ...
s arranged in a
directory hierarchy so that software can be
built,
installed and uninstalled with the make command. When installing an application, very little (if any) user intervention is required after issuing a beginning command such as make install or make install clean in the ports directory of the desired
application. In most cases the software is automatically downloaded from the
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
,
patched and
configured if necessary, then
compiled, installed and registered in the package database. If the new port has needed
dependencies on other applications or libraries, these are installed beforehand automatically.
Most ports are already configured with
default options which have been deemed generally appropriate for most users. However, these configuration options (called ''knobs'') can sometimes be changed before installation using the make config command, which brings up a text-based interface that allows the user to select the desired options.
Historically, each port (or software package) has been
maintained by an individual ''port maintainer'' who is responsible for ensuring the currency of the port and providing general support. Today, many ports are maintained by special task forces or sub-projects, each with a dedicated
mailing list
A mailing list is a collection of names and addresses used by an individual or an organization to send material to multiple recipients.
Mailing lists are often rented or sold. If rented, the renter agrees to use the mailing list only at contra ...
(e.g.
[email protected],
[email protected], etc.), while unmaintained ports are assigned to the generic group
[email protected]. In general, anyone may become a port maintainer by contributing their favorite software to the collection. One may also choose to maintain an existing port with no active maintainer.
Packages
Precompiled (binary) ports are called ''packages''. A package can be created from the corresponding port with the make package command; pre-built packages are also available for download from FreeBSD-hosted package repositories. A user can install a package by passing the package name to the pkg install command. This downloads the appropriate package for the installed FreeBSD release
version, then installs the application, including any software dependencies it may have. By default, packages are downloaded from the main FreeBSD Package Repository (pkg.freebsd.org), but if there are any troubles after updating packages, previous version of packages cannot be installed because the repository denies subfolders indexes. In this case, a user must upgrade the OS version to the latest release and install latest packages.
FreeBSD maintains a
build farm called the ''pointyhat cluster'' in which all packages for all supported
architectures and major
releases are built. The build
logs and known errors for all ports built into packages through the pointyhat cluster are available in a
database
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
and weekly builds logs are also available through mailing list archives.
These pre-compiled packages are separated into categories by the architectures for which they are available. Packages are further separated into several "release" directories, one for each current ''production release'' built from the ports collection and shipped with the release. These production release directories are never updated.
There are also ''stable'' and ''current'' directories for several major release branches. These are updated more or less weekly. In most cases a package created for an older version of FreeBSD can be installed and used on a newer system without difficulty since binary backward compatibility across major releases is enabled by default.
A packaging system for binary packages called
pkg
has replaced the package management system in
FreeBSD 10.
History
Jordan Hubbard committed his ''port make macros'' to the FreeBSD CVS repository on August 21, 1994.
His package install suite ''Makefile'' had been committed a year earlier (August 26, 1993).
The core ports framework was at first maintained by Hubbard along with Satoshi Asami for several years. The Ports Management Team was later formed to handle this task.
NetBSD's pkgsrc and
OpenBSD's ports collection trace their roots to FreeBSD.
DPorts
Since its release, 3.6
DragonFly BSD project uses FreeBSD Ports as a base for its own ''DPorts'' ports collection. John Marino of DragonFly BSD project created ''DeltaPorts''
repository – a collection of patches and files that overlay and modify the FreeBSD Ports, in order to generate DPorts.
See also
*
MacPorts
References
External links
Official FreeBSD Ports web pageFreshPorts- website that tracks port updates
Port-Tags - Project to add tags to the ports collection
from the
FreeBSD Handbook (Chapter 4)
{{Package management systems
Free package management systems
FreeBSD