summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2011-03-18 00:32:05 +0000
committerRyan Hill <rhill@gentoo.org>2011-03-18 00:32:05 +0000
commita2aa93b1f360894436c051b2eb975fa676f21d50 (patch)
tree772f2a66d6ad88478a5d86ad81c6e705d7a8bc83 /net-p2p/bittorrent
parentfix bug #358929 (diff)
downloadhistorical-a2aa93b1f360894436c051b2eb975fa676f21d50.tar.gz
historical-a2aa93b1f360894436c051b2eb975fa676f21d50.tar.bz2
historical-a2aa93b1f360894436c051b2eb975fa676f21d50.zip
Revision bump, new ebuild. Apply Fedora patchset.
Package-Manager: portage-2.2.0_alpha27/cvs/Linux x86_64
Diffstat (limited to 'net-p2p/bittorrent')
-rw-r--r--net-p2p/bittorrent/ChangeLog18
-rw-r--r--net-p2p/bittorrent/Manifest24
-rw-r--r--net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild87
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch75
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch23
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch142
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch15
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch14
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch13
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch81
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch45
-rw-r--r--net-p2p/bittorrent/files/bittorrent.desktop11
-rw-r--r--net-p2p/bittorrent/metadata.xml6
13 files changed, 549 insertions, 5 deletions
diff --git a/net-p2p/bittorrent/ChangeLog b/net-p2p/bittorrent/ChangeLog
index def6fc6f36f4..3b59b0e1e9d9 100644
--- a/net-p2p/bittorrent/ChangeLog
+++ b/net-p2p/bittorrent/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for net-p2p/bittorrent
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bittorrent/ChangeLog,v 1.135 2010/11/15 16:12:35 arfrever Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bittorrent/ChangeLog,v 1.136 2011/03/18 00:32:05 dirtyepic Exp $
+
+*bittorrent-4.4.0-r2 (18 Mar 2011)
+
+ 18 Mar 2011; Ryan Hill <dirtyepic@gentoo.org> +bittorrent-4.4.0-r2.ebuild,
+ +files/bittorrent-4.4.0-bencode-float.patch,
+ +files/bittorrent-4.4.0-fastresume.patch,
+ +files/bittorrent-4.4.0-hashlib.patch,
+ +files/bittorrent-4.4.0-keyerror.patch,
+ +files/bittorrent-4.4.0-no-version-check.patch,
+ +files/bittorrent-4.4.0-pkidir.patch,
+ +files/bittorrent-4.4.0-pygtk-thread-warnings.patch,
+ +files/bittorrent-4.4.0-python26-syntax.patch, +files/bittorrent.desktop,
+ metadata.xml:
+ Revision bump, new ebuild. Apply Fedora patchset.
15 Nov 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
bittorrent-4.4.0-r1.ebuild, bittorrent-5.0.9-r1.ebuild,
diff --git a/net-p2p/bittorrent/Manifest b/net-p2p/bittorrent/Manifest
index a3089fac1c5a..c149112c7980 100644
--- a/net-p2p/bittorrent/Manifest
+++ b/net-p2p/bittorrent/Manifest
@@ -1,10 +1,30 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX bittorrent-4.4.0-bencode-float.patch 2176 RMD160 90746b21a9a56727fb6d307d3e89bdcca557f1eb SHA1 f709562e58f0b22c492499e70bc24b009f61b1a3 SHA256 20f3b5d7a3dfffd79359a8d0b4842d38af0454e1f59e1b36fbbaa3df9aafc9f7
+AUX bittorrent-4.4.0-fastresume.patch 1290 RMD160 5aed914992f8854b4be43826cf54860aa0c00cd7 SHA1 8e49b2c35dc1e62461c3de667a9d4bb6f789d476 SHA256 6bf24d50d79bed55822a4e49e87af20bce1e4cd1bb5fd3dcc78917d507c02a89
+AUX bittorrent-4.4.0-hashlib.patch 3350 RMD160 2e3c0b03fa774977219dcbeb187f241af2b5af01 SHA1 184e9df2a082086f721e3f1718fb9a27d3bbd7bb SHA256 bee23ee38dcadd21e75af8225d35c6fb9185bba409d70d46c25b543b879cac75
+AUX bittorrent-4.4.0-keyerror.patch 637 RMD160 dbf61d730c876bccd23a239a4c87d108f126d9a2 SHA1 83f5744a98d4ed336f9673c1fa160cdf1dacdf26 SHA256 100d656a81471b2332c37c8d567c6906e6e0db3f5c6ed8af9e6394f4d4224d38
+AUX bittorrent-4.4.0-no-version-check.patch 304 RMD160 545e0b1fca50a02a750fa04f29fdac4b0590ed86 SHA1 f4139a6f536fb58faacd378ea892bc917de7b255 SHA256 dad7059dc31d1b40d19adff4abc08e42b9ace1274331e39c28ed148c9a26a52d
+AUX bittorrent-4.4.0-pkidir.patch 562 RMD160 18b7173ebd625c166881f029850cb2f68cafd7a8 SHA1 48b613f225477c343a995ce894163c80d782af39 SHA256 74001d32736e6ffdd94ac0dddaa0cd73e5b674e3a96dff94ad4ec6a9598db49c
+AUX bittorrent-4.4.0-pygtk-thread-warnings.patch 2607 RMD160 fff17d5a695eded4b585f66c57a8be52220e99b3 SHA1 b2a57f2dd8b467624d3d08d5825c8c632be17df4 SHA256 824f0f0c5211eddbdbf30cbf14dc660dfc0b3d2306d2b17d938794ab971d6bca
+AUX bittorrent-4.4.0-python26-syntax.patch 1597 RMD160 935cac6d2457fd4831b92647077356ff3d9896f3 SHA1 4f9ff9269dc7c8d5d43fe48516700346507f31b5 SHA256 b11160c397c460d994393e1e12ac05a4eabb2ca487e2619ec1b2469ee164f9b3
AUX bittorrent-tracker.confd 565 RMD160 9a21fec4c8b654ed71ac0a1425943622cd1b525f SHA1 031d21178924dee7370fa9e5965d1d017001626d SHA256 c994ddd1670a274289043380db70f2f08829cf7c7747be9805ba31dce0e2bc86
AUX bittorrent-tracker.initd 653 RMD160 4546d4d647969f91f623d98bc80ef53dc86a2117 SHA1 898ed64266ac07c53c8536223b1851a2fc5b671d SHA256 5f70c794dcc5d821df1224168ac449fd94983a7f9eeb3e498d31fc369b3b2ff3
+AUX bittorrent.desktop 295 RMD160 573ec80b5eed531caf2db32b35d77d41b71ed7fa SHA1 e2c765b9015ce100181710a2d529ca471d83adc2 SHA256 59459f2dddef3c168f528c3679971fe67e9c996234935c5f682f86f33200f31a
DIST BitTorrent-4.4.0.tar.gz 1255281 RMD160 9e743b3178142855d289743d4430598353fb4d3f SHA1 8ca3e52c8049ff29a6785da410d6aa80c6726882 SHA256 1c9338ed384240258b5733a814670e2dee8ca2fb65babf3f0ca07978707301e0
DIST BitTorrent-5.0.9.tar.gz 2497550 RMD160 631d88c31ebd2f656477791db18e6a868349a2d5 SHA1 b610c811590aad6ec25fc7b30acb9e0264443121 SHA256 4459f694609328e55f829fe2e1143518e35f471aed7814da7689fee5d422f705
DIST BitTorrent-5.2.2.tar.gz 2499810 RMD160 9cda47bb81ab1b8ef254855bf3bd84877bac102f SHA1 ba407346d6cce9d59aef0464d8ee931a953f3a48 SHA256 a9cfe1377b284a0e98d8c0e49d099f44fc8ead6e7f45456428d66bbee0006816
EBUILD bittorrent-4.4.0-r1.ebuild 1791 RMD160 36e44449af14440ee5d9a2ecc45e8e1c0b353c32 SHA1 19b705a9fe7e716346b2a7cd1ae6c316a9414e72 SHA256 47b714682616d53e71ebf18ca53a643f29e22f65f753f04a599ce418b219b7ce
+EBUILD bittorrent-4.4.0-r2.ebuild 2265 RMD160 c37c9e94e36842c5ae9e679817dd2582c1e75120 SHA1 26e1cb9468e1ddaac03535ca3c5219e1e2e23959 SHA256 654d23738657d66aa81ac4c0b6a9c42867ac1e3aaaf13a1e16ea99279466b288
EBUILD bittorrent-5.0.9-r1.ebuild 2272 RMD160 a7de270bc2c118f6b61044d0bd051a78b5f924b8 SHA1 db002ac1b195113056414f5bad88308d55a846a1 SHA256 1e5264551553ce3261ab28bad2b62895763b7b0461dfce8ba5b3e542eae01e48
EBUILD bittorrent-5.2.2.ebuild 2288 RMD160 766692ee26d183bcbbf5303a2cca51869beadf89 SHA1 7f1ba0bc4f1a2040f5bed4908663efc766492513 SHA256 1992f9f5f51b48db477afee8d8901f5e4afcb5e19f216ab386812c01ba37c403
-MISC ChangeLog 19675 RMD160 3386667505086319d7448c63a719d43fb309d5fd SHA1 58d642642dbd6ecd87b1553113f8ae5d979e236b SHA256 33f223c7950d870003fd5e1ed713bd403816a944940902f432beb9472593c5dd
-MISC metadata.xml 160 RMD160 828887200387b28c37fc97111fc6bc3a0a2fcccd SHA1 813ef5bc57f6a8d95e7cab7a745a2a824858f49c SHA256 fe06593409e7f28665c032001005e94cb650299711a0af7f1a558bdb56c4004f
+MISC ChangeLog 20253 RMD160 19a5af0cefd6d447e35db1788756f6c922622a41 SHA1 02eea88fd015eb64a381707673c8282539dcb9a4 SHA256 906e83b5f61d032d54129e2582d3257474e6016e39c30952455398f299bdace0
+MISC metadata.xml 253 RMD160 c5653dbfa27ea739e3430aed0980016fd12aa68f SHA1 461dedcaf3322af7e59c93c21845796c5fa27419 SHA256 301f970e0628e48cfeaf5bd540b63c012452b458b76ef05bb0bcbe640a0f373f
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iEYEARECAAYFAk2CqX4ACgkQiqiDRvmkBmJUZQCgsW4X2DZxbutZsdcG/uHQGMqm
+UhQAoNWSrfIj9bcPABgffUH7OCTgG/p5
+=V/GW
+-----END PGP SIGNATURE-----
diff --git a/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild b/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild
new file mode 100644
index 000000000000..33561f3ae807
--- /dev/null
+++ b/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild,v 1.1 2011/03/18 00:32:05 dirtyepic Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="2:2.5"
+PYTHON_USE_WITH="threads"
+
+# Maintainer note:
+# keep this package at 4.4.0.
+# 5.x - requires wxpython-2.6 which we don't carry
+# 6.x - binary-only non-free crap
+# Fedora has also frozen bittorrent at 4.4.0 and is a good source of patches
+# http://pkgs.fedoraproject.org/gitweb/?p=bittorrent.git
+
+inherit distutils eutils fdo-mime python
+
+MY_P="${P/bittorrent/BitTorrent}"
+
+DESCRIPTION="Tool for distributing files via a distributed network of nodes"
+HOMEPAGE="http://www.bittorrent.com/"
+SRC_URI="http://www.bittorrent.com/dl/${MY_P}.tar.gz"
+
+LICENSE="BitTorrent"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="gtk"
+
+RDEPEND=">=dev-python/pycrypto-2.0
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=dev-python/pygtk-2.6:2 )"
+DEPEND="${RDEPEND}"
+# dev-python/dnspython"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="README.txt TRACKERLESS.txt"
+PYTHON_MODNAME="BitTorrent khashmir"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}"/${P}-no-version-check.patch
+ epatch "${FILESDIR}"/${P}-pkidir.patch
+ epatch "${FILESDIR}"/${P}-fastresume.patch
+ epatch "${FILESDIR}"/${P}-pygtk-thread-warnings.patch
+ epatch "${FILESDIR}"/${P}-python26-syntax.patch
+ epatch "${FILESDIR}"/${P}-bencode-float.patch
+ epatch "${FILESDIR}"/${P}-keyerror.patch
+ epatch "${FILESDIR}"/${P}-hashlib.patch
+
+ # fix doc path #109743
+ sed -i -e "/dp.*appdir/ s:appdir:'${PF}':" BitTorrent/platform.py
+}
+
+src_install() {
+ distutils_src_install
+
+ if use gtk; then
+ doicon images/bittorrent.ico
+ domenu "${FILESDIR}"/${PN}.desktop
+ else
+ rm -f "${D}"usr/bin/{bit,make}torrent
+ fi
+
+ insinto /etc/pki/bittorrent/
+ doins public.key
+
+ newinitd "${FILESDIR}"/bittorrent-tracker.initd bittorrent-tracker
+ newconfd "${FILESDIR}"/bittorrent-tracker.confd bittorrent-tracker
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ use gtk && fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ use gtk && fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch
new file mode 100644
index 000000000000..c14a7b668c25
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch
@@ -0,0 +1,75 @@
+Add bencode support for floating point values.
+
+https://bugzilla.redhat.com/451496
+
+--- a/BitTorrent/bencode.py
++++ b/BitTorrent/bencode.py
+@@ -14,6 +14,8 @@ from BitTorrent.obsoletepythonsupport import *
+
+ from BitTorrent import BTFailure
+
++import string
++
+ def decode_int(x, f):
+ f += 1
+ newf = x.index('e', f)
+@@ -25,6 +27,23 @@ def decode_int(x, f):
+ raise ValueError
+ return (n, newf+1)
+
++def assert_finite(n):
++ """Raises ValueError if n is NaN or infinite."""
++
++ valid_chars = '0123456789.-+eE'
++ if repr(n).translate(string.maketrans('',''), valid_chars) != '':
++ raise ValueError('encountered NaN or infinite')
++
++def decode_float(x, f):
++ f += 1
++ newf = x.index('e', f)
++ try:
++ n = float(x[f:newf].replace('E', 'e'))
++ assert_finite(n)
++ except (OverflowError, ValueError):
++ raise ValueError('encountered NaN or infinite')
++ return (n, newf+1)
++
+ def decode_string(x, f):
+ colon = x.index(':', f)
+ n = int(x[f:colon])
+@@ -55,6 +74,7 @@ decode_func = {}
+ decode_func['l'] = decode_list
+ decode_func['d'] = decode_dict
+ decode_func['i'] = decode_int
++decode_func['f'] = decode_float
+ decode_func['0'] = decode_string
+ decode_func['1'] = decode_string
+ decode_func['2'] = decode_string
+@@ -75,7 +95,7 @@ def bdecode(x):
+ raise BTFailure, _("invalid bencoded value (data after valid prefix)")
+ return r
+
+-from types import StringType, IntType, LongType, DictType, ListType, TupleType
++from types import StringType, IntType, LongType, DictType, ListType, TupleType, FloatType
+
+
+ class Bencached(object):
+@@ -91,6 +111,10 @@ def encode_bencached(x,r):
+ def encode_int(x, r):
+ r.extend(('i', str(x), 'e'))
+
++def encode_float(x, r):
++ assert_finite(x)
++ r.extend(('f', repr(x).replace('e', 'E'), 'e'))
++
+ def encode_bool(x, r):
+ if x:
+ encode_int(1, r)
+@@ -119,6 +143,7 @@ encode_func = {}
+ encode_func[Bencached] = encode_bencached
+ encode_func[IntType] = encode_int
+ encode_func[LongType] = encode_int
++encode_func[FloatType] = encode_float
+ encode_func[StringType] = encode_string
+ encode_func[ListType] = encode_list
+ encode_func[TupleType] = encode_list
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch
new file mode 100644
index 000000000000..b282afde170b
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch
@@ -0,0 +1,23 @@
+"Could not load fastresume data: invalid literal for int() with base 10: '1300250602.1'
+Will perform full hash check."
+
+--- a/BitTorrent/Storage.py
++++ b/BitTorrent/Storage.py
+@@ -213,7 +213,7 @@ class Storage(object):
+ resumefile.write(str(amount_done) + '\n')
+ for x, x, filename in self.ranges:
+ resumefile.write(str(os.path.getsize(filename)) + ' ' +
+- str(os.path.getmtime(filename)) + '\n')
++ str(int(os.path.getmtime(filename))) + '\n')
+
+ def check_fastresume(self, resumefile, return_filelist=False,
+ piece_size=None, numpieces=None, allfiles=None):
+@@ -237,7 +237,7 @@ class Storage(object):
+ else:
+ raise BTFailure(_("Another program appears to have moved, renamed, or deleted the file, "
+ "or %s may have crashed last time it was run.") % app_name)
+- if fsize > 0 and mtime != os.path.getmtime(filename):
++ if fsize > 0 and mtime != int(os.path.getmtime(filename)):
+ raise BTFailure(_("Another program appears to have modified the file, "
+ "or %s may have crashed last time it was run.") % app_name)
+ if size != fsize:
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch
new file mode 100644
index 000000000000..28bfaa76a90a
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch
@@ -0,0 +1,142 @@
+DeprecationWarning: the sha module is deprecated; use the hashlib module instead
+
+--- a/BitTorrent/ConvertedMetainfo.py
++++ b/BitTorrent/ConvertedMetainfo.py
+@@ -15,7 +15,10 @@ from __future__ import generators
+
+ import os
+ import sys
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+
+ from BitTorrent.obsoletepythonsupport import *
+
+--- a/BitTorrent/NewVersion.py
++++ b/BitTorrent/NewVersion.py
+@@ -15,7 +15,10 @@ import sys
+ import zurllib
+ import pickle
+ import threading
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+
+ DEBUG = False
+
+--- a/BitTorrent/PeerID.py
++++ b/BitTorrent/PeerID.py
+@@ -11,7 +11,10 @@
+ # Written by Matt Chisholm
+
+ import os
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from time import time
+ try:
+ getpid = os.getpid
+--- a/BitTorrent/StorageWrapper.py
++++ b/BitTorrent/StorageWrapper.py
+@@ -12,7 +12,10 @@
+
+ from __future__ import division
+
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from array import array
+ from binascii import b2a_hex
+
+--- a/BitTorrent/download.py
++++ b/BitTorrent/download.py
+@@ -19,7 +19,10 @@ import sys
+ import threading
+ import errno
+ import gc
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from socket import error as socketerror
+ from random import seed
+ from time import time
+--- a/BitTorrent/makemetafile.py
++++ b/BitTorrent/makemetafile.py
+@@ -16,7 +16,10 @@ from __future__ import division
+
+ import os
+ import sys
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from time import time
+ from threading import Event
+
+--- a/BitTorrent/parsedir.py
++++ b/BitTorrent/parsedir.py
+@@ -11,7 +11,10 @@
+ # Written by John Hoffman and Uoti Urpala
+
+ import os
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+
+ from BitTorrent.bencode import bencode, bdecode
+ from BitTorrent.btformats import check_message
+--- a/khashmir/khash.py
++++ b/khashmir/khash.py
+@@ -8,7 +8,10 @@
+ # for the specific language governing rights and limitations under the
+ # License.
+
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from random import randint
+
+ #this is ugly, hopefully os.entropy will be in 2.4
+--- a/khashmir/khashmir.py
++++ b/khashmir/khashmir.py
+@@ -13,7 +13,10 @@ from socket import gethostbyname
+
+ from BitTorrent.platform import bttime as time
+
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ import re
+ from BitTorrent.defaultargs import common_options, rare_options
+ from BitTorrent.RawServer_magic import RawServer
+--- a/khashmir/utkhashmir.py
++++ b/khashmir/utkhashmir.py
+@@ -13,7 +13,10 @@ from actions import *
+ from khash import newID
+ from krpc import KRPCProtocolError, KRPCFailSilently
+ from cache import Cache
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from util import *
+ from threading import Thread
+ from socket import gethostbyname
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch
new file mode 100644
index 000000000000..c2730d1d004f
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch
@@ -0,0 +1,15 @@
+Fix bug with error: KeyError: <type 'float'>
+
+https://bugzilla.redhat.com/451496
+
+--- a/BitTorrent/track.py
++++ b/BitTorrent/track.py
+@@ -107,6 +107,8 @@ defaults = [
+ _("scrape access allowed (can be none, specific or full)")),
+ ('max_give', 200,
+ _("maximum number of peers to give with any one request")),
++ ('max_incomplete', 100,
++ _("max number of outgoing incomplete connections")),
+ ('twisted', -1,
+ _("Use Twisted network libraries for network connections. 1 means use twisted, 0 means do not use twisted, -1 means autodetect, and prefer twisted")),
+ ('pid', '/var/run/bittorrent-tracker.pid',
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch
new file mode 100644
index 000000000000..b0c20fde497b
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch
@@ -0,0 +1,14 @@
+Disable check for new versions.
+
+--- a/BitTorrent/NewVersion.py
++++ b/BitTorrent/NewVersion.py
+@@ -128,6 +128,9 @@ class Updater(object):
+
+
+ def get(self):
++ self.debug('Skipping version check')
++ return
++
+ try:
+ self.get_available()
+ except BTFailure, e:
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch
new file mode 100644
index 000000000000..98f9f81c177f
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch
@@ -0,0 +1,13 @@
+Install public key in standard place.
+
+--- a/BitTorrent/NewVersion.py
++++ b/BitTorrent/NewVersion.py
+@@ -163,7 +163,7 @@ class Updater(object):
+ self.threadwrap(self.errorfunc, WARNING, '\n'.join(terrors))
+
+ if torrentfile and signature:
+- public_key_file = open(os.path.join(doc_root, 'public.key'), 'rb')
++ public_key_file = open('/etc/pki/bittorrent/public.key', 'rb')
+ public_key = pickle.load(public_key_file)
+ h = sha(torrentfile).digest()
+ if public_key.verify(h, signature):
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch
new file mode 100644
index 000000000000..c4a232622def
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch
@@ -0,0 +1,81 @@
+GtkDeprecationWarning: gtk.threads_leave is deprecated, use gtk.gdk.threads_leave instead
+
+--- a/BitTorrent/GUI.py
++++ b/BitTorrent/GUI.py
+@@ -25,9 +25,9 @@ from BitTorrent import app_name, FAQ_URL, languages, language_names
+ from BitTorrent.platform import image_root, read_language_file, write_language_file
+
+ def lock_wrap(function, *args):
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+ function(*args)
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+
+ def gtk_wrap(function, *args):
+ gobject.idle_add(lock_wrap, function, *args)
+@@ -377,10 +377,10 @@ class AutoScrollingWindow(ScrolledWindow):
+
+ def scroll_and_wait(self, amount, lock_held):
+ if not lock_held:
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+ self.scroll_by(0, amount)
+ if not lock_held:
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+ if self.vscrolltimeout is not None:
+ gobject.source_remove(self.vscrolltimeout)
+ self.vscrolltimeout = gobject.timeout_add(100, self.scroll_and_wait, amount, False)
+--- a/bittorrent.py
++++ b/bittorrent.py
+@@ -2742,7 +2742,7 @@ class DownloadInfoFrame(object):
+ if self.config['start_minimized']:
+ self.mainwindow.iconify()
+
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+
+ self.mainwindow.set_border_width(0)
+
+@@ -2942,7 +2942,7 @@ class DownloadInfoFrame(object):
+
+ self.nag()
+
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+
+ def window_event(self, widget, event, *args):
+ if event.changed_mask == gtk.gdk.WINDOW_STATE_ICONIFIED:
+@@ -3758,14 +3758,14 @@ class MainLoop:
+ self.mainwindow = None
+ self.started = 0
+
+- gtk.threads_init()
++ gtk.gdk.threads_init()
+
+ def set_mainwindow(self, mainwindow):
+ self.mainwindow = mainwindow
+
+ def run(self):
+ self.mainwindow.traythread.start()
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+
+ if self.mainwindow:
+ self.mainwindow.ssbutton.set_paused(self.mainwindow.config['pause'])
+@@ -3777,12 +3777,12 @@ class MainLoop:
+ self.started = 1
+ gtk.main()
+ except KeyboardInterrupt:
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+ if self.mainwindow:
+ self.mainwindow.torrentqueue.set_done()
+ raise
+
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+
+ def quit(self):
+ if self.mainwindow:
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch
new file mode 100644
index 000000000000..1ad8751528f6
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch
@@ -0,0 +1,45 @@
+Fix syntax errors with python 2.6.
+
+https://bugs.gentoo.org/265784
+
+--- a/khashmir/inserter.py
++++ b/khashmir/inserter.py
+@@ -28,7 +28,6 @@ def d(n):
+ done = done+1
+
+ if __name__=="__main__":
+- global done
+ host, port = sys.argv[1:]
+ x = UTKhashmir("", 22038, "/tmp/cgcgcgc")
+ x.addContact(host, int(port))
+--- a/khashmir/test_krpc.py
++++ b/khashmir/test_krpc.py
+@@ -44,20 +44,20 @@ class KRPCTests(TestCase):
+ self.r = RawServer(Event(), d)
+
+ addr = ('127.0.0.1', 1180)
+- self.as = self.r.create_udpsocket(addr[1], addr[0], True)
++ self.asock = self.r.create_udpsocket(addr[1], addr[0], True)
+ self.af = Receiver(addr)
+- self.a = hostbroker(self.af, addr, self.as, self.r.add_task)
+- self.r.start_listening_udp(self.as, self.a)
++ self.a = hostbroker(self.af, addr, self.asock, self.r.add_task)
++ self.r.start_listening_udp(self.asock, self.a)
+
+ addr = ('127.0.0.1', 1181)
+- self.bs = self.r.create_udpsocket(addr[1], addr[0], True)
++ self.bsock = self.r.create_udpsocket(addr[1], addr[0], True)
+ self.bf = Receiver(addr)
+- self.b = hostbroker(self.bf, addr, self.bs, self.r.add_task)
+- self.r.start_listening_udp(self.bs, self.b)
++ self.b = hostbroker(self.bf, addr, self.bsock, self.r.add_task)
++ self.r.start_listening_udp(self.bsock, self.b)
+
+ def tearDown(self):
+- self.as.close()
+- self.bs.close()
++ self.asock.close()
++ self.bsock.close()
+
+ def testSimpleMessage(self):
+ self.noisy = 0
diff --git a/net-p2p/bittorrent/files/bittorrent.desktop b/net-p2p/bittorrent/files/bittorrent.desktop
new file mode 100644
index 000000000000..9405cb489cff
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=BitTorrent File Transfer
+Comment=Distributed download of files from the Internet
+Exec=bittorrent
+Icon=/usr/share/pixmaps/bittorrent.ico
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Network;FileTransfer;P2P;
+MimeType=application/x-bittorrent;
diff --git a/net-p2p/bittorrent/metadata.xml b/net-p2p/bittorrent/metadata.xml
index aa0f3664825f..a1c365039f17 100644
--- a/net-p2p/bittorrent/metadata.xml
+++ b/net-p2p/bittorrent/metadata.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>net-p2p</herd>
+ <herd>net-p2p</herd>
+ <maintainer>
+ <email>dirtyepic@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
</pkgmetadata>