233 lines
4.2 KiB
HTML
233 lines
4.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>CVS Server Configuration</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="CVS Best Practices"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Developer Sandbox"
|
|
HREF="section1-devsandbox.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Branching and Merging"
|
|
HREF="section1-branchmerge.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>CVS Best Practices</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="section1-devsandbox.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="section1-branchmerge.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="section1-serverconfig"
|
|
></A
|
|
>5. CVS Server Configuration</H1
|
|
><P
|
|
>This section deals with best practices for CVS server side setup and
|
|
configuration.
|
|
</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="section2-accesscontrol"
|
|
></A
|
|
>5.1. CVS access control</H2
|
|
><P
|
|
>One of the important questions that I have been asked time and again is the
|
|
ability to have access control for files/folders/branches etc., within
|
|
the CVS repository for various users. Unfortunately CVS does not
|
|
come with a built in Access control capability but it does support a
|
|
rudimentary form of access control through the readers/writers files in
|
|
the CVSROOT repository. I have put together a set of scripts that use
|
|
the readers/writers files to provide a slightly useable version of access
|
|
control. This is available at <A
|
|
HREF="http://cvspermissions.sarovar.org"
|
|
TARGET="_top"
|
|
>http://cvspermissions.sarovar.org</A
|
|
>
|
|
as an Open Source project. Feel free to use it and let me know how it
|
|
works for you. </P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="section2-scripting"
|
|
></A
|
|
>5.2. Server side scripting</H2
|
|
><P
|
|
>Server side scripting refers to the ability to make CVS server
|
|
execute certain scripts when an event occurs. A common script that
|
|
helps is to verify that all cvs commits contain acomment entered by the
|
|
developer. The process involves setting up the
|
|
<TT
|
|
CLASS="filename"
|
|
>CVSROOT/verifymsg</TT
|
|
> file to run a script when a file is
|
|
checked-in. </P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> ------CVSROOT/verifymsg---------
|
|
|
|
#Set the verifymsg file to fire a script
|
|
DEFAULT /usr/local/bin/validate-cvs-log.sh
|
|
|
|
|
|
------/usr/local/bin/validate-cvs-log.sh ---------
|
|
|
|
#!/bin/sh
|
|
#
|
|
# validate-cvs-log.sh logfile
|
|
|
|
# test that log message has some characters in it
|
|
if [ `cat $1 | wc -c ` -lt 10 ] ; then
|
|
echo "log message too short; please enter a description for the changes"
|
|
exit 1
|
|
else
|
|
exit 0
|
|
fi
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="section2-notification"
|
|
></A
|
|
>5.3. Server Notification</H2
|
|
><P
|
|
>The CVS server can be configured to notify through e-mails in case
|
|
of a commit happening. This can be used to verify whether commits are
|
|
occurring during the course of a daily/release build. If such commits
|
|
occur, based on the project policy, the commits can be ignored or the entire
|
|
build automatically restarted.</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="section1-devsandbox.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="section1-branchmerge.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Developer Sandbox</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Branching and Merging</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |