Wednesday, January 05, 2005

Subversion on Debian

I've spent the last week or so (spare time) setting up a debian linux system to support a subversion repository. Some notes to make it easier if I have to do it again. (I'll use "svn" to represent the directory in which repositories are created.)
  • Debian hint, not subversion related: Use the feta command rather than apt-get, et. al. Start with: apt-get install feta
  • feta install subversion
  • Pay close attention to user and group permission in the directory in which you wish to create the repository. Yes, you do need execute permission (?why--i donno?) I chose not to support direct file access except for repository maintenance. Hence: chmod 770 svn.
  • In addition to direct file access, there are two ways to provide remote access to the repository: svnserve, and DAV via apache. They coexist nicely.
  • The svnserv (svn://host/repostory) approach is easier to set up, but the apache (http://host/svn/repository) approach plays better with firewalls, etc. It also provides "free" web browsing of the repository which is cool!.
  • You configure svnserve permissions after creating the repository (via svnadmin create). To do so, edit the svn/repo/conf/svnserve.conf file which was automatically created when you created the repository (note: replace "repo" with the actual repository name.)
  • To install apache support, you need apache2: feta get apache2
  • You also need the module that supports svn via dav: feta get libapache2-svn
  • To configure permissions etc. for apache-based access, edit:
    /etc/apache2/mods-available/dav_svn.conf
  • I added the default user under which apache runs -- www-data -- to the group that has access to the subversion directory.
  • I want to write some python utilities to help maintain the repository: feta install python2.3-subversion
  • I'm planning to take a look at pysvn: http://pysvn.tigris.org/


No comments: