Hello community,

here is the log from the commit of package vm-install for openSUSE:Factory 
checked in at 2017-10-13 14:18:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vm-install (Old)
 and      /work/SRC/openSUSE:Factory/.vm-install.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vm-install"

Fri Oct 13 14:18:39 2017 rev:161 rq:533427 version:0.9.04

Changes:
--------
--- /work/SRC/openSUSE:Factory/vm-install/vm-install.changes    2017-09-20 
17:13:06.114084339 +0200
+++ /work/SRC/openSUSE:Factory/.vm-install.new/vm-install.changes       
2017-10-13 14:18:41.241370224 +0200
@@ -1,0 +2,11 @@
+Wed Oct 11 10:58:01 UTC 2017 - [email protected]
+
+- remove udchp on SLE15 only
+
+-------------------------------------------------------------------
+Mon Oct  9 17:07:15 MDT 2017 - [email protected]
+
+- PV PXE booting is broken under python 3 (bsc#1047602)
+- Version 0.9.04
+
+-------------------------------------------------------------------

Old:
----
  vm-install-0.9.03.tar.bz2

New:
----
  vm-install-0.9.04.tar.bz2

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

Other differences:
------------------
++++++ vm-install.spec ++++++
--- /var/tmp/diff_new_pack.bIyZdi/_old  2017-10-13 14:18:41.905341030 +0200
+++ /var/tmp/diff_new_pack.bIyZdi/_new  2017-10-13 14:18:41.909340854 +0200
@@ -28,12 +28,12 @@
 %endif
 # For directory ownership:
 BuildRequires:  yast2
-Version:        0.9.03
+Version:        0.9.04
 Release:        0
 Summary:        Tool to Define a Virtual Machine and Install Its Operating 
System
 License:        GPL-2.0
 Group:          System/Emulators/PC
-Source0:        %{name}-0.9.03.tar.bz2
+Source0:        %{name}-0.9.04.tar.bz2
 Source1:        vm-install.conf
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires:       dbus-1-python
@@ -46,7 +46,10 @@
 %else
 Requires:       virt-utils
 %endif
+# FATE324167: vm-install: remove deps on udhcp on SLE15
+%if 0%{?is_opensuse} && 0%{?suse_version} < 1500
 Requires:       udhcp
+%endif
 Requires:       usbutils
 Requires:       tftp(client)
 #%define pysite %(python3 -c "import distutils.sysconfig; 
print(distutils.sysconfig.get_python_lib())")

++++++ vm-install-0.9.03.tar.bz2 -> vm-install-0.9.04.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vm-install-0.9.03/Makefile 
new/vm-install-0.9.04/Makefile
--- old/vm-install-0.9.03/Makefile      2017-09-06 16:21:56.726685869 +0200
+++ new/vm-install-0.9.04/Makefile      2017-10-10 01:08:24.016683479 +0200
@@ -1,5 +1,5 @@
 PACKAGE = vm-install
-VER = 0.9.03
+VER = 0.9.04
 
 default:
        @echo "Run 'make install DESTDIR=$destdir' to install."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vm-install-0.9.03/setup.py 
new/vm-install-0.9.04/setup.py
--- old/vm-install-0.9.03/setup.py      2017-09-06 16:21:56.418697535 +0200
+++ new/vm-install-0.9.04/setup.py      2017-10-10 01:08:19.700847129 +0200
@@ -1,7 +1,7 @@
 from distutils.core import setup
 
 setup(name='vminstall',
-      version='0.9.03',
+      version='0.9.04',
       description='Define a virtual machine and install its operating system',
       author='Charles Coffing',
       author_email='[email protected]',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vm-install-0.9.03/src/vminstall/VMPXE.py 
new/vm-install-0.9.04/src/vminstall/VMPXE.py
--- old/vm-install-0.9.03/src/vminstall/VMPXE.py        2017-07-07 
00:53:28.089793091 +0200
+++ new/vm-install-0.9.04/src/vminstall/VMPXE.py        2017-10-10 
01:04:11.058274718 +0200
@@ -19,7 +19,11 @@
 import stat
 import tempfile
 import urlgrabber.grabber as grabber
-import subprocess,sys,getopt,tempfile,shutil
+import subprocess
+import sys
+import getopt
+import tempfile
+import shutil
 
 from .VMLinux import VMLinux
 from .exceptions import *
@@ -57,24 +61,36 @@
     if (nics is not None and nics[0].bridge is not None):
         bridge = nics[0].bridge
     else:
-        rfd = os.popen("/sbin/brctl show")
+        if os.path.exists('/usr/sbin/bridge'):
+            brctl_cmd = '/usr/sbin/bridge link show'
+            legacy = False
+        else:
+            brctl_cmd = '/usr/sbin/brctl show'
+            legacy = True
+        rfd = os.popen(brctl_cmd)
         data = rfd.read()
         status = rfd.close()
-        lines = data.splitlines()[1:]
+        if legacy is True:
+            lines = data.splitlines()[1:]
+        else:
+            lines = data.splitlines()[0:]
         if not lines:
             raise PXEError(PXEError.E_NO_BRIDGE)
         line1 = lines[0]
         words = line1.split()
-        bridge = words[0]
+        if legacy is True:
+            bridge = words[0]
+        else:
+            bridge = words[9]
 
     log.debug("getServAddr: bridge: %s " % (bridge))
-    udhcp_result=subprocess.getstatusoutput(udhcpc_command +
-                               " -i " + bridge +
-                               " -n -q -s " + udhcpc_script)
-
-    if (udhcp_result[0] != 0):
+    full_cmd = [udhcpc_command, "-i", bridge, "-n", "-q", "-s", udhcpc_script]
+    try:
+        udhcp_result=subprocess.check_output(full_cmd, 
universal_newlines=True, stderr=subprocess.STDOUT)
+    except Exception as e:
         raise PXEError(PXEError.E_NO_SERVER)
-    udhcplines=udhcp_result[1].split('\n')
+
+    udhcplines=udhcp_result.split('\n')
     dhcpinfo={}
     for line in udhcplines:
         s = line.strip()
@@ -197,12 +213,15 @@
             raise e
         os.chdir(vminstall.paths.imagedir)
         if tftp_flag is True:
-            commandstr="tftp "+servaddr+" -c get pxelinux.cfg/default"
+            commandstr=["tftp", servaddr, "-c", "get", "pxelinux.cfg/default", 
"/dev/stdout"]
         else:
-            commandstr="atftp -g -r pxelinux.cfg/default -l default " + 
servaddr
+            commandstr=["atftp", "-g", "-r", "pxelinux.cfg/default", "-l", 
"default", servaddr]
         cfgfilename="default"
-        getpxeres=subprocess.getstatusoutput(commandstr)
-        if not tftp_success(getpxeres) or not os.path.exists(cfgfilename):
+        try:
+            getpxeres=subprocess.check_output(commandstr, 
universal_newlines=True, stderr=subprocess.STDOUT)
+        except Exception as e:
+            raise PXEError(PXEError.E_NO_SERVER)
+        if not os.path.exists(cfgfilename):
             raise PXEError(PXEError.E_NO_CONFIG)
         cfgfile=open(cfgfilename)
         cfglines=cfgfile.readlines()
@@ -249,23 +268,37 @@
         log.debug('k/i: %s, %s'% (kernel_list[options.pxe_label], 
initrd_list[options.pxe_label]))
         for i in [kernel_list[options.pxe_label], 
initrd_list[options.pxe_label]]:
             if tftp_flag is True:
-                cmd="tftp "+servaddr+" -c get "+ i + " " + 
os.path.basename(i)+ "." + str(os.getpid())
+                output_name=os.path.basename(i) + "." + str(os.getpid())
+                cmd=["tftp", servaddr, "-c", "get", i, output_name]
             else:
-                cmd="atftp -g -r " + i + " -l " + os.path.basename(i) + "." + 
str(os.getpid()) + " " + servaddr
-            dlres[i]=subprocess.getstatusoutput(cmd)
-            if not tftp_success (dlres[i]):
+                output_name=os.path.basename(i) + "." + str(os.getpid())
+                cmd=["atftp", "-g", "-r",  i,  "-l", output_name, servaddr]
+            try:
+                dlres[i]=subprocess.check_output(cmd, universal_newlines=True, 
stderr=subprocess.STDOUT)
+            except Exception as e:
                 success=0
+                raise PXEError(PXEError.E_NO_KERNEL)
+            success=1
 
         if success == 1:
             self.kfn = 
vminstall.paths.imagedir+os.path.basename(kernel_list[options.pxe_label])+"."+str(os.getpid())
             self.ifn = 
vminstall.paths.imagedir+os.path.basename(initrd_list[options.pxe_label])+"."+str(os.getpid())
-            cmd = "kdumptool read_ikconfig '" + self.kfn + "' | grep 
'^CONFIG_X86_\(64_\)\?XEN=y'"
-            if subprocess.getstatusoutput(cmd)[0] != 0:
+            cmd_config = ["kdumptool", "read_ikconfig", self.kfn]
+            try:
+                kernel_out=subprocess.check_output(cmd_config, 
universal_newlines=True, stderr=subprocess.STDOUT)
+            except Exception as e:
+                raise PXEError(PXEError.E_NO_KERNEL)
+            lines=kernel_out.split('\n')
+            success=0
+            for line in lines:
+                if re.match("CONFIG_X86_.*_XEN=y", line):
+                    success=1
+                    break
+            if success == 0:
                 # The downloaded kernel is not xen-enabled
                 log.debug("Kernel provided by PXE is not xen-enabled.")
                 os.unlink(self.kfn)
                 os.unlink(self.ifn)
-                success=0
 
         if success == 1:
             log.debug("Using installation kernel/initrd provided by PXE: %s 
%s" % (self.kfn, self.ifn))


Reply via email to