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:
subversion and sqlite were installed.
Installed Subversion:
sudo yum install subversion
Performed the installation:
./configure --with-python=/usr/bin/python
make
sudo make install
Added the python bindings (this was a tricky one to find):
cd python # From build directory
python setup.py install
Created the subversion repository:
svnadmin create /fs/svn
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
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>
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:
Track changesets outside of comments
Right now, you can configure Trac to show which changesets have gone into a bug. However, they only show up in the comments, so it's a little bit too tacked-on for my liking.
By tracking the changesets outside of comments, you won't lose the changesets in bugs with a lot of comments. The real reason for wanting this feature, though, is that it's an important stepping-stone toward real revision management.
Check granularity of permissions
I'm not sure how finely you can control permissions - for example, can you set it so that only certain people can close bugs? I'll need to look into this further.
Better user management
Going along with the previous one, it'd be nice to have a web interface for managing users. This may be in the 1.0 release...
More robust bug flow, i.e. originator verifies closing of bug
I need to define a bug flow that I'd like to see and try to configure Trac to use that flow.
Looks like there's already a bug to discuss something like this.
Milestone Descriptions
It would be nice to be able to enter a description of a milestone, to say
something like, "This milestone includes support for python 2.4 and a
web interface." Some of this could be gathered by looking at the bugs
associated with the milestone, but it's impossible to tell if it's the goal
of the milestone or just something that happens to be going in.
Heh, this already exists - just go to Edit Milestone
Other notes: