[kforge-user] [0.14 enhancement] Trac configuration file

Gunnar Johansson info at gunnar-johansson.se
Wed Oct 10 12:46:03 UTC 2007


>> Trac configuration file management is imho a real bug, as it's really
>> annoying when a user jumps to http://example.org as the value was not
>> correctly set.
>
> To reiterate: you can edit this file using webdav access. I agree this
> is a little clunky but it is probably more future-proof than hard- 
> coding
> particular config variables into KForge (particularly if one is having
> to deal with multiple different trac versions ...).

You can also use the Trac IniAdminPlugin (http://trac-hacks.org/wiki/ 
IniAdminPlugin [site off-line at the moment]).  Install this globally  
in e.g. /usr/share/trac/plugins and enable it globally in /usr/share/ 
trac/conf/trac.ini. Then you can edit all trac.ini settings through  
the Trac interface.  I've used this for our setup and it works great.

I also installed the WebAdmin plugin in the same manner.

If you're interested in further complicating things, you can also  
hack the WebAdmin plugin to do an automatic upgrade of the trac  
instance and restart of apache by appending the following to the end  
of the function _do_update() in webadmin/plugin.py :

	self.log.info('Upgrading environment %s', self.env.path)
	cmd = '/usr/bin/trac-admin ' + self.env.path + ' upgrade'
         errorStatus, output = commands.getstatusoutput(cmd)
         if errorStatus:
             self.log.info('Upgrade failed with output: %s', output)
         else:
             self.log.info('Upgrade succeeded with output: %s', output)

         cmd = 'sudo /etc/init.d/apache2 reload'
         self.log.info('Restarting apache with %s', cmd)
         errorStatus, output = commands.getstatusoutput(cmd)

So, when users use WebAdmin to install any plugins they find useful,  
there's no need to do a manual "trac-admin <env> upgrade" and restart  
apache..  I know, it's a brutal hack, but it works well for us.  :-)

Finally, I agree with Rufus in that this is not really a KForge  
related issue, it has to do with Trac management..  But maybe some  
KForge admins find these hints interesting.

Cheers,
Gunnar

>
> ~rufus
>
> _______________________________________________
> kforge-user mailing list
> kforge-user at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/kforge-user





More information about the kforge-user mailing list