Automatically Upgrade Debian With Each Stable Release

I recently migrated my VPS from Slicehost to Linode and I’ve been very happy with them.  One of the changes that I made during this move was to try out Debian 5.0 as my base OS instead of Ubuntu 8.04.  So far I have been pleased with the change–although I’ll admit there isn’t much that is different on the server installation.  One of the few differences that I have found is in regards to the repository configuration.  One feature in Debian that is not available in Ubuntu is the ability to configure your sources.list to the stable release.. whatever version that happens to be.  Let me explain.

Repository Configuration

Ubuntu, a variant of Debian, uses the /etc/apt/sources.list to configure which repositories to subscribe to for available packages and errata updates.  Generally these repositories are subscribed to by way of development codename.  For example:

http://us.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse

A line like this in your Ubuntu configuration would subscribe to the Ubuntu 8.10 “Intrepid” repository for the life of that release (18 months).  It would also be able to pull updates and packages from the main, restricted, universe and multiverse areas of the repository.

Debian can follow the same standard–a repository configuration example might be something like this:

deb http://mirrors.kernel.org/debian lenny main contrib non-free

As you can see, these are both very similar.  The only differences are the development codenames, “Intrepid” vs “Lenny” and the naming of the repository subdivisions.  non-free vs universe/multiverse, etc.

Subscribing to Stable

The one difference that I have learned with Debian however is that you have the ability to use release aliases instead of development codenames.  For example, I could change “lenny” to “stable” and my machine would subscribe to the “stable” repository as long as one exists.  The key difference here is that “stable” evolves as the distribution evolves.  Whereas in the Ubuntu configuration I would need to update my configuration each time I want to migrate to a new “stable” version, Debian allows me to simple subscribe to “stable” and my machine would follow, and upgrade, to each stable release as long as it is in service.

Here is the sources.list that I use on my current Debian 5.0 web server:

deb http://mirrors.kernel.org/debian/ stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile stable/volatile main contrib non-free

You’ll notice that I’m using “stable” instead of “lenny” even though, at this point, they are technically the same thing.  When the next release is final however my machine will automagically subscibe to the newer repository, and I would never have needed to change my config.  Why doesn’t Ubuntu offer something like this?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>