Thursday, January 15, 2015

Debian backports

Debian has three primary distributions, stable, testing, and unstable. Wheezy is the current stable distribution.  The Debian community takes its time testing before they release their stable distributions. On an older machine like apple powerpc, running a stable distribution makes a huge difference. What you get is an OS the will run and is less like to crash on you. However the price of stability is that you will not get the latest software. This is no deal breaker but if you do want the latest it will mean a little more work.

Sometimes there is a need for a newer version of an application than the one that is in stable. I was wanting to use an extension for libreoffice that will give networking device images similar to what you will find in visio to make diagrams. However the extension would work not with the current version of libreoffice I had installed. Libreoffice would crash every time I tried to use the extension. So I needed to get a newer version.

There are a few ways to get newer software on Debian. You can always go grab the source code and compile it. Just be sure that to look up what software dependencies it needs to be sure you can get them or it will not compile. There is a great "how to" on the Debian forums on how to properly compile a package on Debian. Now before you decide to go down that route you should look to see if there is a package available in the Debian backports repository. Here is an excerpt from the Debian wiki on backports:

"Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates), so they will run without new libraries (wherever it is possible) on a stable Debian distribution"


Now not all the software on testing has been backported to stable so you would need to check first. I verifed that there was a backport for libreoffice by doing search for the package on the debian site. Now to install packages that backported from testing you will need to do the following:

   1. edit your sources.list file to add the backports repository by running the following command 'sudo nano /etc/apt/sources.list'. then enter your password and add the following lines at the bottom:

# wheezy-backports
deb http://mirrors.kernel.org/debian wheezy-backports main contrib non-free
deb-src http://mirrors.kernel.org/debian wheezy-backports main contrib non-free


   2. save (CRTL+o) then exit (CTRL+x). update apt by running 'sudo apt-get update'

   3. then install the backported by typing 'sudo apt-get -t wheezy-backports install package'

The '-t' option tells apt from which distribution to get the package in this instance from 'wheezy-backports'. If you want more info on stable/testing/unstable or other distributions in Debian go to the FAQ here.

UPDATE: I forgot to mention you can also install new packages from testing and unstable by adding their repositories to your sources.list file then running 'sudo apt-get update'. However I would caution against doing that since you may get dependencies that might break stable. If you do decide to go that route backup your system in case you need to roll back. 

No comments:

Post a Comment