About

Supporting the site

App Repository‎ > ‎Archives‎ > ‎

rtorrent-0.8.6

Warning: This version of rTorrent is deprecated and has been replaced by rTorrent 0.8.8. This page and attached files are being kept for reference, but should not be deployed on any systems.

Overview

This DroboApp is a complete, integrated, one-stop shop for rTorrent. It packages rTorrent in a way that can be started as a service on the DroboFS, and a web interface (ruTorrent) to manage rTorrent remotely.

rTorrent requires zlib, openssl, ncurses, libsigc++, xmlrpc-c, cURL, and libtorrent for rTorrent itself, and screen, procps, and unrar for ruTorrent plugins. Both rTorrent and ruTorrent have been packaged to try to offer as much functionality as possible, within the limitations of the DroboFS. Keep in mind that this is a very large DroboApp, with lots of dependencies. I have repeated this procedure from scratch several times to make sure it really works, but please keep in mind that this is the most complex DroboApp yet, and therefore proceed with caution.

Preparation

Make sure you have a cross-compiling virtual machine properly setup.

Compilation

export DEST=/mnt/DroboFS/Shares/DroboApps/rtorrent
cd ~/code/

wget http://zlib.net/zlib-1.2.5.tar.gz
tar zxf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure --prefix=$DEST
make clean && make && make install
cd ..

wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
tar zxf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./Configure linux-generic32 -DL_ENDIAN --prefix=$DEST --openssldir=$DEST/etc/ssl shared zlib-dynamic --with-zlib-include=$DEST/include --with-zlib-lib=$DEST/lib
make clean && make && make install
cd ..

wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.8.tar.gz
tar zxf ncurses-5.8.tar.gz
cd ncurses-5.8/
./configure --host=arm-none-linux-gnueabi --prefix=$DEST --enable-widec --with-shared
make clean && make && make install
cd ..

wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.9.tar.gz
tar zxf libsigc++-2.2.9.tar.gz
cd libsigc++-2.2.9/
./configure --host=arm-none-linux-gnueabi --prefix=$DEST --enable-static
make clean && make && make install
cd ..

wget http://curl.haxx.se/download/curl-7.21.4.tar.gz
tar zxf curl-7.21.4.tar.gz
cd curl-7.21.4/
ac_cv_path_PKGCONFIG=/usr/bin/pkg-config PKG_CONFIG_PATH=$DEST/lib/pkgconfig ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --with-ssl=$DEST --with-zlib=$DEST --with-random --with-ca-bundle=$DEST/etc/ssl/certs/ca-certificates.crt
make clean && make && make install
cd ..

wget http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.16.34/xmlrpc-c-1.16.34.tgz
tar zxf xmlrpc-c-1.16.34.tgz
cd xmlrpc-c-1.16.34/
. ~/uncrosscompile.sh
./configure
make clean && make
cp lib/expat/gennmtab/gennmtab ~/bin/
make clean
. ~/crosscompile.sh
PATH=$DEST/bin:$PATH ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --enable-curl-client
PATH=$DEST/bin:$PATH make
cp ~/bin/gennmtab lib/expat/gennmtab/
make && make install
cd ..

wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
tar zxf libtorrent-0.12.6.tar.gz
cd libtorrent-0.12.6/
PKG_CONFIG_PATH=$DEST/lib/pkgconfig ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --enable-static --enable-aligned
make clean && make && make install
cd ..

wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz
tar zxf rtorrent-0.8.6.tar.gz
cd rtorrent-0.8.6/
wget https://sites.google.com/a/droboports.com/www/app-repository/rtorrent-0-8-6/canvas.h.patch
patch src/display/canvas.h canvas.h.patch
wget https://sites.google.com/a/droboports.com/www/app-repository/rtorrent-0-8-6/common.m4.patch
patch scripts/common.m4 common.m4.patch
./autogen.sh
CFLAGS="$CFLAGS -I$DEST/include -I$DEST/include/ncurses -I$DEST/include/ncursesw" CPPFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" LDFLAGS="-L$DEST/lib" PKG_CONFIG_PATH=$DEST/lib/pkgconfig LIBS="-lssl -lcrypto -ldl -lz" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --with-xmlrpc-c=$DEST/bin/xmlrpc-c-config
make clean && make && make install
cd ..

wget ftp://sunsite.cnlab-switch.ch/mirror/gnu/screen/screen-4.0.3.tar.gz
tar zxf screen-4.0.3.tar.gz
cd screen-4.0.3/
wget http://bugs.gentoo.org/attachment.cgi?id=173051 -O configure.in.patch
patch configure.in configure.in.patch
autoconf
CFLAGS="$CFLAGS -I$DEST/include" LDFLAGS="$LDFLAGS -L$DEST/lib" screen_cv_sys_fifo_usable=yes screen_cv_sys_fifo_broken_impl=no screen_cv_sys_sockets_usable=yes screen_cv_sys_sockets_nofs=no screen_cv_sys_select_broken_retval=no screen_cv_sys_terminfo_used=yes screen_cv_sys_bcopy_overlap=yes screen_cv_sys_memmove_overlap=yes screen_cv_sys_memcpy_overlap=yes ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --with-pty-mode=0620 --with-pty-group=0
make clean && make && make install
cp etc/etcscreenrc $DEST/etc/screenrc
cp etc/screenrc $DEST/etc/.screenrc
cd ..

wget http://procps.sourceforge.net/procps-3.2.8.tar.gz
tar zxf procps-3.2.8.tar.gz 
cd procps-3.2.8/
make clean && make CPPFLAGS="-I$DEST/include -I$DEST/include/ncurses -I$DEST/include/ncursesw" LDFLAGS="-L$DEST/lib" CURSES="-lncursesw" DESTDIR=$DEST
make install DESTDIR=$DEST usr/bin=$DEST/bin/ usr/proc/bin=$DEST/bin/ man1=$DEST/share/man/man1/ man5=$DEST/share/man/man5/ man8=$DEST/share/man/man8/ lib=$DEST/lib/ usr/lib=$DEST/lib/ usr/include=$DEST/include/ install="install -D"
cd ..

wget http://download.gna.org/unrar/unrar-0.0.1.tar.gz
tar zxf unrar-0.0.1.tar.gz 
cd unrar-0.0.1/
ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes ./configure --host=arm-none-linux-gnueabi --prefix=$DEST
make clean && make && make install

Packaging

cd $DEST
mkdir -p var/run var/log var/session
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/admin.url
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/service.sh
chmod a+x service.sh
cd etc
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/rtorrent.conf
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/rtorrent.rc
cd $DEST
wget http://rutorrent.googlecode.com/files/rutorrent-3.2.tar.gz
wget http://rutorrent.googlecode.com/files/plugins-3.2.tar.gz
tar zxf rutorrent-3.2.tar.gz
tar zxf plugins-3.2.tar.gz -C rutorrent/
mv rutorrent www
rm rutorrent-3.2.tar.gz plugins-3.2.tar.gz
cd www/conf
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/config.php -O config.php
cd $DEST/www/plugins
rm -fr httprpc rpc geoip diskspace ratio
cd $DEST/www/plugins/create
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/create-conf.php -O conf.php
cd $DEST/www/plugins/unpack
wget http://www.droboports.com/app-repository/rtorrent-0-8-6/unpack-conf.php -O conf.php
cd $DEST
~/bin/package.sh

Installing

DroboAdmin link: Install rtorrent-0.8.6 (this link only works if you have not changed the DroboFS name). Otherwise, download below and place it in you DroboApps share.

Final remarks

ruTorrent requires PHP and lighttpd. Make sure both are installed and running properly before installing this DroboApp. This DroboApp will automatically detect the presence of lighttpd and configure itself.

rTorrent is configured to run as root, and ruTorrent is not password protected. This may be addressed in a future release, but right now rTorrent crashes without explanation if run under a non-root account. If you want to protect ruTorrent, edit etc/rtorrent.conf and add the authentication configuration following the model from droboadmin.conf.

Please visit the DroboSpace forums to leave your comments, suggestions and feedback.

ċ
admin.url
Download
  1k v. 2 Mar 23, 2011, 3:06 PM Ricardo Padilha
ċ
canvas.h.patch
Download
  1k v. 2 Mar 23, 2011, 2:40 PM Ricardo Padilha
ċ
common.m4.patch
Download
  1k v. 2 Mar 23, 2011, 2:40 PM Ricardo Padilha
ċ
config.php
Download
  1k v. 3 Mar 23, 2011, 3:23 PM Ricardo Padilha
ċ
create-conf.php
Download
  1k v. 2 Mar 23, 2011, 11:18 AM Ricardo Padilha
ċ
rtorrent-0.8.6.tgz
View
DroboApp for DroboFS  Mar 24, 2011, 1:26 AM Ricardo Padilha
ċ
rtorrent.conf
Download
  1k v. 2 Mar 23, 2011, 11:18 AM Ricardo Padilha
ċ
rtorrent.rc
Download
  1k v. 2 Mar 23, 2011, 11:18 AM Ricardo Padilha
ą
rutorrent.png
View Download
  4k v. 2 Mar 24, 2011, 2:48 AM Ricardo Padilha
ċ
service.sh
Download
  1k v. 9 Apr 8, 2011, 1:58 AM Ricardo Padilha
ċ
unpack-conf.php
Download
  1k v. 2 Mar 23, 2011, 3:23 PM Ricardo Padilha
Comments