[nordugrid-arc] Backport support for newer python-twisted

Mattias Ellert ellert at fedoraproject.org
Thu Jul 3 08:38:40 UTC 2014


commit 4b3d66e7c6adbed3cf82670091682740e3a8998a
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Thu Jul 3 10:38:40 2014 +0200

    Backport support for newer python-twisted

 nordugrid-arc-twisted.patch |   34 ++++++++++++++++++++++++++++++++++
 nordugrid-arc.spec          |    3 +++
 2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/nordugrid-arc-twisted.patch b/nordugrid-arc-twisted.patch
new file mode 100644
index 0000000..7e2720a
--- /dev/null
+++ b/nordugrid-arc-twisted.patch
@@ -0,0 +1,34 @@
+diff -ur --exclude Makefile.in nordugrid-arc-4.1.0/src/services/acix/core/cacheclient.py nordugrid-arc-4.1.0/src/services/acix/core/cacheclient.py
+--- nordugrid-arc-4.1.0/src/services/acix/core/cacheclient.py	2013-11-18 12:19:22.388247000 +0100
++++ nordugrid-arc-4.1.0/src/services/acix/core/cacheclient.py	2014-06-11 10:14:26.511810118 +0200
+@@ -2,6 +2,8 @@
+ Client for retrieving cache.
+ """
+ 
++from urlparse import urlparse
++
+ from twisted.python import log
+ from twisted.internet import reactor
+ from twisted.web import client
+@@ -22,17 +24,17 @@
+     Returns a deferred, which will fire with a tuple
+     consisting of a the hashes, generation-time, and the cache.
+     """
+-    scheme, host, port, path = client._parse(url)
++    u = urlparse(url)
+     factory = client.HTTPClientFactory(url)
+     factory.noisy = False
+ 
+-    if scheme == 'https':
++    if u.scheme == 'https':
+         from twisted.internet import ssl
+         if contextFactory is None:
+             contextFactory = ssl.ClientContextFactory()
+-        reactor.connectSSL(host, port, factory, contextFactory)
++        reactor.connectSSL(u.hostname, u.port, factory, contextFactory)
+     else:
+-        reactor.connectTCP(host, port, factory)
++        reactor.connectTCP(u.hostname, u.port, factory)
+ 
+     factory.deferred.addCallback(_gotCache, factory, url)
+     return factory.deferred
diff --git a/nordugrid-arc.spec b/nordugrid-arc.spec
index 9e558cc..e167c69 100644
--- a/nordugrid-arc.spec
+++ b/nordugrid-arc.spec
@@ -99,6 +99,8 @@ Group:		System Environment/Daemons
 License:	ASL 2.0
 URL:		http://www.nordugrid.org/
 Source:		http://download.nordugrid.org/packages/%{name}/releases/%{version}/src/%{name}-%{version}.tar.gz
+#		Backport support for newer python-twisted
+Patch0:		%{name}-twisted.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 #		Packages dropped without replacements
@@ -763,6 +765,7 @@ developers.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %if %{?fedora}%{!?fedora:0} <= 9 && %{?rhel}%{!?rhel:0} <= 5
 # Older versions of SELinux does not have policy for open


More information about the scm-commits mailing list