diff options
author | manu <manu@pkgsrc.org> | 2012-05-14 15:39:52 +0000 |
---|---|---|
committer | manu <manu@pkgsrc.org> | 2012-05-14 15:39:52 +0000 |
commit | 95dba0826a08b248f55afcdc5cd0eac83983a10b (patch) | |
tree | 67a27eda1aeb3136b2666f7fa6bbcfcecfc7042f /sysutils/xentools3 | |
parent | 1414056276f5b50a0637ec5713494e2b4212330e (diff) | |
download | pkgsrc-95dba0826a08b248f55afcdc5cd0eac83983a10b.tar.gz |
Fix "xm list" with Python 2.7 (which is the default now). Without these patches,you get a traceback and a crashing xend.
copied from similar patch on xentools33 from bsiegert
Diffstat (limited to 'sysutils/xentools3')
-rw-r--r-- | sysutils/xentools3/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py | 28 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py | 14 |
3 files changed, 45 insertions, 1 deletions
diff --git a/sysutils/xentools3/distinfo b/sysutils/xentools3/distinfo index bfc7ffd1249..b441ec49313 100644 --- a/sysutils/xentools3/distinfo +++ b/sysutils/xentools3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.14 2011/12/14 03:57:50 sbd Exp $ +$NetBSD: distinfo,v 1.15 2012/05/14 15:39:52 manu Exp $ SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 @@ -63,3 +63,5 @@ SHA1 (patch-dk) = 5685f52835885635eacd305945653f817bbe8a2a SHA1 (patch-dl) = 480b515da8773e4d3cfc305d74f833f16bb12750 SHA1 (patch-dm) = af4b849dfb54454e08acd0618afc0a81572bcbc3 SHA1 (patch-dn) = 1b6490b8f75ab9fe4d66d444fdacdde7db38131d +SHA1 (patch-python_xen_util_xmlrpcclient.py) = 227db87dee15cfb7bedd67d6c118983b4dae2e34 +SHA1 (patch-python_xen_util_xmlrpclib2.py) = 0fc01ed0511ccff6942453f3592a6939b60ab0c0 diff --git a/sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py b/sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py new file mode 100644 index 00000000000..baae4207f83 --- /dev/null +++ b/sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py @@ -0,0 +1,28 @@ +$NetBSD: patch-python_xen_util_xmlrpcclient.py,v 1.1 2012/05/14 15:39:52 manu Exp $ + +--- ../tools/python/xen/util/xmlrpcclient.py.orig 2012-05-14 17:14:52.000000000 +0200 ++++ ../tools/python/xen/util/xmlrpcclient.py 2012-05-14 17:15:44.000000000 +0200 +@@ -21,8 +21,9 @@ + import socket + import string + import xmlrpclib + from types import StringTypes ++from sys import hexversion + + + try: + import SSHTransport +@@ -53,9 +54,12 @@ + self.__handler = handler + return xmlrpclib.Transport.request(self, host, '/RPC2', + request_body, verbose) + def make_connection(self, host): +- return HTTPUnix(self.__handler) ++ if hexversion < 0x02070000: ++ return HTTPUnix(self.__handler) ++ else: ++ return HTTPUnixConnection(self.__handler) + + + # We need our own transport for HTTPS, because xmlrpclib.SafeTransport is + # broken -- it does not handle ERROR_ZERO_RETURN properly. diff --git a/sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py b/sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py new file mode 100644 index 00000000000..b78273f6da0 --- /dev/null +++ b/sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py @@ -0,0 +1,14 @@ +$NetBSD: patch-python_xen_util_xmlrpclib2.py,v 1.1 2012/05/14 15:39:52 manu Exp $ + +--- ../tools/python/xen/util/xmlrpclib2.py.orig 2012-05-14 17:15:51.000000000 +0200 ++++ ../tools/python/xen/util/xmlrpclib2.py 2012-05-14 17:16:18.000000000 +0200 +@@ -60,8 +60,9 @@ + protocol_version = "HTTP/1.1" + + def __init__(self, hosts_allowed, request, client_address, server): + self.hosts_allowed = hosts_allowed ++ self.disable_nagle_algorithm = False + SimpleXMLRPCRequestHandler.__init__(self, request, client_address, + server) + + # this is inspired by SimpleXMLRPCRequestHandler's do_POST but differs |