Run new packages on older distros with backports

206

Author: Michael Stutz

If you run a stable system, you don’t have to miss out on the latest and greatest releases of your favorite applications — just use a backport to get a package of a new release that’s been “back-ported” to your older distribution.

Backports are new software releases — often beta or development releases — that are recompiled under the libraries and environment of an older distribution, so that they can be run on “stable” systems that haven’t yet upgraded to all the latest software. They allow you to run recent versions of your favorite software applications — versions that your system wouldn’t otherwise meet the dependencies for.

Ubuntu’s Backports Project leader John Dong says that most of the time, his project’s backports are simply recompiled in an older environment, and that he typically doesn’t like to change packages to get them to compile. “However,” he says, “if there is pressing reason [such as an important bug fix], we do manually tweak packages to build, or work closely with the other Ubuntu developers to upload a version to the development tree that more readily backports to previous Ubuntu releases.”

Just about any package can be backported, but most tend to be the high-demand, user-level applications — such as Firefox, OpenOffice.org, and other large, popular packages — as well as multimedia applications and media players.

Traditionally, backports have been associated with another purpose — security. When new releases of applications include important security updates that are also applicable to older versions, those fixes are applied to the older version and a “backported” copy of that version is made available by the vendor. Many distributions, including Red Hat and SUSE, have provided regular security backports of their packages for years.

But aside from the security and bug fixes, using backports lets you have the latest features of applications that are otherwise unavailable on the older, stable versions of a distribution.

Backported software archives exist for the Debian and Ubuntu distributions — and using them on your system is a simple process.

Using Debian backports

Hundreds of backported packages for Debian systems are available from Debian Backports, backports.org. If you want to browse the packages online before actually trying them out on your system, you can look through the directories. They have a directory for the latest additions to the archive, and there’s also a comparison chart showing some of the backports currently available for Debian’s stable Sarge release, and how these backports compare with the version that’s included in Etch, which is the next version of Debian.

The Debian Backports project also maintains several mailing lists for announcements and help.

To use backports on Debian, first edit your /etc/apt/sources.list file (as root) to point to one or more sources of backported packages for your distribution. To use the main Debian Backports archive with a Sarge system, for example, you’d add the following line:

deb http://www.backports.org/debian sarge-backports main contrib non-free

Then, update your list of available packages with the command apt-get update.

Once your package list is updated, use an interactive package management front end such as aptitude or dselect to list your available packages; the backports should appear as newly available packages. By convention, Debian backport packages have the text “~bpo” appended to their version number.

You can select and install a backported package, or just do it on the command line with a call to apt-get, using the -t option to specify the target release as “sarge-backports” (or whatever name is appropriate for the backport archive that you’re using). For example, here’s the ever-popular backport method of installing the latest version of Firefox:

apt-get -t sarge-backports install firefox

The Debian Backports project isn’t the only source of backported packages for Debian. Anyone can make and publish a backport of a software release. The apt-get.org site maintains a large list of sites that have made their own backports available.

Using Ubuntu backports

Not to be left behind, the Ubuntu distribution has its own official backports repository, and an automated method for requesting backports.

Currently, Ubuntu provides backports for many versions of its distribution, although Dong says that Dapper and Edgy are the two versions that receive active backporting. “Backports have been offered officially since Hoary, and are provided up to the latest stable release,” says Dong. “However, backports are fulfilled solely on user demand for them, and requests tend to taper off for older releases as newer ones come out.”

The basic usage in Ubuntu is the same as for Debian — as root, edit your /etc/apt/sources.list file to include a line containing the backports repository that’s appropriate for your Ubuntu version:

  • For Feisty Fawn (7.04):

    deb http://archive.ubuntu.com/ubuntu feisty-backports main restricted universe multiverse

  • For Edgy Eft (6.10):

    deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

  • For Dapper Drake (6.06 LTS):

    deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse

  • For Breezy Badger (5.10):

    deb http://archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse

  • For Hoary Hedgehog (5.04):

    deb http://archive.ubuntu.com/ubuntu hoary-backports main restricted universe multiverse

  • For Warty Warthog (4.10):

    deb http://archive.ubuntu.com/ubuntu warty-backports main restricted universe multiverse

Then, run apt-get update to update your packages list, and the backports should appear in the list of available packages in your package management program.

Ubuntu has ample documentation on running backports and an active user forum.

Caveats

While you might have the temptation to madly install all the backports that show up as newly available, this isn’t really a good idea. You can’t run your whole system on backports, nor would you want to; every addition of an unstable backported application takes you further from the “stable” distribution, and has the potential to introduce the unforeseen bugs and errors associated with running the latest “unstable” software. If you want the latest development releases of everything, it doesn’t make sense to run a “stable” version of your distribution, anyway — just upgrade the whole distribution to an unstable (but more recent) release.

And if an application you use in backported form does have an important security update, it becomes necessary to apply the update to the backported package. This isn’t always easy or automatic.

The other problem to be aware of when you run backports is that as your system ages and time passes, your fresh new backport is, well, no longer a fresh new backport. When it comes time to do a distribution upgrade, you’ll have to do some hands-on package management, making sure that either the backports repository is no longer in your sources.list, or that you’ve set the pin priority for the backports lines in your sources.lists file.

But if you’re careful and use them smartly, backports can be a great way to play the line between the reliability of a tested, stable system and the fanciful new features of your favorite applications.