CVSup vs Portsnap

Portsnap is a system for securely updating the ports tree by distributing signed compressed snapshots. This is the client half of that system; it downloads compressed snapshots into /usr/local/portsnap (“portsnap fetch”) and uses those to extract a ports tree into /usr/ports (“portsnap extract”) or update an existing tree (“portsnap update”).

In addition to operating entirely over HTTP, portsnap can use under a tenth of the bandwidth required by CVSup if a copy of the ports tree is being updated every few days.

CVSup update of the ports tree in one minute

CVSup is a software package for distributing and updating source trees from a master CVS repository on a remote server host.

CVSup uses the so-called pull model of updating. Under the pull model, each client asks the server for updates, if and when they are wanted. The server waits passively for update requests from its clients. Thus all updates are instigated by the client. The server never sends unsolicited updates. Users must either run the CVSup client manually to get an update, or they must set up a cron job to run it automatically on a regular basis.

The term CVSup, capitalized just so, refers to the entire software package. Its main components are the client cvsup which runs on each user’s machine, and the server cvsupd which runs at each of the FreeBSD mirror sites.

CVSup’s operation is controlled by a configuration file called the supfile. There are some sample supfiles in the directory /usr/share/examples/cvsup/.

The fastest, and certainly not most efficent way but will “suffice”, method to get up and running is to reuse one of the example files found here: /usr/share/examples/cvsup/

(If you have not installed CVSup use the sysinstall pkg method.)

In this case as we want to update the ports tree this particular one called “ports-supfile”

Just edit the host value around line 49 to “*default” after pinging the hsot to see if it is up…

then run “cvsup /usr/share/examples/cvsup/ports-supfile” and wait for your tree to update.