« Home | MySQL inches towards closed source » | Orbitz TLC » | Microsoft ISA server and Linux » | Control multiple computers with a single keyboard ... » | Is the party over for Indian Outsourcers? » | Google Tech Talk - Inbox Zero Presentation by Merl... » | Shopping for General Liability Insurance » | My New GPG Key » | Encrypt GMail using GPG » | Convert Word 2007 .docx files to .doc files »

Installing Subversion on legacy Red Hat distros

Upgrading subversion on legacy Red Hat machines is painful because of the interdependent RPMs. If you attempt to install the rpms from your distribution you will quickly find that the apr or apr-util versions are simply too old. You quickly become mired in rpm hell.

The best option is to go for source and upgrade manually. However, when building from source you will quickly get errors because of missing apr and apr-utils. You will fight errors and compiler failures until you discover the magic sequence of events (or just follow along below).

Subversion the Easy Way

Installing subversion is easy if you know how. First, we will do a working install in our $HOME directory, then we will move on to wiping out the older install, and finally we will build and install to the system directories.

You will need to download the latest subversion source tarball, the latest apr and apr-util source tarballs. Depending on your distribution you might need to get libexpat.

First, the Test Build

First, lets build it in our home directory under a simple account. No sense in messing up the system directories just yet (or getting trapped with a non-working subversion client while your users are stomping their feet at your desk like two year old children).

1. Build and Install apr

This will create and populate a $HOME/lib directory with the apr binaries.

tar -xzf apr-1.2.8.tar.gz
cd apr-1.2.8
./configure --prefix=$HOME
make
make install


2. Build and Install apr-util

This will build and add more executables to the $HOME/lib directory.

tar -xzf apr-1.2.8.tar.gz
cd apr-1.2.8
./configure --prefix=$HOME --with-apr=$HOME
make
make install


3. Build and Install Subversion

tar -xjf subversionr-1.4.3.tar.bz2
cd subversion-1.4.3
./configure --prefix=$HOME --without-berkely-db --with-zlib --with-ssl --with-apr=$HOME --with-apr-util=$HOME
make
make install

If the build breaks referencing expat (XML library) quickly check to see if you have it installed in /usr/lib/ instead of /usr/local/lib. If this is the case you can cheat (becase the --with-expat configure parameter didn't work on my build) with:
 
ln -s /usr/lib/libexpat.la /usr/local/lib/libexpat.la
ln -s /usr/lib/libexpat.so /usr/local/lib/libexpat.so

You should now have the subversion client installed.

Installing for Real.

(Optional) You can see if you have any rpms installed and wipe them out.

# rpm -qa | grep svn
# rpm -e svn-x.x.x

Next, follow the installation procedure above but substitute $HOME for /usr. That will make the configure script generate make files that will install subversion in /usr/bin and /usr/lib and not the default /usr/local/xxx directories.

Good Luck.

Powered by ScribeFire.

Labels: , ,