Pour ce billet ont été utilisés :
- SVN 1.4.2
- Apache 2.2.3
- PHP 5.2.0-8
- Debian 2.6.18
Création du répertoire svn du projet.
svnadmin create nomProjet
La création des accès au SVN se fait dans le dossier conf où il existe 3 fichiers :
- authz : permet la création des groupes et des utilisateurs du svn.
- passwd : permet d'allouer les mots de passe aux utilisateurs.
- svnserve.conf : permet de gérer le SVN.
## (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to a
### single user, to a group of users defined in a special groups
### section, or to anyone using the '*' wildcard. Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ().
groups
dev = meda,cedric,romain,jr,joel,tuani
# /foo/bar
# harry = rw
# * =
/:/
@dev = rw
Exemple : passwd
users
meda:WC4d26oVnIqE2
cedric:ZOuMTKkS92Jxs
joel:Rd/q9N8YWKCl2
tuani:tMbRxmWFJNFQE
romain:UWE7qWnyypc7A
jr:DgSw.3g0bl87U
Exemple : svnserve.conf
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
general
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory. If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
realm = /
Il faut ensuite rendre disponible le SVN par http :
- Aller dans /etc/apache2/sites-enabled/
- Créer un nouveau fichier nommé nomProjet.svn
Mettre dans le fichier :
<VirtualHost *:80>
ServerAdmin meda@lineolia.net
ServerName meetgeek.svn.lineolia.net
<Location />
DAV svn
SVNPATH /var/lib/svn/meetgeek
AuthType Basic
AuthName "MeetGeek Repository"
AuthUserFile /var/lib/svn/meetgeek/conf/passwd
AuthzSVNAccessFile /var/lib/svn/meetgeek/conf/authz
Require valid-user
</Location>
ErrorLog /var/log/apache2/meetgeek-svn-error.log
CustomLog /var/log/apache2/meetgeek.log combined
LogLevel warn
</VirtualHost>
Donner les droits à apache au SVN :
chown -R www-data:www:data /chemin/du/repertoire/du/projret/svn
Création du trac
trac-admin /chemin/des/pages/web/nomProjet initenv
chown -R www-data:www:data /chemin/des/pages/web/nomProjet
Faire le fichier permettant l'accès au trac et aux différents projets :
- Aller dans /etc/apache2/sites-enabled.
- Création d'un nouveau fichier trac.
<VirtualHost *:80>
ServerAdmin meda@lineolia.net
ServerName trac.lineolia.net
DocumentRoot /var/www/public/trac/
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
</Directory>
<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/www/public/trac/
PythonOption TracUriRoot /
</Location>
ErrorLog /var/log/apache2/leasysite-trac-error.log
CustomLog /var/log/apache2/access.log combined
LogLevel warn
</VirtualHost>
Dans /etc/apache2/sites-enabled/trac
<Location /bliss>
AuthType Basic
AuthName "Bliss"
AuthUserFile /etc/apache2/bliss.htpasswd
Require valid-user
</Location>
Dans bliss.htpasswd
meda:$apr1$KTMiv/..$SZsLqSGKzYJGisE7K011H0
Ajout des autorisations administrateur du trac :
trac-admin /chemin/tptrac/proj permission add admin TRAC_ADMIN