Following -stable (the "Patch branch")

Table Of Contents

What is the -stable (patch) branch?

Starting with 2.7, OpenBSD provides a source tree that contains important patches and fixes (i.e. those from the errata plus others which are obvious and simple, but do not deserve an errata entry) and makes it available via CVS, in addition to the -current source. Thus, users can choose three options :

As a general principle, all errata entries will be merged into the patch branch within 48 hours of when an errata is published. Other post release patches may be merged in as well, subject to a number of conditions:

It is worth pointing out the name -stable refers ONLY to the API and operations of OpenBSD not changing, not the overall reliability of the system. In fact, if things go as desired, the -current flavor of OpenBSD, on its way to becoming the next -release, will be an improvement in reliability, security and overall quality over the previous -release and -stable.

Getting -stable source code

To obtain the patch branch for a particular release of OpenBSD, you can update on top of a pre-existing source tree (from FTP or the CD) or you can grab the source tree freshly from an AnonCVS server. Instructions for getting the patch branch and staying up to date are described in the Getting Started section of the AnonCVS documentation. Note that patch branches do not help to upgrade from one release of OpenBSD to another, e.g. to go from 4.5 to 4.6. They only provide a means for staying up to date with the patches within a given release.

Do not attempt to go from one release to another via source. Instead, please visit the upgrade guide. Also, you cannot go backwards, from -current back to -stable, because of library versioning problems and other changes.

Building OpenBSD -stable

Full details on building from source are provided in FAQ 5 - Building the System from Source. This is a simplified summary.

Once you have obtained a source tree via anoncvs, you must rebuild the system. The stages for doing so are:

Rebuilding the kernel

To rebuild the default kernel from stable:

# cd /usr/src/sys/arch/i386/conf
# /usr/sbin/config GENERIC
# cd /usr/src/sys/arch/i386/compile/GENERIC
# make clean && make depend && make

Replace i386 with your architecture, e.g. sparc, alpha, etc.

Rebooting with the new kernel

To reboot with the newly compiled kernel:

# cd /usr/src/sys/arch/i386/compile/GENERIC
# make install          (Safely install new kernel)
# reboot

As above, substitute your architecture for i386. If your system has trouble booting the new kernel, you can easily go back and reboot from the old kernel, now called obsd.

Rebuilding the binaries

To rebuild the system binaries:

# rm -rf /usr/obj/*
# cd /usr/src
# make obj
# cd /usr/src/etc && env DESTDIR=/ make distrib-dirs
# cd /usr/src
# make build

This will take awhile...

If you have a number of machines to keep at -stable, you may wish to make a release, creating the standard install file sets, which can then be quickly and easily installed on any machine of the same platform.

OpenBSD www@openbsd.org
$OpenBSD: stable.html,v 1.27 2009/10/25 14:39:35 steven Exp $