Apache Development Notes
|
This page is intended to provide some basic background about
development nits and the maintenance of the developer site.
|
Maintaining the Sources
|
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:
- 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.
- 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.
- 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.
- 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
|
CVS Modules
|
There are several different modules in the Apache CVS repository:
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.
|
|
Setting Up Remote CVS
|
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:
- 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.)
- 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.
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.
- 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.
|
Working with the Apache Source CVS Repository remotely
|
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/
|
|