Hello community,

here is the log from the commit of package cluster-glue for openSUSE:Factory 
checked in at 2017-11-30 12:39:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cluster-glue (Old)
 and      /work/SRC/openSUSE:Factory/.cluster-glue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cluster-glue"

Thu Nov 30 12:39:06 2017 rev:61 rq:546436 
version:1.0.12+v1.git.1511436818.71ae59fa

Changes:
--------
--- /work/SRC/openSUSE:Factory/cluster-glue/cluster-glue.changes        
2017-08-24 18:19:26.355962836 +0200
+++ /work/SRC/openSUSE:Factory/.cluster-glue.new/cluster-glue.changes   
2017-11-30 12:39:06.395628693 +0100
@@ -1,0 +2,13 @@
+Wed Nov 29 13:45:21 UTC 2017 - [email protected]
+
+- Port scripts to Python 3
+  * Add 0001-Port-scripts-to-Python-3.patch
+
+-------------------------------------------------------------------
+Thu Nov 23 11:34:53 UTC 2017 - [email protected]
+
+- Update to version 1.0.12+v1.git.1511436818.71ae59fa:
+  * Fix: stonith:external/ec2: Enforce en_US.UTF-8 locale when invoking aws 
client (bsc#1059171)
+  * Drop libnet dependency (bsc#1069596)
+
+-------------------------------------------------------------------

Old:
----
  cluster-glue-1.0.12+v1.git.1501749673.bdd95fd0.tar.bz2

New:
----
  0001-Port-scripts-to-Python-3.patch
  cluster-glue-1.0.12+v1.git.1511436818.71ae59fa.tar.bz2

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

Other differences:
------------------
++++++ cluster-glue.spec ++++++
--- /var/tmp/diff_new_pack.YgdPJ2/_old  2017-11-30 12:39:07.123602223 +0100
+++ /var/tmp/diff_new_pack.YgdPJ2/_new  2017-11-30 12:39:07.123602223 +0100
@@ -39,7 +39,7 @@
 Summary:        Reusable cluster components
 License:        GPL-2.0 and LGPL-2.1+
 Group:          Productivity/Clustering/HA
-Version:        1.0.12+v1.git.1501749673.bdd95fd0
+Version:        1.0.12+v1.git.1511436818.71ae59fa
 Release:        0
 Url:            https://github.com/ClusterLabs/cluster-glue.git
 Source:         %{name}-%{version}.tar.bz2
@@ -50,6 +50,8 @@
 # PATCH-FIX-OPENSUSE: drop lrm as it's not used anymore by pacemaker
 Patch4:         cluster-glue_droplrm.patch
 # PATCH-FIX-UPSTREAM: fix warnings seen by GCC7
+# PATCH-FIX-OPENSUSE: Port scripts to Python 3
+Patch5:         0001-Port-scripts-to-Python-3.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  OpenIPMI-devel
 BuildRequires:  asciidoc
@@ -67,12 +69,9 @@
 BuildRequires:  libxslt
 BuildRequires:  net-snmp-devel
 BuildRequires:  pkgconfig
-BuildRequires:  python-devel
+BuildRequires:  python3-devel
 %if 0%{?suse_version} > 1130
-BuildRequires:  libnet-devel
 PreReq:         sysvinit(network) sysvinit(syslog)
-%else
-BuildRequires:  libnet
 %endif
 
 Requires(pre):  %fillup_prereq
@@ -139,17 +138,22 @@
 %setup -q
 %patch1 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
 export CFLAGS
+PYTHON="%{_bindir}/python3"
+export PYTHON
 ./autogen.sh
+find . -type f -exec perl -pi -e 'BEGIN{undef $/};s[^#\!/usr/bin/env 
perl][#\!%{_bindir}/perl]' {} \;
 # SLES <= 10 does not support ./configure --docdir=,
 # hence, use this ugly hack
 %if 0%{?suse_version} < 1020
 export docdir=%{glue_docdir}
 %configure \
     --enable-ipmilan=no \
+       --enable-libnet=no \
     --enable-fatal-warnings=%{warnings_fatal} \
     --with-package-name=%{name} \
     --with-daemon-group=%{gname} \
@@ -157,6 +161,7 @@
 %else
 %configure \
     --enable-ipmilan=no \
+       --enable-libnet=no \
     --enable-fatal-warnings=%{warnings_fatal} \
     --with-package-name=%{name} \
     --with-daemon-group=%{gname} \

++++++ 0001-Port-scripts-to-Python-3.patch ++++++
>From 6780d699034825d7cee5331c6d593b8645348401 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Wed, 29 Nov 2017 14:44:22 +0100
Subject: [PATCH] Port scripts to Python 3

---
 lib/plugins/stonith/external/dracmc-telnet | 10 +++++-----
 lib/plugins/stonith/external/ibmrsa-telnet |  8 ++++----
 lib/plugins/stonith/external/riloe         | 22 +++++++++++-----------
 lib/plugins/stonith/ribcl.py.in            | 20 ++++++++++----------
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/lib/plugins/stonith/external/dracmc-telnet 
b/lib/plugins/stonith/external/dracmc-telnet
index 78c01453..0156dcda 100644
--- a/lib/plugins/stonith/external/dracmc-telnet
+++ b/lib/plugins/stonith/external/dracmc-telnet
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # vim: set filetype=python
 #######################################################################
 #
@@ -74,7 +74,7 @@ class DracMC(telnetlib.Telnet):
 
     def _get_timestamp(self):
         ct = time.time()
-        msecs = (ct - long(ct)) * 1000
+        msecs = (ct - int(ct)) * 1000
         return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S",
                             time.localtime(ct)), msecs)
 
@@ -170,7 +170,7 @@ class DracMCStonithPlugin:
 
     def _get_timestamp(self):
         ct = time.time()
-        msecs = (ct - long(ct)) * 1000
+        msecs = (ct - int(ct)) * 1000
         return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S",
                             time.localtime(ct)), msecs)
 
@@ -200,7 +200,7 @@ class DracMCStonithPlugin:
                            self._parameters['cyclades_port'])
                     c.login(self._parameters['username'],
                             self._parameters['password'])
-                except Exception, args:
+                except Exception as args:
                     if "Connection reset by peer" in str(args):
                         self._echo_debug("Someone is already logged in... 
retry=%s" % tries)
                         c.close()
@@ -362,7 +362,7 @@ class DracMCStonithPlugin:
             func = getattr(self, cmd, self.not_implemented)
             rc = func()
             return(rc)
-        except Exception, args:
+        except Exception as args:
             self.echo_log("err", 'Exception raised:', str(args))
             if self._connection:
                 self.echo_log("err", self._connection.get_history())
diff --git a/lib/plugins/stonith/external/ibmrsa-telnet 
b/lib/plugins/stonith/external/ibmrsa-telnet
index adb2a3eb..4e76825b 100644
--- a/lib/plugins/stonith/external/ibmrsa-telnet
+++ b/lib/plugins/stonith/external/ibmrsa-telnet
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 # vim: set filetype=python
 #######################################################################
 #
@@ -71,7 +71,7 @@ class RSABoard(telnetlib.Telnet):
 
     def _get_timestamp(self):
         ct = time.time()
-        msecs = (ct - long(ct)) * 1000
+        msecs = (ct - int(ct)) * 1000
         return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S",
                             time.localtime(ct)), msecs)
 
@@ -149,7 +149,7 @@ class RSAStonithPlugin:
 
     def _get_timestamp(self):
         ct = time.time()
-        msecs = (ct - long(ct)) * 1000
+        msecs = (ct - int(ct)) * 1000
         return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S",
                             time.localtime(ct)), msecs)
 
@@ -305,7 +305,7 @@ class RSAStonithPlugin:
             func = getattr(self, cmd, self.not_implemented)
             rc = func()
             return(rc)
-        except Exception, args:
+        except Exception as args:
             self.echo_log("err", 'Exception raised:', str(args))
             if self._connection:
                 self.echo_log("err", self._connection.get_history())
diff --git a/lib/plugins/stonith/external/riloe 
b/lib/plugins/stonith/external/riloe
index 412873f5..f11bb465 100644
--- a/lib/plugins/stonith/external/riloe
+++ b/lib/plugins/stonith/external/riloe
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 #
 # Stonith module for RILOE Stonith device
 #
@@ -35,7 +35,7 @@ import os
 import socket
 import subprocess
 import xml.dom.minidom
-import httplib
+import http.client as httplib
 import time
 import re
 
@@ -163,12 +163,12 @@ info = {
 }
 
 if cmd in info:
-    print info[cmd]
+    print(info[cmd])
     sys.exit(0)
 
 if cmd == 'getconfignames':
     for arg in [ "hostlist", "ilo_hostname", "ilo_user", "ilo_password", 
"ilo_can_reset", "ilo_protocol", "ilo_powerdown_method", "ilo_proxyhost", 
"ilo_proxyport"]:
-        print arg
+        print(arg)
     sys.exit(0)
 
 if not rihost:
@@ -344,13 +344,13 @@ def open_ilo(host):
             return h
         else:
             return httplib.HTTPSConnection(host)
-    except socket.gaierror, msg:
+    except socket.gaierror as msg:
         fatal("%s: %s" %(msg,host))
-    except socket.sslerror, msg:
+    except socket.sslerror as msg:
         fatal("%s for %s" %(msg,host))
-    except socket.error, msg:
+    except socket.error as msg:
         fatal("%s while talking to %s" %(msg,host))
-    except ImportError, msg:
+    except ImportError as msg:
         fatal("ssl support missing (%s)" %msg)
 
 def send_request(req,proc_f):
@@ -364,7 +364,7 @@ def send_request(req,proc_f):
     c = open_ilo(rihost)
     try:
         c.send(req+'\r\n')
-    except socket.error, msg:
+    except socket.error as msg:
         fatal("%s, while talking to %s" %(msg,rihost))
     t_end = time.time()
     my_debug("request sent in %0.2f s" % ((t_end-t_begin)))
@@ -377,7 +377,7 @@ def send_request(req,proc_f):
             if not reply:
                 break
             result.append(reply)
-        except socket.error, msg:
+        except socket.error as msg:
             if msg[0] == 6: # connection closed
                 break
             my_err("%s, while talking to %s" %(msg,rihost))
@@ -393,7 +393,7 @@ def send_request(req,proc_f):
             reply = re.sub("<(RIBCL.*)/>", r"<\1>", reply)
         try:
             doc = xml.dom.minidom.parseString(reply)
-        except xml.parsers.expat.ExpatError,msg:
+        except xml.parsers.expat.ExpatError as msg:
             fatal("malformed response: %s\n%s"%(msg,reply))
         rc = proc_f(doc)
         doc.unlink()
diff --git a/lib/plugins/stonith/ribcl.py.in b/lib/plugins/stonith/ribcl.py.in
index 0733bb24..f4e888b5 100644
--- a/lib/plugins/stonith/ribcl.py.in
+++ b/lib/plugins/stonith/ribcl.py.in
@@ -18,7 +18,7 @@
 
 import sys
 import socket
-from httplib import *
+from http.client import *
 from time import sleep
 
 
@@ -29,7 +29,7 @@ try:
         host = argv[1].split('.')[0]+'-rm'
         cmd = argv[2]
 except IndexError:
-        print "Not enough arguments"
+        print("Not enough arguments")
         sys.exit(1)
 
 
@@ -63,10 +63,10 @@ try:
         if cmd == 'reset' and host.startswith('gfxcl'):
                 acmds.append(login + todo['off'] + logout)
                 acmds.append(login + todo['on'] + logout)
-        else:   
+        else:
                 acmds.append(login + todo[cmd] + logout)
 except KeyError:
-        print "Invalid command: "+ cmd
+        print("Invalid command: " + cmd)
         sys.exit(1)
 
 
@@ -88,13 +88,13 @@ try:
                 sleep(1)
 
 
-except socket.gaierror, msg:
-        print msg
+except socket.gaierror as msg:
+        print(msg)
         sys.exit(1)
-except socket.sslerror, msg:
-        print msg
+except socket.sslerror as msg:
+        print(msg)
         sys.exit(1)
-except socket.error, msg:
-        print msg
+except socket.error as msg:
+        print(msg)
         sys.exit(1)
 
-- 
2.15.0

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.YgdPJ2/_old  2017-11-30 12:39:07.167600623 +0100
+++ /var/tmp/diff_new_pack.YgdPJ2/_new  2017-11-30 12:39:07.167600623 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">git://github.com/ClusterLabs/cluster-glue.git</param>
-          <param 
name="changesrevision">bdd95fd0f89f31b19fa46ffa0ea3f5022ebcd858</param></service></servicedata>
+          <param 
name="changesrevision">609cc3866108464ee3f47ff4aeb47e01db31fee1</param></service></servicedata>
\ No newline at end of file

++++++ cluster-glue-1.0.12+v1.git.1501749673.bdd95fd0.tar.bz2 -> 
cluster-glue-1.0.12+v1.git.1511436818.71ae59fa.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cluster-glue-1.0.12+v1.git.1501749673.bdd95fd0/lib/plugins/stonith/external/ec2
 
new/cluster-glue-1.0.12+v1.git.1511436818.71ae59fa/lib/plugins/stonith/external/ec2
--- 
old/cluster-glue-1.0.12+v1.git.1501749673.bdd95fd0/lib/plugins/stonith/external/ec2
 2017-08-03 10:41:13.000000000 +0200
+++ 
new/cluster-glue-1.0.12+v1.git.1511436818.71ae59fa/lib/plugins/stonith/external/ec2
 2017-11-23 12:33:38.000000000 +0100
@@ -59,6 +59,12 @@
 
 : ${ec2_tag=${ec2_tag_default}}
 
+# Always invoke aws command with UTF-8 locale
+# to avoid issues when the tag contains non-ASCII
+# characters (bsc#1059171)
+LC_ALL=en_US.UTF-8
+export LC_ALL
+
 function usage()
 {
 cat <<EOF


Reply via email to