Rolling back rtorrent

2017/11/04 --chroot raspbian jessie within stretch to use old rtorrent

I recently upgraded my Raspberry Pi from Raspbian Jessie to Raspbian Stretch. Unfortunately one of the upgraded packages I use, rtorrent, seems to have a memory issue in 0.9.6 (included in Stretch) (see https://github.com/rakshasa/rtorrent/issues/191), which is rather annoying for such a memory constrained device, and I did indeed experience high loads.

Options:

Let's try just adding the Jessie repo back and seeing if the old 0.9.2 version will take:

# apt-get install rtorrent=0.9.2-1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 rtorrent : Depends: libsigc++-2.0-0c2a (>= 2.0.2) but it is not going to be installed
          > Depends: libtorrent14 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Nope, this just leads into a library dependency mess.

Different distro? DietPi seems to have addressed this directly https://github.com/Fourdee/DietPi/issues/176 but I don't have time to try DietPi just now.

I don't want to roll back to Jessie either; I quite like being on the latest versions of all the other packages! Plus Stretch is the stable repo now.

Perhaps I can have the best of both worlds? Install a chrooted copy of Jessie with the version of rtorrent I want in parallel with my base raspbian Stretch!

As root:

# apt-get install debootstrap
# mkdir -p /chroot/jessie
# debootstrap --no-check-gpg --arch=armhf jessie /chroot/jessie/ http://archive.raspbian.org/raspbian

this will take a while

# chroot /chroot/jessie/ apt-get update
# chroot /chroot/jessie/ apt-cache show rtorrent
Package: rtorrent
Version: 0.9.2-1
Architecture: armhf

hurray!

# chroot /chroot/jessie/ apt-get install rtorrent
# mkdir /chroot/jessie/home/pi
# chroot /chroot/jessie/ adduser pi
# mount --bind /home/pi/ /chroot/jessie/home/pi

I also have an external btrfs raid1 mounted:

# mkdir /chroot/jessie/media/raid1a
# mount --bind /media/raid1a/ /chroot/jessie/media/raid1a/

Only root can execute chroot, so we use the userspec option to use our pi user, and also export the HOME path ready

# sudo chroot --userspec=pi /chroot/jessie env HOME=/home/pi rtorrent

By jove it works!

Of course the true solution would be to compile a statically linked armhf binary of this version of rtorrent. Another time maybe...


PrevNext
Nethack