Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Upgrading Subversion in OS X Server (Leopard)

I've been working with OS X Server 10.5.7 for a couple of weeks now and things are going fairly well, but I have run into a problem upgrading SVN, particularly the modules dealing with WebDav and SVN on Apache2.

If I trigger an error on the browser by requesting an invalid address I get an error message:

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.8 mod_fastcgi/2.4.2 SVN/1.4.4

Showing that SVN 1.4.4 is installed as part of a module on the OS X Server Apache2.

-------------------------------
MY QUESTIONS :
-------------------------------
( 1 ) I would like to get DSO modules if possible that work with OS X Server and allow SVN 1.6 to display correctly.

( 2 ) If that is not possible, I would like to re-compile Apache 2 with all the correct Apple Config Parameters, so that I don't loose the WIKI, etc.

Any ideas ?
-------------------------------

On Tiger OS X Server I used MacPorts and that worked very well, but now that I bought a new machine and Leopard Server, I don't want to loose any of its functionality, especially the WIKI related stuff, so I want to stick to the Apple stuff for the most part...

According to the video "What's New in Subversion 1.6 ?" there are a lot of reasons for upgrading to SVN 1.6.x, security being one of them...

To see the video you can go to

http://www.tigris.org

and click on the button at the top of the home page, or go to

http://www.collab.net/webinar/41/

First you will need to register at collab.net which totally painless.


Upgrading on my iMac workstation is trivial, just download the binary svn 1.6.2 from

http://www.Collab.net -> downloads ->Subversion -> Community Button

add /opt/subversion/bin/ to the PATH and you're in business. If you are using a GUI Client like CornerStone, it may only work with version 1.5.x, but that is another issue to look into...

The server stores the svn executables in /usr/bin and a quick trip to the Terminal shows them.

$ which svn
---> /usr/bin/svn

$ svn --version
---> svn 1.4.4

$ ls -la /usr/bin | grep svn

or

$ ls /usr/bin | grep svn
---> svn
---> svnadmin
---> svndumpfilter
---> svnlook
---> svnserve
---> svnsync
---> svnversion

After using Disk Utility.app to create a .dmg archive of the boot partition to a backup drive or partition in case all does not go as expected, made a quick backup of the svn executables.

This shows two ways to install the svn 1.6.2 binary, EXCEPT for the fact that the Apple installed Apache DAV modules have been compiled with svn 1.4.4, and when you try to view the svn repositories using a web browser on a client machine there will be an error generated by apache, showing svn 1.4.4.

DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING, this is what I have done so far, but there is a piece I am missing dealing with apache2.

Use Disk Utility.app to create a .dmg archive of the boot partition.
Store the .dmg archive to a backup drive or partition in case all does not go as expected.
You can always start from another drive and recover your boot partition.
You can always make the server a "Target" for another machine and recover that way.
This is all fairly simple, but the above is my way of saying always prepare for the worst, if it doesn't happen then all the better.

There are two ways to upgrade svn, first the easiest and most compatible way :
-------------------------------
FIRST METHOD ( BEGIN )
-------------------------------
( 1 ) Install svn 1.6.2 in the default directory /opt/subversion/, with its executables in /opt/subversion/bin/ and...

( a ) place "/opt/subversion/bin/' in the front of the line as far as the $PATH is concerned

$ echo 'export PATH="/opt/subversion/bin:$PATH"' >> ~/.bash_profile

( b ) You can see the new path

$ echo $PATH

( c ) You can open the ~/.bash_profile using BBEdit or TextEdit, to see the newly added path...
$ open -a /Applications/BBEdit.app ~/.bash_profile

( d ) close the window containing ~/.bash_profile

$ which svn
---> /opt/subversion/bin/svn

$ svn --version
---> svn 1.6.2

$ ls -la /opt/subversion/bin | grep svn

or

$ ls /opt/subversion/bin | grep svn
---> svn
---> svnadmin
---> svndumpfilter
---> svnlook
---> svnserve
---> svnsync
---> svnversion
-------------------------------
FIRST METHOD ( END )
-------------------------------

-------------------------------
SECOND METHOD ( BEGIN )
May break Xcode's subversion, and perhaps other things that might rely on the older version of SVN
-------------------------------
$ which svn
---> /usr/bin/svn

$ svn --version
---> svn 1.4.4

$ ls -la /usr/bin | grep svn

or

$ ls /usr/bin | grep svn
---> svn
---> svnadmin
---> svndumpfilter
---> svnlook
---> svnserve
---> svnsync
---> svnversion

$ sudo mkdir /usr/bin/svn_144

This will move the v1.4.4. files to the backup directory, and give a slight error when it tries to move svn_144 onto itself, ignore the error

$ sudo mv /usr/bin/svn* /usr/bin/svn_144/

or simply redirect the error to /dev/null

$ sudo mv /usr/bin/svn* /usr/bin/svn_144/ 2> /dev/null

all the svn* files in /usr/bin/ have now been moved to /usr/bin/svn_144/

I then installed the svn 1.6.2. binary from the package at http://www.collab.net

$ ls -la /opt/subversion/bin/ | grep svn

You can see the path is the original path, were are not going to change it using this method.
$ echo $PATH

We are going to create new symlinks, so that when you call svn, the system will find /usr/bin/svn in its path, which will resolve to /opt/subversion/bin/svn and you will be using version 1.6.2 instead of the backed up version 1.4.4

$ sudo ln -s /opt/subversion/bin/svn* /usr/bin/

-------------------------------
SECOND METHOD ( END )
-------------------------------

iMacG5, Mac OS X (10.5.7)

Posted on May 20, 2009 11:54 AM

Reply

There are no replies.

Upgrading Subversion in OS X Server (Leopard)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.