Subversion on Solaris

So I have been trying to find the “definitive” guide on compiling and installing Subverison on Solaris. There are random sites over the interwebs that have a spattering of different tips, so I thought I would write one how how I did it and what all was done. When you finish this, you will have a basic Subversion system up and running to which you can then further lock down… Requirements: I downloaded the following:

  1. Subversion 1.8.10 (
  2. APR 1.5.1 (
  3. APR Util 1.5.3 (
  4. scons 2.3.0 (
  5. Serf 1.3.7 (
  6. Apache HTTPD 2.2.27 (
  7. SQLite 3.8.6 (
  8. ViewVC 1.1.22 (
  9. diffutils 3.2 ( [ Needed for ViewVC to work ]

Next up is compiling the software. This is the order I did things:

  1. Apache HTTP Server
  2. APR
  3. APR-Util
  4. SQLite
  5. scons
  6. serf
  7. subversion
  8. viewvc
  9. diffutils

I put all the tar balls in a directory called svn in my home directory. So all the instructions below are relative to it.


Apache HTTP Server

cd httpd-2.2.27
./configure --prefix=/opt/svnweb --with-ssl=/usr/sfw --with-ldap --enable-mods-shared="ssl deflate rewrite ldap authnz-ldap dav dav-fs dav-lock"
make install



cd apr-1.5.1
./configure --prefix=/opt/sungeek
make install



cd apr-util-1.5.3
./configure --prefix=/opt/sungeek --with-apr=/opt/sungeek
make install



cd sqlite-autoconf-3080500
./configure --prefix=/opt/sungeek
make install



mkdir /home/unixwiz/scons
cd scons
tar -xvf ../scons-local-2.3.0.tar
ln -s /home/unixwiz/scons/ /home/unixwiz/bin/scons

(made sure the link points to a directory in your path)



At line 251 of SConstruct add the following (this is needed to get it to work on Solaris):

env['PLATFORM'] = 'posix'

(it should be directly below the line that says env.Append(LIBS=’m’) in the sunos if statement)

cd serf-1.3.7
vi SConstruct   (edit as above noted)
scons APR=/opt/sungeek APU=/opt/sungeek OPENSSL=/usr PREFIX=/opt/sungeek CC=/usr/sfw/bin/gcc CFLAGS=-D__EXTENSIONS__
scons install

The CC and CFLAGS needs to be set otherwise it will try to use CC and will give you some errors about APR_PATH_MAX.



cd subversion-1.8.10
./configure --prefix=/opt/sungeek --with-apr=/opt/sungeek --with-apr-util=/opt/sungeek --with-serf=/opt/sungeek --with-apxs=/opt/svnweb/bin --with-openssl --with-sqlite=/opt/sungeek
make install
cd /opt/sungeek/libexec
cp mod* /opt/svnweb/modules

Next edit the httpd.conf and add the “LoadModule dav_svn_module modules/” line after the rewrite_module line.

At the bottom of the httpd.conf add the following: (assuming that /svn is the location of your svn repository.)

<Location /svn/repos>
DAV svn
SVNPath /svn>

Then change the User/Group from daemon to webservd. Also make sure to change the file systems permissions on /svn to be owned by webservd:webservd.



cd subversion-1.8.10
make swig-py
make install-swig-py
echo /opt/sungeek/lib/svn-python > /usr/lib/python2.6/site-packages/subversion.pth



cd viewvc-1.1.22

Installation path: /opt/sungeek/viewvc-1.1.22
DESTDIR path: empth

Edit the /opt/sungeek/viewvc-1.1.22/viewvc.conf and change the following:
svn_roots = svnrepos: /svn
default_root = svn_roots
mime_types_files = /opt/svnweb/conf/mime.types
diff = /opt/sungeek/bin/diff


Next copy the files form /opt/sungeek/viewvc-1.1.22/bin/cgi/*.cgi to /opt/svnweb/cgi-bin

Add the following to the bottom of the httpd.conf

<Directory /opt/sungeek/viewvc-1.1.22>
Order Allow, Deny
Allow from All


cd diffutils-3.2
./configure --prefix=/opt/sungeek
make install