boof Posted July 14, 2009 Share Posted July 14, 2009 First off, I searched the forums and the wiki for existing rtorrent install info / packages. I could only find reference to the bubbaraid rtorrent installations. As nice as bubbaraid is, I'd like to stick with 'core' unraid as much as possible - mostly to stay on top of the juicy beta releases. The impression I got was no one had done rtorrent as it was a pain with lots of dependencies and manual building required. And it is! So here are some rtorrent and dependencies packages I've made myself. - built from stable, not devel branch. For no particular reason. - compiled with xmlrpc-c support ready for web interfaces - works for me, your mileage may vary - apologies if this is replicating effort, please point me in the direction of any posts I've missed! It's too big to attach to this post so : http://files.init-1.net/unraid/rtorrent.zip Files contained : Archive: rtorrent.zip Length Date Time Name -------- ---- ---- ---- 694999 07-14-09 16:28 curl-7.16.2-i486-1.tgz 402093 07-14-09 16:28 libidn-1.5-i486-1.tgz 194369 07-14-09 16:28 libsigc++-2.0.18-i486-1.tgz 355170 07-14-09 16:29 libtorrent-0.12.4-i486-1.tgz 389587 07-14-09 16:29 rtorrent-0.8.4-i486-1.tgz 661167 07-14-09 16:29 xmlrpc-c-1.11.00-i486-1.tgz -------- ------- 2697385 6 files installpkg from your go script as you would as usual. I leave the rtorrentrc as an exercise for the reader. Hope someone finds this useful. edited 24/08/09 ---------------------- Updated zip file to contain a new curl package and recompiled binaries based on it to fix a tracker connect bug. Archive: rtorrent.zip Length Date Time Name -------- ---- ---- ---- 793285 08-24-09 15:04 curl-7.19.6-i486-1_slack12.2.tgz 402093 08-24-09 15:04 libidn-1.5-i486-1.tgz 194369 08-24-09 15:04 libsigc++-2.0.18-i486-1.tgz 355317 08-24-09 15:04 libtorrent-0.12.4-i486-1.tgz 389728 08-24-09 15:04 rtorrent-0.8.4-i486-1.tgz 661167 08-24-09 15:04 xmlrpc-c-1.11.00-i486-1.tgz -------- ------- 2795959 6 files As a bonus heres a quick and dirty sample .rtorrentrc file: directory = /mnt/user/Private/torrents session = /mnt/user/Private/torrent-metadata upload_rate = 10 check_hash = no hash_interval = 10 hash_max_tries = 1 port_range = 6000-6000 port_random = no use_udp_trackers = yes bind = 192.168.1.1 dht = off peer_exchange = no encryption = allow_incoming,enable_retry,prefer_plaintext tos = throughput scgi_port = 127.0.0.1:5000 edited 09/12/09 ------------------------ Thanks to the hard work of flixxx and with his approval a newer more up to date version of the rtorrent package can be found at : http://files.init-1.net/unraid/rtorrent-0.8.6.zip The only things changed from the original package are the libtorrent and rtorrent packages. However everything is bundles together for simplicity. Archive: rtorrent-0.8.6.zip Length Date Time Name -------- ---- ---- ---- 363947 12-09-09 10:55 libtorrent-0.12.6-i486-1.tgz 393122 12-09-09 11:38 rtorrent-0.8.6-i486-1.tgz 661167 08-24-09 09:04 xmlrpc-c-1.11.00-i486-1.tgz 793285 08-24-09 09:04 curl-7.19.6-i486-1_slack12.2.tgz 402093 08-24-09 09:04 libidn-1.5-i486-1.tgz 194369 08-24-09 09:04 libsigc++-2.0.18-i486-1.tgz -------- ------- 2807983 6 files Thanks flixxx! Link to comment
WeeboTech Posted July 14, 2009 Share Posted July 14, 2009 Thanks! I've done the same, only my version is older. One thing I did do differently was compile some of the support libs statically to make it easier on the installer. In any case, if you publish this via torrent on linuxtracker.org I'll contribute by being a seeder. Link to comment
bubbaQ Posted July 14, 2009 Share Posted July 14, 2009 When I built BubbaRaid, I had to use the dev code, since a particular bug was not fixed in the stable code. When I build the new BubbaRaid for 5.x, I will revisit the stability issue of rTorrent. Link to comment
NLS Posted July 19, 2009 Share Posted July 19, 2009 (you won't make bubbaraid for 4.5 final "if it actually shows up"? 5.0 could mean 12 months for Tom -eeeasily- and I really hoped your dev cycle would be shorter than his) Link to comment
bubbaQ Posted July 20, 2009 Share Posted July 20, 2009 Highly unlikely. I can't justify the level of work it would take for something with such a limited lifespan. The next flavor of BubbaRaid will be a package install, and no modified kernel. That means it won't have ALSA sound support. But it will have some precompiled stuff that is not available in a Slackware package (such as rTorrent). Link to comment
WeeboTech Posted July 20, 2009 Share Posted July 20, 2009 The next flavor of BubbaRaid will be a package install, and no modified kernel. That means it won't have ALSA sound support. What kernel mods are needed for ALSA? Maybe we could lobby for Tom to include the kernel mods and we could package up the support modules. I also remember that Kernel IPC was not included, maybe that needs to be part of the list too. Link to comment
bubbaQ Posted July 20, 2009 Share Posted July 20, 2009 Kernel modules for sound support are huge... That was a major reason BubbaRaid was 3 times larger than stock unRAID, and I had only a small subset of sound card drivers in it. Link to comment
boof Posted August 24, 2009 Author Share Posted August 24, 2009 There is a bug in the version of curl I've used that sometimes prevents rtorrent from connecting to the tracker(s). I've rebuilt with an updated version and will post update the zip in the first post with the newer versions shortly. Link to comment
flixxx Posted September 8, 2009 Share Posted September 8, 2009 How can I run this as a service or have it come up on startup? I put in my go script: installpkg /boot/rtorrent.install/* rtorrent but rtorrent never starts (unless i telnet into the server and manually type it). thanks Link to comment
BRiT Posted September 9, 2009 Share Posted September 9, 2009 When the "go" script is invoked, there is no, or a very minimal path setup. Try specifying the entire full path to the rtorrent executable. Link to comment
WeeboTech Posted September 9, 2009 Share Posted September 9, 2009 Also keep in mind, that it's best to run rtorrent through a program called screen or dtach It will take a bit of learning on how to work with screen, but the effort is the reward of running an interactive program, detaching from it and being able to re-attach again. Link to comment
flixxx Posted September 9, 2009 Share Posted September 9, 2009 Thanks, what does Bubba use for Bubbaraid? dtach or screen? Link to comment
flixxx Posted September 9, 2009 Share Posted September 9, 2009 Also keep in mind, that it's best to run rtorrent through a program called screen or dtach It will take a bit of learning on how to work with screen, but the effort is the reward of running an interactive program, detaching from it and being able to re-attach again. I'm so glad you keep the word "dtach" and "screen" in most of your posts cause when I do a search for screenn WAY too much info comes up. Anyway, reading a few of your other posts and links you provided I got everything working I installed the screen, ncurse and utempter I put in my go package to install the 3 packages and then: screen -d -m /usr/bin/rtorrent and bam we're in business **Edit, I jumped the gun. although I can go as far as installing screen, with the Go script it cannot open a detached screen runing rtorrent... it seems i have to login via telnet and manually input that command... back to the drawing board Link to comment
boof Posted September 9, 2009 Author Share Posted September 9, 2009 Also keep in mind, that it's best to run rtorrent through a program called screen or dtach It will take a bit of learning on how to work with screen, but the effort is the reward of running an interactive program, detaching from it and being able to re-attach again. I'm so glad you keep the word "dtach" and "screen" in most of your posts cause when I do a search for screenn WAY too much info comes up. Anyway, reading a few of your other posts and links you provided I got everything working I installed the screen, ncurse and utempter I put in my go package to install the 3 packages and then: screen -d -m /usr/bin/rtorrent and bam we're in business **Edit, I jumped the gun. although I can go as far as installing screen, with the Go script it cannot open a detached screen runing rtorrent... it seems i have to login via telnet and manually input that command... back to the drawing board Glad you got it working. I have to say at the moment I just login and manually start screen and rtorrent. My server reboots so rarely that it's not a big deal for me to do so. Having it auto start would be useful, though I don't know how off the top of my head. I suspect invoking screen via a script might cause problems as it wants to attach (and detach!) to a tty - none of which will be in use by the system script trying to start it... Some environment variable fiddling may be a way to go - or there might be a more elegant solution within screen. If you find out please update! I might have a look when I get some time towards the end of the week. Link to comment
WeeboTech Posted September 9, 2009 Share Posted September 9, 2009 Here's a chunk from my rc.rTorrent script. N=Nameofscript R=rootdirectory of program to run P=program to run # Turn off ^S and ^Q as rtorrent uses these keys stty stop undef stty start undef export TERM=linux # Detached command for submission /usr/bin/screen -T linux -dmUS ${N} $R/$P The actual rtorrent line I use at the end of the screen command is. /usr/bin/rtorrent -n -o import=${CONFFILE} MY script is a bit advanced of an rc script. It's not perfect but it works. I still have to refine it, I'll consider posting it. to reconnect after detaching. use the command screen -x rtorrent || screen -S rtorrent rtorrent I have another tool call screens which provides a list of detached screen sessions in a menu, allowing you to connect to any of them My rc.rtorrent script is a bit long because it was designed to run multiple rtorrents for private trackers. I may create a google-code site to house all of the rtorrent stuff for unRAID. I was playing with BubbaQ's unraidweb and it looks like it would be a good addition to add the web interface for rtorrent. As mentioned, I'm in a unRAID rut since new development stagnated. Maybe some coffee and coaxing will fire me up. LOL! Link to comment
flixxx Posted September 9, 2009 Share Posted September 9, 2009 Here's a chunk from my rc.rTorrent script. N=Nameofscript R=rootdirectory of program to run P=program to run # Turn off ^S and ^Q as rtorrent uses these keys stty stop undef stty start undef export TERM=linux # Detached command for submission /usr/bin/screen -T linux -dmUS ${N} $R/$P The actual rtorrent line I use at the end of the screen command is. /usr/bin/rtorrent -n -o import=${CONFFILE} MY script is a bit advanced of an rc script. It's not perfect but it works. I still have to refine it, I'll consider posting it. to reconnect after detaching. use the command screen -x rtorrent || screen -S rtorrent rtorrent I have another tool call screens which provides a list of detached screen sessions in a menu, allowing you to connect to any of them My rc.rtorrent script is a bit long because it was designed to run multiple rtorrents for private trackers. I may create a google-code site to house all of the rtorrent stuff for unRAID. I was playing with BubbaQ's unraidweb and it looks like it would be a good addition to add the web interface for rtorrent. As mentioned, I'm in a unRAID rut since new development stagnated. Maybe some coffee and coaxing will fire me up. LOL! Thank Weebotech, I copied and pasted your script in my rtorrent.rc and it didn't work I didn't expect it too though. So what does this command do? export TERM=linux And what does screen -T linux do? I'm figuring it plays a role with the export on top I prettym uch understand the rest, i still don't get though how your will start during bootup without you logging in to the terminal, except for that export command, the rest seems very similar to just invoking screen -dm rtorrent It's so dificult googling "screen" considering so many other crazy results come up. Link to comment
flixxx Posted September 10, 2009 Share Posted September 10, 2009 Google "man screen" I have, thanks bubba. I've gotten pretty familiar with screen, in fact I also found this fantastic manual that even references the screenrc file: http://www.delorie.com/gnu/docs/screen/screen_toc.html#SEC_Contents regardless I still cannot get screen to startup with the go file. i've tried all sort of combinations but nothing will work. Bubba, how did u manage to make rtorrent start on startup in bubbaraid? Link to comment
WeeboTech Posted September 10, 2009 Share Posted September 10, 2009 Ahh, here's the situation. There is a rtorrent.rc script which rtorrent reads on startup. Then I have my own rc.rTorrent script which starts up rtorrent in screen. rc.rTorrent starts rtorrent which reads a configuration file called rtorrent.rc My scriptlet is used in the go script, not in the rtorrent.rc configuration file. export TERM=linux Sets a variable called TERM to linux which is used by any curses application to find out specifics about terminal emulation. How to position cursor, clear screen, etc, etc. And what does screen -T linux do? I'm figuring it plays a role with the export on top forces terminal emulation to be of type TERM linux (could be vt100 or any other if the definitions are on the filesystem). i still don't get though how your will start during bootup without you logging in to the terminal, except for that export command, the rest seems very similar to just invoking screen -dm rtorrent You can use the few lines from my scriptlet to help run screen in detached mode to run rtorrent. Try this one. This assumes your configuration file is in /boot/custom/etc/rtorrent.rc /usr/bin/screen -T linux -dmUS rtorrent /usr/bin/rtorrent -n -o import=/boot/custom/etc/rtorrent.rc some info from the man pages -d -m Start screen in "detached" mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts. -S sessionname When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for "screen -list" and "screen -r" actions. It substitutes the default [tty.host] suffix. The session name is if you want to re-attach to the rtorrent running in screen. As in -x Attach to a not detached screen session. (Multi display mode). and screen -x rtorrent example root@slacky:/home/rcotrone/src/slackbuilds/dtach/dtach# slogin root@atlas root@Atlas ~ #screen -list There is a screen on: 12977.rTorrent (Attached) 1 Socket in /root/.screen. root@Atlas ~ #screen -x rTorrent ^A^D (to detach) [detached] Link to comment
flixxx Posted September 10, 2009 Share Posted September 10, 2009 It's the strangest thing that it does not work for me. I have tried the commands you have given me. -d -m technically should work, and they do when i'm logged in via putty and input the command, but from the Go script i get nothing. I've also made a script, called it test.sh and tried to invoke the script from the go file. Still nothing. So if i understand correctly, your go script invoke rc.rTorrent which in turn has everything posted up there? Basically, we can take the same commands and put them in the go script to get the same results (except, I wouldn't put {n} and so on, i'll just manually enter the paths). Link to comment
WeeboTech Posted September 10, 2009 Share Posted September 10, 2009 This is the simpler form of the command. /usr/bin/screen -T linux -dmUS rtorrent /usr/bin/rtorrent -n -o import=/boot/custom/etc/rtorrent.rc make a script with this line in it and run it to see if it works. then do a screen -list to see of there is a session called rtorrent running. There might be something wrong with your rtorrent.rc so you can try with /usr/bin/rtorrent -n -o import=/boot/custom/etc/rtorrent.rc to see what it says. Link to comment
flixxx Posted September 10, 2009 Share Posted September 10, 2009 This is the simpler form of the command. /usr/bin/screen -T linux -dmUS rtorrent /usr/bin/rtorrent -n -o import=/boot/custom/etc/rtorrent.rc make a script with this line in it and run it to see if it works. then do a screen -list to see of there is a session called rtorrent running. There might be something wrong with your rtorrent.rc so you can try with /usr/bin/rtorrent -n -o import=/boot/custom/etc/rtorrent.rc to see what it says. Thanks, but when I type "/usr/bin/screen -T linux -dmUS rtorrent /usr/bin/rtorrent -n -o import=/boot/custom/etc/rtorrent.rc". everything works just fine, I have absolutely no problems and rtorrent is running. The moment i put that in the go script, nothing happens. After I reboot, everything else in my go file gets done except for this. Mind you, the server does not have a physical keyboard,mouse or monitor... So i don't know if it's because there is no terminal present that it doesn't want to run it... since though it works fine with yours, it doesn't make sense to me. Link to comment
WeeboTech Posted September 10, 2009 Share Posted September 10, 2009 The moment i put that in the go script, nothing happens. After I reboot, everything else in my go file gets done except for this. Mind you, the server does not have a physical keyboard,mouse or monitor... So i don't know if it's because there is no terminal present that it doesn't want to run it... since though it works fine with yours, it doesn't make sense to me. Do you run this command after you install the packages? You might need to put a monitor to capture what happens with the go script. The screen is not failing because there is no terminal present. It's not needed to run screen detached like that. Link to comment
flixxx Posted September 10, 2009 Share Posted September 10, 2009 The moment i put that in the go script, nothing happens. After I reboot, everything else in my go file gets done except for this. Mind you, the server does not have a physical keyboard,mouse or monitor... So i don't know if it's because there is no terminal present that it doesn't want to run it... since though it works fine with yours, it doesn't make sense to me. Do you run this command after you install the packages? You might need to put a monitor to capture what happens with the go script. The screen is not failing because there is no terminal present. It's not needed to run screen detached like that. Maybe i'm missing a package? this is what my go script looks like: #!/bin/bash^M # Start the Management Utility^M /usr/local/sbin/emhttp &^M #We will now start Unraid-Web installpkg /boot/unraidweb.tgz #Install rtorrent installpkg /boot/rtorrent.install/* #Install Screen mkdir /var/log/wtmp installpkg /boot/screen/* #Test for copying screenrc #cp /boot/screenrc /etc/screenrc #Make symbolic link of rtorrent.rc ln -s /boot/rtorrent.rc /root/.rtorrent.rc #Run rtorrent under a screen /usr/bin/screen -T linux -dmUS rtorrent /usr/bin/rtorrent In the "screen" folder I have the following package: ncurses-5.6-i486-3.tgz* screen-4.0.3-i486-1.tgz* utempter-1.1.4-i486-1.tgz* Link to comment
WeeboTech Posted September 10, 2009 Share Posted September 10, 2009 Looks like it should work, what is in the rtorrent.install directory? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.