Quick Guide: Installing CVSup and the Ports Collection on FreeBSD 4.7
January, 2 2004

This guide covers one method to install and setup CVSup to update your Ports collection. Please check out the FreeBSD handbook for more information on configuring CVSup and installing applications via the ports collection. This guide is geared towards a high-bandwidth connection and may not be practical for dialup users. There are, however, some comments at the end of this document which may assist dialup users. The following versions were used for this guide:

  FreeBSD 4.7
  cvsup-without-gui-16.1h
  ezm3-1.1


Install The Ports Collection (If you don't have them yet.)

Check for the existence of /usr/ports directory. If it is not there, you will need to install the Ports. Here, we will be installing them from the CD-ROM with Sysinstall and then update with CVSup. Run the following command to invoke the FreeBSD Synstaller:

/stand/sysinstall

Select the following form the Sysinstall menu:

Select Configure and press Enter.
Select Distributions and press Enter.
Scroll down and select "ports", Tab to [OK] press Enter.
Select install media [such as CD-ROM] and press Enter.
Once the ports are installed, select Exit and then Exit again.

You should now have a /usr/ports directory containing a subdirectory for each category. Each category contains subdirectories corresponding to each port in that category. Each port directory contains its own skeleton files which provide essential information on how to patch and compile that port. Note that the actual distfiles (source files) are not included. The Ports collection will not consume your entire drive. The skeleton files are updated when we run CVSup, and the distfiles are only downloaded when we build (make) a port.


Installing CVSup

I will be using cvsup-without-gui, however, you may choose to use cvsupit which provides a menu based setup and a GUI. I find cvsup-without-gui to be simpler. You can download and build CVSup from the ports by changing to /usr/ports/net/cvsup-without-gui (or cvsupit) and running make install. This will take at least 1/2 hour on a fast machine. In this case, I prefer to just install the package--much quicker!

NOTE for FreeBSD 4.10: I would recommend using the ports collection. The compile is long, but it will grab the dependencies that are not included here. Simply change to the /usr/ports/net/cvsup-without-gui directory then then issue: make install clean

You will need to grab the following precompiled packages (not the ports) from FreeBSD or a mirror:

  cvsup-without-gui-16.X.tgz (category net)
  ezm3-X.X.tgz (category lang)

Being sure you are in the directory that holds the package files. Install in the following order with pkg_add.

pkg_add ezm3-1.1.tgz (dependency for cvsup)
pkg_add cvsup-without-gui-16.1f.tgz

If you are using one of the FreeBSD default c-shells you will need to issue 'rehash' before CVSup is recognized, or just reboot if you are lame. (Newbe Note: Issue set | grep shell (without the quotes) to discover which shell you are using. Result will be something like /bin/csh. csh is our shell.)

rehash

You can issue the following to CVSup. You should be greeted with version information:

cvsup -v


Configuring And Running CVSup

Before we can run CVSup, we must create a supfile which is the only mandatory config file for CVSup. We can place the supfile anywhere in our directories. I will use /etc/supfile as this requires less typing, all though /usr/local/etc/cvsup/supfile may make more sense to you. The below example of a supfile would update all of the ports collections and documentation from the cvsup10.FreeBDS.org server.

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

You could create this file now if you had confidence in your typing skills. No offense, but I would recommend you take a quick look at the examples in /usr/share/examples/cvsup and copy one of those files to /etc/supfile. You will want to look at standard-supfile, ports-supfile, and stable-supfile. If you are going to hack your own supfile, you may want to take a looksee at the section just below DANGER! WARNING! LOOK OUT! VORSICHT! in the stable-supfile.

We will copy the /usr/share/examples/cvsup/ports-supfile to /etc/supfile. We will also add the doc-all (documentation) collection.

cp /usr/share/examples/cvsup/ports-supfile /etc/supfile

Edit the 'supfile' with your favorite editor. I will use 'ee' for this example (Use [Escape] to exit 'ee').

ee /etc/supfile

  1. Change *default host=CHANGE-THIS.FreeBSD.org to a CVSup server near you. You will find a list here.
  2. Add doc-all just below ports-all if you wish to update documentation along with the Ports collection.
That is it! You are ready to update you Ports with the following: (Firewall Note: You will need to allow outbound connections on TCP port 5999. One example for IPfw: ipfw add [rule number] allow tcp from any to any 5999 out via [interface name] )

cvsup -g -L 2 /etc/supfile

The -g means no dang GUI, the -L indicates verbosity level which we have set to 2, and '/etc/supfile' is the path to your supfile. Issue man cvsup or cvsup --help for more info. Also, it would be polite to note that there is a space between -L' and 2 as well as the other options. Dialup users will want to edit their supfile to include only the collections they need. Before doing that, read the sample files and always include ports-base. Also be careful with the tag= values.

Glenn Sidman
email address