HowTo configure Redmine for advanced Bazaar integration » History » Version 1

Lluís Vilanova, 2012-01-22 21:07

1 1 Lluís Vilanova
h1. HowTo configure Redmine for advanced Bazaar integration
2 1 Lluís Vilanova
3 1 Lluís Vilanova
<pre>
4 1 Lluís Vilanova
PerlLoadModule Apache::Authn::Redmine
5 1 Lluís Vilanova
6 1 Lluís Vilanova
WSGIScriptAliasMatch ^/bzr/.*/\.bzr/smart$ /var/vcs/bzr/bzr-smart.py
7 1 Lluís Vilanova
8 1 Lluís Vilanova
# Allow regular GETs to work too
9 1 Lluís Vilanova
RewriteEngine on
10 1 Lluís Vilanova
RewriteCond %{REQUEST_URI} !^/bzr/.*/\.bzr/smart$
11 1 Lluís Vilanova
RewriteRule ^/bzr/(.+)$ /home/code/bzr/$1 [L]
12 1 Lluís Vilanova
13 1 Lluís Vilanova
<Location /bzr>
14 1 Lluís Vilanova
    WSGIApplicationGroup %{GLOBAL}
15 1 Lluís Vilanova
16 1 Lluís Vilanova
    DAV on
17 1 Lluís Vilanova
    AuthType Basic
18 1 Lluís Vilanova
    AuthName "Project membership authentication"
19 1 Lluís Vilanova
    Require valid-user
20 1 Lluís Vilanova
21 1 Lluís Vilanova
    PerlAccessHandler Apache::Authn::Redmine::access_handler
22 1 Lluís Vilanova
    PerlAuthenHandler Apache::Authn::Redmine::authen_handler
23 1 Lluís Vilanova
24 1 Lluís Vilanova
    RedmineDSN "DBI:mysql:database=redmine_default;host=127.0.0.1"
25 1 Lluís Vilanova
    RedmineDbUser "redmine"
26 1 Lluís Vilanova
    RedmineDbPass "password"
27 1 Lluís Vilanova
    RedmineCacheCredsMax 50
28 1 Lluís Vilanova
</Location>
29 1 Lluís Vilanova
</pre>
30 1 Lluís Vilanova
31 1 Lluís Vilanova
<pre>
32 1 Lluís Vilanova
#!/usr/bin/env python
33 1 Lluís Vilanova
34 1 Lluís Vilanova
from bzrlib.transport.http import wsgi
35 1 Lluís Vilanova
36 1 Lluís Vilanova
def application(environ, start_response):
37 1 Lluís Vilanova
    app = wsgi.make_app(
38 1 Lluís Vilanova
        root='/home/code/bzr/',
39 1 Lluís Vilanova
        prefix='/bzr/',
40 1 Lluís Vilanova
        readonly=False,
41 1 Lluís Vilanova
        enable_logging=True)
42 1 Lluís Vilanova
    return app(environ, start_response)
43 1 Lluís Vilanova
</pre>