====== Building Subversion for Cool Stack Apache 2.2 ======
===== Preflight =====
==== Prerequisites ====
- [[install-amp|Install Cool Stack AMP - Apache, MySQL, PHP package (CSKamp)]]: **insuring you follow the instructions for Cool Stack 1.2.**
- [[accelerators:kb:sun_studio|Install SunStudio Compilers & Tools]]
==== Assumptions ====
This guide makes the following assumptions:
* building Subversion against Cool Stack Apache, using its apr and aprutil.
* uses the SunStudio compiler (''cc'').
* builds Subversion without Berkeley DB (BDB) - i.e. only FSFS will be available to you.
* builds Subversion's Neon dependency.
* installs libraries into ''/opt/coolstack/lib'' and binaries into ''/opt/coolstack/bin'' (you should insure your PATH is properly configured).
===== Compilation =====
- Create a directory to download source code to:
mkdir -p /opt/src
cd /opt/src
- Download source:
wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
- Unzip the source and switch to the newly-created ''subversion-1.4.6'' directory:
gtar -xvf subversion-1.4.6.tar.gz
gtar -xvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6/
==== Build Dependencies ====
=== neon 0.25.5 ===
This version of Subversion requires an older version of **neon**, neon 0.25. Fortunately it is included in the ''subversion-deps-1.4.6.tar.gz'' that you just expanded.
Build **neon**:
cd /opt/src/subversion-1.4.6/neon/
CC=/opt/SUNWspro/bin/cc CFLAGS="-I/opt/coolstack/include" LDFLAGS="-L/opt/coolstack/lib" ./configure --prefix=/opt/coolstack --with-libxml2=/opt/coolstack --with-ssl=openssl
make
make install
=== OpenSSL 0.9.8 ===
This section of the instructions may not be reliable. It appears to be working, but needs refinement. //Please help improve this section of the instructions.//
Subversion 1.4.6 looks for **OpenSSL 0.9.8**. You may have another versions installed, but you need 0.9.8.
According to pkgsrc.se, OpenSSL 0.9.8 was released through pkgsrc in late January 2008. In theory, it should be as simple as issuing the following commands:
cd /opt/pkgsrc/security/openssl && bmake install
However,
If not, you'll need to build your own OpenSSL:
cd /opt/src
wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz
gtar -xvf openssl-0.9.8g.tar.gz
CC=cc CFLAGS="-I/opt/coolstack/include" LD_FLAGS="-L/opt/coolstack/lib" ./config --prefix=/opt/coolstack
make depend
make
make test
==== Build Subversion ====
cd /opt/src/subversion-1.4.6
CC=cc CFLAGS="-I/opt/coolstack/include" LD_FLAGS="-L/opt/coolstack/lib" ./configure --prefix=/opt/coolstack --with-apxs=/opt/coolstack/apache2/bin/apxs --with-apr=/opt/coolstack/apache2 --with-apr-util=/opt/coolstack/apache2 --with-neon=/opt/coolstack
make
make install
==== Possible Issues ====
- fix APXS path to perl:
nano /opt/coolstack/apache2/bin/apxs
change
#!/usr/bin/perl /opt/local/bin/perl
- While building Subversion:
libtool: link: warning: `/usr/local/lib/libexpat.la' seems to be moved
\\Solution: //unknown//
- While installing Subversion:
ld.so.1: svnversion: fatal: libssl.so.0.9.8: open failed: No such file or directory
/bin/bash: line 1: 8784 Killed subversion/svnversion/svnversion . /repos/svn/trunk >/opt/coolstack/include/subversion-1/svn-revision.txt
gmake: *** [revision-install] Error 137 \\ Solution: build OpenSSL, and if necessary, make sure that your ''LD_LIBRARY_PATH'' is set correctly.
===== Postflight =====
==== Add SVN binaries to your Path ====
SVN binaries (''svn'', ''svnadmin'', etc.) have been installed to ''/opt/coolstack/bin''. If you wish to use these binaries for managing your Subversion repositories, insure ''/opt/coolstack/bin'' is in your Path.
==== Configure Apache Modules ====
- Disable Apache if it is already running:
svcadm disable svc:/network/csk-http
- Check the **dav_svn** and **authz_svn** modules have been correctly installed in the filesystem:
$ cd /opt/coolstack/apache2/modules
$ ls -l | grep svn
-rwxr-xr-x 1 root root 17K Jan 30 18:33 mod_authz_svn.so*
-rwxr-xr-x 1 root root 231K Jan 30 18:33 mod_dav_svn.so*
- Open your Apache configuration file (by default, ''/opt/coolstack/apache2/conf/httpd.conf'') and verify that the **dav_svn** and **authz_svn** modules have been added (apxs should have done this for you):
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
- In the same file, insure **mod_dav** is uncommented:
LoadModule dav_module modules/mod_dav.so
- Test the syntax for your Apache configuration:
$ /opt/coolstack/apache2/bin/httpd -t
Syntax OK
- If your configuration looks good, and you're not yet ready to configure a Virtualhost to view your repositories, you can now bring Apache back up:
svcadm enable svc:/network/csk-http
If you're ready to setup Apache with your repositories, continue to the [[accelerators:kb:apache:setup-svn|setting up SVN instructions]].