Tuesday, November 26, 2013

How to downgrade SVN in Arch Linux

Whenever I do an update to arch, it installs a new version of subversion, which is as it should be. At the moment, the latest is SVN 1.8.3. However, several of the development tools I use depend on svnkit, which currently supports SVN 1.7.x. So to keep my command line svn compatible with my svnkit-based tools, I need to downgrade. As usual, I'm adding this blog entry so I can remember how to do this. It's pretty simple:

  1. cd /var/cache/pacman/pkg
  2. ls sub*
    subversion-1.7.9-4-x86_64.pkg.tar.xz  subversion-1.8.0-1-x86_64.pkg.tar.xz
    subversion-1.7.9-6-x86_64.pkg.tar.xz  subversion-1.8.3-1-x86_64.pkg.tar.xz
  3. sudo pacman -U subversion-1.7.9-6-x86_64.pkg.tar.xz
That is all. Or maybe not. Might need this:

cd /usr/lib
sudo ln -s libserf-1.so.3.0.0 libserf-1.so.0

svn --version will either work or say it's missing libserf.

Last resort: This happened recently, I updated arch and got SVN 1.9.5. My svnkit is still 1.8.12. I tried following the above, but since I'd also upgraded my hard drive recently, I didn't have any old packages in /var/cache/pacman/pkg. I couldn't find the older tar.xz files for SVN 1.8 anywhere (maybe they are out there, I just couldn't find them). So in my .bashrc file, I added these lines:

export PATH=$PATH:/home/danson/src/svnkit-1.8.12/bin
alias svn="jsvn"

This means I'm now using the svn client from svnkit instead of the official svn client from Apache. If I really need the Apache client, it's still there in /usr/bin, so I'm covered either way.


No comments: