cvsweb – graphical interface to cvs
As you may well know, I run cvsup.nz.freebsd.org. On that server,
but for my own use, I use cvsweb.
This port allows you to browse a CVS repository via the web. When I first
encountered this tool, I thought it was great. But recent advances have improved it.
There is now a .conf file into which you can customize various options.
Not to mention that the output and user interface are improved. Personally, I
like the coloured diff output.
cvsweb is of no use to you unless you have the
following on your box:
By the way, cvsweb will also run on NT according to what I’ve read.
Other reading
I suggest you have a read of these resources before you continue.
And if you have problems, go there first.
- /usr/local/share/doc/cvsweb/ has the documentation for cvsweb
- http://www.cyclic.com/ is the home page for cvs.
But I notice they have recently rebranded to site to be http://www.cvshome.org/ which looks very nice.
Installing
This should be familiar to you now. Since I have the entire ports tree installed, all I needed to do was:
/usr/ports/devel/cvsweb make make install
*** BUT: before you do the install, read about the Makefile
variables which allow you to customize the install. ***
There are a few things you must be careful with. My configuration was not the
default. Therefore, I had to move some things around. The next few sections
deal with how I did those moves.
After I wrote this article, Akinori -Aki- MUSHA provided some feedback which included
details on the Makefile variables.
cgi-bin location
My cgi-bin directory, and indeed my Apache location, is not standard.
The port install had put cvsweb.cgi here:
/usr/local/share/apache/cgi-bin/cvsweb.cgi
So I moved it to my actual cgi-bin directory:
/nzmirror/www-nz.freebsd.org/cgi-bin/
But there is a better way. See Makefile variables.
The configuration file
cvsweb uses the cvsweb.conf configuration file.
You are supplied with an example file. By default, this is installed to /usr/local/etc/.
And it is up to you to take a copy of this sample file:
cp /usr/local/etc/cvsweb.conf.sample /usr/local/etc/cvsweb.conf
In the configuration file, you’ll find a section which refers to the CVSROOT
repositories which cvsweb can expect to find on your box. By default, it
assumes you have a local cvs repository as well as the FreeBSD repository. That is
not the case on my box. I have only the FreeBSD repository. So I had to remove
the references to the local repository. Here’s what comes with the sample
configuration (this may be OK for you, maybe not).
To make it clear, the parts I changed are in bold.
# 'symbolic_name' 'path_to_the_actual_repository' %CVSROOT = ( 'local' => '/home/cvs', 'freebsd' => '/home/ncvs', ); %CVSROOTdescr = ( 'local' => 'My CVS Repository', 'freebsd' => 'FreeBSD', ); # This tree is enabled by default when # you enter the page $cvstreedefault = 'local';
Then I modified this file like this. You’ll see I removed references to local
and changed the default to FreeBSD.
# 'symbolic_name' 'path_to_the_actual_repository' %CVSROOT = ( 'freebsd' => '/nzmirror/ncvs', ); %CVSROOTdescr = ( 'freebsd' => 'FreeBSD', ); # This tree is enabled by default when # you enter the page $cvstreedefault = 'freebsd';
Icons and bitmaps
cvsweb uses a number of icons and bitmaps. By default,
these were installed to /usr/local/share/apache/icons/cvsweb/. I moved
these to where my installation of Apache could find them:
cp -R /usr/local/share/apache/icons/ /nzmirror/www-nz.freebsd.org/icons/
But there is a better way. See Makefile variables.
Makefile variables
The makefile for cvsweb contains two variables which specify the location of the
cgi-bin directory and the icons. You can specify the values for these variables and
the install will use those locations.
For instance, if your cgi-bin is at /usr/local/www/cgi-bin
and your icons directory is at /usr/local/www/data/icons, then you can do like
this:
cd /usr/ports/devel/cvsweb make CGIDIR=www/cgi-bin ICONSDIR=www/data/icons build install
This assumes that PREFIX is /usr/local (as is the case with the default
ports tree; you’ll know if you’ve changed it).
Seeing the output
You should now be able to use cvsweb by browsing to
http://localhost/cgi-bin/cvsweb.cgi.
Problems I encountered
Along the way, I encountered this error:
Error: $CVSROOT not found! The server on which the CVS tree lives is probably down Please try again in a few minutes.
This means cvsweb cannot find your cvs repository. Or, your
configuration file specifies a cvs repository which does not exist on your box.
That’s why I removed ‘local’ from the configuration file.
Check your settings against mine and try again.
I encounter the same problem .
Did you cvsweb.cgi ok now?
Yes, cvsweb.cgi is OK now. Check your .conf file.