Hello community,

here is the log from the commit of package python-pywbem for openSUSE:Factory 
checked in at 2014-01-09 15:34:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pywbem (Old)
 and      /work/SRC/openSUSE:Factory/.python-pywbem.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pywbem"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pywbem/python-pywbem.changes      
2013-11-30 18:33:16.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-pywbem.new/python-pywbem.changes 
2014-01-09 15:34:39.000000000 +0100
@@ -1,0 +2,10 @@
+Thu Jan  9 11:54:53 UTC 2014 - speili...@suse.com
+
+- Added pywbem-ipv6.patch: IPv6 support taken from systemsmanagement:wbem
+
+-------------------------------------------------------------------
+Thu Dec 19 19:33:56 UTC 2013 - speili...@suse.com
+
+- Don't remove buildroot in install section
+
+-------------------------------------------------------------------

New:
----
  pywbem-ipv6.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pywbem.spec ++++++
--- /var/tmp/diff_new_pack.CAyRqf/_old  2014-01-09 15:34:40.000000000 +0100
+++ /var/tmp/diff_new_pack.CAyRqf/_new  2014-01-09 15:34:40.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pywbem
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,17 @@
 
 
 Name:           python-pywbem
-BuildRequires:  python-devel
-BuildRequires:  python-xml
 Version:        0.7.0
 Release:        0
+Url:            http://pywbem.sf.net/
 Summary:        Python module for making CIM operation calls using the WBEM 
protocol
 License:        LGPL-2.1+
 Group:          System/Management
-Url:            http://pywbem.sf.net/
 Source0:        pywbem-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM -- Upstream patch for IPv6 support
+Patch:          pywbem-ipv6.patch
+BuildRequires:  python-devel
+BuildRequires:  python-xml
 Requires:       python-xml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -35,9 +37,9 @@
 
 %prep
 %setup  -q -n pywbem-%{version}
+%patch -p1
 
 %build
-ln -s . pywbem
 python setup.py build
 
 %install

++++++ pywbem-ipv6.patch ++++++
diff -ur orig-pywbem-0.7.0/cim_http.py pywbem-0.7.1/cim_http.py
--- orig-pywbem-0.7.0/cim_http.py       2013-08-02 11:00:13.000000000 +0200
+++ pywbem-0.7.1/cim_http.py    2013-09-26 15:32:29.765504492 +0200
@@ -58,6 +58,15 @@
     if m:
         host = url[len(m.group(0)):]
 
+    # IPv6 with/without port
+    m = re.match("^\[?([0-9A-Fa-f:]*)\]?(:([0-9]*))?$", host)
+    if m:
+        host = m.group(1)
+        port_tmp = m.group(3)
+        if port_tmp:
+            port = int(port_tmp)
+        return host, port, ssl
+
     s = string.split(host, ":")         # Set port number
     if len(s) != 1:
         host = s[0]
@@ -120,24 +129,41 @@
             key_file = x509.get('key_file')
 
         if verify_callback is not None:
-            try:
-                from OpenSSL import SSL
-                ctx = SSL.Context(SSL.SSLv3_METHOD)
-                ctx.set_verify(SSL.VERIFY_PEER, verify_callback)
-                # Add the key and certificate to the session
-                if cert_file is not None and key_file is not None:
-                  ctx.use_certificate_file(cert_file)
-                  ctx.use_privatekey_file(key_file)
-                s = SSL.Connection(ctx, socket.socket(socket.AF_INET,
-                                                      socket.SOCK_STREAM))
-                s.connect((host, port))
-                s.do_handshake()
-                s.shutdown()
-                s.close()
-            except socket.error, arg:
-                raise Error("Socket error: %s" % (arg,))
-            except socket.sslerror, arg:
-                raise Error("SSL error: %s" % (arg,))
+            addr_ind = 0
+            # Temporary exception store
+            addr_exc = None
+            # Get a list of arguments for socket().
+            addr_list = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)
+            for addr_ind in xrange(len(addr_list)):
+                family, socktype, proto, canonname, sockaddr = 
addr_list[addr_ind]
+                try:
+                    from OpenSSL import SSL
+                    ctx = SSL.Context(SSL.SSLv3_METHOD)
+                    ctx.set_verify(SSL.VERIFY_PEER, verify_callback)
+                    ctx.set_default_verify_paths()
+                    # Add the key and certificate to the session
+                    if cert_file is not None and key_file is not None:
+                      ctx.use_certificate_file(cert_file)
+                      ctx.use_privatekey_file(key_file)
+                    s = SSL.Connection(ctx, socket.socket(family, socktype, 
proto))
+                    s.connect((host, port))
+                    s.do_handshake()
+                    s.shutdown()
+                    s.close()
+                    addr_exc = None
+                    break
+                except (socket.gaierror, socket.error), arg:
+                    # Could not perform connect() call, store the exception 
object for
+                    # later use.
+                    addr_exc = arg
+                    continue
+                except socket.sslerror, arg:
+                    raise Error("SSL error: %s" % (arg,))
+
+            # Did we try all the addresses from getaddrinfo() and no successful
+            # connection performed?
+            if addr_exc:
+                raise Error("Socket error: %s" % (addr_exc),)
 
     numTries = 0
     localAuthHeader = None
@@ -166,7 +192,7 @@
                 raise Error('Invalid URL')
 
     locallogin = None
-    if host in ('localhost', '127.0.0.1'):
+    if host in ('localhost', 'localhost6', '127.0.0.1', '::1'):
         local = True
     if local:
         uid = os.getuid()
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to