Subversion Version Control System on Ubuntu Desktop

The objective is to install subversion on my Ubuntu Dapper desktop in order to support version control for day to day projects.

Will use Apache 2 as uniform access control for security reasons, and in order to make this box a subversion server in my home office network.

Installation with Synaptic

  • subversion package
  • libapache2-svn package

Create repository

victorkane@mentor:~$ sudo mkdir /var/lib/svn
Password:
victorkane@mentor:~$ sudo svnadmin create --fs-type fsfs /var/lib/svn

Create password file

victorkane@mentor:~$ sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd victor
New password:
Re-type new password:
Adding password for user victor
victorkane@mentor:~$

Apache 2 HTTP Server configuration

/etc/apache2/mods-enabled/dav_svn.conf:

The objective is to install subversion on my Ubuntu Dapper desktop in order to support version control for day to day projects.

Will use Apache 2 as uniform access control for security reasons, and in order to make this box a subversion server in my home office network.

Installation with Synaptic

  • subversion package
  • libapache2-svn package

Create repository

victorkane@mentor:~$ sudo mkdir /var/lib/svn
Password:
victorkane@mentor:~$ sudo svnadmin create --fs-type fsfs /var/lib/svn

Create password file

victorkane@mentor:~$ sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd victor
New password:
Re-type new password:
Adding password for user victor
victorkane@mentor:~$

Apache 2 HTTP Server configuration

/etc/apache2/mods-enabled/dav_svn.conf:

# dav_svn.conf - Example Subversion/Apache configuration
#
# For details and further options see the Apache user manual and
# the Subversion book.

# <Location URL> ... </Location>
# URL controls how the repository appears to the outside world.
# In this example clients access the repository as http://hostname/svn/
<Location /svn>

# Uncomment this to enable the repository,
DAV svn

# Set this to the path to your repository
SVNPath /var/lib/svn

# The following allows for basic http authentication. Basic authentication
# should not be considered secure for any particularly rigorous definition of
# secure.

# to create a passwd file
# # rm -f /etc/apache2/dav_svn.passwd
# # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon
# New password:
# Re-type new password:
# Adding password for user dwhedon
# #

# Uncomment the following 3 lines to enable Basic Authentication
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd

# Uncomment the following line to enable Authz Authentication
AuthzSVNAccessFile /etc/apache2/dav_svn.authz

# The following three lines allow anonymous read, but make
# committers authenticate themselves.

# <LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
# </LimitExcept>

</Location>

/etc/apache2/dav_svn.authz:

 [groups]
admin=manny, moe, jack
worlddomination=bill,henry,programmer
level2=programmer1, programmer2
guests=guest

[/]
@admin=rw

[svn:/worlddomination]
@worlddomination=rw

restart Apache 2 HTTP Server:

victorkane@mentor:~$ sudo apache2ctl restart