Hello community, here is the log from the commit of package vm-install for openSUSE:Factory checked in at 2015-01-30 11:00:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vm-install (Old) and /work/SRC/openSUSE:Factory/.vm-install.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vm-install" Changes: -------- --- /work/SRC/openSUSE:Factory/vm-install/vm-install.changes 2014-11-28 08:45:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.vm-install.new/vm-install.changes 2015-01-30 11:00:34.000000000 +0100 @@ -1,0 +2,30 @@ +Thu Jan 29 06:50:12 MST 2015 - cy...@suse.com + +- bnc#915102 - vm-install is broken +- Version 0.8.38 + +------------------------------------------------------------------- +Thu Jan 22 14:28:35 MST 2015 - carn...@suse.com + +- bnc#857916 - keymap option not passed to xen vm +- Version 0.8.37 + +------------------------------------------------------------------- +Thu Jan 21 09:31:12 MST 2015 - carn...@suse.com + +- bnc#913744 - DomU upgrade from SLES 11 SP3 to SLES 12 using + installation source doesn't give you the option to upgrade +- Version 0.8.36 + +------------------------------------------------------------------- +Mon Jan 19 17:25:32 MST 2015 - carn...@suse.com + +- Fix get_running_vms parsing for libvirt managed VMs. + +------------------------------------------------------------------- +Thu Dec 11 12:26:18 MST 2014 - carn...@suse.com + +- Use grub.xen to boot os13.2 PV guests +- Version 0.8.35 + +------------------------------------------------------------------- Old: ---- vm-install-0.8.34.tar.bz2 New: ---- vm-install-0.8.38.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vm-install.spec ++++++ --- /var/tmp/diff_new_pack.KVTITw/_old 2015-01-30 11:00:36.000000000 +0100 +++ /var/tmp/diff_new_pack.KVTITw/_new 2015-01-30 11:00:36.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package vm-install # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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 @@ -27,12 +27,12 @@ %endif # For directory ownership: BuildRequires: yast2 -Version: 0.8.34 +Version: 0.8.38 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.8.34.tar.bz2 +Source0: %{name}-0.8.38.tar.bz2 Source1: vm-install.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 s390x ppc64le ++++++ vm-install-0.8.34.tar.bz2 -> vm-install-0.8.38.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/Makefile new/vm-install-0.8.38/Makefile --- old/vm-install-0.8.34/Makefile 2014-11-20 22:11:12.000000000 +0100 +++ new/vm-install-0.8.38/Makefile 2015-01-29 14:52:17.000000000 +0100 @@ -1,5 +1,5 @@ PACKAGE = vm-install -VER = 0.8.34 +VER = 0.8.38 default: @echo "Run 'make install DESTDIR=$destdir' to install." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/setup.py new/vm-install-0.8.38/setup.py --- old/vm-install-0.8.34/setup.py 2014-11-20 22:11:06.000000000 +0100 +++ new/vm-install-0.8.38/setup.py 2015-01-29 14:52:14.000000000 +0100 @@ -1,7 +1,7 @@ from distutils.core import setup setup(name='vminstall', - version='0.8.34', + version='0.8.38', description='Define a virtual machine and install its operating system', author='Charles Coffing', author_email='ccoff...@novell.com', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vmdisks/disks.py new/vm-install-0.8.38/src/vmdisks/disks.py --- old/vm-install-0.8.34/src/vmdisks/disks.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vmdisks/disks.py 2015-01-22 18:36:10.000000000 +0100 @@ -509,6 +509,8 @@ virtio=True except: continue + elif arg.startswith('xvd') and vminstall.caps.is_xen(): + vdev = arg elif arg is '': # Empty string assumes default continue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/ParaVirtGuest.py new/vm-install-0.8.38/src/vminstall/ParaVirtGuest.py --- old/vm-install-0.8.34/src/vminstall/ParaVirtGuest.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vminstall/ParaVirtGuest.py 2015-01-20 01:24:35.000000000 +0100 @@ -379,6 +379,7 @@ ramdisk = ',%s' % self.runtime['initrd'] if self.options.os_type == "sles12" or \ self.options.os_type == "sled12" or \ + self.options.os_type == "opensuse13" or \ self.options.os_type == "rhel7": return [ "<os type='%s'>" % self.options.os_type, [ '<type>linux</type>', @@ -439,6 +440,7 @@ ramdisk = ',%s' % self.runtime['initrd'] if self.options.os_type == "sles12" or \ self.options.os_type == "sled12" or \ + self.options.os_type == "opensuse13" or \ self.options.os_type == "rhel7": return """builder="linux" #bootargs="" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/gtk/interface.py new/vm-install-0.8.38/src/vminstall/gtk/interface.py --- old/vm-install-0.8.34/src/vminstall/gtk/interface.py 2014-11-20 21:52:10.000000000 +0100 +++ new/vm-install-0.8.38/src/vminstall/gtk/interface.py 2015-01-29 14:47:18.000000000 +0100 @@ -1441,6 +1441,8 @@ log.debug("Validation failed: VM must not be running for an upgrade") self._exc_box(VmError(err=VmError.E_VM_RUNNING)) return + if self.options.os_type in ('sles12', 'sled12'): + self.options.extra_args = "upgrade=1" # Initialize the internal data from the config file. Do this before calling calculate try: vminstall.options.initialize_vm_from_config_file(self.options, vm_name) @@ -2228,6 +2230,7 @@ def run(job, options, defaults): gtk.gdk.threads_init() + gtk.gdk.threads_enter() assert(not options.background) window = VMCreate(job, options, defaults) window.topwin.connect("delete-event", gtk.main_quit) @@ -2236,4 +2239,5 @@ if not options.debug: warnings.simplefilter('ignore', Warning) gtk.main() + gtk.gdk.threads_leave() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/job.py new/vm-install-0.8.38/src/vminstall/job.py --- old/vm-install-0.8.34/src/vminstall/job.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vminstall/job.py 2015-01-22 18:37:21.000000000 +0100 @@ -541,59 +541,46 @@ def _parse_xml(self, f, lines): kernel_found = 0 + initrd_found = 0 + cmdline_found = 0 + on_reboot_found = 0 + os_end_found = 0 bootloader_found = 0 bootloader_args_found = 0 - ramdisk_found = 0 - args_found = 0 - on_reboot_found = 0 for line in lines: while True: + if not os_end_found: + index = line.find("</os>") + if index != -1: + os_end_found = 1 + initrd_str = "" + cmdline_str = "" + kernel_str = "" + if not kernel_found: + kernel_str = " <kernel>" + self.guest.kernel + "</kernel>\n" + kernel_found = 1 + if not initrd_found: + initrd_str = " <initrd>" + self.guest.initrd + "</initrd>\n" + initrd_found = 1 + if not cmdline_found: + cmdline_str = " <cmdline> install=" + self.guest.options.source + if self.guest.options.extra_args: + cmdline_str = cmdline_str + " " + self.guest.options.extra_args + cmdline_str = cmdline_str + "</cmdline>\n" + cmdline_found = 1 + line = kernel_str + initrd_str + cmdline_str + line + continue if not kernel_found: index = line.find("<kernel>") if index != -1: kernel_found = 1 _line = line[0:index] - new = " <kernel>" + self.guest.kernel + "</kernel>\n" - if not ramdisk_found: - new = new + " <initrd>" + self.guest.initrd + "</initrd>\n" - ramdisk_found = 1 - _line = _line + new - end = len(line) - (index,found) = self._find_closing_brace(line, index, end) - line = _line + line[index:end] - continue - if not bootloader_found: - index = line.find("<bootloader>") - if index != -1: - bootloader_found = 1 - end = len(line) - (end,found) = self._find_closing_brace(line, index, end) - sep = line[index:end] - (a,b,c) = self._partition_line(line, sep) - if c.strip(" \n") == "" and a.strip(" ") == "": - c = "" - if a.strip(" ") == "": - a = "" - line = a + c - continue - if not bootloader_args_found: - index = line.find("<bootloader_args>") - if index != -1: - bootloader_args_found = 1 - end = len(line) - (end,found) = self._find_closing_brace(line, index, end) - sep = line[index:end] - (a,b,c) = self._partition_line(line, sep) - if c.strip(" \n") == "" and a.strip(" ") == "": - c = "" - if a.strip(" ") == "": - a = "" - line = a + c + line = _line + "<kernel>" + self.guest.kernel + "</kernel>\n" continue - if not ramdisk_found: + if not initrd_found: index = line.find("<initrd>") if index != -1: - ramdisk_found = 1 + initrd_found = 1 end = len(line) (end,found) = self._find_closing_brace(line, index, end) sep = line[index:end] @@ -604,22 +591,19 @@ new = " <initrd>" + self.guest.initrd + "</initrd>\n" line = a + new + c continue - if not args_found: + if not cmdline_found: index = line.find("<cmdline>") if index != -1: - args_found = 1 + cmdline_found = 1 end = len(line) (end,found) = self._find_closing_brace(line, index, end) sep = line[index:end] - (a,b,c) = self._partition_line(line, sep) - args_line = " <cmdline>\' install=" + self.guest.options.source + sep = line[index:end] + args_line = " <cmdline> install=" + self.guest.options.source if self.guest.options.extra_args: args_line = args_line + " " + self.guest.options.extra_args - if found: - new = args_line + "\'</cmdline>\n" - else: - new = args_line + "\'</cmdline>\n" - line = a + new + c + new = args_line + "</cmdline>\n" + line = new continue if not on_reboot_found: index = line.find("<on_reboot>") @@ -635,6 +619,20 @@ new = "<on_reboot>destroy</on_reboot>" line = a + new + c continue + if not bootloader_found: + index = line.find("<bootloader>") + if index != -1: + # We don't want this set for upgrading + bootloader_found = 1 + line = "" + continue + if not bootloader_args_found: + index = line.find("<bootloader_args>") + if index != -1: + # We don't want this set for upgrading + bootloader_args_found = 1 + line = "" + continue f.write(line) break @@ -658,6 +656,9 @@ log.debug('Error: Creating temporary configuration files for upgrading has failed') raise InstSrcError(err=InstSrcError.E_CONFIG) f = open(fname, "w+") + is_xml = 0 + if lines[0].startswith("<domain type='xen'>") or lines[0].startswith("<?xml"): + is_xml = 1 if self._options.upgrade_managed_vm: if util.is_xend_running(): @@ -665,28 +666,33 @@ else: self._parse_xml(f, lines) else: - for line in lines: - # This is a legacy config file format - value = line[:-1].split('=', 1)[1] - value = value.strip('"') - vname = line[:-1].split('=', 1)[0] - vname = vname.strip(" ") - if vname == 'on_reboot': - line = "on_reboot=\"destroy\"\n" - elif vname == 'extra': - if self.guest.options.extra_args: - line = "extra=\"install=" + self.guest.options.source + " " + self.guest.options.extra_args + "\"\n" - else: - line = "extra=\"install=" + self.guest.options.source + "\"\n" - elif vname == 'bootloader': - line = "kernel=\"" + self.guest.kernel + "\"\n" - f.write(line) - line = "ramdisk=\"" + self.guest.initrd + "\"\n" + if is_xml: + self._parse_xml(f, lines) + else: + for line in lines: + # This is a legacy config file format + if not line.strip(): + continue + value = line[:-1].split('=', 1)[1] + value = value.strip('"') + vname = line[:-1].split('=', 1)[0] + vname = vname.strip(" ") + if vname == 'on_reboot': + line = "on_reboot=\"destroy\"\n" + elif vname == 'extra': + if self.guest.options.extra_args: + line = "extra=\"install=" + self.guest.options.source + " " + self.guest.options.extra_args + "\"\n" + else: + line = "extra=\"install=" + self.guest.options.source + "\"\n" + elif vname == 'bootloader': + line = "kernel=\"" + self.guest.kernel + "\"\n" + f.write(line) + line = "ramdisk=\"" + self.guest.initrd + "\"\n" + f.write(line) + continue + elif vname == 'bootargs': + continue f.write(line) - continue - elif vname == 'bootargs': - continue - f.write(line) f.close() self.guest.options.upgrade_config = fname log.debug('Temporary configuration file for upgrading = %s' % fname) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/keytable.py new/vm-install-0.8.38/src/vminstall/keytable.py --- old/vm-install-0.8.34/src/vminstall/keytable.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vminstall/keytable.py 2015-01-22 22:25:18.000000000 +0100 @@ -88,9 +88,12 @@ kt = s.split('"')[1] if ".map.gz" in kt: kt = kt.rstrip(".map.gz") + if kt == "": + # If KEYTABLE="" then 'us' is implied + kt = "us" if keytable.has_key(kt): keymap = keytable[kt] - f.close + f.close() return keymap def read_keymaps(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/options.py new/vm-install-0.8.38/src/vminstall/options.py --- old/vm-install-0.8.34/src/vminstall/options.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vminstall/options.py 2015-01-22 18:37:37.000000000 +0100 @@ -873,9 +873,14 @@ log.debug('Error reading configuration file for %s' % vm_name) raise InstSrcError(err=InstSrcError.E_CONFIG) if not util.is_xend_running(): - xml.merge(fname, options) - os.unlink(fname) - return + if lines[0].startswith("<domain type='xen'>") or lines[0].startswith("<?xml"): + save_os_type = options.os_type + save_extra_args = options.extra_args + xml.merge(fname, options) + options.extra_args = save_extra_args + options.os_type = save_os_type + os.unlink(fname) + return os.unlink(fname) extra_args = options.extra_args options.disks = None @@ -957,6 +962,8 @@ value = value[1].strip('\' ') else: # This is a legacy config file format + if not line.strip(): + continue value = line[:-1].split('=', 1)[1] value = value.strip('"') vname = line[:-1].split('=', 1)[0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/util.py new/vm-install-0.8.38/src/vminstall/util.py --- old/vm-install-0.8.34/src/vminstall/util.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vminstall/util.py 2015-01-22 18:37:50.000000000 +0100 @@ -313,10 +313,11 @@ use_virsh = True data = rfd.read() status = rfd.close() - lines = data.splitlines()[1:] - # Remove 'Domain-0' if not use_virsh: lines.pop(0) + lines = data.splitlines()[1:] + else: + lines = data.splitlines() for line in lines: if line is '' or line[0] in (' ', '\t'): continue @@ -362,7 +363,6 @@ if is_xend_running(): os.system("/usr/sbin/xm list -l %s > %s" % (vm_name, fname)) else: - # FIXME: This does not output sxp format so calling code will fail parsing it os.system("/usr/bin/virsh dumpxml %s > %s" % (vm_name, fname)) if not os.path.exists(fname): return (None, None, None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.34/src/vminstall/xen_guest.py new/vm-install-0.8.38/src/vminstall/xen_guest.py --- old/vm-install-0.8.34/src/vminstall/xen_guest.py 2014-10-23 16:05:17.000000000 +0200 +++ new/vm-install-0.8.38/src/vminstall/xen_guest.py 2015-01-22 23:49:20.000000000 +0100 @@ -347,9 +347,9 @@ def _get_keymap_xml(self): ret = [] - keymap = keytable.get_keymap(self.options.keymap) - if keymap != None: - ret = ['<keymap>%s</keymap>' % keymap] + #keymap = keytable.get_keymap(self.options.keymap) + #if keymap != None: + # ret = ['<keymap>%s</keymap>' % keymap] return ret def _get_keymap_xen(self): @@ -370,6 +370,9 @@ ret += " port='%d'" %(self.options.vncport,) if self.options.vnc_password: ret += " password='%s'" %(self.options.vnc_password,) + keymap = keytable.get_keymap(self.options.keymap) + if keymap != None: + ret += " keymap='%s'" %(keymap,) ret += '/>' elif self.options.graphics_viewer == 'sdl': ret = "<graphics type='sdl'/>" -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org