My /etc/apt/sources.list (for Debian squeeze)

My sources.list entries:

# local repo (manually downloaded debs, etc.):
deb file:/usr/local/packages ./

# The closest Debian mirror is at Dalhousie University, Halifax:
deb http://mirror.its.dal.ca/debian/ squeeze main contrib non-free
deb http://mirror.its.dal.ca/debian/ squeeze-updates main
deb http://mirror.its.dal.ca/debian/ squeeze-proposed-updates main
# See http://www.debian.org/mirror/list for mirrors closer to you

# Security updates (not mirrored)
deb http://security.debian.org/ squeeze/updates main

# Official backports repo for squeeze (I install the Linux kernel from it)
deb http://backports.debian.org/debian-backports squeeze-backports main

# Debian multimedia, a must-have for mplayer et al.
deb http://mirror.its.dal.ca/debian-multimedia squeeze main non-free

# Repo that provides latest Iceweasel (aka Firefox)
deb http://mozilla.debian.net/ squeeze-backports iceweasel-release

APT pinning, Iceweasel upgrade, hide Facebook Ads

I am a pretty happy user of Debian 5 stable (“Lenny”). But some Lenny packages are a little too old for my taste.

For example, Iceweasel is version 3.0.6 in Lenny. But the latest Adblock Plus (1.1.1 and later) requires Firefox/Iceweasel 3.0.12 and Adblock Element Hiding Helper does not work correctly with Adblock Plus versions older than 1.1.1 (keeps ignoring the configured hiding patterns).

So I decided that I want Iceweasel 3.0.14 from Debian testing (“Squeeze”). I googled for APT Pinning and found this page

http://wiki.debian.org/AptPinning

The lower half of it explains a “conservative approach” to pinning that only installs testing packages when the user explicitly requests it. I created /etc/apt/preferences to look like this:

Package: *
Pin: release a=stable
Explanation: prefer stable
Pin-Priority: 900

Package: *
Pin: release o=Debian
Explanation: require approval
Pin-Priority: -10

Then I added the Debian testing repository to /etc/apt/sources.list, told apt to update itself and installed Iceweasel from testing:

apt-get update
apt-get install -t testing iceweasel

That worked nicely and upgraded only the Iceweasel package, nothing else.

Now I can use Adblock Plus with the Element Hiding Helper to get rid of the ads in Facebook by adding these Element Hiding Rules:

facebook.com##DIV.adcolumn
facebook.com##DIV.UIEMUASFrame.UIEMUASSLikeFrame
facebook.com##DIV.UIEMUASFrame

Yay! That was worth the effort …