How to update FreeBSD source trees using CVSup
Sometimes it is necessary to get an updated release of a particular FreeBSD distribution
(bug fixes, new device drivers). For example, the current release of FreeBSD 4.7 might have
changed somewhat between April and October of 2002, and you need the most recent updates
which have driver support for a particular network card.
CVSup allows an easy way to update your source tree. Here are quick and easy steps to work with
More information is available from the CVSup page of the FreeBSD Handbook.
- If cvsup is not already installed on your system, add it as a package from the installation cdrom.
- Add a firewall rule to allow connections to the Internet:
> ipfw add 450 allow tcp from any to me established
- Edit a supfile. Here is a template. It updates
the entire source tree. Although this is an easy and quick step, it's
probably a better idea to restrict the update (it saves you time when you
don't have to update the entire source tree).
Note: See the link at the bottom of the page for detailed info on format and options for this file.
- Update the source tree:
> cvsup -g -L 2 <supfile>
- Update the configuration files for your machine:
> mergemaster -p
This step could be a little tricky. However, the basic idea is to keep the configuration that you already have and add the updates to it. More information on mergemaster can be found in the make world page in the FreeBSD handbook.
- Recompile the updated source trees:
> cd /usr/src; make world
- Remove the firewall rule to the Internet:
> ipfw delete 450
Revised by David Ott 17 Mar 2003