Forum
rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests (/thread-2342.html)

Pages: 1 2


rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 06:42 PM

Here are ready for testing packages
https://github.com/koper89/xbian-package-rtorrent-0.9.2
https://github.com/koper89/xbian-package-rtorrent-0.9.3
https://github.com/koper89/xbian-package-rtorrent-0.9.4


This packages include rtorrent, curl+libcurl, xmlrpc-c, rutorrent web-gui with plugins
Used in compilation:
curl 7.37.0 (--enable-ares --enable-tls-srp --with-zlib --with-ssl --with-libssh2 --with-libidn)
xmlrpc-c 1.33.12 (--enable-libxml2-backend --disable-abyss-server --disable-cgi-server)
libtorrent 0.13.2-3
lbitorrent 0.13.4 (--with-posix-fallocate)
rtorrent 0.9.2-4 (--with-xmlrpc-c)
Dependancies:
nginx/php5-fpm/php5-cli/unrar/dtach

KNOWN BUGS:
rtorrent-0.9.4 is not able to turn off with "stop rtorrent" it's because bug with PID/Name changing
rtorrent-0.9.4 have some memory leaks, and about 50% higher memory usage compared to 0.9.3 and 0.9.2


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 07:44 PM

Why can't you let the package depend on those dependencies?

More comments:
- Please remove all files not directly related to rtorrent.
- Add dependencies to packages that are required to run rtorrent instead of including them in the package.
- Make the postrm in such a way that ALL installed files are removed when remove the package.
- The location of the config file is not configurable. Make a /etc/default/rtorrent file to be able to adapt this.
- Why is the package depended on xbian-update?
- Don't include capitals in the control file except for the description.


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 08:05 PM

I did, it was just information in here:
https://github.com/koper89/xbian-package-rtorrent-0.9.2/blob/master/content/DEBIAN/control


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 08:13 PM

I updated my previous post.

You didn't because you include curl and xmlrpc in the package itself.

Also, don't depend on nginx but rather manually detect the webserver used and use the postinst script to create the config files necessary.


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 08:19 PM

I included curl because i wanted to add Asynchronous DNS support.
And xmlrpc to libxml2
But I'll delete them if needed, I would like to stick to nginx+php5-fpm because it's really lightweight, but I'll try to find how to detect webserver and try to adapt (but I don't know if I'll be able to detect php5-fpm or php5)

Best wishes


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 08:21 PM

It doesn't matter that you depend or suggest other packages, it matters that you include them in a package were they don't belong.

If rtorrent actually requires php5-fpm and php5 to function in the first place, then it's a dependency. But, rtorrent doesn't rely on nginx or apache and such.

Also, add a message that the webserver is installed in /var/www by default.


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 08:38 PM

I wanted to make easy to install rtorrent If I'll delete nginx/php5-fpm and staff it'll be useless for 1 click persons. I know you want to be it as proper as It can but let's remember what is the purpouse for this packages...

and about
Quote:- The location of the config file is not configurable. Make a /etc/default/rtorrent file to be able to adapt this.
I don't know how properly source this in upstart I tried:
Terminal
description "rTorrent 0.9.4 autostart script"

start on runlevel [2345]
stop on runlevel [016]

setuid xbian
setgid xbian
env HOME=/home/xbian
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env CONFIG_FILE=/media/media/.system/Config/rtorrent/.rtorrent.rc <=== TRIED WITH THIS LINE AND WITHOUT
env ENABLED=0 <=== TRIED WITH THIS LINE AND WITHOUT
# Automatically restart process if crashed
respawn
respawn limit 2 10

# Essentially lets upstart know the process will detach itself to the background
expect daemon

# Rtorrent may take some time to stop
kill timeout 60

# Put all crap into logfile
console log

# Nice level
nice 7
script
. /etc/default/rtorrent
export CONFIG_FILE
export ENABLED
test "$ENABLED" = '1' || exit 0
# Start the process
exec dtach -n /tmp/rtorrent.dtach rtorrent -n -o import=$CONFIG_FILE

end script
And it didn't seems to work in upstart...

EDIT:
And if you're so eager with making it as slim as it can I can make separate packages for rtorrent and rutorrent
and in rtorrent will be only things needed to start rtorrent in shell, and if you want web gui you'll have to install xbian-package-rtorrent which will include rtorrent with webserver and configuration


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 09:12 PM

Yes, of course the package should be easy to install, but it should also not break the apt structure. By not defined your dependencies right and including files that should not be included, things will become a mess.

Also, when users already have installed apache, they won't like it to have to install nginx.

There are two important rules here:
- To what does the package really depend on and are these dependencies available through the official repository? If not, then make a separate xbian package for these dependencies if so, then depend on the official ones.
- What packages can make rtorrent work better but isn't really required. Then add those packages as suggestions. Let your package be able to recognize what configuration the user is already using (such as nginx or apache).


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 09:34 PM

Ok, to make it more simple I moved rutorrent with nginx to another package, because it'll take me much more time to polish it (detec webserver and stuff). And made rtorrent packages as simple as i could so here it's
https://github.com/koper89/xbian-package-rtorrent-0.9.2
https://github.com/koper89/xbian-package-rtorrent-0.9.3
https://github.com/koper89/xbian-package-rtorrent-0.9.4
https://github.com/koper89/xbian-package-rutorrent

So if you want webgui, you need install rtorrent + rutorrent


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 09:44 PM

rtorrent upstart script:
Code:
description "ncurses BitTorrent client based on LibTorrent"

start on (local-filesystems and net-device-up and runlevel [2345])
stop on runlevel [016]

env HOME=/home/xbian
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

env CONFIG_FILE=/media/media/.system/Config/rtorrent/.rtorrent.rc
env ENABLED=0

respawn
respawn limit 2 10

nice 7

pre-start script
    exec su xbian -c "screen -dms rtorrent /usr/local/bin/rtorrent" &
end script

post-stop script
    exec kill `pgrep screen -x '-dms rtorrent /usr/local/bin/rtorrent'`;
end script
I didn't include the configurable stuff because i didn't want to give too much away Wink

Can you also work on the comments i gave earlier.


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 09:48 PM

And what's diffrent in your upstart that mine? Both working, mine using dtach (which is less resourcfull than screen and I think it's important in rapsberry Pi) And mine is also working, the only thing I have problem is with configurable stuff which you didn't share, so I'll stick with mine upstart script which is perfectly fine.


- Please remove all files not directly related to rtorrent.
Already done

- Add dependencies to packages that are required to run rtorrent instead of including them in the package.
Already done

- Make the postrm in such a way that ALL installed files are removed when remove the package.
As I assume I only need to remove files that are not in binary such as those created in post/pre install script? Everytinh else will be deleted by dpkg?

- The location of the config file is not configurable. Make a /etc/default/rtorrent file to be able to adapt this.
As I said I don't know how to do it

- Why is the package depended on xbian-update?
Removed, and made proper dependancies

- Don't include capitals in the control file except for the description.
Checked

As I said to make detection of webserver it'll take much more time, so I'll stick with what I did till now.


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 09:55 PM

Quote:As I assume I only need to remove files that are not in binary such as those created in post/pre install script? Everytinh else will be deleted by dpkg?
No, you need to manually add this to the postrm file.

Quote:As I said I don't know how to do it
I also didn't know how to make an upstart rtorrent file, but i manage to do so by searching the internet...

Quote:As I said to make detection of webserver it'll take much more time, so I'll stick with what I did till now.
Then we'll have to wait before we include it in the official repositories.


Also, your upstart file didn't work here. This one does.


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 10:01 PM

https://github.com/koper89/xbian-package-rtorrent-0.9.3/blob/master/content/etc/init/rtorrent.conf
This is my upstart script and it's working

And about postrm, are then all previous packages from download package wrong?
https://github.com/xbianonpi/xbian-package-transmission/blob/master/content/DEBIAN/postrm
Here they only remove configuration files not binaries...


RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - CurlyMo - 10th Jun, 2014 10:26 PM

Also, it has nothing to do with anyones eagerness that i want you to make proper packages. If you are simply going to include things like curl, then you break the whole apt procedure when we actually want to install the libcurl package. I'm just guiding you through the way apt packages are properly created:
Code:
apt-cache search transmission
[...]
transgui - Front-end to remotely control Transmission
transmission - lightweight BitTorrent client
transmission-cli - lightweight BitTorrent client (command line programs)
transmission-common - lightweight BitTorrent client (common files)
transmission-daemon - lightweight BitTorrent client (daemon)
transmission-dbg - lightweight BitTorrent client (debug symbols)
transmission-gtk - lightweight BitTorrent client (GTK interface)
transmission-qt - lightweight BitTorrent client (Qt interface)
transmission-remote-cli - ncurses interface for the Transmission BitTorrent daemon
[...]



RE: rtorrent 0.9.2/0.9.3/0.9.4 xbian package ready for tests - koper89 - 10th Jun, 2014 10:34 PM

https://github.com/koper89/xbian-package-rtorrent-0.9.2
https://github.com/koper89/xbian-package-rtorrent-0.9.3
https://github.com/koper89/xbian-package-rtorrent-0.9.4

Ok so if you could check those and say if they are now correct (only add configurable things in upstart but still it's working perfectly fine now)

As I said higher I moved rutorrent from rtorrent package:
https://github.com/koper89/xbian-package-rutorrent
Here it's I'll make more work on this but It'll take some time till it'll be ready for official xbian package, but rtorrent-0.9.2-4 I think are ready to realese, and I don't know what about this quote you made? What's about that? Could you tell something about transmission postrm script ?