Subversion Server Notes

 * Subversion Server Notes
 * -----------------------
 * 
 * If you intend to run a server, a repository needs to be created using
 * svnadmin (see man svnadmin) or the following command to create it in
 * /var/svn:
 * 
 *     emerge --config =dev-vcs/subversion-1.6.13
 * 
 * Subversion has multiple server types, take your pick:
 * 
 *  - svnserve daemon: 
 *    1. Edit /etc/conf.d/svnserve
 *    2. Fix the repository permissions (see "Fixing the repository permissions")
 *    3. Start daemon: /etc/init.d/svnserve start
 *    4. Make persistent: rc-update add svnserve default
 * 
 *  - svnserve via xinetd:
 *    1. Edit /etc/xinetd.d/svnserve (remove disable line)
 *    2. Fix the repository permissions (see "Fixing the repository permissions")
 *    3. Restart xinetd.d: /etc/init.d/xinetd restart
 * 
 *  - svn over ssh:
 *    1. Fix the repository permissions (see "Fixing the repository permissions")
 *       Additionally run:
 *         groupadd svnusers
 *         chown -R root:svnusers /var/svn/repos
 *    2. Create an svnserve wrapper in /usr/local/bin to set the umask you
 *       want, for example:
 *          #!/bin/bash
 *          . /etc/conf.d/svnserve
 *          umask 007
 *          exec /usr/bin/svnserve ${SVNSERVE_OPTS} "$@"
 * 
 *  - http-based server:
 *    1. Edit /etc/conf.d/apache2 to include both "-D DAV" and "-D SVN"
 *    2. Create an htpasswd file:
 *       htpasswd2 -m -c /var/svn/conf/svnusers USERNAME
 *    3. Fix the repository permissions (see "Fixing the repository permissions")
 *    4. Restart Apache: /etc/init.d/apache2 restart
 * 
 *  Fixing the repository permissions:
 *       chmod -Rf go-rwx /var/svn/conf
 *       chmod -Rf g-w,o-rwx /var/svn/repos
 *       chmod -Rf g+rw /var/svn/repos/db
 *       chmod -Rf g+rw /var/svn/repos/locks
 * 
 * If you intend to use svn-hot-backup, you can specify the number of
 * backups to keep per repository by specifying an environment variable.
 * If you want to keep e.g. 2 backups, do the following:
 * echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion
 * echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion
 * 
 * Subversion contains support for the use of Memcached
 * to cache data of FSFS repositories.
 * You should install "net-misc/memcached", start memcached
 * and configure your FSFS repositories, if you want to use this feature.
 * See the documentation for details.
 *