Skip to main content

Update Ports Tree in FreeBSD 6.2, 7.x and 8.x

Posted in
Your rating: None Average: 3.5 (6 votes)

To update your ports, you must first install the cvsup-bin utility. You can either
download and install it using the ports tree, or you can install it from the FreeBSD
CDROM. Next, you need to modify the ports-supfile, which is used to choose a repository
site and shall determine what ports will be updated (all ports by default). Finally, you
need to execute the cvsup command and update your ports tree. In writing this article, I
assume that you already have a connection to the internet available to your FreeBSD box.

This works in 6.2,  7.1, 7.2, 8.x
Buy and Sell Cisco Network Gear.

1. Install cvsup-bin The cvsup utility is the client/server program used
to compare the cvs repository and your ports tree. It then downloads only the ports that are newer
or have changed since your install or last update. You need to be logged in as root to install this
utility.

Login as root

prompt# cd /usr/ports/net/cvsup-without-gui
prompt# make install && make clean

 

2. Create or Modify the supfile Once you have installed the cvsup utility,
you will need to create or modify a supfile. The supfile is the configuration file used by cvsup.
You can find sample supfiles in the /usr/share/examples/cvsup/ directory. Copy the ports-supfile
from the example directory to your /root directory.

 

prompt# cp /usr/share/examples/cvsup/ports-supfile /root
prompt# cd /root
prompt# chmod u+w ports-supfile
prompt# vi ports-supfile


Edit the line that points to the site you will be using. It can be cvsup1 through cvsup9.
You will get better performance depending on which site you select. You can use the traceroute
utility to determine the closest and fastest server near you. If you are unfamiliar with the
traceroute utility start with cvsup1.

 

 

Change:    *default host=CHANGE_THIS.FreeBSD.org

 

To:   *default host=cvsup1.FreeBSD.org


Comment (#) out the ports-all line and remove the comment (#) from the category you would like updated:
Save the file. In this example only the un-commented (no #) category of your ports tree will be updated.

First run you should un-comment base, lang, security, and www.

Update your ports Run the cvsup utility: issue the cvsup command and the name of your supfile.

Login as root

prompt# cd /root
prompt# cvsup ports-supfile

 

The cvsup utility will now attempt to connect to the server (cvsup1) and update your ports tree.
The name of the ports being updated will be displayed on the screen. A message stating that the update
is finished will be displayed when cvsup is done.

Notes: If you look through the example supfiles, you will find that there are several different supfiles.
Look at and use the ports-supfile and stable-supfile. Just as the ports-supfile is used to keep your ports tree
up to date, the stable-supfile is used to keep the source code of the FreeBSD os up to date. The source can later
be used to upgrade the operating system. For more information on the cvsup utility:

prompt# man cvsup

 

Good Luck.. Hope it works..
Ren

technical dev check

All works on a new FreeBSD 8.x  install.

wr

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.