: Documentation

Using CIA with SourceForge.net

contributed by Christopher Forsythe, updated by Max Horn

Purpose of this How-To:

This document will be the focused on setting up CIA for SourceForge.net projects using their CVS service. It might still be helpful if you're using CIA on a CVS server hosted elsewhere, but some commands will need to be adapted.

Note that this document only applies to CVS projects. The SF.net admin interface already includes an easy-to-use option for enabling CIA on your Subversion repository. You can add cia_svn.py like any other Subversion hookscript. You can learn how to do that in the SF.net site docs.

Setting up CIA: Step one, getting the right stuff

In order to get CIA to post information, it has to be emailed. In order for CIA to email, you have to run a script from the source repository.

The script you need is called a "Client Script". Visit CIA's list of clients or jump directly to the CVS client script. Once you have the script, you can move on to the next step.

Setting up CIA: Step two, CVSROOT:

Once you have the script, you need to put it in the right location. This requires you to checkout a CVS module called "CVSROOT". (You must capitalize this word, as this is case sensitive.)

You can do this in one of two ways. If you have not checked out a CVS module for your project, do the following:

cvs -z3 -d:ext:developername@cvs.sourceforge.net:/cvsroot/projectname co CVSROOT

Replace "developername" with your SourceForge.net user id, and "projectname" with your the SourceForge.net UNIX name of your project.

If you have already checked out your project, change into the location of that on your hard disk. Once you have moved into this directory, issue the following command:

cvs co CVSROOT

Move or copy the file from step one into the CVSROOT directory, and then cd into it. Once you have done that, issue the following command to add the file to cvs:

cvs add ciabot_cvs.pl

You will get a notification that the file will be added once you do a "cvs commit". We will issue that once we have modified the files we need to. On to step three.

Setting up CIA: Step three, modifying files:

Once you have added the script to cvs, you need to do a few things so it is run automatically after every commit. This requires modifying the "checkoutlist" and "loginfo" files. If you have syncmail installed, you'll see lines for it in these files already.

First you need to add a line to a file called "checkoutlist". Files stored in CVSROOT are stored in a non-plaintext format, adding lines to checkoutlist makes it so that a plaintext copy of the file will be stored in CVSROOT as well. Add this line to the end of checkoutlist:


Next, we need to modify the "loginfo" file, which is responsible for running the script we are adding. Add this line to it:

ALL /usr/bin/perl $CVSROOT/CVSROOT/ciabot_cvs.pl %{,,,s} $USER

The last file to modify is ciabot_cvs.pl itself. You have to tell it where to send emails, and other information. Open ciabot_cvs.pl in a text editor, and then scroll down to the "Configuration" section. Edit the following lines:

  • $project = 'projectname';

    Replace projectname with your project's UNIX name assigned by SourceForge.net, or whatever name you are going by. This name should be fairly short, and shouldn't contain any whitespace or odd characters. It will be used in your project's URL on CIA, and it will be used on IRC. You can separately assign a longer name for use in the web interface.

  • $from_email = 'leader@example.com';

    Put in one of the project leaders email addresses here.

That's it. You can configure other options as you like, but these are the required fields. Once you have done all of this, there is only one thing left to do. Issue the following command from inside the CVSROOT folder:

cvs commit

You should now be setup. If all went well, the next commit you make should show up in #commits and on the web. If you would like to customize your projects's appearance on the web, or if you would like to have a bot in your IRC channel, create an account on CIA. Congratulations on setting up CIA to work with your project.