Guide to mod_cvs


Contents

Background information
What it does
What it doesn't do
Future plans
Getting it
Installing it
Questions, comments, ideas

Background information

Since you're reading this, you're probably either using, or planning on using CVS with web development. I discovered CVS when I started managing a fairly large website at the College of Engineering, Kista. After doing hundreds of commits and updates I started looking for a way of getting the webservers to work a little smarter with CVS, and mod_cvs is the result.

What it does

Every request Apache receives is passed through a number of handlers. mod_cvs is one of these handlers. What mod_cvs handles is CVS, Concurrent Versions System.

mod_cvs recognizes if the files in your webtree are checked out from a CVS repository. If so, it checks if the file is up-to-date and, if not, updates it.

Another neat feature of mod_cvs is the date-checkout feature. You can specify a date in the URI that gets passed to CVS, which checks out an older revision of the requested file and sends it to the user.

What it doesn't do

Future plans

More ideas (or patches) would be greatly appreciated...

Getting it

I have an anonymous CVS server that you can use. It copies the files from my active repository to the public one once an hour, so things should be up-to-date most of the time.

  1. Chdir to a working directory of your choice and make sure cvs is in your path.
  2. Make sure a kerberized rsh client or anything like that is not in your path, else set the CVS_RSH environment path.
  3. cvs -d anoncvs@anoncvs.sub.nu:/cvs get mod_cvs

If you're not interested in getting the latest development version, or if you run into problems with Anon-CVS, you can get the latest release (not as new as the CVS check outs) via FTP.

Primary site: ftp.sub.nu
Alternate site: ftp.isk.kth.se

A checked out version of the mod_cvs source is also available right here on the web.

There are no pre-compiled binaries and there probably never will.

Installing it

You might want to consider compiling your server with support for DSO (Dynamic Shared Objects), because that way you won't have to rebuild your server everytime you get a new version of mod_cvs.

  1. Edit the site-specific variables in the Makefile.
  2. Run make.
  3. Move mod_cvs.so to a directory of your choice.
  4. Add the following line to your httpd.conf:
    LoadModule cvs_module /path/to/mod_cvs.so
  5. Edit your access.conf in a <Directory> or <Location> section, or place a .htaccess file anywhere in your checked-out webtree that says: CVSCheck On
  6. Restart your server with cvs in the path and the CVSROOT environment variable set. Don't forget the server must have write-permission in the webtree.

    NOTE: If you don't use a patched version of CVS, the webserver must also have write-permission to your repository's history-file. I advise you to use a patch to fix this. I use a version of CVS that I got from OpenBSD somewhere. I might more specific here in a while...

Questions, comments, ideas

Whatever it is, mail me: martin@insulander.com

Contents
Back to mod_cvs home


Last updated Wednesday, 09-Dec-1998 14:41:29 MET
Copyright © 1998 Martin Insulander, martin@insulander.com