Update FreeBSD Ports Collection Up to Date and Latest

»»»Update FreeBSD Ports Collection Up to Date and Latest
CVSup can be used as a quick method for getting the Ports Collection and keep the ports tree up to date. CVSup distributes and updates source trees from a master CVS repository on a remote server host. The FreeBSD sources are maintained in a CVS repository on a central development machine in California. With CVSup, FreeBSD users can easily keep their own source trees up to date.

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

There are few ways to install CVSup in FreeBSD:

  1. Install CVSup by using the precompiled net/cvsup package from the FreeBSD packages collection
  2. Build CVSup from source by using the net/cvsup port (which includes CVSup GUI). Warning: the net/cvsup port depends on the Modula-3 system, which takes a substantial amount of time and disk space to download and build.

If CVSup is installed on a machine which does not have XFree86? or Xorg installed, such as a server, use the port which does not include the CVSup GUI, net/cvsup-without-gui.

For example,

# pkg_add -r cvsup-without-gui

Or build from ports collection at net/cvsup-without-gui.

After installing, CVSup is ready and can be executed with the following command:

# cvsup -L 2 -h cvsup.FreeBSD.org /usr/share/examples/cvsup/ports-supfile

where cvsup.FreeBSD.org is a CVSup server that change be change to a CVSup server near you. See CVSup Mirrors for a complete listing of mirror sites.

Replace /root/ports-supfile with your own supfile name and location.

The -L 2 tells CVSup to print out the details of all the file updates it is doing. There are three levels of verbosity, from -L 0 to -L 2. The default is 0, which means total silence except for error messages.

While -h specify the supfile location.

It’s also possible to create a configuration file for CVSup to avoid the need of passing the CVSup server on the command line. CVSup’s operation is controlled by a configuration file called the supfile. There are some sample supfiles in the directory /usr/share/examples/cvsup/.

As root, copy /usr/share/examples/cvsup/ports-supfile to a new location, such as /root or your home directory.

Edit ports-supfile.

Change CHANGE_THIS.FreeBSD.org to a CVSup server near you. See CVSup Mirrors for a complete listing of mirror sites.

To run cvsup by using the supfile, use the following as root, so that cvsup has the permissions it needs to update your files:

# cvsup -L 2 /root/ports-supfile

Replace /root/ports-supfile with your own supfile name and location.

The -L 2 tells CVSup to print out the details of all the file updates it is doing. There are three levels of verbosity, from -L 0 to -L 2. The default is 0, which means total silence except for error messages.

If you are not running X11 or if you just do not like GUIs, you should add a couple of options to the command line when you run cvsup and your CVSup is installed with GUI:

# cvsup -g -L 2 supfile

Replace supfile with your own supfile name and location.

The -g tells CVSup not to use its GUI. This is automatic if you are not running X11, but otherwise you have to specify it.

Running the CVSup command later will download and apply all the recent changes to your Ports Collection, except actually rebuilding the ports for your own system.

By |2016-12-09T08:43:38+00:00December 9th, 2016|Categories: Linux|Tags: , , , |0 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.