Collab.net Subversion 1.5 OSX Problems

  • August 4, 2008
Table of Contents

So I started using Versions a while ago… When I saw there’s people having problems with the 1.5 cli tools from Collab.net I was sceptical. But being unable to keep myself from upgrading I tried it anyway.

And what do you know… I get exactly the same problem described by “Gary Gray” on the Versions group…

Commiting svn+ssh results in this error message:

svn: Commit failed (details follow):
svn: Cannot negotiate authentication mechanism

So I started digging around there’s essentially two fixes to this problem. The first would be to reinstall subversion with the –without-sasl flag on osx and the other is described here.

The problem however is that both of these require recompiling subversion. Now the question is why would you recompile subversion if you already have it and the problem is just in dependent libraries?

That’s right, the only reason I write this is because I didn’t feel like recompiling a bunch of dependencies that I might never use again. So this fix actually works fine without reinstalling subversion.

Contrary to commen belief the cause of this problem is not the sasl library but in fact the bundled openssl library(don’t kill me if I’m wrong though :P)

So first of all you would go on and install/upgrade openssl and sasl in your favorite package manager.

Since I use macports it would look like this:

sudo port upgrade openssl
sudo port install cyrus-sasl2

In this case the libs are installed into /opt/local/lib . I think it’s /sw/lib for fink..?

Then you want to make the old subversion binaries to use the new libraries instead by using the following:

for f in `ls /opt/subversion/lib/libsvn*1.0.0.0.dylib` ; do
    install_name_tool -change /usr/lib/libsasl2.2.dylib /opt/local/lib/libsasl2.2.dylib $f  ;
    install_name_tool -change /usr/lib/libssl.0.9.7.dylib /opt/local/lib/libssl.0.9.8.dylib $f ;
    install_name_tool -change /usr/lib/libcrypto.0.9.7.dylib /opt/local/lib/libcrypto.0.9.8.dylib $f ;
    lipo $f -thin i386 -output $f ;
done
for f in `ls /opt/subversion/bin` ; do
    install_name_tool -change /usr/lib/libsasl2.2.dylib /opt/local/lib/libsasl2.2.dylib /opt/subversion/bin/$f  ;
    install_name_tool -change /usr/lib/libssl.0.9.7.dylib /opt/local/lib/libssl.0.9.8.dylib /opt/subversion/bin/$f ;
    install_name_tool -change /usr/lib/libcrypto.0.9.7.dylib /opt/local/lib/libcrypto.0.9.8.dylib /opt/subversion/bin/$f ;
    lipo /opt/subversion/bin/$f -thin i386 -output /opt/subversion/bin/$f ;
done

lipo is necessary in my case since the subversion binaries are 64 bit as well and the library my macports installed were 32 bit intel, causing it to crash.

You might want to use ppc or something if you’re on a G4.

Update:
Here’s a little script with which you can toggle svn 1.5 support in xcode on and off:

#!/bin/sh

XCODESVN=/Developer/Library/Xcode/Plug-ins/XcodeSubversionPlugin.xcplugin/Contents/MacOS/XcodeSubversionPlugin 
SVNPREFIX=/opt/subversion

if [ ! -f ${XCODESVN}.bak ]; then cp $XCODESVN ${XCODESVN}.bak ; else cp $XCODESVN.bak ${XCODESVN}; rm $XCODESVN.bak; exit; fi

install_name_tool -change /usr/lib/libapr-1.0.dylib $SVNPREFIX/lib/libapr-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libaprutil-1.0.dylib $SVNPREFIX/lib/libaprutil-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_client-1.0.dylib $SVNPREFIX/lib/libsvn_client-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_delta-1.0.dylib $SVNPREFIX/lib/libsvn_delta-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_diff-1.0.dylib $SVNPREFIX/lib/libsvn_diff-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_fs_fs-1.0.dylib $SVNPREFIX/lib/libsvn_fs_fs-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_fs-1.0.dylib $SVNPREFIX/lib/libsvn_fs-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_ra_dav-1.0.dylib $SVNPREFIX/lib/libsvn_ra_neon-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_ra_local-1.0.dylib $SVNPREFIX/lib/libsvn_ra_local-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_ra_svn-1.0.dylib $SVNPREFIX/lib/libsvn_ra_svn-1.0.dylib  $XCODESVN
install_name_tool -change /usr/lib/libsvn_ra-1.0.dylib $SVNPREFIX/lib/libsvn_ra-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_repos-1.0.dylib $SVNPREFIX/lib/libsvn_repos-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_subr-1.0.dylib $SVNPREFIX/lib/libsvn_subr-1.0.dylib $XCODESVN
install_name_tool -change /usr/lib/libsvn_wc-1.0.dylib $SVNPREFIX/lib/libsvn_wc-1.0.dylib $XCODESVN

Enjoy

comments powered by Disqus

Related Posts

3G-Modding your eee 1000he hackintosh

As some of you may know I’ve been using snow leopard on my eee 1000he for quite a while(You can still get the modded DSDT I use on my system from my github page)

Read More

launching firefox with text/html entry in mutt 1.5,21

I recently decided that I might want to see some html mails in a real browser instead of a w3m dump. For example when I need to click on the stupid reset password link, which is sent in the html only mail from easyjet.

Read More