Serveur SVN-Trac
Généralités
Mise en place d'un serveur Subversion (SVN) couplé avec l'environnement de travail collaboratif Trac sur un serveur MacOS X. L'installation doit permettre de gérer des projets avec des chefs de projets autonomes. Elle doit être faite sans avoir besoin des droits d'administrateurs (sauf pour lancer le serveur https et mettre en place des certificats de sécurité). Pour cela tout sera mis en place dans un répertoire particulier. Pour permettre les mises à jour des différents logiciels, on mettra en place une notion de current pointant vers la version courante.
Détails
- S'assurer que les outils de développement son bien installés sinon il n'y a pas de gcc.
- Création d'un compte local sur le serveur: compte svntrac par exemple. Pour que certains fichiers manipulés par ce compte soient visible par le Web, ce compte aura comme groupe principal www (70). :
chgrp -R www /Users/svntrac
Création de deux arborescences toutsvn et repository.
- toutsvn contiendra tous les logiciels nécessaires et les fichiers de configuration de base.
- repository contiendra les fichiers des utilisateurs et les configurations spécifiques aux dépots.
- Création d'un répertoire toutsvn et d'un lien symbolique de /toutsvn vers ce répertoire :
ln -s /Volumes/HD750/toutsvn /toutsvn
chgrp www /Volumes/HD750/toutsvn
chmod g+w /Volumes/HD750/toutsvn
toutsvn |
- archives
- authzwebadminplugin.zip
- clearsilver-0.9.14.tar.gz
- docutils-0.4.tar.gz
- ...
|
Tous les fichier .tar.gz des logiciels à installer |
|
|
|
lien current -> /toutsvn/conf/httpd/versions/a |
- versions
- a
- ...
- httpd.conf
- ...
- ssl.conf
- trac.conf
- vhost.conf
- trac
|
|
|
lien current -> /toutsvn/versions/a |
- util
- bin
- compil.sh
- create_repos.sh
|
Utilitaires |
|
|
|
lien conf -> /toutsvn/conf/httpd/versions/a |
- error
- ...
- lib
- apr.exp
- ...
- python2.4
- site-packages
- docutils
- easy-install.pth
- mod_python
- neo_cgi.o
- pysqlite2
|
|
|
contient /toutsvn/versions/a/lib/svn-python |
- trac
- TracAccountManager-0.1.3dev_r2171-py2.4.egg
- TracWebAdmin-0.1.2dev_r4429-py2.4.egg
- TracWebAdminAuthz-0.2.1-py2.4.egg
- svn-python
- logs
- man
- ...
- share
|
|
|
conf -> /toutsvn/conf/trac |
|
|
- Création des répertoires archives, util, conf et versions. Dans versions, un répertoire a pour la première version et un lien symbolique
APR (Apache Portable Runtime) et apr-util
Installation de APR et APR-util pour apache.
Python
Installation de python pour le mod_python d'apache.
- Recopier Python-2.4.4.tgz dans le dossier archives
- tar xvfz Python-2.4.4.tgz
- cd Python-2.4.4
- ./configure --prefix=/toutsvn/versions/a --with-threads --disable-framework --disable-toolbox-glue --disable-ipv6
- make -j 4
- make install
Apache
Installation du serveur web httpd
- Recopier httpd-2.2.4.tar.gz dans le dossier archives
- tar xvfz httpd-2.2.4.tar.gz
- cd httpd-2.2.4
- ./configure --prefix=/toutsvn/versions/a --enable-so --enable-dav --enable-ssl --enable-rewrite --enable-cgi --with-included-apr --with-mpm=worker
- make -j 4
- make install
swig
Installation de swig (Simplified Wrapper and Interface Generator)
- Recopier swig-1.3.31.tar.gz dans le dossier archives
- tar xvfz swig-1.3.31.tar.gz
- ./configure --prefix=/toutsvn/versions/a --with-python=/toutsvn/versions/a/bin/python --without-ocaml --without-php4 --without-guile --without-java --without-java --without-perl5 --without-tcl --without-x --without-ruby --without-mzscheme --without-pike --without-gcj --without-chicken --without-csharp --without-lua --without-allegrocl --without-clisp
- make -j 4
- make install
neon
Installation de neon (Interface C pour http et WebDAV) version neon-0.25.5 utilisé par subversion
- Recopier neon-0.25.5.tar.gz dans le dossier archives
- tar xvfz neon-0.25.5.tar.gz
- ./configure --prefix=/toutsvn/versions/a --disable-nls --disable-debug --with-ssl=openssl
- make -j 4
- make install
subversion
Installation de subversion (Gestionnaire de version, successeur de CVS)
- Recopier subversion-1.4.3.tar.gz dans le dossier archives
- tar xvfz subversion-1.4.3.tar.gz
- mv ../neon-0.25.5 neon
- ./configure --prefix=/toutsvn/versions/a --with-apxs=/toutsvn/versions/a/bin/apxs --with-apr=/toutsvn/versions/a/bin/apr-1-config --with-apr-util=/toutsvn/versions/a/bin/apu-1-config --without-berkeley-db --enable-swig-bindings=python --with-ssl --with-swig=/toutsvn/versions/a/bin/swig
- make -j 4
- make install
- make -j 4 swig-py
- make install-swig-py
ajouter /srcdev/versions/b/lib/svn-python dans /srcdev/versions/b/lib/python2.4/site-packages/svn.pth
mod_python
Installation de mod_python 3.2.10
- Recopier mod_python-3.3.1.tgz dans le dossier archives
- tar xfz mod_python-3.3.1.tgz
- ./configure --with-apxs=/srcdev/versions/b/bin/apxs --with-python=/srcdev/versions/b/bin/python --with-max-locks=64
- make -j 4
- make install
ez_setup.py
SQLite
Installation de SQLite 3.3.13
- Recopier sqlite-3.3.13.tar.gz dans le dossier archives
- tar xvfz sqlite-3.3.13.tar.gz
- ./configure --prefix=$prefix --enable-threadsafe --disable-tcl
- make -j 4
- make install
pysqlite
Installation de pysqlite 2.3.2
- Recopier pysqlite-2.3.2.tar.gz dans le dossier archives
- tar xvfz pysqlite-2.3.2.tar.gz
- python setup.py install
clearsilver
Installation de clearsilver 0.9.14
- Recopier clearsilver-0.9.14.tar.gz dans le dossier archives
- ./configure --prefix=$prefix --with-python=$prefix/bin/python --disable-java --disable-csharp --disable-ruby --disable-perl --disable-apache
- make -j 4
- Mofifier la première ligne de /scripts/document.py pour utiliser le bon python
- make install
- puis aller dans python et python setup.py install
docutils
Installation de docutils 0.4
- Recopier docutils-0.4.tar.gz dans le dossier archives
- tar xvfz docutils-0.4.tar.gz
- python setup.py install
trac 0.10.4
Installation de trac 0.10.4
- Recopier trac-0.10.4.tar.gz dans le dossier archives
- tar xvfz trac-0.10.4.tar.gz
- python setup.py build
- python setup.py install
- remet un lien vers les fichiers de configuration
- rm -Rf $prefix/share/trac/conf
- ln -s $tout/conf/trac $prefix/share/trac/conf
cURL
Installation de cURL
Plugins trac
- Webadmin
- TracNav
- ChangeLog
- HierWikiPlugin
- tracdown
- TracTags
- authzwebadminplugin
- accountmanager
- PageToPdfPlugin
- wikigoodiesplugin
Créer le répertoire repository avec une lien de /repository
ln -s /Volumes/HD750/repository /repository
Mettre les droits svntrac:www à REPOS
chown svntrac:www /repository/
dans repository, créer REPOS
sudo chmod g+w /repository/trac/ens/depart/log/trac.log à mettre dans le script de création dépôt.
transfert CVS -> SVN
cvs2svn --dumpfile=NEW_SVN_REPOS.dump --no-default-eol [--trunk-only] --encoding="latin_1" --encoding="utf_8" OLD_CVS_REPOS
svnadmin load /repository/svn/[research|school]/NAME < NEW_SVN_REPOS.dump
- demander s'il y a des executables, si oui: svn propset svn:executable '*' LISTE_FICHIERS_EXEC
- verifier si des fichiers passent binaires, alors que c'est du texte (a cause des accents), si oui: svn propset svn:mime-type text/plain LISTE_FICHIERS
Récupérer le tgz sur srcdev
tar xzvf enssrc.tgz
cvs2svn --dumpfile=PSI.dump --no-default-eol --trunk-only --trunk=ENSEIGNEMENTS_SRC/PSI --encoding="latin_1" --encoding="utf_8" ENSEIGNEMENTS_SRC
sur othello
./create_repos.sh -s ens -u imounier -d LI232
ls -al /repository/trac/ens/LI232/log/
chmod g+w /repository/trac/ens/LI232/log/trac.log
/toutsvn/current/bin/svnadmin load /repository/svn/ens/LI232 < /Users/admin/PSI.dump
/toutsvn/current/bin/trac-admin /repository/trac/ens/LI232 resync
/toutsvn/current/bin/trac-admin /repository/trac/ens/LI232 permission add svntrac TRAC_ADMIN
sur une autre machine
svn mv https://nom_de_machine/svn/ens/LI232/ENSEIGNEMENTS_SRC/PSI/PSI/TD-TME https://nom_de_machine/svn/ens/LI232/
svn mv https://nom_de_machine/svn/ens/LI232/ENSEIGNEMENTS_SRC/PSI/PSI/TD-TME https://nom_de_machine/svn/ens/LI232/ -m "mv"
svn mv https://nom_de_machine/svn/ens/LI232/ENSEIGNEMENTS_SRC/PSI/PSI/.cvs-symlinks https://nom_de_machine/svn/ens/LI232/ -m "mv"
svn mv https://nom_de_machine/svn/ens/LI232/ENSEIGNEMENTS_SRC/PSI/PSI/csym-add https://nom_de_machine/svn/ens/LI232/ -m "mv"
svn mv https://nom_de_machine/svn/ens/LI232/ENSEIGNEMENTS_SRC/PSI/PSI/csym-update https://nom_de_machine/svn/ens/LI232/ -m "mv"
svn rm https://nom_de_machine/svn/ens/LI232/ENSEIGNEMENTS_SRC -m "rm"
Accès Webdav
https://serveur/[nomDepot]_uploads
Problèmes rencontrés...
Error validating server certificate for (dans un SCPlugin du Finder)
Cela arrive lorsque l'on utilise un certificat non reconnu ou que le certificat a changé (après expiration)
$ cd vers_un_repertoire-svn
$ /Library/Contextual\ Menu\ Items/SCFinderPlugin.plugin/Contents/Resources/SCPluginUIDaemon.app/Contents/bin/svn log
Error validating server certificate for 'https://serveurSVN.domaine.fr:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: serveurSVN.domaine.fr
- Valid: from Thu, 21 Jan 2010 23:00:00 GMT until Mon, 21 Jan 2013 22:59:59 GMT
- Issuer: TERENA, NL
- Fingerprint: 15:a7:37:70:07:4c:23:66:7d:79:f1:25:b3:da:f4:40:e0:9f:6b:f6
(R)eject, accept (t)emporarily or accept (p)ermanently? p
2007-2012. Page élaborée grâce au travail d'Alexandre Hamez.