Tag Archives: CVS

CVS | Setup

CVS Server

Download RPM | Red Hat Enterprise Linux 4 cvsd-1.0.3-2.el4.at.i386.rpm

Packager: ATrpms

cvsd is a wrapper program for cvs in pserver mode. it will run ‘cvs pserver’
under a special uid/gid in a chroot jail. cvsd is run as a daemon and is
controlled through a configuration file. It is relatively easy to configure
and provides tools for setting up a rootjail.

This server can be useful if you want to run a public cvs pserver. You
should however be aware of the security limitations of running a cvs
pserver. If you want any kind of authentication you should really consider
using secure shell as a secure authentication mechanism and transport.
Passwords used with cvs pserver are transmitted in plaintext.

Create a CVS Jailroot

# mkdir /usr/local/cvsroot
# cvs -d /usr/local/cvsroot/[REPOSITORY_NAME] init
# cvsd-buildroot /usr/local/cvsroot
# cd /usr/local/cvsroot
# mkdir -p var/lock

# vi /etc/cvsd/cvsd.conf

RootJail /usr/local/cvsroot
Uid cvsd
Gid cvsd
Listen * 2401 # or whatever port you’d like it to listen on, up to you
Repos /[REPOSITORY_NAME]

Add Users

# cvsd-passwd /usr/local/cvsroot/[REPOSITORY_NAME] [YOUR_USER_HERE]

NOTE: To create a user that has only read rights follow the next steps:

# touch /usr/local/cvsroot/[REPOSITORY_NAME]/CVSROOT/readers
# chown cvsd:cvsd /var/lib/cvsd/root/CVSROOT/readers
# vi /usr/local/cvsroot/[REPOSITORY_NAME]/CVSROOT/readers

Add the users you just created to this file, each user seperated by a new line. Do not forget to put a new line after the last user. This setting only allows readers to the repository, to allow writers, create a file writers on same path.

Apply Permissions

# cd /usr/local
# chown -R cvsd:cvsd cvsroot
# chmod -R 775 /usr/local/cvsroot/
[REPOSITORY_NAME]

# /etc/init.d/cvsd restart

Test

Set your CVSROOT environment var

# CVSROOT=:perserver:[YOUR_USER_HERE]@localhost:/[REPOSITORY_NAME]
# export CVSROOT
# cvs login
# cvs logout

Reference:

HOWTO CVS Server