HostOnNet Blog

Updating freeBSD ports with cvsup

Looking for Linux Server Admin or WordPress Expert? We can help.

Step 1

You will need to install cvsup. Which will download the latest information about the ports.

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

Step 2

Now we need to make a file so the cvsup will know what to download from the FreeBSD server updates.

cd /etc
vi cvsupfile

Now create and save the file with the following written in it:

*default host=cvsup2.FreeBSD.org
*default base=/usr
*default prefix=/usr
*default release=cvs
*default tag=none
*default delete use-rel-suffix
*default tag=.
ports-all
doc-all

Step 3

Now you can easily upgrade the ports tree at any time by logging into your SSH as admin/root and typing:

/usr/local/bin/cvsup -g -L2 /etc/cvsupfile

Doing this manually once a week is preferable since many programs change pretty quickly.

To have the tree update automatically (which I don’t trust and neither should you Wink) we will first login to root and type:

crontab -u root -e

-u flag tells crontab to tweak the following user’s crontab and the -e flag tells crontab to edit the file.

We will then add something like this:

#minute hour mday month wday command with full path
0 3 * * * /usr/local/bin/cvsup -g -L2 /etc/cvsupfile

This tells the cron to update at 3:00 A.M. every morning.

Save and exit and you are done.

Posted in Uncategorized. Bookmark the permalink.

One Response to Updating freeBSD ports with cvsup

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.