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 (http://mirror.metrocast.net/apache/subversion/subversion-1.8.10.tar.gz)
  2. APR 1.5.1 (http://mirror.metrocast.net/apache/apr/apr-1.5.1.tar.gz)
  3. APR Util 1.5.3 (http://mirror.metrocast.net/apache/apr/apr-util-1.5.3.tar.gz)
  4. scons 2.3.0 (http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz)
  5. Serf 1.3.7 (http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2)
  6. Apache HTTPD 2.2.27 (http://mirror.metrocast.net/apache/httpd/httpd-2.2.27.tar.bz2)
  7. SQLite 3.8.6 (http://www.sqlite.org/2014/sqlite-autoconf-3080600.tar.gz)
  8. ViewVC 1.1.22 (http://viewvc.tigris.org/files/documents/3330/49347/viewvc-1.1.22.tar.gz)
  9. diffutils 3.2 (http://ftp.gnu.org/gnu/diffutils/diffutils-3.2.tar.gz) [ 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
make install

 

APR

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

 

APR-Util

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

 

SQLite

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

 

scons


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

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

 

serf

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.

 

Subversion

cd subversion-1.8.10
export CFLAGS=-D__EXTENSIONS__
./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
make install
cd /opt/sungeek/libexec
cp mod* /opt/svnweb/modules

Next edit the httpd.conf and add the “LoadModule dav_svn_module modules/mod_dav_svn.so” 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>
</Location>

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.

 

swig-py

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

 

ViewVC

 
cd viewvc-1.1.22
./viewvc-install 

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
</Directory>

diffutils

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