Well, i decided to start using subversion for a new project on my dreamhost account.

This took be a couple of hours to figure out, so I thought I’d pass on the information

Firstly, dreamhost does provide but not support subversion on their hosts, but it seems its a bit hit and miss, have a look at their wiki and you’ll see for some people it just works, and for others they need their own version and for still others it just doesn’t work.

I was one of those people (it didn’t work)

The symptom: ’svnadmin create svn/repo’ would simply hang when run. Just to confuse matters, it would create some directories, just enough to let it work a little. Any action on the repository would randomly fail (for instance, command-line ’svn export svn/repo’ would work, but commits and checkin’s would just fail (but imports would work!).

Surfing the net pointed the bone at nfs and dreamhost and muttered about using ‘fsfs’ as the storage mech rather than berkley db (bdb).

To cut to the chase, the problem was to do with APR (Apache Portable Runtime) which subversion uses, Debian (version 3.1) and /dev/random.

The solution is to:

  1. download source version of subversion
  2. Configure it to use /dev/urandom not /dev/random
  3. make and then install

And it will work!

In unix commands, thats:

  1. cd ~
  2. mkdir src
  3. cd src
  4. wget http://subversion.tigris.org/downloads/subversion-1.3.0.tar.bz2
  5. ./configure –prefix=$HOME –without-berkeley-db –with-zlib –with-ssl –with-devrandom=/dev/urandom
  6. make
  7. make install
  8. and change your PATH var to put your ~/bin ahead of your usual path: export PATH=~/bin:$PATH
  9. run ‘which svn’ to confirm you are running your svn
  10. Enjoy!