This is a quick guide on how to get a recent version (1.4.2) of Subversion working on a Bubba server. I've tried to include as much info as possible but if something is not clear just let me know.
For this first part we need to run as root, so ssh into Bubba using your user account and then su to root. The default root password is excito, make sure you change this if you haven't already.
Next we need to edit the /etc/apt/sources.list in order to enable the Debian repositories, the initial version of the file looks like this:
Code: Select all
#deb http://ftp.se.debian.org/debian/ sarge main
#deb http://security.debian.org/ sarge/updates main
#deb http://ftp.se.debian.org/debian/ sarge non-free
deb http://update.excito.net/ bubba main
Unfortunately the standard repositories only contain version 1.1.4, this had some major issues for me and was incredibly slow. In order to get a more recent version we need add the Debian Sarge backports repository to our list, so we now have:
Code: Select all
deb http://ftp.uk.debian.org/debian/ sarge main
deb http://security.debian.org/ sarge/updates main
deb http://ftp.uk.debian.org/debian/ sarge non-free
deb http://www.uk.backports.org/ sarge-backports main contrib non-free
deb http://update.excito.net/ bubba main
Now that we have the required repositories we need to refresh the package cache:
Code: Select all
apt-get update
Code: Select all
apt-get -t sarge-backports install subversion
Now that we have Subversion installed we need to get a server running. This guide only covers the svnserve server, not the WebDav Apache integration. For details on the two configurations and on how to set up the WebDav integration check out the Subversion book at: http://svnbook.red-bean.com/
Before we start the server we need something to serve. First we need to create a subversion user that will own the repositories. The reason for doing this is it prevents other users from messing with the repositories and also prevents them from looking at the passwd file (which stores the passwords in clear text). As root, run:
Code: Select all
groupadd svn
useradd -m -d /home/svn -s /bin/bash -g svn svn
passwd svn
Code: Select all
mkdir repositories <-- or whatever you want to call it.
Code: Select all
svnadmin create /home/svn/repositories/test
Code: Select all
cd /home/svn/repositories/test/conf
Edit the passwd file and remove the the two commented lines under the [users] section, add a new user and password e.g.
Code: Select all
[users]
testuser = topsecret
Code: Select all
anon-access = read
auth-access = write
password-db = passwd
Right, now were ready to start the server. There are two mechanisms for running svnserve, as a daemon or through inetd. I prefer the inetd approach as it means the server is not running constantly and it also means I don't have to mess about with init scripts

Just to be awkward I use xinetd (an inetd replacement), this is available through the standard debian repositories, to install it run the following as root:
Code: Select all
apt-get install xinetd
Still as root, create a new file in the /etc/xinetd.d/ folder called svn, e.g:
Code: Select all
vi /etc/xinetd.d/svn
Code: Select all
# Subversion server
# default: on
service svn
{
socket_type = stream
protocol = tcp
user = svn
wait = no
disable = no
server = /usr/bin/svnserve
server_args = -i -r /home/svn/repositories
port = 3690
}
Restart the xinetd process:
Code: Select all
/etc/init.d/xinetd restart
Code: Select all
mkdir -p test/{trunk,branches,tags}
touch test/trunk/test.txt
Code: Select all
svn import test svn://localhost/test --username testuser --password topsecret -m "Initial Import"
Code: Select all
Adding test/branches
Adding test/tags
Adding test/trunk
Adding test/trunk/test/txt
Committed revision 1.
Code: Select all
svn checkout svn://localhost/test/trunk test2
Code: Select all
A test2/test.txt
Checked out revision 1.
Phew! Hopefully you found that useful, if you have any comments/corrections just let me know.
Cheers,
Darren.