csup(1) is part of the base system of FreeBSD and can be used as a tool to help you keep your systems ports, docs, & source updated.
It offers the user a greater deal of flexibility in updating their source files. Unlike freebsd_update(1), either STABLE or CURRENT (aswell as RELEASE) can be tracked.
The first requirement is to make a symlink under /usr/ports/. For instance:
# ln -s /usr/ports/INDEX-7 /usr/ports/INDEXwould be required if you use FreeBSD-7. Obviously, if you're using FreeBSD-6 or FreeBSD-8, you have to change the above accordingly.
The next requirement is to setup your sup files. Three files are required: one for the source of FreeBSD, one for the document source (written in SGML) and one for ports.
The examples found under /usr/share/examples/cvsup/ are suitable given one edit:
standard-supfile (the source supfile) needs a proper tag. To track 7.1 for example, a line like:
*default release=cvs tag=RELENG_7_1is needed in the supfile. The available tags are listed on this page.
The file ports-supfile is fine as it is, as is doc-supfile. They both track HEAD as ports and docs do not have branches unlike the system sources.
What is needed is a refuse file: /var/db/sup/refuse, which contains a list of all the docs (and/or ports) that aren't wanted (i.e the foreign ones). This saves on bandwidth by not downloading files that are not needed:
doc/bn_*
doc/da_*
doc/de_*
doc/el_*
doc/es_*
doc/fr_*
doc/hu_*
doc/it_*
doc/ja_*
doc/mn_*
doc/nl_*
doc/no_*
doc/pl_*
doc/pt_*
doc/ru_*
doc/sr_*
doc/tr_*
doc/zh_*
The next task is to configure /etc/make.conf. The following lines are needed in there, with SUPHOST set appropriately. There's a list of sup servers at the bottom of this page
SUP_UPDATE?= "yes"
SUP?= /usr/bin/csup
SUPFLAGS?= "-g -L 2"
SUPHOST?= cvsup3.uk.freebsd.org
SUPFILE?= /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE?= /usr/share/examples/cvsup/ports-supfile
DOCSUPFILE?= /usr/share/examples/cvsup/doc-supfile
DOC_LANG?= en_US.ISO8859-1
FORMATS?= html-split
.if ${.CURDIR:M*/textproc/docproj}
WITH_JADETEX=no
.endif
Then copy this script to /usr/local/sbin/ and run it when you want to update your ports, source & docs.
#!/bin/sh
#
# Update source, docs and ports
LOCAL_DIR="$(pwd)"
cd /usr/src
make update
cd /usr/ports
make fetchindex
echo "Now run:"
echo "# /usr/local/sbin/portsdb -u "
echo "# /usr/local/sbin/pkgdb -uvF "
cd $LOCAL_DIR
The ports-mgmt/portupgrade port needs to be installed if you're going to run portsdb & pkgdb. The recommendation is to install it (or use ports-mgmt/portmaster) and use it for managing your ports.
The downloaded docs' sgml source files can now be built into the required format.
This requires the port textproc/docproj.
Note: Above in /etc/make.conf, docproj has been set to be built without jadetex. This means that TeX isn't installed and consequently the postscript & pdf versions of the docs cannot be built although the html docs can.
To build an HTML version of the handbook:
# cd /usr/doc/en_US.ISO8859-1/books/handbook
# make install This will exit with an error. Ignore this; a directory listing should show the docs have been built and the index of the handbook can be found at file:///usr/share/doc/en_US.ISO8859-1/books/handbook/index.html
If you want to build all the documentation, then go higher up the directory tree and run make there. i.e:
# cd /usr/doc
# make install |
Last updated:
|
|