[kforge-user] kforge 0.11 svn repo creation error
Rufus Pollock
rufus.pollock at okfn.org
Thu Jul 27 08:24:21 UTC 2006
Omer KARAGOZOGLU wrote:
> I have solved the problem with both the svn creation and the page not
> rendering correctly. I would like to inform you of the solution and
> discuss if it is the correct way of solving the problem.
Thanks Omer, that's really useful.
> In order for svn to run I ran the following commands
> # chown wwwrun:www /root/
> # chown -R wwwrun:www /root/.subversion/
>
> This got rid of the (svnadmin: Can't open config file
> '/root/.subversion/servers') error
> and the repo was successfully created by both the command line command
> # sudo -u wwwrun svnadmin create --fs-type fsfs /home/..
>
> And the web interface.
Good to hear. Of course you might want to be a bit careful about giving
the web user full access to the root user's home directory.
> As for the rendering problem as mentioned in my previous post when I examined the error logs I had noticed
> Client denied by server configuration: /usr/share/kforge/...
> I found that this was due the directory settings in my httpd.conf file
>
> I changed the setting to
> <Directory />
> Order Allow, Deny
> Allow from all
> </Directory>
>
> After making these changes all seems to work.
>
> Now I have a question about Trac. Why isn't Kforge using postgresql as the trac database?
Until the latest release (v0.9) trac only supported sqlite. KForge needs
to run against both trac v0.8 and v0.9 (for example debian stable's
version of trac is 0.8) and was developed against 0.8 so we default to
support sqlite. However it would be fairly easy to patch this.
You'd want to look at kforge.plugin.trac.command:
<http://project.knowledgeforge.net/kforge/svn/trunk/src/kforge/plugin/trac/command.py>
And change 'db_str = ...' in:
{{{
def createTracProjectEnvironment(self):
versionParts = trac.__version__.split('.')
tracVersion = float(versionParts[0] + '.' + versionParts[1])
project_name = self.tracProject.service.id
db_str = 'sqlite:db/trac.db'
if tracVersion <= 0.8:
db_str = '' # no db_str stuff in trac <= 0.8
repository_dir = self.svnService.getDirPath()
templates_dir = self.dictionary['trac.templates_path']
cmd = 'trac-admin %s initenv %s %s %s %s' % (self.envname,
project_name, db_str, repository_dir, templates_dir)
status, output = commands.getstatusoutput(cmd)
if status:
self.raiseError('Creation of trac project environment
failed (cmd was: %s) (output was: %s)' % (cmd, output))
}}}
The best way to do this would probably be to add a config parameter
called db_str to the [trac] section of the etc/kforge.conf file and then
use that to set db_str in that method.
You'd also want need to investigate whether trac needs a separate
database for each trac instance or whether many trac instances can share
the same database. If you need separate databases (as seems likely) you
need to generate a unique name for each db and make sure it could be
automatically created as needed.
Regards,
Rufus
More information about the kforge-user
mailing list