Background
My old server (Luke) has been dying for awhile now, and things had proceeded to unnacceptable levels. The new server (R2D2) is running the new Ubuntu 11.04 (Natty Narwhal) instance, whereas Luke was running 10.10 (Maverick Meerkat). Mission critical software such as dhcp, apache, vsftp, python, ssh etc was operational on R2D2. Both are the “Server” edition/flavour of Ubuntu. Meaning all I have at my disposal is a command line.
Love it.
The Problem
After successfully transferring the svn repository (using svnsync) to R2D2 and installing the Trac environment and setting up my vhost for Apache; I proceeded to access my Trac repository via my browser. Everything was working, except anything to do with my subversion repository.
I couldn’t :
- see any updates to the repository in the timeline
- browse the source code
- view the most recent repository version number in Admin->Repository settings page
No matter how many times I fiddled with the Trac.ini, vhost settings or repository/Trac environment configurations – I just could not make it work.
These were the approximate locations :
- Trac Environment - /var/trac/project/
- I used to have more directories within project for each element, but this is no longer necessary for Trac 0.12.2
- SVN Repository – /home/user/svn/project/element/
The Solution
I did have a hefty number of problems up to this point, which I’ll breeze over quickly here:
- I was updating from an older version of Trac to 0.12.2. 0.12.2 handles repository set-up very differently from its predecessors since it is capable of handling multiple repositories within one Trac environment (finally!). I had to get my head around setting up svn hooks (I will have to write a separate blog post on that later. The documentation is shockingly confusing).
- mod_python is no longer maintained, and there are issues starting to creep in that will never be resolved. I had to move across to wsgi – thankfully not much of a problem because I’m used to having to use mod_wsgi for Django.
- Some “weirdness” with getting Apache to actually start on Natty.
After I fixed all of these, I still couldn’t browse the source code on my Trac environment. Just to note – I have configured my repository settings through the Admin interface on Trac, rather than using the Trac.ini file.
Unlike all of my Trac-y previous problems, despite some of the solutions themselves being a little fiddly, the errors were apparent and were presented to me via Trac. They were thankfully not squirrelled away in a log file somewhere. But for my browse source, I couldn’t seem to find any errors or indications to why things may have been going to shit.
It wasn’t my permissions – by this point I had chmod’d everything in my user directory to 777 and was beginning to actually stomp my feet in frustration. Then I had an idea – I visited the browse source web page : http://www.yourtracurlhere.com/browser
Lo and behold, I saw a permissions error! … but there shouldn’t be any problems accessing my home directory, should there?
TURNS OUT, even though I *thought* I had configured Natty to NOT encrypt my home folders, it had done so ANYWAY. I quickly moved my svn repository to /var/svn/username/project/element/, and updated Trac and my vhost files to use this new location. I also modified the permissions of the new repository location to something sensible, so that the it is accessible to Apache.
Aaaaaaaaand it appeared on the web interface.
Ace.
Current Mood:
Angry