Chapter 12. Updating the System from Sources

Table of Contents
12.1. Create a cvsup supfile
12.2. Read /usr/src/UPDATING
12.3. Check /etc/make.conf variables
12.4. Pre-buildworld Mergemaster
12.5. Single User Mode
12.6. Recompile the source: Buildworld
12.7. Compile and Install a New Kernel
12.8. Installworld
12.9. Using Mergemaster
12.10. Removing old files, libraries and directories

These notes are based on information found in the Handbook. The Handbook should be consulted to verify that the process has not changed.

Warning: It is not recommended to use this method to update the system from the 4.x branch to the 5.x branch. The safest approach is to backup important data, perform a new installation and then restore the data.

You should have adequate backups of any important data before attempting the updating.

12.1. Create a cvsup supfile

You can track any branch by using the appropriate CVS tag. See the Handbook section for CVS Tags for possible tags: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html.

These are some examples:

If you want to track the STABLE branch, an example is provided that can be copied:

# cp /usr/share/examples/cvsup/stable-supfile /root

Only one change is needed to the /root/stable-supfile. Use your favorite editor to set the host from which updated sources will be obtained. This line will need to be changed to a suitable ftp server:

*default host=CHANGE_THIS.FreeBSD.org

This is an example of how the final line would appear:

*default host=cvsup11.FreeBSD.org

Updating the sources is easily done with:

# cvsup -g -L2 /root/stable-supfile

You may have bad luck in cvsupping your source when someone was doing a major commit. In this case, all you have to do is to re-cvsup your sources again and repeat the steps.

Also note that the developers get more active the week before a code freeze so its good to be a bit more cautious during that time. Problems like catching a snapshot of the source tree "between commits" and that sort of thing become more likely during that week. It is even more important to be reading the appropriate mailing lists during this time to watch for problems before updating.

# The following line is for 5-stable:

*default release=cvs tag=RELENG_5

Other options are RELENG_5_3_0_RELEASE (tag - not a branch) that points to what got burned onto the 5.3 release CDs. It doesn't change. RELENG_5_3 is a branch based off of 5.3, that will contain only security fixes. RELENG_5 is the -stable branch that will eventually have 5.4, 5.6, etc branched from it.