Print View

Updating the Ports Tree
Created: 02/17/2003


General Information

The ports tree (/usr/ports) contains many useful programs that have been ported over to work on FreeBSD.  Almost every tutorial here uses something from the ports collection in one way or another.  Since all programs are constantly being updated, it's a good idea to update your ports tree at least once every week to stay current with all the changes that are happening.  While this tutorial will not tell you how to setup a program to upgrade every ports program you install (one does exist) it will tell you how to keep the make files current so you'll always be compiling the latest version.  For an extensive resource on what ports are constantly being updated see FreshPorts.org.

Requirements

  1. Local root access on the box or be able to su to root.
  2. A SSH client that supports ANSI colors such as puTTy or SecureCRT.
  3. Your favorite text editor (I prefer nano).

Installation

After logging on to the machine as root or su'ing to root, we need to install cvsup, the program that will download the latest information from the FreeBSD servers.
#
#
#
cd /usr/ports/net/cvsup-without-gui
make install
make clean

Configuration

Now it's time to make the config file that cvsup will use so it knows what to download from the FreeBSD update servers.
#
#
cd /etc
nano cvsupfile
Create and save a file that looks like the following:
*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
To upgrade the ports tree at any time, simply log in as root and issue:
# cvsup -g -L2 /etc/cvsupfile
If you don't want to upgrade the ports tree manually, you can make it automatic.

Author: Kyle Symonds
ksymonds at gmail dot com



7 Comments

Posted by on March 17, 2005 at 10:09:45 am EET

Thanks. This made a simple task very simple.


Posted by on March 17, 2005 at 10:09:45 am EET

Very good indeed! Works a treat


Posted by thekore on March 17, 2005 at 10:09:45 am EET

thanks, doing it right now to upgrade from 4.8 to 4.10 :D


Posted by onsitepcs on March 17, 2005 at 10:09:45 am EET

cvsupfile should be in /usr/local/etc ?


Posted by weasel on March 17, 2005 at 10:09:45 am EET

It can be thrown anywhere you desire, just remember where you put it because you need it in the final bit of the cvsup command.


Posted by rhyous on February 04, 2007 at 3:04:19 am EET

What about the refuse file?  Where does it go?


Posted by rhyous on February 04, 2007 at 3:28:54 am EET

Never mind I found the default location for it:

/var/db/sup/refuse


Copyright 2003 - 2008 BSD Guides.  All rights reserved.

About | Terms of Use | Privacy | Contact