Some users would like to get email when someone commits a change to CVS.

For email about changes to SVN repositories, see Setting up SVN Email.

To set up CVS mail, the admin of the workgroup should go to the Admin->Configure Group page and click on CVS mail list. This will send email to the website managers who will create the mailing list.

Group admins should read the softdevel CVS How do I set it up so that I get email whenever someone commits a change? question and follow the instructions.

The second step is to edit the CVSROOT/loginfo file.
GSRC: If the CVS repository home directory is /home/cvs, then you would edit /home/cvs/CVSROOT/loginfo by using cvs itself to check it out.
Chess: If the CVS repository home directory is /home/cvs_chess, then you would edit /home/cvs_chess/CVSROOT/loginfo (For details, see http://www.loria.fr/~molli/cvs/doc/cvs_2.html#SEC20 )
For CHESS, E3s, Embedded or Trust CVS repositories, substitute in the appropriate directory (cvs_chess, cvs_e3scenter, cvs_embedded, cvs_trust.
For CHESS:

cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_chess co CVSROOT
Then edit CVSROOT/loginfo.
GSRC: If the list is on gigascale, add a line like:
mvsis/.* mailx -s "%s" mvsis-cvs@gigascale.org

Chess: If the mailing list is on chess.eecs.berkeley.edu
mvsis/.* mailx -s "%s" mvsis-cvs@chess.eecs.berkeley.edu
Note that the %s should be inside double quotes, see the CVS NEWS file for changes between cvs-1.11 and cvs-1.11.1 for details. See also loginfo section of "How do I install CVS?"
OR See below for using log_accum.pl, which gives better results.
then commit your changes:
cvs commit -m "Added cvs mail for mvsis" loginfo
When you do the commit, the /home/cvs/CVSROOT/loginfo file will automagically be updated.

Chess Setup

  1. Check out a copy of chess CVSROOT:
    cvs -d :ext:source.eecs.berkeley.edu:/home/cvs co CVSROOT
    
  2. Edit commitinfo
    ^ptII $CVSROOT/CVSROOT/commit_prep.pl
    
  3. Edit loginfo
    ^ptII $CVSROOT/CVSROOT/log_accum.pl %s
    
    Note that there is no need to use double quotes around the %s.
  4. Edit mailhost
    ptII ptexternal-cvs@chess.eecs.berkeley.edu
    
  5. Add and commit:
    cvs commit -m "Added diffs support for ptII"
    

Chess initial setup

On Chess, we are using CVSROOT/log_accum.pl, which was originally obtained from Kepler.

Installation hints can be found at Email Notification I did the following:

  1. Obtain log_accum.pl and commit_prep.pl You'll need a kepler cvs account
    cvs -d :ext:brooks@cvs.ecoinformatics.org:/cvs co CVSROOT
    
  2. Check out a copy of chess CVSROOT:
    cvs -d :ext:source.eecs.berkeley.edu:/home/cvs co CVSROOT
    
  3. Copy log_accum.pl and commit_prep.pl in to the chess CVSROOT
  4. Edit checkoutlist and add
    commit_prep.pl
    log_accum.pl
    mailhosts
    
  5. Edit log_accum.pl
    I changed how the mailhost file is handled so that it names the entire mailing list name.
  6. Edit commitinfo
    ^ptII $CVSROOT/CVSROOT/commit_prep.pl
    
  7. Edit loginfo
    ^ptII $CVSROOT/CVSROOT/log_accum.pl %s
    
  8. Edit mailhost
    ptII ptexternal-cvs@chess.eecs.berkeley.edu
    
  9. Add and commit:
    cvs add commit_prep.pl log_accum.pl mailhosts
    cvs commit -m "Added diffs support"
    

Users with restricted accounts

If a user has a restricted account on the webserver, then make sure they have access to a mail program. If the user does not have access to a mail program, then you will see
Mailing the commit message...
sh: mail: not found
Locally, we did:
cp /usr/ucb/mail /users/cvsuser/bin

Users with non-eecs addresses

If there are cvs users who do not have @eecs.berkeley.edu email addresses, then further modifications are necessary
  1. Create a ~/.forward file for the user.
    For example, ~elvis/.forward would contain elvis@graceland.com.
  2. Edit /etc/mail/sendmail.cf and add the user to the line that starts with C{E}root. This will prevent email from that user being masqueraded to user@eecs.berkeley.edu
  3. The loginfo file should have a line like
    reap/.* /home/cvs_chess/CVSROOT/log.pl -m reap-cvs@chess.eecs.berkeley.edu -s %s
    

Security note: At this time, anyone who has cvs write access to the repository can make the above change. However, this seems a little risky, so we are not telling anyone about it.