Thursday, December 29, 2011

CollabNet Subversion Edge cont'd

I already explained Collabnet Subversion Edge and my experience installing it. Now I want to focus on installing Trac (with some hacks).
I really thought this should be easy, but it turns out that there are a lot of pitfalls. So for any other poor souls who are not fluent in python (and for my own reference) here it goes.

Installing Trac

As you know, trac has some requirements. Namely setuptools and genshii. There are a few packages to download for Windows here. I didn't know which version of python came with subversion edge, so I checked. There is a folder named csvn/python25. So it seems to be python 2.5. But wait - there is a python27.dll in there. and some other files indicating python 2.7. So which is it?
D:\csvn\Python25>python.exe --version
Python 2.7.1
 Alright, that settles it. But why did Collabnet not rename the folder..?
So I downloaded the setuptools package for python 2.7 and win32. The installer failed to run, it sais it couldn't find any python 2.7 installation.

Apparently a regular python installer will create some registry entries so that the system recognizes the python installation. Collabnet subversion edge doesn't do this anymore due some complaints.
So I had to go in there and manually create the relevant entries. They were already present from the old python 2.5 installation, which I wanted to get rid of anyway. So I changed the version to 2.7 and updated the paths to point to D:\csvn\python25. This let me install setuptools, genshii and finally trac too.

Configuring Trac

That part was straight-forward. Like with subversion, I just copied the relevant parts of my VisualSVN server's apache config and pasted it to the main httpd.conf file. Here is the relevant snippet:
<Location /trac>
 SetHandler mod_python
 PythonInterpreter main_interpreter
 PythonHandler trac.web.modpython_frontend
 PythonOption TracEnvParentDir D:\Trac
 PythonOption TracUriRoot /trac

 AuthName "Trac"
 AuthType SSPI
 SSPIAuth On
 SSPIAuthoritative On
 SSPIDomain jerich
 SSPIOfferBasic On
 SSPIOmitDomain On
 require group DOMAIN\Trac-Users
</Location>
All relevant modules are already loaded, so that's it.

6 comments:

Mark Phippard said...

It was just poor planning that we named the folder Python25 and not simply Python. If we renamed the folder to now it would break existing installs that do updates because we do not have any means to do things like change the PATH and other environment variables that the original installer created.

Richard Page said...

I have tried to follow this and still cannot get this to install - currently working on it. Does SVNEdge python installation need the full phython scripts or is it ok as it is....
Richard Page

Richard Page said...

I have tried to install trac on windows with subversion edge and as you say it is tricky - still not achieved.
Not sure whether the svn edge python is sufficient or whether I need to install the complete python over the top of the svn edge python25 directory. Any advice would be appreciated.

Richard Page said...

Having some problems with installing trac with SVNEdge
Do I need to install complete python in the SVNEdge python25 directory.
As you indicate this is not easy.
Still working through this issue so any help much appreciated.

Anonymous said...

It would be VERY nice if CollabNet SubversionEdge detailed this somewhere in thier instructions.

I've been pulling my hair out for almost a week now to get Collabnet to play well with a second python install (of 2.7). I've finally got everything up and running and am ready to start adding to this setup.

I'm digging into adding Reviewboard onto the machine and hoping it can integrate with Collabnet's apache server when I came across this blog only to find out that everything SHOULD have worked out of the box with the existing Python install.

UGH!

Back to square 1...

fizze said...

@ Richard Page:
Yes, it should work with the existing Python that's part of SVN Edge.