summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2016-04-12 16:36:57 +0200
committerIan Delaney <idella4@gentoo.org>2016-04-13 10:14:12 +0800
commitb571300bec3dec1d90d450b9d257bf577feebac8 (patch)
tree58e639d71c262ec744620d814e0b2e81d786f094 /dev-python/dulwich
parentdev-python/dulwich: upgrade to vn. 0.12.0 (diff)
downloadgentoo-b571300bec3dec1d90d450b9d257bf577feebac8.tar.gz
gentoo-b571300bec3dec1d90d450b9d257bf577feebac8.tar.bz2
gentoo-b571300bec3dec1d90d450b9d257bf577feebac8.zip
dev-python/dulwich: fix possible hang with gzip
achieved by use of patch 'dulwich-0.12.0-fix-gzip-hang.patch', run in revbumped ebuild Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1247 Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'dev-python/dulwich')
-rw-r--r--dev-python/dulwich/dulwich-0.12.0-r1.ebuild (renamed from dev-python/dulwich/dulwich-0.12.0.ebuild)2
-rw-r--r--dev-python/dulwich/files/dulwich-0.12.0-fix-gzip-hang.patch27
2 files changed, 29 insertions, 0 deletions
diff --git a/dev-python/dulwich/dulwich-0.12.0.ebuild b/dev-python/dulwich/dulwich-0.12.0-r1.ebuild
index c4426b10f89c..9cbd12a7fa71 100644
--- a/dev-python/dulwich/dulwich-0.12.0.ebuild
+++ b/dev-python/dulwich/dulwich-0.12.0-r1.ebuild
@@ -21,6 +21,8 @@ DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/gevent[$(python_gen_usedep python2_7)] )"
RDEPEND=""
+# https://github.com/jelmer/dulwich/pull/418
+PATCHES=( "${FILESDIR}/${P}-fix-gzip-hang.patch" )
DISTUTILS_IN_SOURCE_BUILD=1
diff --git a/dev-python/dulwich/files/dulwich-0.12.0-fix-gzip-hang.patch b/dev-python/dulwich/files/dulwich-0.12.0-fix-gzip-hang.patch
new file mode 100644
index 000000000000..3feed01181ed
--- /dev/null
+++ b/dev-python/dulwich/files/dulwich-0.12.0-fix-gzip-hang.patch
@@ -0,0 +1,27 @@
+From 6ba8bba4f41ca9a2a4f7568ad45cabd41d7c9964 Mon Sep 17 00:00:00 2001
+From: Jonas Haag <jonas@lophus.org>
+Date: Tue, 12 Apr 2016 15:40:38 +0200
+Subject: [PATCH] Fix hang on Gzip decompression
+
+'LimitedInputFilter' should be applied before the Gzip middleware as
+'CONTENT_LENGTH' refers to the size of the *compressed* body. If
+applied in wrong order, this may cause 'copyfileobj()' to try to read
+more data from the socket than is available, resulting in a call to
+'recv()' that hangs forever.
+---
+ dulwich/web.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dulwich/web.py b/dulwich/web.py
+index a4fa941..d8863fe 100644
+--- a/dulwich/web.py
++++ b/dulwich/web.py
+@@ -415,7 +415,7 @@ def make_wsgi_chain(*args, **kwargs):
+ correctly wrapped with needed middleware.
+ """
+ app = HTTPGitApplication(*args, **kwargs)
+- wrapped_app = GunzipFilter(LimitedInputFilter(app))
++ wrapped_app = LimitedInputFilter(GunzipFilter(app))
+ return wrapped_app
+
+