summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorrecht <recht@pkgsrc.org>2005-03-28 14:43:10 +0000
committerrecht <recht@pkgsrc.org>2005-03-28 14:43:10 +0000
commitfc4877c9342803872d7a54ff7d8af138f7ff06d1 (patch)
tree3bd31c7cb0bcad9e03b4c33b63c094520a733c78 /net
parent2160538b0af0d7dc34245e91662fb31000a20001 (diff)
downloadpkgsrc-fc4877c9342803872d7a54ff7d8af138f7ff06d1.tar.gz
update to BitTorrent 4.0.1
2005-03-25: 4.0.1 is now available. Changes since the last stable release: - Possible workaround for the "TCP stack flaking out" bug as a preference. - Preference option for the text color over the progress bar. - Fixed problem picking config file and save locations on Win98/ME. - Switched to GTK file save widgets to fix the problem of resuming multi-file torrents. - Bulk traffic flag was only being set on incoming connections. - Some tweaks to the interface and more informative error messages. - Fixes to installer, including location fixes for non-English users. - Fix for interface lockups after being minimized. - Fixed a couple tracebacks. _ A few small tracker bugs fixed. - An item which belonged in the previous notes: Improvments to seed behaviour which addresses the problem for which super-seeding was created, but without the problems of super-seeding. 2005-03-07: 4.0.0 is now available. Changes since the last stable release: - All new queue-based user interface - Many options are now modifiable from the interface, including upload rate - Lots of other interface improvements - Extra stats are visible, for those who like it - Remembers what it was doing across restarts _ New .torrent maker "btmaketorrentgui" replaces "btcompletedir" - Better performance, as always - License has changed to the BitTorrent Open Source License - Torrent fields are correctly created and interpreted as utf8 - Too many little things to list A few technical notes, for those interested: - Single port: launchmany can seed and client can download many files from a single port and thread - Interface now uses GTK instead of wxWidgets - BitTorrent packets are marked as bulk data to make traffic shaping easier 2005-01-22: 3.9.1 beta is now available.
Diffstat (limited to 'net')
-rw-r--r--net/bittorrent-gui/Makefile15
-rw-r--r--net/bittorrent-gui/PLIST4
-rw-r--r--net/bittorrent/Makefile5
-rw-r--r--net/bittorrent/Makefile.common7
-rw-r--r--net/bittorrent/PLIST66
-rw-r--r--net/bittorrent/distinfo15
-rw-r--r--net/bittorrent/patches/patch-aa27
-rw-r--r--net/bittorrent/patches/patch-ab13
-rw-r--r--net/bittorrent/patches/patch-ac32
-rw-r--r--net/bittorrent/patches/patch-ad302
-rw-r--r--net/bittorrent/patches/patch-ae20
-rw-r--r--net/bittorrent/patches/patch-af13
12 files changed, 85 insertions, 434 deletions
diff --git a/net/bittorrent-gui/Makefile b/net/bittorrent-gui/Makefile
index 7148a8826af..c9b0d2298ed 100644
--- a/net/bittorrent-gui/Makefile
+++ b/net/bittorrent-gui/Makefile
@@ -1,23 +1,22 @@
-# $NetBSD: Makefile,v 1.8 2004/12/25 20:03:53 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2005/03/28 14:43:10 recht Exp $
#
.include "../../net/bittorrent/Makefile.common"
PKGNAME= ${DISTNAME:S/BitTorrent/bittorrent-gui/}
-PKGREVISION= 2
-COMMENT+= (wxGTK GUI)
+COMMENT+= (GTK+ GUI)
-DEPENDS+= bittorrent>=3.4:../../net/bittorrent
+DEPENDS+= bittorrent>=4.0.1:../../net/bittorrent
-NO_BUILD= # defined
+PYTHON_PATCH_SCRIPTS= btdownloadgui.py btmaketorrentgui.py
-PYTHON_PATCH_SCRIPTS= btcompletedirgui.py btdownloadgui.py
+do-build: # empty
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/btcompletedirgui.py ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/btdownloadgui.py ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/btmaketorrentgui.py ${PREFIX}/bin
.include "../../lang/python/application.mk"
-.include "../../x11/py-wxWidgets/buildlink3.mk"
+.include "../../x11/py-gtk2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/bittorrent-gui/PLIST b/net/bittorrent-gui/PLIST
index 6f782e88552..68c03baa72d 100644
--- a/net/bittorrent-gui/PLIST
+++ b/net/bittorrent-gui/PLIST
@@ -1,3 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/03 10:04:04 recht Exp $
-bin/btcompletedirgui.py
+@comment $NetBSD: PLIST,v 1.2 2005/03/28 14:43:10 recht Exp $
bin/btdownloadgui.py
+bin/btmaketorrentgui.py
diff --git a/net/bittorrent/Makefile b/net/bittorrent/Makefile
index a94c901b124..636a920fd26 100644
--- a/net/bittorrent/Makefile
+++ b/net/bittorrent/Makefile
@@ -1,16 +1,17 @@
-# $NetBSD: Makefile,v 1.24 2005/02/13 13:53:34 recht Exp $
+# $NetBSD: Makefile,v 1.25 2005/03/28 14:43:10 recht Exp $
#
.include "Makefile.common"
PKGNAME= ${DISTNAME:S/BitT/bitt/}
-PKGREVISION= 2
PYDISTUTILSPKG= YES
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bittorrent
+ ${INSTALL_DATA} ${WRKSRC}/credits.txt ${PREFIX}/share/doc/bittorrent
${INSTALL_DATA} ${WRKSRC}/README.txt ${PREFIX}/share/doc/bittorrent
+ ${INSTALL_DATA} ${WRKSRC}/LICENSE.txt ${PREFIX}/share/doc/bittorrent
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
diff --git a/net/bittorrent/Makefile.common b/net/bittorrent/Makefile.common
index 7b42589c35f..8e98fdf1ee8 100644
--- a/net/bittorrent/Makefile.common
+++ b/net/bittorrent/Makefile.common
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile.common,v 1.9 2005/01/23 20:41:48 recht Exp $
+# $NetBSD: Makefile.common,v 1.10 2005/03/28 14:43:10 recht Exp $
#
-DISTNAME= BitTorrent-3.4.2
+DISTNAME= BitTorrent-4.0.1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bittorrent/}
-EXTRACT_SUFX= .zip
MAINTAINER= recht@NetBSD.org
-HOMEPAGE= http://bitconjurer.org/BitTorrent/
+HOMEPAGE= http://www.bittorrent.com/
COMMENT= File sharing tool
DISTINFO_FILE= ${.CURDIR}/../../net/bittorrent/distinfo
diff --git a/net/bittorrent/PLIST b/net/bittorrent/PLIST
index 4e02921c812..55c9d245ed8 100644
--- a/net/bittorrent/PLIST
+++ b/net/bittorrent/PLIST
@@ -1,43 +1,58 @@
-@comment $NetBSD: PLIST,v 1.8 2004/03/03 10:02:08 recht Exp $
-bin/btcompletedir.py
+@comment $NetBSD: PLIST,v 1.9 2005/03/28 14:43:10 recht Exp $
bin/btdownloadcurses.py
bin/btdownloadheadless.py
-bin/btdownloadlibrary.py
bin/btlaunchmany.py
bin/btlaunchmanycurses.py
-bin/btmakemetafile.py
+bin/btmaketorrent.py
bin/btreannounce.py
bin/btrename.py
bin/btshowmetainfo.py
-bin/bttest.py
bin/bttrack.py
${PYSITELIB}/BitTorrent/Choker.py
${PYSITELIB}/BitTorrent/Choker.pyc
${PYSITELIB}/BitTorrent/Choker.pyo
+${PYSITELIB}/BitTorrent/ClientIdentifier.py
+${PYSITELIB}/BitTorrent/ClientIdentifier.pyc
+${PYSITELIB}/BitTorrent/ClientIdentifier.pyo
${PYSITELIB}/BitTorrent/Connecter.py
${PYSITELIB}/BitTorrent/Connecter.pyc
${PYSITELIB}/BitTorrent/Connecter.pyo
+${PYSITELIB}/BitTorrent/ConvertedMetainfo.py
+${PYSITELIB}/BitTorrent/ConvertedMetainfo.pyc
+${PYSITELIB}/BitTorrent/ConvertedMetainfo.pyo
${PYSITELIB}/BitTorrent/CurrentRateMeasure.py
${PYSITELIB}/BitTorrent/CurrentRateMeasure.pyc
${PYSITELIB}/BitTorrent/CurrentRateMeasure.pyo
+${PYSITELIB}/BitTorrent/Desktop.py
+${PYSITELIB}/BitTorrent/Desktop.pyc
+${PYSITELIB}/BitTorrent/Desktop.pyo
${PYSITELIB}/BitTorrent/Downloader.py
${PYSITELIB}/BitTorrent/Downloader.pyc
${PYSITELIB}/BitTorrent/Downloader.pyo
${PYSITELIB}/BitTorrent/DownloaderFeedback.py
${PYSITELIB}/BitTorrent/DownloaderFeedback.pyc
${PYSITELIB}/BitTorrent/DownloaderFeedback.pyo
-${PYSITELIB}/BitTorrent/Encrypter.py
-${PYSITELIB}/BitTorrent/Encrypter.pyc
-${PYSITELIB}/BitTorrent/Encrypter.pyo
+${PYSITELIB}/BitTorrent/Encoder.py
+${PYSITELIB}/BitTorrent/Encoder.pyc
+${PYSITELIB}/BitTorrent/Encoder.pyo
+${PYSITELIB}/BitTorrent/GUI.py
+${PYSITELIB}/BitTorrent/GUI.pyc
+${PYSITELIB}/BitTorrent/GUI.pyo
${PYSITELIB}/BitTorrent/HTTPHandler.py
${PYSITELIB}/BitTorrent/HTTPHandler.pyc
${PYSITELIB}/BitTorrent/HTTPHandler.pyo
${PYSITELIB}/BitTorrent/NatCheck.py
${PYSITELIB}/BitTorrent/NatCheck.pyc
${PYSITELIB}/BitTorrent/NatCheck.pyo
+${PYSITELIB}/BitTorrent/OpenPath.py
+${PYSITELIB}/BitTorrent/OpenPath.pyc
+${PYSITELIB}/BitTorrent/OpenPath.pyo
${PYSITELIB}/BitTorrent/PiecePicker.py
${PYSITELIB}/BitTorrent/PiecePicker.pyc
${PYSITELIB}/BitTorrent/PiecePicker.pyo
+${PYSITELIB}/BitTorrent/RateLimiter.py
+${PYSITELIB}/BitTorrent/RateLimiter.pyc
+${PYSITELIB}/BitTorrent/RateLimiter.pyo
${PYSITELIB}/BitTorrent/RateMeasure.py
${PYSITELIB}/BitTorrent/RateMeasure.pyc
${PYSITELIB}/BitTorrent/RateMeasure.pyo
@@ -53,6 +68,9 @@ ${PYSITELIB}/BitTorrent/Storage.pyo
${PYSITELIB}/BitTorrent/StorageWrapper.py
${PYSITELIB}/BitTorrent/StorageWrapper.pyc
${PYSITELIB}/BitTorrent/StorageWrapper.pyo
+${PYSITELIB}/BitTorrent/TorrentQueue.py
+${PYSITELIB}/BitTorrent/TorrentQueue.pyc
+${PYSITELIB}/BitTorrent/TorrentQueue.pyo
${PYSITELIB}/BitTorrent/Uploader.py
${PYSITELIB}/BitTorrent/Uploader.pyc
${PYSITELIB}/BitTorrent/Uploader.pyo
@@ -68,27 +86,47 @@ ${PYSITELIB}/BitTorrent/bitfield.pyo
${PYSITELIB}/BitTorrent/btformats.py
${PYSITELIB}/BitTorrent/btformats.pyc
${PYSITELIB}/BitTorrent/btformats.pyo
+${PYSITELIB}/BitTorrent/configfile.py
+${PYSITELIB}/BitTorrent/configfile.pyc
+${PYSITELIB}/BitTorrent/configfile.pyo
+${PYSITELIB}/BitTorrent/controlsocket.py
+${PYSITELIB}/BitTorrent/controlsocket.pyc
+${PYSITELIB}/BitTorrent/controlsocket.pyo
+${PYSITELIB}/BitTorrent/defaultargs.py
+${PYSITELIB}/BitTorrent/defaultargs.pyc
+${PYSITELIB}/BitTorrent/defaultargs.pyo
${PYSITELIB}/BitTorrent/download.py
${PYSITELIB}/BitTorrent/download.pyc
${PYSITELIB}/BitTorrent/download.pyo
-${PYSITELIB}/BitTorrent/fakeopen.py
-${PYSITELIB}/BitTorrent/fakeopen.pyc
-${PYSITELIB}/BitTorrent/fakeopen.pyo
+${PYSITELIB}/BitTorrent/launchmanycore.py
+${PYSITELIB}/BitTorrent/launchmanycore.pyc
+${PYSITELIB}/BitTorrent/launchmanycore.pyo
+${PYSITELIB}/BitTorrent/makemetafile.py
+${PYSITELIB}/BitTorrent/makemetafile.pyc
+${PYSITELIB}/BitTorrent/makemetafile.pyo
+${PYSITELIB}/BitTorrent/obsoletepythonsupport.py
+${PYSITELIB}/BitTorrent/obsoletepythonsupport.pyc
+${PYSITELIB}/BitTorrent/obsoletepythonsupport.pyo
${PYSITELIB}/BitTorrent/parseargs.py
${PYSITELIB}/BitTorrent/parseargs.pyc
${PYSITELIB}/BitTorrent/parseargs.pyo
+${PYSITELIB}/BitTorrent/parsedir.py
+${PYSITELIB}/BitTorrent/parsedir.pyc
+${PYSITELIB}/BitTorrent/parsedir.pyo
+${PYSITELIB}/BitTorrent/platform.py
+${PYSITELIB}/BitTorrent/platform.pyc
+${PYSITELIB}/BitTorrent/platform.pyo
${PYSITELIB}/BitTorrent/selectpoll.py
${PYSITELIB}/BitTorrent/selectpoll.pyc
${PYSITELIB}/BitTorrent/selectpoll.pyo
-${PYSITELIB}/BitTorrent/testtest.py
-${PYSITELIB}/BitTorrent/testtest.pyc
-${PYSITELIB}/BitTorrent/testtest.pyo
${PYSITELIB}/BitTorrent/track.py
${PYSITELIB}/BitTorrent/track.pyc
${PYSITELIB}/BitTorrent/track.pyo
${PYSITELIB}/BitTorrent/zurllib.py
${PYSITELIB}/BitTorrent/zurllib.pyc
${PYSITELIB}/BitTorrent/zurllib.pyo
+share/doc/bittorrent/LICENSE.txt
share/doc/bittorrent/README.txt
+share/doc/bittorrent/credits.txt
@dirrm share/doc/bittorrent
@dirrm ${PYSITELIB}/BitTorrent
diff --git a/net/bittorrent/distinfo b/net/bittorrent/distinfo
index 152af24aad3..89040cf8af8 100644
--- a/net/bittorrent/distinfo
+++ b/net/bittorrent/distinfo
@@ -1,11 +1,6 @@
-$NetBSD: distinfo,v 1.13 2005/02/24 12:13:43 agc Exp $
+$NetBSD: distinfo,v 1.14 2005/03/28 14:43:10 recht Exp $
-SHA1 (BitTorrent-3.4.2.zip) = e3c34b0988369e706564f24fc63d9921c6af8298
-RMD160 (BitTorrent-3.4.2.zip) = ef296e28559570463e46bee299b46ebce473f87a
-Size (BitTorrent-3.4.2.zip) = 244989 bytes
-SHA1 (patch-aa) = 95bb805f2b906c91bf36ecb7ce289cab84242ca9
-SHA1 (patch-ab) = ece6faa60d27df84f1c5d5b64f8d5c61fb79dc6e
-SHA1 (patch-ac) = ff3f9963f017cf0f967a7355116819deb64a861d
-SHA1 (patch-ad) = 46d79fa604516f6aab196eb3d91d546702977fa5
-SHA1 (patch-ae) = 5ce8d3808396c091e7e60f4de88d93064ac470dc
-SHA1 (patch-af) = 21a9ddf3b2d69728582f3ee4fd5d68a55a5b826a
+SHA1 (BitTorrent-4.0.1.tar.gz) = 577db045897e02dcf8d3546f93a2525c5b7ba6cf
+RMD160 (BitTorrent-4.0.1.tar.gz) = 9ccec667802df40aa21c00be7930ac5ad4d65821
+Size (BitTorrent-4.0.1.tar.gz) = 154427 bytes
+SHA1 (patch-aa) = 0acdf112a748cfa0b615c9113f7519cb732bd181
diff --git a/net/bittorrent/patches/patch-aa b/net/bittorrent/patches/patch-aa
index 6ab73c369f5..95e508dd446 100644
--- a/net/bittorrent/patches/patch-aa
+++ b/net/bittorrent/patches/patch-aa
@@ -1,16 +1,15 @@
-$NetBSD: patch-aa,v 1.5 2005/02/13 13:53:34 recht Exp $
+$NetBSD: patch-aa,v 1.6 2005/03/28 14:43:10 recht Exp $
---- setup.py.orig Mon Mar 17 20:34:41 2003
-+++ setup.py
-@@ -18,9 +18,9 @@ setup(
-
- packages = ["BitTorrent"],
+--- setup.py.orig Mon Mar 28 16:23:38 2005
++++ setup.py Mon Mar 28 16:26:30 2005
+@@ -19,8 +19,8 @@
+
+ import glob
+
+-scripts = ["btdownloadgui.py", "btdownloadcurses.py", "btdownloadheadless.py",
+- "btmaketorrentgui.py", "btmaketorrent.py",
++scripts = ["btdownloadcurses.py", "btdownloadheadless.py",
++ "btmaketorrent.py",
+ "btlaunchmany.py", "btlaunchmanycurses.py",
+ "bttrack.py", "btreannounce.py", "btrename.py", "btshowmetainfo.py"]
-- scripts = ["btdownloadgui.py", "btdownloadheadless.py", "btdownloadlibrary.py",
-+ scripts = ["btdownloadheadless.py", "btdownloadlibrary.py",
- "bttrack.py", "btmakemetafile.py", "btlaunchmany.py", "btcompletedir.py",
-- "btdownloadcurses.py", "btcompletedirgui.py", "btlaunchmanycurses.py",
-+ "btdownloadcurses.py", "btlaunchmanycurses.py",
- "btmakemetafile.py", "btreannounce.py", "btrename.py", "btshowmetainfo.py",
- "bttest.py"]
- )
diff --git a/net/bittorrent/patches/patch-ab b/net/bittorrent/patches/patch-ab
deleted file mode 100644
index 781f509d4dd..00000000000
--- a/net/bittorrent/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2005/02/13 13:53:34 recht Exp $
-
---- btreannounce.py.orig Mon Mar 17 20:26:40 2003
-+++ btreannounce.py
-@@ -3,7 +3,7 @@
- # Written by Henry 'Pi' James and Bram Cohen
- # see LICENSE.txt for license information
-
--from sys import argv
-+from sys import argv, exit
- from BitTorrent.bencode import bencode, bdecode
-
- if len(argv) < 3:
diff --git a/net/bittorrent/patches/patch-ac b/net/bittorrent/patches/patch-ac
deleted file mode 100644
index a4a6c8596af..00000000000
--- a/net/bittorrent/patches/patch-ac
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2005/02/13 13:53:34 recht Exp $
-
---- BitTorrent/Rerequester.py.orig Sat Apr 3 06:10:45 2004
-+++ BitTorrent/Rerequester.py
-@@ -5,7 +5,7 @@ from zurllib import urlopen, quote
- from btformats import check_peers
- from bencode import bdecode
- from threading import Thread, Lock
--from socket import error
-+from socket import error, gethostbyname
- from time import time
- from random import randrange
- from binascii import b2a_hex
-@@ -18,8 +18,7 @@ class Rerequester:
- self.url = ('%s?info_hash=%s&peer_id=%s&port=%s&key=%s' %
- (url, quote(infohash), quote(myid), str(port),
- b2a_hex(''.join([chr(randrange(256)) for i in xrange(4)]))))
-- if ip != '':
-- self.url += '&ip=' + quote(ip)
-+ self.ip = ip
- self.interval = interval
- self.last = None
- self.trackerid = None
-@@ -81,6 +80,8 @@ class Rerequester:
-
- def rerequest(self, url, set):
- try:
-+ if self.ip:
-+ url += '&ip=' + gethostbyname(self.ip)
- h = urlopen(url)
- r = h.read()
- h.close()
diff --git a/net/bittorrent/patches/patch-ad b/net/bittorrent/patches/patch-ad
deleted file mode 100644
index f3e83986263..00000000000
--- a/net/bittorrent/patches/patch-ad
+++ /dev/null
@@ -1,302 +0,0 @@
-$NetBSD: patch-ad,v 1.3 2005/02/13 13:53:34 recht Exp $
-
---- BitTorrent/track.py.orig Sun Mar 21 20:33:17 2004
-+++ BitTorrent/track.py
-@@ -37,12 +37,15 @@ defaults = [
- 'minimum time it must have been since the last flush to do another one'),
- ('allowed_dir', '', 'only allow downloads for .torrents in this dir'),
- ('parse_allowed_interval', 15, 'minutes between reloading of allowed_dir'),
-+ ('show_infopage', 1, "whether to display an info page when the tracker's root dir is loaded"),
-+ ('infopage_redirect', '', 'a URL to redirect the info page to'),
- ('show_names', 1, 'whether to display names from allowed dir'),
- ('favicon', '', 'file containing x-icon data to return when browser requests favicon.ico'),
- ('only_local_override_ip', 1, "ignore the ip GET parameter from machines which aren't on local network IPs"),
- ('logfile', '', 'file to write the tracker logs, use - for stdout (default)'),
- ('allow_get', 0, 'use with allowed_dir; adds a /file?hash={hash} url that allows users to download the torrent file'),
- ('keep_dead', 0, 'keep dead torrents after they expire (so they still show up on your /scrape and web page)'),
-+ ('scrape_allowed', 'full', 'scrape access allowed (can be none, specific or full)'),
- ('max_give', 200, 'maximum number of peers to give with any one request'),
- ]
-
-@@ -124,11 +127,11 @@ class Tracker:
- favicon = config['favicon']
- self.favicon = None
- if favicon:
-- if isfile(favicon):
-+ try:
- h = open(favicon, 'rb')
- self.favicon = h.read()
- h.close()
-- else:
-+ except:
- print "**warning** specified favicon file -- %s -- does not exist." % favicon
- self.rawserver = rawserver
- self.becache1 = {}
-@@ -190,6 +193,130 @@ class Tracker:
- self.uq_broken = 0
- self.keep_dead = config['keep_dead']
-
-+ def get_infopage(self):
-+ if not self.config['show_infopage']:
-+ return (404, 'Not Found', {'Content-Type': 'text/plain', 'Pragma': 'no-cache'}, alas)
-+ red = self.config['infopage_redirect']
-+ if red != '':
-+ return (302, 'Found', {'Content-Type': 'text/html', 'Location': red},
-+ '<A HREF="'+red+'">Click Here</A>')
-+
-+ s = StringIO()
-+ s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n' \
-+ '<html><head><title>BitTorrent download info</title>\n')
-+ if self.favicon != None:
-+ s.write('<link rel="shortcut icon" href="/favicon.ico" />\n')
-+ s.write('</head>\n<body>\n' \
-+ '<h3>BitTorrent download info</h3>\n'\
-+ '<ul>\n'
-+ '<li><strong>tracker version:</strong> %s</li>\n' \
-+ '<li><strong>server time:</strong> %s</li>\n' \
-+ '</ul>\n' % (version, isotime()))
-+ names = self.downloads.keys()
-+ if not names:
-+ s.write('<p>not tracking any files yet...</p>\n')
-+ else:
-+ names.sort()
-+ tn = 0
-+ tc = 0
-+ td = 0
-+ tt = 0 # Total transferred
-+ ts = 0 # Total size
-+ nf = 0 # Number of files displayed
-+ uc = {}
-+ ud = {}
-+ if self.allowed != None and self.show_names:
-+ s.write('<table summary="files" border="1">\n' \
-+ '<tr><th>info hash</th><th>torrent name</th><th align="right">size</th><th align="right">complete</th><th align="right">downloading</th><th align="right">downloaded</th><th align="right">transferred</th></tr>\n')
-+ else:
-+ s.write('<table summary="files">\n' \
-+ '<tr><th>info hash</th><th align="right">complete</th><th align="right">downloading</th><th align="right">downloaded</th></tr>\n')
-+ for name in names:
-+ l = self.downloads[name]
-+ n = self.completed.get(name, 0)
-+ tn = tn + n
-+ lc = []
-+ for i in l.values():
-+ if type(i) == DictType:
-+ if i['left'] == 0:
-+ lc.append(1)
-+ uc[i['ip']] = 1
-+ else:
-+ ud[i['ip']] = 1
-+ c = len(lc)
-+ tc = tc + c
-+ d = len(l) - c
-+ td = td + d
-+ if self.allowed != None and self.show_names:
-+ if self.allowed.has_key(name):
-+ nf = nf + 1
-+ sz = self.allowed[name]['length'] # size
-+ ts = ts + sz
-+ szt = sz * n # Transferred for this torrent
-+ tt = tt + szt
-+ if self.allow_get == 1:
-+ linkname = '<a href="/file?info_hash=' + quote(name) + '">' + self.allowed[name]['name'] + '</a>'
-+ else:
-+ linkname = self.allowed[name]['name']
-+ s.write('<tr><td><code>%s</code></td><td>%s</td><td align="right">%s</td><td align="right">%i</td><td align="right">%i</td><td align="right">%i</td><td align="right">%s</td></tr>\n' \
-+ % (b2a_hex(name), linkname, size_format(sz), c, d, n, size_format(szt)))
-+ else:
-+ s.write('<tr><td><code>%s</code></td><td align="right"><code>%i</code></td><td align="right"><code>%i</code></td><td align="right"><code>%i</code></td></tr>\n' \
-+ % (b2a_hex(name), c, d, n))
-+ ttn = 0
-+ for i in self.completed.values():
-+ ttn = ttn + i
-+ if self.allowed != None and self.show_names:
-+ s.write('<tr><td align="right" colspan="2">%i files</td><td align="right">%s</td><td align="right">%i/%i</td><td align="right">%i/%i</td><td align="right">%i/%i</td><td align="right">%s</td></tr>\n'
-+ % (nf, size_format(ts), len(uc), tc, len(ud), td, tn, ttn, size_format(tt)))
-+ else:
-+ s.write('<tr><td align="right">%i files</td><td align="right">%i/%i</td><td align="right">%i/%i</td><td align="right">%i/%i</td></tr>\n'
-+ % (nf, len(uc), tc, len(ud), td, tn, ttn))
-+ s.write('</table>\n' \
-+ '<ul>\n' \
-+ '<li><em>info hash:</em> SHA1 hash of the "info" section of the metainfo (*.torrent)</li>\n' \
-+ '<li><em>complete:</em> number of connected clients with the complete file (total: unique IPs/total connections)</li>\n' \
-+ '<li><em>downloading:</em> number of connected clients still downloading (total: unique IPs/total connections)</li>\n' \
-+ '<li><em>downloaded:</em> reported complete downloads (total: current/all)</li>\n' \
-+ '<li><em>transferred:</em> torrent size * total downloaded (does not include partial transfers)</li>\n' \
-+ '</ul>\n')
-+ s.write('</body>\n' \
-+ '</html>\n')
-+ return (200, 'OK', {'Content-Type': 'text/html; charset=iso-8859-1'}, s.getvalue())
-+
-+ def scrapedata(self, name, return_name = True):
-+ l = self.downloads[name]
-+ n = self.completed.get(name, 0)
-+ c = len([1 for i in l.values() if i['left'] == 0])
-+ d = len(l) - c
-+ f = {'complete': c, 'incomplete': d, 'downloaded': n}
-+ if ( return_name and self.show_names
-+ and self.allowed is not None and self.allowed.has_key(name) ):
-+ f['name'] = self.allowed[name]['name']
-+ return (f)
-+
-+ def get_scrape(self, paramslist):
-+ fs = {}
-+ if paramslist.has_key('info_hash'):
-+ if self.config['scrape_allowed'] not in ['specific', 'full']:
-+ return (400, 'Not Authorized', {'Content-Type': 'text/plain', 'Pragma': 'no-cache'},
-+ bencode({'failure reason':
-+ 'specific scrape function is not available with this tracker.'}))
-+ for infohash in paramslist['info_hash']:
-+ if infohash in self.downloads.keys():
-+ fs[infohash] = self.scrapedata(infohash)
-+ else:
-+ if self.config['scrape_allowed'] != 'full':
-+ return (400, 'Not Authorized', {'Content-Type': 'text/plain', 'Pragma': 'no-cache'},
-+ bencode({'failure reason':
-+ 'full scrape function is not available with this tracker.'}))
-+ names = self.downloads.keys()
-+ names.sort()
-+ for name in names:
-+ fs[name] = self.scrapedata(name)
-+
-+ return (200, 'OK', {'Content-Type': 'text/plain'}, bencode({'files': fs}))
-+
- def get(self, connection, path, headers):
- try:
- (scheme, netloc, path, pars, query, fragment) = urlparse(path)
-@@ -197,117 +324,22 @@ class Tracker:
- path = path.replace('+',' ')
- query = query.replace('+',' ')
- path = unquote(path)[1:]
-+ paramslist = {}
- params = {}
- for s in query.split('&'):
- if s != '':
- i = s.index('=')
-- params[unquote(s[:i])] = unquote(s[i+1:])
-+ kw = unquote(s[:i])
-+ key, value = unquote(s[:i]), unquote(s[i+1:])
-+ paramslist.setdefault(key, []).append(value)
-+ params[key] = value
- except ValueError, e:
- return (400, 'Bad Request', {'Content-Type': 'text/plain'},
- 'you sent me garbage - ' + str(e))
- if path == '' or path == 'index.html':
-- s = StringIO()
-- s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n' \
-- '<html><head><title>BitTorrent download info</title>\n')
-- if self.favicon != None:
-- s.write('<link rel="shortcut icon" href="/favicon.ico" />\n')
-- s.write('</head>\n<body>\n' \
-- '<h3>BitTorrent download info</h3>\n'\
-- '<ul>\n'
-- '<li><strong>tracker version:</strong> %s</li>\n' \
-- '<li><strong>server time:</strong> %s</li>\n' \
-- '</ul>\n' % (version, isotime()))
-- names = self.downloads.keys()
-- if names:
-- names.sort()
-- tn = 0
-- tc = 0
-- td = 0
-- tt = 0 # Total transferred
-- ts = 0 # Total size
-- nf = 0 # Number of files displayed
-- uc = {}
-- ud = {}
-- if self.allowed != None and self.show_names:
-- s.write('<table summary="files" border="1">\n' \
-- '<tr><th>info hash</th><th>torrent name</th><th align="right">size</th><th align="right">complete</th><th align="right">downloading</th><th align="right">downloaded</th><th align="right">transferred</th></tr>\n')
-- else:
-- s.write('<table summary="files">\n' \
-- '<tr><th>info hash</th><th align="right">complete</th><th align="right">downloading</th><th align="right">downloaded</th></tr>\n')
-- for name in names:
-- l = self.downloads[name]
-- n = self.completed.get(name, 0)
-- tn = tn + n
-- lc = []
-- for i in l.values():
-- if type(i) == DictType:
-- if i['left'] == 0:
-- lc.append(1)
-- uc[i['ip']] = 1
-- else:
-- ud[i['ip']] = 1
-- c = len(lc)
-- tc = tc + c
-- d = len(l) - c
-- td = td + d
-- if self.allowed != None and self.show_names:
-- if self.allowed.has_key(name):
-- nf = nf + 1
-- sz = self.allowed[name]['length'] # size
-- ts = ts + sz
-- szt = sz * n # Transferred for this torrent
-- tt = tt + szt
-- if self.allow_get == 1:
-- linkname = '<a href="/file?info_hash=' + quote(name) + '">' + self.allowed[name]['name'] + '</a>'
-- else:
-- linkname = self.allowed[name]['name']
-- s.write('<tr><td><code>%s</code></td><td>%s</td><td align="right">%s</td><td align="right">%i</td><td align="right">%i</td><td align="right">%i</td><td align="right">%s</td></tr>\n' \
-- % (b2a_hex(name), linkname, size_format(sz), c, d, n, size_format(szt)))
-- else:
-- s.write('<tr><td><code>%s</code></td><td align="right"><code>%i</code></td><td align="right"><code>%i</code></td><td align="right"><code>%i</code></td></tr>\n' \
-- % (b2a_hex(name), c, d, n))
-- ttn = 0
-- for i in self.completed.values():
-- ttn = ttn + i
-- if self.allowed != None and self.show_names:
-- s.write('<tr><td align="right" colspan="2">%i files</td><td align="right">%s</td><td align="right">%i/%i</td><td align="right">%i/%i</td><td align="right">%i/%i</td><td align="right">%s</td></tr>\n'
-- % (nf, size_format(ts), len(uc), tc, len(ud), td, tn, ttn, size_format(tt)))
-- else:
-- s.write('<tr><td align="right">%i files</td><td align="right">%i/%i</td><td align="right">%i/%i</td><td align="right">%i/%i</td></tr>\n'
-- % (nf, len(uc), tc, len(ud), td, tn, ttn))
-- s.write('</table>\n' \
-- '<ul>\n' \
-- '<li><em>info hash:</em> SHA1 hash of the "info" section of the metainfo (*.torrent)</li>\n' \
-- '<li><em>complete:</em> number of connected clients with the complete file (total: unique IPs/total connections)</li>\n' \
-- '<li><em>downloading:</em> number of connected clients still downloading (total: unique IPs/total connections)</li>\n' \
-- '<li><em>downloaded:</em> reported complete downloads (total: current/all)</li>\n' \
-- '<li><em>transferred:</em> torrent size * total downloaded (does not include partial transfers)</li>\n' \
-- '</ul>\n')
-- else:
-- s.write('<p>not tracking any files yet...</p>\n')
-- s.write('</body>\n' \
-- '</html>\n')
-- return (200, 'OK', {'Content-Type': 'text/html; charset=iso-8859-1'}, s.getvalue())
-+ return self.get_infopage()
- elif path == 'scrape':
-- fs = {}
-- names = []
-- if params.has_key('info_hash'):
-- if self.downloads.has_key(params['info_hash']):
-- names = [ params['info_hash'] ]
-- # else return nothing
-- else:
-- names = self.downloads.keys()
-- names.sort()
-- for name in names:
-- l = self.downloads[name]
-- n = self.completed.get(name, 0)
-- c = len([1 for i in l.values() if type(i) == DictType and i['left'] == 0])
-- d = len(l) - c
-- fs[name] = {'complete': c, 'incomplete': d, 'downloaded': n}
-- if (self.allowed is not None) and self.allowed.has_key(name) and self.show_names:
-- fs[name]['name'] = self.allowed[name]['name']
-- r = {'files': fs}
-- return (200, 'OK', {'Content-Type': 'text/plain'}, bencode(r))
-+ return self.get_scrape(paramslist)
- elif (path == 'file') and (self.allow_get == 1) and params.has_key('info_hash') and self.allowed.has_key(params['info_hash']):
- hash = params['info_hash']
- fname = self.allowed[hash]['file']
-@@ -506,9 +538,9 @@ def size_format(s):
- r = str(s) + 'B'
- elif (s < 1048576):
- r = str(int(s/1024)) + 'KiB'
-- elif (s < 1073741824l):
-+ elif (s < 1073741824L):
- r = str(int(s/1048576)) + 'MiB'
-- elif (s < 1099511627776l):
-+ elif (s < 1099511627776L):
- r = str(int((s/1073741824.0)*100.0)/100.0) + 'GiB'
- else:
- r = str(int((s/1099511627776.0)*100.0)/100.0) + 'TiB'
diff --git a/net/bittorrent/patches/patch-ae b/net/bittorrent/patches/patch-ae
deleted file mode 100644
index a26c9342a8c..00000000000
--- a/net/bittorrent/patches/patch-ae
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2005/02/13 13:53:34 recht Exp $
-
---- BitTorrent/zurllib.py.orig Fri Jun 27 02:40:21 2003
-+++ BitTorrent/zurllib.py
-@@ -35,7 +35,14 @@ class HTTPContentEncodingHandler(HTTPHan
- if DEBUG:
- pprint.pprint(headers.dict)
- url = fp.url
-- return addinfourldecompress(fp, headers, url)
-+ resp = addinfourldecompress(fp, headers, url)
-+ # As of Python 2.4 http_open response also has 'code' and 'msg'
-+ # members, and HTTPErrorProcessor breaks if they don't exist.
-+ if 'code' in dir(fp):
-+ resp.code = fp.code
-+ if 'msg' in dir(fp):
-+ resp.msg = fp.msg
-+ return resp
-
-
- class addinfourldecompress(addinfourl):
diff --git a/net/bittorrent/patches/patch-af b/net/bittorrent/patches/patch-af
deleted file mode 100644
index 4d18bef8558..00000000000
--- a/net/bittorrent/patches/patch-af
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-af,v 1.1 2005/02/13 13:53:34 recht Exp $
-
---- btcompletedir.py.orig Wed Mar 3 18:44:28 2004
-+++ btcompletedir.py
-@@ -30,6 +30,8 @@ def completedir(files, url, flag = Event
- subtotal[0] += x
- vc(float(subtotal[0]) / total)
- for i in togen:
-+ if flag.isSet():
-+ break
- t = split(i)
- if t[1] == '':
- i = t[0]