I was perusing the Ubuntu Hardy Heron backports repository (what? You don’t do that?!) and noticed that subversion had been added to the backports. If you’re reading this, you probably already know that you’re stuck with subversion 1.4 officially and unless you wanted to compile from source, or install a 3rd party .deb, you were pretty much out of luck.
Now that its been added to the backports repository, its a very simple to upgrade.
If you’re never added anything from backports before, listen up. Backports are all the libs that have feature upgrades (not security related) that won’t show up in normal apt-get upgrade repositories. You could simply add the following line to your sources.list:
deb http://archive.ubuntu.com/ubuntu hardy-backports main universe multiverse restricted
On a default Hardy install it should already be in there, just commented out. So you can uncomment the two backports lines.
This will make all the libs on your machine upgrade to the newest… probably not what you want as you won’t get security updates for the backported versions. Instead we can use something called Pinning, which is available on most apt based operating system.
What we do is add the repository to our sources.list as above but put its priority lower then default, so that the normal repositories take precedent. Then we can on, a per lib basis, upgrade only the libraries we expressly want upgraded from backports.
In the file /etc/apt/preferences (you may have to create it), add the following lines:
Package: * Pin: release a=hardy-backports Pin-Priority: 400
We’re setting the hardy-backports repository to have a lower then default priority, so it won’t override the official repositories.
Update your apt cache: sudo apt-get update
Now if you do an apt-get upgrade subversion you shouldn’t see any changes… so how do we install from backports?
sudo apt-get upgrade -t hardy-backports subversion
You can see, its the same line, except we set the target of the upgrade to come from the backports repository.
Now you can keep your servers on the main repositories but still update a library here and there if you really desire new functionality.
