[koji] fix python 2.7 incompatibilities (rhbz 619276)

dmalcolm dmalcolm at fedoraproject.org
Tue Aug 3 23:34:07 UTC 2010


commit 021dece5bef1ef7df254cc98d8ac09599c0f2949
Author: David Malcolm <dmalcolm at redhat.com>
Date:   Tue Aug 3 19:36:09 2010 -0400

    fix python 2.7 incompatibilities (rhbz 619276)

 koji.spec      |   10 +++++++++-
 python27.patch |   24 ++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/koji.spec b/koji.spec
index 67de2fa..9d14b6b 100644
--- a/koji.spec
+++ b/koji.spec
@@ -2,13 +2,17 @@
 
 Name: koji
 Version: 1.4.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: LGPLv2 and GPLv2+
 # koji.ssl libs (from plague) are GPLv2+
 Summary: Build system tools
 Group: Applications/System
 URL: http://fedorahosted.org/koji
 Patch0: fedora-config.patch
+
+# Fix python 2.7 incompatibilities (rbhz#619276)
+Patch1: python27.patch
+
 Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
@@ -103,6 +107,7 @@ koji-web is a web UI to the Koji system.
 %prep
 %setup -q
 %patch0 -p1 -b .orig
+%patch1 -p5
 
 %build
 
@@ -187,6 +192,9 @@ if [ $1 = 0 ]; then
 fi
 
 %changelog
+* Tue Aug  3 2010 David Malcolm <dmalcolm at redhat.com> - 1.4.0-4
+- fix python 2.7 incompatibilities (rhbz 619276)
+
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 1.4.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 
diff --git a/python27.patch b/python27.patch
new file mode 100644
index 0000000..022cb68
--- /dev/null
+++ b/python27.patch
@@ -0,0 +1,24 @@
+diff -urN /usr/lib/python2.7/site-packages/koji/ssl/SSLConnection.py /usr/lib/python2.7/site-packages/koji-bak/ssl/SSLConnection.py
+--- /usr/lib/python2.7/site-packages/koji/ssl/SSLConnection.py	2010-07-09 04:04:26.000000000 +0200
++++ /usr/lib/python2.7/site-packages/koji-bak/ssl/SSLConnection.py	2010-08-02 19:39:00.000000000 +0200
+@@ -63,7 +63,7 @@
+         c, a = self.__dict__["conn"].accept()
+         return (SSLConnection(c), a)
+ 
+-    def makefile(self, mode, bufsize):
++    def makefile(self,  mode='r', bufsize=-1):
+         """
+         We need to use socket._fileobject Because SSL.Connection
+         doesn't have a 'dup'. Not exactly sure WHY this is, but
+diff -urN /usr/lib/python2.7/site-packages/koji/ssl/XMLRPCServerProxy.py /usr/lib/python2.7/site-packages/koji-bak/ssl/XMLRPCServerProxy.py
+--- /usr/lib/python2.7/site-packages/koji/ssl/XMLRPCServerProxy.py	2010-07-09 04:04:26.000000000 +0200
++++ /usr/lib/python2.7/site-packages/koji-bak/ssl/XMLRPCServerProxy.py	2010-08-02 19:35:04.000000000 +0200
+@@ -41,7 +41,7 @@
+             # Yay for Python 2.2
+             pass
+         _host, _port = urllib.splitport(host)
+-        self._https = SSLCommon.PlgHTTPS(_host, (_port and int(_port) or 443), ssl_context=self.ssl_ctx, timeout=self._timeout)
++        self._https = SSLCommon.PlgHTTPSConnection(_host, (_port and int(_port) or 443), ssl_context=self.ssl_ctx, timeout=self._timeout)
+         return self._https
+ 
+     def close(self):


More information about the scm-commits mailing list