The Apache HTTP Server Project

This page is intended to provide some basic background about development nits and the maintenance of the developer site.

Almost all files relating to Apache, either the actual sources or the files that aren't part of the distribution, are maintained in a CVS repository. Here is the way in which changes are applied:

  1. Developer checks out a copy of the files on which it wants to work, into a private working directory:

    % cvs checkout apache

    This step only needs to be performed once.

  2. Developer keeps its working directory synchronised with changes made to the repository:

    % cvs update apache

    This should probably be done daily or even more frequently during periods of high activity.

  3. Developer makes changes to its working copies, makes sure they work, and generates a patch so others can apply the changes to test them:

    % cvs diff -u apache/src/mod_mime.c > /tmp/foo

    The /tmp/foo file is mailed to the developers list so they can consider the value/validity of the patch. It is also worth making sure your code follows the Apache style, as described by the GNU indent flags in the .indent.pro file in every source directory.

  4. Once other developers have agreed that the change is a Good Thing, the developer checks the changes into the repository:

    % cvs commit apache/src/mod_mime.c

There are several different modules in the Apache CVS repository:

apache-1.3

To create a directory tree containing the 1.3 sources, and call it apache-1.3, change your current directory to the parent of the tree and then check the 1.3 sources out as follows:

% cd /usr/local/apache
% cvs checkout apache-1.3
httpd-2.0

To create a directory tree containing the 2.0 sources, and call it httpd-2.0, change your current directory to the parent of the tree and then check the 2.0 sources out as follows:

% cd /usr/local/apache
% cvs checkout -d httpd-2.0 -r APACHE_2_0_BRANCH httpd-2.0
% cd httpd-2.0/srclib
% cvs checkout -r APR_0_9_BRANCH apr
% cvs checkout -r APU_0_9_BRANCH apr-util

The httpd-2.0 repository takes advantage of APR and APR-util from the Apache portable run-time, so those must be checked out separately. Because not all httpd contributors have access to APR, you may need to use anonymous CVS to get those repositories. We are looking in to solving this problem.

httpd-2.1

If you want to check out the bleeding edge of development, the httpd-2.1 development tree (slated for a release 2.2), use cvs HEAD as follows:

% cd /usr/local/apache
% cvs checkout -d httpd-2.1 httpd-2.0
% cd httpd-2.1/srclib
% cvs checkout apr apr-util
site

This module contains the files that live at http://www.apache.org/. The directory on the host that maps to that URL is actually a set of checked-out working copies of the CVS files.

It is important that the files on the Web host not be modified directly. If you want or need to change one, check it out into a private working copy, modify that, commit the change into CVS, and then perform a cvs update -dP to bring the host directory into sync with the CVS sources.

The Web site directories are not maintained in synch with the CVS files automatically. They are manually updated from CVS by various people as they consider appropriate. This is usually not an issue, unless a group of files are being updated according to an ongoing group discussion.

httpd-site

Like the site module, this one is used to maintain the files that comprise a website - in this case, http://httpd.apache.org/. Also like the previous module, the directory on the server is a checked-out working copy of this module.

httpd-dist

Like the site module, this one is used ot maintain the files that comprise a website - in this case, http://www.apache.org/dist/httpd/. Also like the previous module, the directory on the server is a checked-out working copy of this module. However, since this is a distribution directory, we only have the surrounding documentation and control files checked into this module -- the actual tarballs are simply copied to www.apache.org.

Most of the Apache Group members with access to the CVS repository actually do their work on their local machines and keep synchronised with the repository through remote CVS. See the ABOUT APACHE page for information about how the group works and people get access to the CVS repository.) One way to set this up using the ssh (secure shell) tool:

  1. You need an account on the Apache repository system. If you've been "voted in" for direct access to the repository, this should have been set up for you. (You know if you have it.)
  2. Include the following in your login files on your local (UNIX) machine:
           setenv CVSROOT repository-system:/home/cvs
           setenv CVS_RSH /usr/local/bin/ssh
           setenv CVS_SERVER /usr/local/bin/cvs
        
    Adjust the last two paths to correctly reflect the locations of cvs and ssh on your local system.
  3. Set up the following environment in your account on the Apache repository system:

          setenv CVSROOT /home/cvs
          setenv CVS_RSH /usr/local/bin/ssh
          setenv CVS_SERVER /usr/local/bin/cvs
        

    These are the correct locations for the repository system, so you don't need to edit them.

  4. On your local system generate your SSH public key file ~/.ssh/identity.pub via ssh-keygen and then put it in ~/.ssh/authorized_keys on the repository system. If you use the ssh-agent this will allow you to access the repository without having to enter a password for each CVS operation. Use ssh-add and enter your passphrase once when you start a session, and ssh-add -D at the end of the session to delete your unencrypted key(s) from the agent.

Ralf Engelschall has written an excellent explanation on how to use remote CVS with the "cvsup" functionality we have available now.

http://www.engelschall.com/pw/apache/cvsguide/


Copyright © 1999-2004, The Apache Software Foundation