Subscribe to RSS

Trac, WebAdmin plugin and global configuration

As you may know I manage quite a few trac installations. A few days ago I upgrade my server from Ubuntu “Dapper Drake” 6.06 to Ubuntu “Feisty Fawn” 7.04. This also upgrade trac 0.9.x to 0.10.3.

I was happy, since trac 0.10.3 has many improvements over 0.9.x, but there was one thing I was not so happy about. After the upgrade, I upgraded all my trac installations and everything seemed to be okay, except for the WebAdmin plugin. Apparently it was not installed anymore.

What happened? After upgrading the trac package, the plugins directory was emptied. Well, just re-install the WebAdmin plugin for 0.10.x.

cd /usr/share/trac/plugins
sudo svn co http://svn.edgewall.org/repos/trac/sandbox/webadmin/
cd webadmin
sudo python setup.py bdist_egg
cd dist
sudo easy_install-2.4 TracWebAdmin-0.1.2dev_r4429-py2.4.egg

That was easy, next I wanted to enable the plugin for all my trac installations by adding the proper configuration to /usr/share/trac/conf/trac.ini, the global trac configuration file that is used by all trac installs.

[components]
webadmin.* = enabled

After restarting Apache (this is needed for some reason to get trac to read the new configuration file), no admin button showed up in any of the projects.

What went wrong is that Ubuntu (or Debian?) maintainers have changed the location of the global configuration file for trac. There are three solutions to this, all of them work fine, although I recommend you use the first one.

1. Move your global configuration

The best way to tackle this problem is to move your global configuration file to the new location: /etc/trac/trac.ini

sudo mv /usr/share/trac/conf/trac.ini /etc/trac/trac.ini

This way you’re configuration is safe from new upgrades and confirms to the defaults the package maintainer has set.

2. Symlink the configuration

If for some reason you don’t want to actually move your /usr/share/trac/conf/trac.ini file, you can create a symlink to the new location:

sudo ln -sf /usr/share/trac/conf/trac.ini /etc/trac/trac.ini

This leaves your original configuration file in tact, but it may be removed by new upgrades.

3. Change Trac

You may also change the location where trac looks for the configuration file. Open up /var/lib/python-support/python2.5/trac/siteconfig.py and change the following:
< __default_conf_dir__ = '/etc/trac'
> __default_conf_dir__ = '/usr/share/trac/conf'[/pre]
 
(Note: the > and < symbols mark what is removed and what is added to the file.)
 
In any case, reboot your web server and you should be good to go again.

Please share the love of this post by bookmarking it, and sharing it with others. Thanks!

  • Digg
  • del.icio.us
  • description
  • Reddit
  • Technorati
  • BlinkList
  • E-mail this story to a friend!
  • Facebook
  • Live
  • MisterWong
  • Netvouz
  • NewsVine
  • Slashdot
  • SphereIt

5 Comments

  1. Royce Nobles
    Posted 28 August, 2007 at 17:47 | Permalink

    You are a life saver! I had the same issue and your solution worked perfectly. Thanks for the info.

  2. Posted 28 September, 2007 at 15:02 | Permalink

    hello

    your web was very useful to my fight against trac. when ill have more time i will use this info to do more test.

    bye

  3. Posted 21 December, 2007 at 11:03 | Permalink

    Thanks a lot Ariejan!

    You have saved me a lot of time with this article.

  4. Stoffe
    Posted 24 January, 2008 at 11:42 | Permalink

    Thanks, made it easy to install webadmin. =)

    Maybe that should be an official tutorial somewhere for older versions of Ubuntu/Trac. :)

  5. derek
    Posted 7 July, 2008 at 14:19 | Permalink

    great guide - was definitely key in helping me set up my trac.

    Thanks!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*