Setting Own CVS Repository
Created: 02/11/2007
General Information
In this guide I'd like to present a short info on setting own CVS repository. It has been written with an assumption that the repository will be accessed locally and through the SSH connection. Using ssh might require setting$CVS_RSH=ssh environment variable on client system.Requirements
Repository Initiation
The cvs utility is a part of base system on all BSDs, thus no special installation steps are needed to make it up and running.| # | pw add group cvs |
|
# # # # |
cd /home mkdir cvs cvs -d /home/cvs init chown -R cvsadmin:cvs /home/cvs |
|
$ cd $HOME/project1 $ cvs -d /home/cvs/ import project1 mysoft v1 N project1/project.c No conflicts created by this import |
| # | cvs -d <path to repository> import <repository> <vendortag> <releasetage> |
|
$ cd .. $ cvs -d /home/cvs/ co project1 cvs checkout: Updating project1 U project1/project.c $ cd project1/ $ ls CVS project.c |
Adding Useful Features
Ports Collection have some fine applications for sending e-mail notifications when any changes are done to the repository. In this guide I'll present a CVSSpam application that generate nice HTML messages. For plain text messages take a look at ActivityMail.Installing the CVSSpam
|
# # |
cd /usr/ports/devel/cvsspam make install clean |
Configuration
Having done that you can create a temporary directory to checkout repository's configuration files:|
$ $ $ $ |
mkdir $HOME/temp cd $HOME/temp cvs -d /home/cvs/ co CVSROOT cd CVSROOT |
collect_diffs.rb, cvsspam.rb, record_lastdir.rb.| $ | cp /usr/local/libexec/cvsspam/* ./ |
checkoutlist so they also would be uploaded do the repository:|
$ $ |
ls *.rb >> checkoutlist cvs commit checkoutlist |
|
$ $ |
cvs add *.rb cvs commit |
commitinfo and loginfo files:|
$ $ $ |
echo "DEFAULT $CVSROOT/CVSROOT/record_lastdir.rb" >> commitinfo echo "DEFAULT $CVSROOT/CVSROOT/activitymail -dSf %{sVv} -t me@myhost.net" >> loginfo cvs commit |
$Id$ tag for a custom one, like all the BSD projects does in their source files? There's actually nothing to it. Having checked out the CVSROOT add options file to the checkoutlist:|
$ $ |
echo "options" >> checkoutlist cvs commit |
|
$ $ $ |
echo "tag=FreeBSD=CVSHeader" >> options cvs add options cvs commit |
This guide is © 2007 - 2008 Cezary Morga.
Author: Cezary Morga
cm at therek dot net