Upgrade rtorrent in karmic 9.10 THE EASY WAY

This is just a quick follow-up to my earlier post. I now have the rtorrent package source up and running on my ppa. So now you just need to do the following:

echo -e "deb http://ppa.launchpad.net/patricksissons/rtorrent/ubuntu karmic main \ndeb-src http://ppa.launchpad.net/patricksissons/rtorrent/ubuntu karmic main" | sudo tee /etc/apt/sources.list.d/rtorrent.list && sudo apt-get update && sudo apt-get install rtorrent

This will add my rtorrent ppa to your custom sources, update your source cache, then install the updated version of rtorrent (as well as libtorrent and xmlrpc). Combine this with rutorrent and you have a pretty sweet headless torrent server.

Launchpad PPA’s

So after discovering that my quick and dirty rtorrent fix didn’t actually fix what i needed it to (xmlrpc stuff, specifically), I decided to instead look into setting up a ppa on launchpad to host some of my custom packages. So here is a quick guide on how to do this:

first, some things you will need to install:
sudo apt-get install dput devscripts
of course, you’ll need some of the usual stuff like build-essentials and other common dev packages. dput is used to upload your source packages to your ppa, and devscripts contains some useful debian package scripts, such as debuild which is used to build your package.

now, create a gpg key for your ppa (or use an existing one if you have one)
simply use gpg –gen-key to generate a key (use the defaults, unless you want to get more specific)
if you already have a set of keys on another machine, you can export/import the public and private keys to your other machine. If you get into trouble with not enough entropy (happens when your compile machine is headless and you do everything through ssh), then try installing rng-tools and set your device to /dev/urandom (in /etc/default/rng-tools) then start the service. This will generate entropy for you.

Now setup your own ppa. First you’ll need a launchpad account, then you just need to authenticate yourself and create a new ppa. I won’t detail this process, but you can probably get a good idea from here: http://blog.launchpad.net/ppa/personal-package-archives-for-everyone

Now grab your source package as well as its build dependencies:
sudo apt-get build-dep PACKAGE
apt-get source PACKAGE

note that you don’t need to sudo when getting package sources. If you are upgrading the package using the latest version, things can get a little wonky because ubuntu packages are usually customized with patches, and these patches often don’t work with bleeding edge source. None the less you can give it a shot, simply grab the source for your package (not through apt, but from svn, git, http, etc…) and then copy the debian directory from the ubuntu source directory to your newer source directory. You will need to modify the changelog and create a new entry for your package (with an updated version). Alternatively, you can use dch to do this. Once you have your source set up, you have to build the source package. I recommend building the binary first, but this is not necessary, it just helps to for testing installation of the package and other things. to build the source package:
debuild -S -sa
this will generate a source package in the parent directory. Once this finishes, you can upload it to you ppa.

to upload your package to your ppa, just run:
dput PPA PACKAGE_source.changes
PPA will be something like ppa:USER_NAME/PPA_NAME
the changes file will have been created as a part of the source package creation.
this will ask you to enter your gpg password, and then upload the files to the launchpad servers. In a few minutes your package will be built and you’ll get a notice saying it was successful or not.

Caveats! They exist! some things i have found which are slightly annoying are the following:
you cannot re-upload (re-build) a package. This is useful if you have a dependency issue, the only fix is to increment the version and re-upload (please correct me if there is a better solution).
deleting packages is not very clear what happens, a deleted package still exists for quite some time on the server. There appears to be no notice of a package being purged, it just randomly stops existing.

p.s. updated rtorrent ppa will come soon, if you really want to get it now, you can use this package source:
deb http://ppa.launchpad.net/patricksissons/pjs/ubuntu karmic main
this is my development ppa, so it may contain things you don’t actually want to install.

Upgrade rtorrent in karmic 9.10

here is a quick and easy way to upgrade to the latest rtorrent on karmic. Basically we just snag it from lucid.

There are two basic methods to do this, the easiest is debatable between the two. Personally, i just tried method one, but i’m sure method two would work just as well.

Method 1:

  1. head to http://packages.ubuntu.com/lucid/rtorrent
  2. download the deb for your architecture
  3. download the deb for each of the following dependent packages:
    1. libssl
    2. librtorrent
    3. libxmlrpc
    4. libxmlrpc-core
  4. install each of the packages by running sudo dpkg -i *.deb

Method 2:

update your apt sources to lucid, do an apt update and then install rtorrent.  This should get the lucid packages and dependents.  Just remember to revert your changes to the apt source.

Like i said, i did method one, mostly because i was curious which packages i would need to backport to get rtorrent upgraded to version 0.8.6.  If you are curious why one might do this, it is because there are significant changes made to libtorrent and rtorrent, and this is an easy way to get access to them.

There may be some remaining issues to deal with regarding libxmlrpc, this is something i will look into once i have had a chance to work with this new version of rtorrent.

Next Page »