# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# LibreSource Installation notes
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright (C) 2004-2008 Artenum SARL / INRIA
# http://www.libresource.org - contact@artenum.com
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Thank you for using LibreSource
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Subversion installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The LibreSource Subversion service manage dynamicaly the
subversion configuration files for security management.
Thus, in order to use this services, a subversion server must
be installed and configured to used this generated files.
- Configure LibreSource for your subversion (libresourceConfig.properties / libresourceConfig.xml)
> subversion.authz.file.path : Specify the path to the authz file that your Subversion should use (security mapping)
> subversion.repository.base.path : Parent directory for any subversion repository
> subversion.create.repository.cmd: Command line for the repository creation.
(LibreSource will add the repository name at the end)
> subversion.rename.repository.cmd: Command line used to rename a repository.
(LibreSource will add the old repository name and the new one at the end)
> libresource.web.conf : Specify the path of your configuration file of the Libresource web application.
- Script and command line proposition
> subversion.create.repository.cmd=sudo /home/libresource/tools/CreateSVNRepositoryForLS.sh /home/libresource/svn/libresource
> subversion.rename.repository.cmd=sudo /home/libresource/tools/MoveSVNRepositoryForLS.sh /home/libresource/svn/libresource
> Script shell: CreateSVNRepositoryForLS.sh
=======================================================
#!/bin/sh
if [ $# -ne 2 ]; then
echo $0 svnparentpath svnrepository
exit 1
fi
svnparentpath=$1
shift
if [ ! -d $svnparentpath ]; then
echo $svnparentpath is not a valid folder...
exit 2
fi
if [ $1 != `basename $1` ]; then
echo $1 ambiguous repository name ...
exit 3
fi
if [ -e $svnparentpath/$1 ]; then
echo $svnparentpath/$1 already exist...
exit 4
fi
su www-data -c "mkdir $svnparentpath/$1; svnadmin create $svnparentpath/$1"
if [ $? != 0 ]; then
echo problem during the svncreate phase
exit 5
fi
exit 0
=======================================================
> Script shell: MoveSVNRepositoryForLS.sh
=======================================================
#!/bin/sh
if [ $# -ne 3 ]; then
echo $0 svnparentpath sourcesvnrepository ciblesvnrepository
exit 1
fi
svnparentpath=$1
shift
if [ ! -d $svnparentpath ]; then
echo $svnparentpath is not a valid folder...
exit 2
fi
if [ $1 != `basename $1` ]; then
echo $1 ambiguous repository name ...
exit 3
fi
if [ $2 != `basename $2` ]; then
echo $2 ambiguous repository name ...
exit 4
fi
if [ ! -d $svnparentpath/$1 ]; then
echo $svnparentpath/$1 is not a valid folder...
exit 5
fi
if [ -e $svnparentpath/$2 ]; then
echo $svnparentpath/$2 already exist...
exit 6
fi
su www-data -c "mv $svnparentpath/$1 $svnparentpath/$2"
if [ $? != 0 ]; then
echo problem during the move phase
exit 7
fi
exit 0
=======================================================
- Libresource Web Application configuration file needed to activate Subversion (libresource-web.xml)
=======================================================
=======================================================
- Configure the Subversion installation
aptitude install subversion subversion-tools libapache2-svn libapache2-mod-auth-pgsql
a2enmod auth_pgsql
Ce module est inutilisable si il n'est pas chargé en premier :
cd /etc/apache2/mods-enabled
mv auth_pgsql.load 0000_auth_pgsql.load
en tant que libresource :
mkdir /home/libresource/svn
cd /home/libresource/svn
svnadmin create test
en tant que root :
chown -R www-data:www-data .
exemple de fichier de conf de site apache :
ServerName bench.artenum.com
ErrorLog /home/libresource/logs/bench/error_log
CustomLog /home/libresource/logs/bench/access_log combined
DAV svn
SVNParentPath /home/libresource/svn/
Require valid-user
AuthName "svn"
AuthType Basic
Auth_PG_host localhost
Auth_PG_port 5432
Auth_PG_database libresource
Auth_PG_user postgres
Auth_PG_pwd rien
Auth_PG_pwd_table casusers_
Auth_PG_uid_field username_
Auth_PG_pwd_field passworddigest_
Auth_PG_cache_passwords on
Auth_PG_encrypted off