Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66169 - Request: TorrentFlux
Summary: Request: TorrentFlux
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement
Assignee: Gentoo Web-apps project
URL: http://www.torrentflux.com/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2004-10-02 15:48 UTC by Luke-Jr
Modified: 2007-09-08 13:17 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
torrentflux-1.5.ebuild (torrentflux-1.5.ebuild,1.88 KB, text/plain)
2004-12-05 23:29 UTC, Ross Dougherty
Details
files/postinstall-en.txt (postinstall-en.txt,327 bytes, text/plain)
2004-12-05 23:30 UTC, Ross Dougherty
Details
files/reconfig (reconfig,243 bytes, text/plain)
2004-12-05 23:30 UTC, Ross Dougherty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2004-10-02 15:48:56 UTC
Webapp stuff...
Comment 1 Albert 2004-10-31 13:24:06 UTC
TorrentFlux is a FREE PHP based Torrent client. Manage all of your Torrent downloads through a convenient web interface from anywhere.

It's open source.  I think it would be perfect for my server to seed torrent iso's of popular distros and larger open source applications.
Comment 2 gent_bz 2004-11-15 16:37:02 UTC
Another request for same.
Comment 3 atom 2004-11-22 16:19:55 UTC
another request.
Comment 4 Albert 2004-11-22 20:39:48 UTC
Essentially there's nothing to it, it installs just as easy as any other web-app.

The hard part is finding a maintainer for the package.
Comment 5 Jon Hood (RETIRED) gentoo-dev 2004-11-27 08:16:44 UTC
I would be happy to maintain it. If someone could write up an ebuild, or I'll try to get on it tonight.
Comment 6 Ian 2004-11-29 20:08:04 UTC
It's an excellent applicaton.

Yet another request.
Comment 7 Ross Dougherty 2004-12-05 23:29:25 UTC
Created attachment 45361 [details]
torrentflux-1.5.ebuild
Comment 8 Ross Dougherty 2004-12-05 23:30:02 UTC
Created attachment 45362 [details]
files/postinstall-en.txt
Comment 9 Ross Dougherty 2004-12-05 23:30:31 UTC
Created attachment 45363 [details]
files/reconfig
Comment 10 Evan Alter 2005-01-27 17:01:33 UTC
how about one for Torrentflux 2.0

http://www.torrentflux.com/forum/index.php?showtopic=654
Comment 11 Renat Lumpau (RETIRED) gentoo-dev 2005-12-13 15:01:34 UTC
Hi,
torrentflux is now in our unofficial overlay:
http://svn.gnqs.org/projects/gentoo-webapps-overlay/browser/experimentalwww-apps/torrentflux

Please note that the overlay is unofficial, not a Gentoo project, and not
supported. It is intended to provide easier access to new web applications.
Comment 12 gent_bz 2005-12-13 17:15:10 UTC
That should probably be
http://svn.gnqs.org/projects/gentoo-webapps-overlay/browser/experimental/www-apps/torrentflux

(missing /) 
Comment 13 Nick Rout 2006-02-04 00:48:20 UTC
Renat, a couple of comments on the 2.0 beta ebuild you posted:

1. it does not set up the mysql database properly. I copied commands out of the 1.5 ebuild. I suggest you take a look at the src_install bit of the 1.5 ebuild.

PASSWORD=${RANDOM}${RANDOM}${RANDOM}
	sed '1s/^/GRANT ALL PRIVILEGES ON torrentflux.* TO "torrentflux"@"localhost" IDENTIFIED BY "'${PASSWORD}'";\nCREATE DATABASE torrentflux;\nUSE torrentflux;\nFLUSH PRIVILEGES;\n/' -i sql/torrentflux.sql
	sed -e 's|$cfg\["db_user"] = "user"|$cfg\["db_user"] = "torrentflux"|' \
		-e 's|$cfg\["db_pass"] = "password"|$cfg\["db_pass"] = "'${PASSWORD}'"|' \
		-i html/config.php
	chmod o-r sql/torrentflux.sql html/config.php



2. Your ebuild does not copy the bittornado executables from the torrentflux source file to /usr/local. Again the 1.5 ebuild posted here does this successfully. This is what does it in the 1.5 ebuild:

# We'll use the supplied copy of BitTornado as the copy in portage may not always be compatible
	find TF_BitTornado/ -name .cvs\* -or \( -type d -name CVS -prune \) -or \( -type d -name original_src -prune \) | xargs rm -rf
	cp -R TF_BitTornado/ ${D}/usr/local/

I simply manually copied the whole of the TF_BitTornado directory out of the source file and into /usr/local and that worked, although the 1.5 ebuild is more sophisticated :-) 

I was in a hurry to get it going so haven't written a new ebuild and therefore no patch. 
Comment 14 Luke-Jr 2006-02-04 08:22:34 UTC
Nick:
- No ebuild should *ever* install anything to /usr/local
- If certain versions of BitTornado are incompatible, they should be placed in [R]DEPEND as blockers; TorrentFlux should not install a separate program.
Comment 15 Renat Lumpau (RETIRED) gentoo-dev 2006-02-04 09:04:23 UTC
(In reply to comment #13)
> 1. it does not set up the mysql database properly. I copied commands out of
> the 1.5 ebuild. I suggest you take a look at the src_install bit of the 1.5
> ebuild.

This is unnecessary. The postinstall instructions clearly mention that you need to create a database before setting up the db using the provided sql script.

> 2. Your ebuild does not copy the bittornado executables from the torrentflux
> source file to /usr/local. Again the 1.5 ebuild posted here does this
> successfully. This is what does it in the 1.5 ebuild:

Ebuilds do not install into /usr/local. Bundling applications is in general undesirable (what if I already have bittornado installed? what if there is a security bug in bittornado?)

Please let me know if there is a specific version of bittornado that 2.0_beta1 requires and I'll update the dependency.
Comment 16 Xake 2006-02-05 12:08:21 UTC
I don't know if that is a problem or just me being stupid but fluxtorrent needs a file named btphptorrent.py and I can not find it in the general distrubition, just in the bundled varion. Does this file exist in the original and only got reneamed or what?
I know the persons behind torrentflux has adviced agains using other things than the bundled thing just becouse of problems like that.
Comment 17 Nick Rout 2006-02-12 15:58:52 UTC
Thanks for the replies, and for the lesson in ebuild creation.

I did like the way the 1.5 ebuild made the database when installing, I got confused when doing it myself with the 2.0beta ebuild. Never mind.

As far as /usr/local is concerned, the situation is this:

1. torrentflux uses btphptornado.py which is part of the torrentflux package. This script is based on bittornado and needs bittornado in order to operate.

2. The torrentflux devs express a strong preference for using the version of bittornado that they use, so as to aboid previos problems of btphptornado.py working incorrectly when things subtly change with the underlying bittornado package. So they bundle the essential bits of bittornado that they need and install it to /usr/local/TF_BitTornado/ which is somewhere nothing else will be installed.

3. The ebuild therefore has a couple of options. One is to use the version of bittornado in portage, install btphptornado to /usr/bin where the rest of bittornado lives, and hope it doesn't break. This is unsupported by the torrentflux devs. The other option is to use the bittornado version supplied with torrentflux, but install it to, say, /opt/TF_BitTornado. This would keep the torrentflux devs happy, but as has been pointed out you don't get any upgrades to bittornado that way.

4. In either case the ebuild should edit the config.php lines to point to the proper locations for the executables. By default these are:

$cfg["btphpbin"] = "/usr/local/TF_BitTornado/btphptornado.py";
$cfg["btshowmetainfo"] = "/usr/local/TF_BitTornado/btshowmetainfo.py";
Comment 18 Luke-Jr 2006-02-12 23:22:17 UTC
There is a third option: DEPEND on the specific BitTornado version required. Unless BitTornado is SLOTted, this can be pretty ugly, I admit...
Comment 19 Xake 2006-02-13 02:19:38 UTC
Browsing around the forums for torrentflux I hit a thread talkig about using latest bittornado with torrentflux. As now I am doing it myself, and the problem to make it work seems to be to have Bittornado placed in /usr/local/TF_BitTornado/Bittornado as it is there the script btphptornado.py searches for it (well, actually it is ./Bittornado according to a comment in the forum). 
So somehow if we want the emerged bittornado to work with torrentflux just like that you have to get the file btphptornado.py to firstly get installed (and that would not be into /usr/local/TF_BitTornado/ as it is today) and then have it reworked to use the version of Bittornado installed on the system and this is why SLOT'ing a package of Bittornado (which is just for to sake of support from upstream, not a question of what torrentflux really needs) is not enought.
Comment 20 Nick Rout 2006-04-05 22:25:15 UTC
I have just been informed that torrentflux 2.1 has been relesed. I will try and have a play some time and do a bump on the ebuild (providing it is simple!)
Comment 21 Renat Lumpau (RETIRED) gentoo-dev 2006-04-20 08:41:55 UTC
updated ebuild (2.1) is in SVN. i also gave up on the idea of unbundling bittornado, so now it should just work.
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2007-09-08 13:16:47 UTC
13:15:48 <+CIA-23> jakub * r407 proj/webapps/experimental/www-apps/torrentflux/: Remove - unpatched XSS vulnerability for almost a year, requires safe_mode disabled, upstream homepage unreachable, and this thing generally sucks             .

http://securitytracker.com/alerts/2006/Oct/1017007.html
http://sourceforge.net/tracker/index.php?func=detail&aid=1600227&group_id=123961&atid=698093
Comment 23 Jakub Moc (RETIRED) gentoo-dev 2007-09-08 13:17:24 UTC
Removed from webapps overlay and WONTFIX.