diff -u bittornado-0.3.18/debian/patches/00list bittornado-0.3.18/debian/patches/00list --- bittornado-0.3.18/debian/patches/00list +++ bittornado-0.3.18/debian/patches/00list @@ -16,0 +17,3 @@ +18_fix_launchmany_encrypter.dpatch +19_fix_tracker_return_all.dpatch +20_tracker_cache_minor_fix.dpatch diff -u bittornado-0.3.18/debian/bittornado.desktop bittornado-0.3.18/debian/bittornado.desktop --- bittornado-0.3.18/debian/bittornado.desktop +++ bittornado-0.3.18/debian/bittornado.desktop @@ -2,13 +2,12 @@ Version=0.3.10 -Encoding=UTF-8 Name=Bittornado Client GenericName=Bittorrent Client X-MultipleArgs=false -Exec=/usr/bin/btdownloadgui +Exec=/usr/bin/btdownloadgui.bittornado X-test=test -n "$DISPLAY" Type=Application Icon=bittornado MimeType=application/x-bittorrent; NoDisplay=false -Categories=GNOME;Application;Network;FileTransfer;P2P; +Categories=GNOME;Network;FileTransfer;P2P; Terminal=false diff -u bittornado-0.3.18/debian/control bittornado-0.3.18/debian/control --- bittornado-0.3.18/debian/control +++ bittornado-0.3.18/debian/control @@ -1,8 +1,7 @@ Source: bittornado Section: net Priority: optional -Maintainer: Ubuntu Core developers -XSBC-Original-Maintainer: Micah Anderson +Maintainer: Micah Anderson Uploaders: Cameron Dale Build-Depends: dpatch, debhelper (>= 5.0.37.2) Build-Depends-Indep: python-dev, python-support (>= 0.5.4), docbook-to-man @@ -40,7 +39,7 @@ Package: bittornado-gui Architecture: all -Depends: ${python:Depends}, bittornado (= ${Source-Version}), python-wxgtk2.6 +Depends: ${python:Depends}, bittornado (= ${source:Version}), python-wxgtk2.6 Conflicts: bittorrent (<= 3.4.2-2), libfreetype6 (= 2.1.7-2.4) Replaces: bittorrent Suggests: python-psyco diff -u bittornado-0.3.18/debian/changelog bittornado-0.3.18/debian/changelog --- bittornado-0.3.18/debian/changelog +++ bittornado-0.3.18/debian/changelog @@ -1,10 +1,18 @@ -bittornado (0.3.18-3ubuntu1) gutsy; urgency=low +bittornado (0.3.18-4) unstable; urgency=low - * Fixed absolute path and other spec problems directly in - bittornado's .desktop file in debian/. (Thanks to Thierry Moisan for the fix) (LP: #4587) - * Modify Maintainer value to match Debian-Maintainer-Field Spec + * 18_fix_launchmany_encrypter.dpatch: fix a bug in the Encrypter + that dropped all launchmany handled connections (Closes: #422098) + * Fixed absolute path and other spec problems in .desktop file + (thanks to Ubuntu) + * Fixed other .desktop issues from new lintian checks + * Switch bittornado-gui dependence from Source-Version to source:Version + * Fix the menu entry to comply with the new menu transition + * 19_fix_tracker_return_all.dpatch: fix a tracker bug that caused + all torrents' peers to be returned for every request + * 20_tracker_cache_minor_fix.dpatch: a minor fix for the new cache + structure used by the tracker - -- Andrea Veri Fri, 15 Jun 2007 23:47:05 +0200 + -- Cameron Dale Mon, 17 Sep 2007 13:56:24 -0800 bittornado (0.3.18-3) unstable; urgency=low diff -u bittornado-0.3.18/debian/bittornado-gui.menu bittornado-0.3.18/debian/bittornado-gui.menu --- bittornado-0.3.18/debian/bittornado-gui.menu +++ bittornado-0.3.18/debian/bittornado-gui.menu @@ -1,4 +1,6 @@ -?package(bittornado-gui):needs="X11" section="Apps/Net"\ +?package(bittornado-gui):needs="X11"\ + section="Applications/Network/File Transfer"\ icon="/usr/share/pixmaps/bittornado.xpm"\ - title="Bittornado Client" command="/usr/bin/btdownloadgui.bittornado" \ + title="BitTornado Client"\ + command="/usr/bin/btdownloadgui.bittornado"\ hints="Internet" only in patch2: unchanged: --- bittornado-0.3.18.orig/debian/patches/20_tracker_cache_minor_fix.dpatch +++ bittornado-0.3.18/debian/patches/20_tracker_cache_minor_fix.dpatch @@ -0,0 +1,45 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20_tracker_cache_minor_fix.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix a minor bug in the tracker's new cache structure. +## DP: Fix is taken from upstream CVS. + +@DPATCH@ +diff -urNad bittornado~/BitTornado/BT1/track.py bittornado/BitTornado/BT1/track.py +--- bittornado~/BitTornado/BT1/track.py 2007-09-17 19:53:46.000000000 -0700 ++++ bittornado/BitTornado/BT1/track.py 2007-09-17 19:54:49.000000000 -0700 +@@ -688,15 +688,19 @@ + self.seedcount[infohash] += 1 + if not peer.get('nat', -1): + for bc in self.becache[infohash]: +- bc[1][myid] = bc[0][myid] +- del bc[0][myid] ++ x = bc[0].get(myid) ++ if x: ++ bc[1][myid] = x ++ del bc[0][myid] + elif left and not peer['left']: + self.completed[infohash] -= 1 + self.seedcount[infohash] -= 1 + if not peer.get('nat', -1): + for bc in self.becache[infohash]: +- bc[0][myid] = bc[1][myid] +- del bc[1][myid] ++ x = bc[1].get(myid) ++ if x: ++ bc[0][myid] = x ++ del bc[1][myid] + peer['left'] = left + + if port: +@@ -717,7 +721,8 @@ + l = self.becache[infohash] + y = not peer['left'] + for x in l: +- del x[y][myid] ++ if x[y].has_key(myid): ++ del x[y][myid] + if natted >= 0: + del peer['nat'] # restart NAT testing + if natted and natted < self.natcheck: only in patch2: unchanged: --- bittornado-0.3.18.orig/debian/patches/19_fix_tracker_return_all.dpatch +++ bittornado-0.3.18/debian/patches/19_fix_tracker_return_all.dpatch @@ -0,0 +1,59 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 19_fix_tracker_return_all.dpatch by Cameron Dale +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Stop the tracker from returning all torrents' peers in every request. + +@DPATCH@ +diff -urNad bittornado~/BitTornado/BT1/track.py bittornado/BitTornado/BT1/track.py +--- bittornado~/BitTornado/BT1/track.py 2007-08-18 16:20:37.000000000 -0700 ++++ bittornado/BitTornado/BT1/track.py 2007-08-18 16:20:38.000000000 -0700 +@@ -267,10 +267,9 @@ + l4,l4 = [ip,port] nopeerid + ''' + if config['compact_reqd']: +- x = 3 ++ self.cache_default_len = 3 + else: +- x = 5 +- self.cache_default = [({},{}) for i in xrange(x)] ++ self.cache_default_len = 5 + for infohash, ds in self.downloads.items(): + self.seedcount[infohash] = 0 + for x,y in ds.items(): +@@ -590,6 +589,8 @@ + + return None + ++ def cache_default(self): ++ return [({},{}) for i in xrange(self.cache_default_len)] + + def add_data(self, infohash, event, ip, paramslist): + peers = self.downloads.setdefault(infohash, {}) +@@ -751,7 +752,7 @@ + cache = self.cached_t.setdefault(infohash, None) + if ( not cache or len(cache[1]) < rsize + or cache[0] + self.config['min_time_between_cache_refreshes'] < clock() ): +- bc = self.becache.setdefault(infohash,self.cache_default) ++ bc = self.becache.setdefault(infohash,self.cache_default()) + cache = [ clock(), bc[0][0].values() + bc[0][1].values() ] + self.cached_t[infohash] = cache + shuffle(cache[1]) +@@ -766,7 +767,7 @@ + data['peers'] = [] + return data + +- bc = self.becache.setdefault(infohash,self.cache_default) ++ bc = self.becache.setdefault(infohash,self.cache_default()) + len_l = len(bc[2][0]) + len_s = len(bc[2][1]) + if not (len_l+len_s): # caches are empty! +@@ -958,7 +959,7 @@ + + def natcheckOK(self, infohash, peerid, ip, port, peer): + seed = not peer['left'] +- bc = self.becache.setdefault(infohash,self.cache_default) ++ bc = self.becache.setdefault(infohash,self.cache_default()) + cp = compact_peer_info(ip, port) + reqc = peer['requirecrypto'] + bc[2][seed][peerid] = (cp,chr(reqc)) only in patch2: unchanged: --- bittornado-0.3.18.orig/debian/patches/18_fix_launchmany_encrypter.dpatch +++ bittornado-0.3.18/debian/patches/18_fix_launchmany_encrypter.dpatch @@ -0,0 +1,23 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 18_fix_launchmany_encrypter.dpatch by Cameron Dale +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix a bug in the Encrypter that dropped all launchmany handled +## DP: connections due to not sending the headers properly. +## DP: Debian Bug #422098, fix found in BitTornado CVS. + +@DPATCH@ +diff -urNad bittornado~/BitTornado/BT1/Encrypter.py bittornado/BitTornado/BT1/Encrypter.py +--- bittornado~/BitTornado/BT1/Encrypter.py 2007-07-30 17:28:08.000000000 +0000 ++++ bittornado/BitTornado/BT1/Encrypter.py 2007-07-30 17:31:56.000000000 +0000 +@@ -91,7 +91,9 @@ + else: + self.encrypted = False + self.options = options +- self.write(self.Encoder.my_id) ++ self.write(chr(len(protocol_name)) + protocol_name + ++ option_pattern + ++ self.Encoder.download_id + self.Encoder.my_id ) + self.next_len, self.next_func = 20, self.read_peer_id + else: + self.encrypted = None # don't know yet