Friday, January 19, 2007

Setup CVS Server on Mac OS X 10.4

I just setup the cvs server on mac. Here are the steps:

Configuring the CVS repository


sudo mkdir /usr/local/cvsroot/

sudo cvs -d /usr/local/cvsroot/ init
or
setup environment variable:
CVSROOT=/usr/local/cvsroot
and
export CVSROOT

Password CVS access using xinetd
create a file cvspserver in /etc/xinetd.d
service cvspserver
{
disable = no
socket_type = stream
wait = no user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/usr/local/cvsroot
pserver groups = yes flags = REUSE
}

Restarting xinetd
cat /var/run/xinetd.pid and grab the id (i.e. 285)
sudo kill -HUP id (i.e. 285)
sudo /System/Library/StartupItems/IPServices/IPServices start

Create a file called passwd in /usr/local/cvsroot/CVSROOT/
create a encrypted password:
perl -e 'print crypt "password", "sa"'
in the passwd file, put down
username:encryptedpassword

Setup client connection like this
:pserver:username@domain:/usr/local/cvsroot

then you're done!