Back to article

Using the Apache CVS Repository

Keeping Up with Apache's Bleeding Edge

April 13, 2000

The Apache HTTP Server project keeps all of its source files in a central CVS source code repository. As changes are made, they are applied to this master repository; when a release is built, it is assembled from the same repository. But suppose you want to keep up with the latest and greatest Apache developments (and bugs), without having to wait for a release? How would you do it? That's what this article is all about.

Assumptions in This Article
For the rest of this article, I'm going to make the following assumptions:

  1. your Apache source tree starts at ./apache-1.3/
  2. your Apache ServerRoot is /usr/local/web/apache
  3. your Apache DocumentRoot is /usr/local/web/htdocs
  4. the username under which Apache runs (the value of the User directive in your httpd.conf file) is nobody
  5. Code examples appear in this typeface. Text you type exactly as shown is bold-face; placeholders for which you substitute a real value are italicised.

All of the cd and other shell commands in this article that refer to directories use these locations.

Ways of Accessing the Source
Members of the Apache core development team have direct access to the repository. When one of them makes a change, it's available to all the others instantly. However, how can that change percolate out to where people who aren't members of the team can get it and try it out? There are currently three methods of doing this; each has its own advantages and disadvantages.

anonymous CVS
This method allows you to keep up by accessing a copy of the master repository. At least two systems currently make such copies at intervals and allow those copies to be accessed using a generic read-only account. This 'generic' account is similar to the 'anonymous' account used to access FTP repositories, hence the name 'anonymous CVS,' like 'anonymous FTP.'
Needs: a CVS client.
tarball download
Synchonising with the sources this way is as simple as pulling down a compressed tar archive and unpacking it.
Needs: a Web browser, the ability to gunzip files, and a tool capable of reading tar archives.
The rsync tool allows you to keep a local directory tree in sync with a remote one. In this case, you can use it to keep your local copy of the Apache sources in lockstep with one of the readonly copies of the master repository.
Needs: an rsync client.

Since all of these methods are working on copies of the master repository rather than the master itself, the freshness of your source is directly dependent on the freshness of the copy.

Using the 'Anonymous CVS' Method
This method of playing catch-up involves using CVS itself in client-server mode. One or more systems out on the Internet periodically make copies of the master Apache repository, and you use CVS to make a local copy of one of these and keep up to date with it.

  • Once a local copy is established, updates are small--only changes are copied
  • You can maintain local customisations in your copy of the tree, and CVS will merge in changes from the master--and let you know when your changes conflict with alterations made to the master
  • cvs diff makes it easy to submit local changes to the Apache project for possible inclusion
  • Requires a CVS client
  • Lots of back-and-forth network traffic during an update; can be slow

The currently working anonymous CVS repository is maintained at the Sourcery.Org site. It is refreshed from the master repository every two hours (on the odd-numbered ones).

To obtain ('check out') a copy of the Apache 1.3 source tree, or update an existing checked-out tree, use the following commands:

    export CVSROOT=:pserver:anonymous@CVS.Sourcery.Org:/cvs/apache
    cvs login
    CVS password: anoncvs     [not echoed]
    cvs checkout apache-1.3

As long as you don't do a cvs�logout, you only need to log in once. If you want the Apache 2.0 source tree instead, use apache-2.0 instead of apache-1.3 in the example.

You can avoid having to set the CVSROOT environment variable every time by cding into the apache-1.3 directory and doing a cvs�update instead of a checkout. The main disadvantage to that is that it won't pick up any new subdirectories (and files in 'em) that have been created since the last time you updated your local copy.

Sitemap | Contact Us