Cool :) 

Attached is some documentation on what all the scripts do, and
step by step instructions for installing the whole system on a new CVS


On Sun, 4 Feb 2001, Jon Stevens wrote:

> on 2/4/01 12:03 AM, "Jeff Turner" <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > I'd like to use the Jakarta CVS access control and commit emailing for a
> > company CVS server. This is the stuff get get if you run 'cvs checkout
> > 
> > There isn't any indication that the files are under the APL (or any
> > license), so can I assume it's in the public domain and usable by anyone?
> > 
> > I'll post installation instructions if that's the case.
> > 
> > 
> > --Jeff
> Yep, it is in the public domain. Have fun.
> -jon
> -- 
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> <> | <>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Written 4 Feb 2001
$Revision: 1.2 $ $Date: 2001/02/04 10:26:42 $


This file documents the Apache projects' CVS setup, namely the contents of
the CVSROOT directory, and how to install the Apache CVS system on a new
system. All comments and improvements welcome.

Access Control Lists

The Apache access control system is very flexible and very simple (much better
than the OS username technique described in the CVS book). The ACLs (access
control lists) determine whether a user has *write* access. Who has read access
is still determined by the 'readers', 'writers' and 'passwd' files. The Apache
ACLs work in addition to the standard CVS mechanism, not replacing it.

Here is a list of new files implementing the ACL, and what they do:

          The access control lists for determining write access. See
          the description in
          Program that parses 'avail' and decides whether a user has
          commit access
          Once a user has been authenticated against the ACL, this
          script creates a list of the files modified in this commit.
          This data is stored for later use by the logging script
 In this way, can combine
          changes in multiple directories, and mail a single message.

          Program invoked from commitinfo (the standard
          CVS hook into the commit process), which in turn invokes

Commit message Mailing System

By default with CVS, if files README and src/ are modified, two
separate commit messages will be emailed to the committers. This is because CVS
has a very file-centric model, and has little idea of project-wide differences,
and thus doesn't associate the changes in README and src/

The Apache script '' works in tandem with the commit checking
script '' to accumulate all changes made in one commit, and the
mailing *one* message to the list.

'' by default mails an Apache list, and thus needs minor
modification. See below for details.

Getting ACLs working on a new system

Here are the steps I performed to use the Apache CVSROOT system on a new CVS

1) Download the Apache CVSROOT directory as follows:

  [~/jakarta]$ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
  password: anoncvs
  [~/jakarta]$ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout 

2) Download the new server CVSROOT directory:

  [~/server]$ cvs -d :ext:jeff@localhost:/usr/local/src/CVS
  [~/server]$ cvs checkout CVSROOT

3) Tag the current version of new server's CVSROOT from a CVSROOT sandbox: 

  [~/server/CVSROOT]$ cvs tag before_apache

4) Copy the following files from the checked-out jakarta CVSROOT to the
checked-out server CVSROOT:

  [~/server/CVSROOT]$ cp ~/jakarta/CVSROOT/commitcheck .
  [~/server/CVSROOT]$ cp ~/jakarta/CVSROOT/ .
  [~/server/CVSROOT]$ cp ~/jakarta/CVSROOT/ .
  [~/server/CVSROOT]$ cp ~/jakarta/CVSROOT/avail .

5) Add these new files to the 'checkoutlist' file, so they'll be checked out on
the server CVSROOT:

[~/server/CVSROOT]$ cat >> checkoutlist 

6) Add the new files to CVS, and do a 'cvs update':

[~/server/CVSROOT]$ cvs add commitcheck avail 
[~/server/CVSROOT]$ cvs up
A avail
M checkoutlist
A commitcheck
M commitinfo

7) Edit the ACL to allow everyone to edit everything (or customise it now):

[~/server/CVSROOT]$ cat avail

8) As a test, forbid yourself commit to a project, in my case 'proj/usl':

[~/server/CVSROOT]$ cat avail


When I try to commit a change, I get this message:

**** Access denied: Insufficient Karma (jeff|proj/usl)
cvs server: Pre-commit check failed
cvs [server aborted]: correct above errors first!
cvs commit: saving log message in /tmp/cvsz0gU4N

9) Fix the 'avail' file to whatever you want and commit.

10) Tag the CVSROOT to indicate that ACLs are working:

[~/server/CVSROOT]$ cvs tag with_acls

Getting commit logs working on a new system

1) Copy the logging files from Jakarta CVSROOT to server CVSROOT:

[~/server/CVSROOT]$ cp ~/jakarta/CVSROOT/loginfo .
[~/server/CVSROOT]$ cp ~/jakarta/CVSROOT/ .

2) Add the new file to CVS:

[~/server/CVSROOT]$ cvs add 
cvs server: use 'cvs commit' to add this file permanently

3) Add the extra file to 'checkoutlist':

[~/server/CVSROOT]$ cat >> checkoutlist

4) Add '

[~/server/CVSROOT]$ cvs add

5) Edit thusly, customising the email address:

[~/server/CVSROOT]$ diff ~/jakarta/CVSROOT/ 
< $MAIL_TO       = 'apache-cvs';
> $MAIL_TO       = 'jeff@localhost';
<  if (defined($mlist)) {
<      $MAIL_TO = $mlist . "-cvs\@$MLISTHOST";
<  }
> # if (defined($mlist)) {
> #     $MAIL_TO = $mlist . "-cvs\@$MLISTHOST";
> # }

6) Create a 'commitlogs' directory in the server *repository* CVSROOT
directory, and make it owned by group 'cvs' (or equivalent):

[/usr/local/src/CVS/CVSROOT]# mkdir commitlogs
[/usr/local/src/CVS/CVSROOT]# chgrp -R cvs commitlogs
[/usr/local/src/CVS/CVSROOT]# ls -la commitlogs
drwxr-xr-x   2 jeff     cvs          4096 Feb  4 16:16 commitlogs

This is where will store its logs.

7) Now commit the changes to CVSROOT

[~/server/CVSROOT]$ cvs commit

8) Try making a change to a file and commit. You should see the following:

checking log message for correctness...
Checking in README;
/usr/local/src/CVS/share/csgi/README,v  <--  README
new revision: 1.2; previous revision: 1.1
Mailing the commit message...

8) Check on the mailing list or email address for the mail to come through.

All done!
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to