Real Open Source SCM software

I've been searching for quite some time for some real open source SCM software that primarily integrated version control with bugs, and secondarily provides things like release management and metrics and does it all with a clean, easy interface that people will actually use. To cut a long story short, I found JIRA which looks really good and is open-source friendly, but is not open source itself. I'd like to try it out so I could give it a hardier recommendation to my company and the places where I contract, but it'd be a lot of effort to set up some fake repository on my own time that I'd have to convince someone to buy later.

So, more recently, I've found Trac and Scmbug. Scmbug is in the alpha stage and is glue software between bug tracking software and version control software (initially Bugzilla and CVS), and doesn't really have its own website right now. I rejected the "glue" approach when I was considering implementing something like this myself because in order to be really useful, you need everything to be cleanly integrated, which is difficult to do when you're just writing glue software.

So that brings us to Trac. It seems to be fairly early on in development, but it's under active development, and it already looks very nice and supports a lot of what I want. At least two of the additional things that I'd want are in consideration for future releases

I decided to try out Trac. So without further ado, this is how I got it working on my Fedora Core 4 system:

  1. Downloaded and untarred version 0.8.4.
  2. Made sure packages subversion and sqlite were installed.
  3. Installed Subversion:

    sudo yum install subversion
  4. Installed Clearsilver (this could have been done from a yum repository like ATrpms, but I wanted to keep my external dependencies low):
    1. Downloaded and untarred version 0.9.14.
    2. Performed the installation:

      ./configure --with-python=/usr/bin/python
      make
      sudo make install
    3. Added the python bindings (this was a tricky one to find):

      cd python # From build directory
      python setup.py install
  5. Created the subversion repository:

    svnadmin create /fs/svn
  6. Started the Trac Installation:

    sudo python ./setup.pl install
    trac-admin /fs/trac initenv
    sudo chgrp -R apache /fs/trac
    sudo chmod -R g+w /fs/trac
  7. Configured Apache by putting the following in /etc/httpd/conf.d/trac.conf:

    Alias /trac/ /usr/share/trac/htdocs/
    #or where you installed the trac htdocs
    #You have to allow people to read the files in htdocs
    <Directory "/usr/share/trac/htdocs">
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all
    </Directory>

    # Trac need to know where the database is located
    <Location "/cgi-bin/trac.cgi">
      SetEnv TRAC_ENV "/fs/trac/"
    </Location>

    # You need this to allow users to authenticate
    # trac.htpasswd can be created with
    # cmd 'htpasswd -c trac.htpasswd' (UNIX)
    # do 'man htpasswd' to see all the options
    <Location "/cgi-bin/trac.cgi/login">
      AuthType Basic
      AuthName "trac"
      AuthUserFile /fs/trac.htpasswd
      Require valid-user
    </Location>
  8. Trac should now be available and working at sitename/cgi-bin/trac.cgi
  9. Set up projects in Subversion
  10. Set up Trac Subversion hooks:

    cd contrib # From Trac source directory
    sudo mkdir /usr/share/trac/contrib
    sudo cp trac-*-commit-hook /usr/share/trac/contrib
    cd /fs/svn #subversion repository
    cp pre-commit.tmpl pre-commit
    cp post-commit.tmpl post-commit
    chmod 755 pre-commit post-commit vi pre-commit post-commit

    Comment out the existing script calls at the bottom pre-commit and post-commit and add the following:

    post-commit:

    LOG=`/usr/bin/svnlook log -r $REV $REPOS`
    AUTHOR=`/usr/bin/svnlook author -r $REV $REPOS`
    TRAC_ENV='/fs/users/xar/trac'

    /usr/bin/python /usr/share/trac/contrib/trac-post-commit-hook \
    -p "$TRAC_ENV" \
    -r "$REV" \
    -u "$AUTHOR" \
    -m "$LOG"

    pre-commit:

    LOG=`/usr/bin/svnlook log -t "$TXN" "$REPOS"`
    TRAC_ENV='/fs/users/xar/trac'

    /usr/bin/python /usr/share/trac/contrib/trac-pre-commit-hook \
    "$TRAC_ENV" \
    "$LOG" || exit 1

After playing with it a little bit, Trac looks pretty good, even if it is a little early on. It's far beyond where I could have hoped to been with my own invention after months of work, so I guess I'll see if they're responsive to patch submissions. (Note: This Trac Hacks website may be a good place to submit revisions.

This is a list of things that I'd like to see in Trac:


Other notes:

Validate XHTML 1.0! Validate CSS!