How to easily update to the latest transmission-daemon under Debian Wheezy

I love Debian for its stability and would not change it for anything. However there are instances when I would like to run an updated version of something and there does not exist a backport for it. One such instance is the Transmission bittorent daemon.

Since I’ve started using Transmission I really love it. The daemon runs on my headless Linux server that acts as my home file server, web server, etc. box that sits next to my modem/router. The daemon is accessed through a web browser. The web interface is very easy to use and has all the important options one needs for managing bittorrent downloads.

However the version that is part of Debian Wheezy – version 2.52-3 – is a bit crusty compared with the latest v.2.84. Debian has a process called a “simple Sid backport” which is one way to create an actual Debian package using the Debian package source from the Sid/unstable branch of Debian.

However in between the Wheezy/stable release and Sid/unstable things changed enough that its basically not possible to do a simple Sid backport due to required libraries which do not exist for Wheezy. Trying to backport all the required libraries and their subsequent dependencies would be really difficult.

But there’s actually a really easy, straightforward way to build the latest Transmission daemon from source and install it under Wheezy. Here’s how:

First create a directory in /usr/local/src to download the source package to:

mkdir /usr/local/src/transmission
cd /usr/local/src/transmission

Then I use wget to retrieve the latest source tarball from the mothership:

wget -c https://transmission.cachefly.net/transmission-2.84.tar.xz

Extract it:

tar -xJf transmission-2.84.tar.xz

Now prior to compiling it there are a couple things. Just to be safe I used the powerful Debian command that installs the dependencies required to build a Debian source package:

apt-get build-dep transmission

This will install all the packages necessary to build the Debian package. Because the Debian package is an older version all the required libraries might not be installed by this command. When I started the compilation process I had to install four additional packages to get Transmission to build:

apt-get install libcurl4-gnutls-dev libevent-dev libnatpmp-dev intltool

Now Transmission can be built:

cd transmission-2.84
./configure --enable-cli --enable-daemon --enable-external-natpmp
make
sudo make install

Now without having to remove the old transmission-daemon you can easily switch to the new one by simply editing this line in /etc/init.d/transmission-daemon:

DAEMON=/usr/bin/$NAME

change it to:

DAEMON=/usr/local/bin/$NAME

That’s it!

Now the daemon can be started (or restarted):

sudo service transmission-daemon restart

When you connect via the web interface you will see the new version. All your existing torrents should resume from the same state as before.


Comments

Leave a Reply

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