© 2015 Warren Block
Last updated 2015-07-12
Upgrading FreeBSD to the latest -STABLE version.
Introduction
FreeBSD changes all the time, and changes to the source are checked in every day. Upgrading to the latest -STABLE version provides all this new code without breaking installed programs.
That Word Does Not Mean What You Think It Means
The name "-STABLE" is frequently misunderstood. It does not mean solid or steady. -STABLE means that while code can change, the ABI (Application Binary Interface) will remain stable and not change. Programs compiled to run on FreeBSD 10.0-RELEASE, or 10.1-RELEASE, or 10.2-RELEASE will continue to work on FreeBSD 10-STABLE. Effectively, -STABLE is the latest version of FreeBSD you can get without breaking installed software.
Using svn(1)
The FreeBSD source code in /usr/src is updated with svn(1) from the
devel/subversion port. This example shows updating to FreeBSD
10-STABLE. If an old /usr/src directory already exists and was not
created by svn
, remove or rename it first. Do not check out source
over an existing directory, it will cause unexpected problems later.
The Handbook has a list of Subversion mirror sites. Pick one close to you.
Installing and using Subversion is described in the Handbook.
The first step is a checkout of the source code. svn
connects to
the mirror and downloads the entire stable/10 source to the /usr/src
directory:
# svn checkout https://svn0.us-west.freebsd.org/base/stable/10 /usr/src
Verify the server fingerprint against the fingerprints shown in the Subversion mirror sites link above.
The checkout only needs to be done once. Afterwards, the source can be quickly updated to the latest version in the Subversion repository with an update command:
# svn up /usr/src
Now What?
After the source is updated, build and install world and kernel as normal. See Simplifying FreeBSD Kernel Config Files and Building FreeBSD World And Kernel