How to pimp Sourceforge Enterprise Edition 4.4 to support Subversion 1.5-dev

November 15, 2007 Team CollabNet

The following instructions on how to change the SourceForge Enterprise Edition Download to function with Subversion 1.5-dev are at your own risk and not supported by CollabNet. Subversion 1.5 is not released yet and I don’t recommend that you tinker around with the SFEE Download image that you use for development.

If you are still eager to get Subversion 1.5-dev on your SFEE Download machine: Read on!

Why do this?

I was really interested in testing the new features of Subversion 1.5, like merge tracking, sparse directories and sharding. I also love to work with SourceForge Enterprise Edition, which I use for my projects. The downloadable edition of SourceForge Enterprise Edition ships with Subversion 1.4.3 and I decided to “pimp” my VMware image to support Subversion 1.5-dev.

Yum is your friend

The preconfigured SFEE 4.4 Download VMware image does not have a graphical user interface, like KDE, or a browser, and it does not ship with development tools like gcc. This decision was made intentionally. If you use SFEE 4.4 with the preconfigured Subversion 1.4.3 you only have to log into the VMware image once to do the initial configuration. After that you never have to touch the system again (which is a good thing). However, if you plan to upgrade SFEE 4.4 to Subversion 1.5-dev, you will need lots of software that does not ship with the image (it is normally not needed and would only result in longer download times).

The first step I would recommend is to upgrade the package manager of the underlying operating system (Cent OS 4.3) to let you access the software repository of rpmforge: http://wiki.centos.org/Repositories/RPMForge

After that, you can use yum to get virtually every software package you like on your machine. I started to install KDE, Eclipse, gcc and lots of other tools to facilitate the porting process. To proceed, you will need at least the C and C++ compilers, the python developer package, autoconf and libtool.

Backup everything

Before proceeding with the next step, you should save everything that is worth saving. As mentioned above, the upgrade process is risky and must not be used for any production system. Make sure to save a copy of apache’s httpd.conf

Checking out Subversion 1.5-dev

The Subversion 1.5 binaries from CollabNet are built for Apache 2.2. SFEE 4.4 is built with Apache 2.0.52, so you have to build Subversion yourself. Don’t worry, I had never done this before and only read the INSTALL file of Subversion once to understand how it works. You can checkout Subversion by typing “svn checkout http://svn.collab.net/repos/svn/”

Removing the old stuff

You have to upgrade the apr libraries on the VM-ware image to build Subversion 1.5-dev. You can easily get rid of the old ones by typing “yum erase apr”. On the SFEE Download, this will remove your Apache as well as Subversion and all Subversion related Apache modules (due to package dependencies on Cent OS 4.3). Your SFEE will be temporarily broken after this step. Please ensure that you checked out the Subversion’s source code before doing this step.

After having removed the old libraries, you may type “yum install httpd-devel” to install Apache and its header files again. Copy the saved httpd.conf file over the new one to preserve SFEE’s apache configuration. Do not try to start Apache again, the Subversion modules are still missing and SFEE’s apache configuration relies on them.

Building Subversion

This is maybe the hardest step, but if you follow the instructions in the INSTALL file in the top level directory of Subversion’s own repository (you’ve just checked it out), you will have no problems. You have to download  and install the newest versions of libapr 0.9.x and libapr 0.9.x and libneon or libserf (do not use the Cent OS 4.3 standard packages, they are too old). Optionally, you may download OpenSSL and libasl as well. The INSTALL file contains all information how to do this. For libz, you may use the version that yum provides you.

Last but not least, Subversion 1.5-dev requires SQLite development packages. You may install them by typing “yum install sqlite-devel”. However, sqlite occasionally causes problems with some versions of yum. If yum freezes after this step, take a look at this forum post or make sure that you install a newer version of python-sqlite before.

If you plan to use SFEE to browse through your repositories, you will need the python bindings as well, so take a look at subversion/bindings/swig/INSTALL as well. You will have to install SWIG, which is explained in the INSTALL file.

After that, you can start to build and install Subversion 1.5 and the python bindings:
./autogen.sh
./configure –prefix=”/usr/” –enable-dso –with-ssl –with-apxs=/usr/sbin/apxs
make
make install
make swig-py
make install-swig-py
echo /usr/lib/svn-python > /usr/lib/python-2.3/site-packages/subversion.pth

Congratulations

If you successfully followed the above instructions, the last thing you need to do is restarting the apache webserver: “/etc/init.d/httpd restart”. Afterwards, your SFEE 4.4 should run with Subversion 1.5.0-dev and it will be easy to upgrade Subversion 1.5-dev to new revisions: simply repeat the last steps after an svn update of the working copy where you keep the Subversion code.

Enjoy!

Feedback appreciated

I am totally aware of the fact that this description still requires a lot of work for you and only covers the IMHO most important points in the upgrade process. Of course I can go into detail, but first I like to find out whether there is any interest in having Subversion 1.5-dev on SFEE 4.4 at all. If you have questions regarding an upgrade step or have a better way to do it, please tell me.

There is also another possibility to upgrade on Subversion 1.5-dev: Upgrade the apache application server to version 2.2, rewrite the SFEE-specific httpd.conf and its dependent files and install CollabNet’s pre-built Subversion 1.5 binaries from the early adapter program . Please tell me about your experiences with that approach or whether you are interested in getting a description how that would work.

Previous Article
Analysis Paralysis

From the November 2007 issue of Fast Company: [Researchers] gave doctors the medical history of a 67-year-o...

Next Article
Changes made from Subversion 1.4.x to 1.5 – A command line point of view

Command line comparison between Subversion 1.4.x and Subverson 1.5. Read more ›