Getting the latest OpenOffice and Mozilla versions while running Debian Stable.

Many of us are running stable because we want stability, we want everything to "just work" and not be exposed to too many bugs along the way. On the other hand, we also want the latest versions of the software we care about, typically the software we use everyday. This choice between stability and features is a fundamental tension in software deployment and indeed software development that can only really be resolved by "cherry picking" the latest versions of the important software and installing them into a stable distribution.

In Debian this is done using backports.org. Backports are, literally, the software from [http://www.debian.org/releases/unstable/ Debian unstable] ported back to work with Debian stable. backports.org is technically unofficial and unsupported, but the infrastructure which is used to build, maintain and use it is supported and backports.org is very widely used.

Debian uses a system called "pinning," so called because it allows (amongst other things) sysadmins to pin certain packages at particular versions while the rest of the system, is upgraded as normal. Dependencies are normally handled pretty well.

Select your packages

Work out which packages you want the latest versions of. In this example I'll be using the OpenOffice and Firefox families of applications, but backports.org has many thousands of packages available. Likely candidates include Thunderbird, subversion and [http://www.backports.org/package.php?search=kde-i18n KDE-i18n, translations of the KDE desktop system. This last is particularly important, because translation releases typically lag behind development releases and often translations miss the distribution release deadline.

Add backports.org to /etc/apt/sources.list

Add backports.org to your /etc/apt/sources.list like so:

#deb file:///cdrom/ sarge main

deb http://mirror.ox.ac.uk/debian/ stable main
deb-src http://mirror.ox.ac.uk/debian/ stable main

deb http://security.debian.org/ stable/updates main

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

The first line there is a hangover from the my installation of debian from a CDROM and can be removed. The next two lines are the location I get most of my packages from: a local debian mirror. The next line is the location of the security updates, this is very important because security updates appear there first. The last line is the new line I've added for backports. You will need to add a similar line to your file.

Give backports.org a low priority

Tell apt how important the bulk of the packages on backports.org are: not very. In the file /etc/apt/preferences (which you may need to create from scratch) add the following:

Package: *
Pin: release a=sarge-backports
Pin-Priority: 200

This can be read: "for all packages in the release "sarge-backports" set a priority of 200." The priorities range from 0 to above 1000, making 200 a low priority, thus ensuring that none of the backports packages will be installed unless you explicitly request it or they are required prerequisites of high priority packages.

Tell apt which packages you want

Explicitly tell apt which packages you want, again in the /etc/apt/preferences file:

Package: openoffice.org
Pin: release a=sarge-backports
Pin-Priority: 999

Package: firefox firefox, mozilla-firefox, mozilla-firefox-gnome-support, firefox-gnome-support, mozilla-firefox-dom-inspector, firefox-dom-inspector
Pin: release a=sarge-backports
Pin-Priority: 999

The exact package names can be found via the search engine at http://www.backports.org.

At this point you need to save and close all your applications likely to be affected by the upgrade, typically all running instances of Firefox and OpenOffice. If you need to keep reading these instructions, open them in a different flavour of web browser.

Run apt-get

Update apt's cache of which packages are where.

apt-get update

Purge the currently installed packages (this does not purge user data such as bookmarks, only system data). This command is rather complex because rather than purging specific packages, it is checking which packages are already on the system which match certain strings and un-installing those. This extra complexity is needed because I don't know what packages you already have installed.

apt-get remove --purge `COLUMNS=1000  dpkg -l | grep ^ii | awk '{print $2}' | grep "\(firefox\|openoffice\)"`

Lastly, install the new packages. The list of packages is the same as the list of packages in the /etc/apt/preferences file.

apt-get install  firefox firefox mozilla-firefox mozilla-firefox-gnome-support firefox-gnome-support mozilla-firefox-dom-inspector firefox-dom-inspector openoffice.org

Now when you start OpenOffice or Firefox they should be the new version.

OSSWatchWiki: HowToGetTheLatestFirefoxAndOpenOfficeInDebianStable (last edited 2013-04-15 13:56:17 by localhost)

Creative Commons License
The content of this wiki is licensed under the Creative Commons Attribution-ShareAlike 2.0 England & Wales Licence.

OSS Watch is funded by the Joint Information Systems Committee (JISC) and is situated within the Research Technologies Service (RTS) of the University of Oxford.