Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package virt-scenario for openSUSE:Factory checked in at 2023-06-20 16:48:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/virt-scenario (Old) and /work/SRC/openSUSE:Factory/.virt-scenario.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virt-scenario" Tue Jun 20 16:48:32 2023 rev:17 rq:1093807 version:2.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/virt-scenario/virt-scenario.changes 2023-06-14 16:32:49.555754069 +0200 +++ /work/SRC/openSUSE:Factory/.virt-scenario.new.15902/virt-scenario.changes 2023-06-20 16:48:41.179479683 +0200 @@ -1,0 +2,10 @@ +Mon Jun 19 16:54:38 UTC 2023 - Antoine Ginies <agin...@suse.com> + +- version 2.1.1: + * remove 'terminate' button in the scenario selection page + * storage window now preload previous data if they have been + already set + * improve encryption password checks + * cleanup some code + +------------------------------------------------------------------- Old: ---- virt-scenario-2.1.0.tar.gz New: ---- virt-scenario-2.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virt-scenario.spec ++++++ --- /var/tmp/diff_new_pack.SmfqLh/_old 2023-06-20 16:48:41.795483384 +0200 +++ /var/tmp/diff_new_pack.SmfqLh/_new 2023-06-20 16:48:41.803483433 +0200 @@ -20,7 +20,7 @@ %define pythons python3 Name: virt-scenario -Version: 2.1.0 +Version: 2.1.1 Release: 0 Summary: Tool to create XML guest configuration and prepare the host for a scenario License: GPL-3.0-or-later ++++++ virt-scenario-2.1.0.tar.gz -> virt-scenario-2.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/ChangeLog new/virt-scenario-2.1.1/ChangeLog --- old/virt-scenario-2.1.0/ChangeLog 2023-06-14 14:43:03.000000000 +0200 +++ new/virt-scenario-2.1.1/ChangeLog 2023-06-19 18:59:52.000000000 +0200 @@ -1,3 +1,38 @@ +2023-06-19 aginies + + update + + +2023-06-19 aginies + + version 2.1.1 + + +2023-06-19 aginies + + remove "terminate" button in scenario selection; Reload previous storage config in case of re-opening the dialog box + + +2023-06-19 aginies + + add a way to set default value in combobox + + +2023-06-19 aginies + + improve password checking + + +2023-06-19 aginies + + append machine type if not already present + + +2023-06-19 aginies + + remove obsolete LIST_MACHINETYPE + + 2023-06-13 aginies point to the right line diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/PKG-INFO new/virt-scenario-2.1.1/PKG-INFO --- old/virt-scenario-2.1.0/PKG-INFO 2023-06-14 14:43:03.000000000 +0200 +++ new/virt-scenario-2.1.1/PKG-INFO 2023-06-19 18:59:52.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: virt-scenario -Version: 2.1.0 +Version: 2.1.1 Summary: Virt-scenario Home-page: https://github.com/aginies/virt-scenario Author: Antoine Ginies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/setup.py new/virt-scenario-2.1.1/setup.py --- old/virt-scenario-2.1.0/setup.py 2023-06-12 19:52:43.000000000 +0200 +++ new/virt-scenario-2.1.1/setup.py 2023-06-19 18:46:13.000000000 +0200 @@ -164,7 +164,7 @@ setuptools.setup( name="virt-scenario", - version="2.1.0", + version="2.1.1", author="Antoine Ginies", author_email="agin...@suse.com", description="Virt-scenario", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/virt_scenario.egg-info/PKG-INFO new/virt-scenario-2.1.1/src/virt_scenario.egg-info/PKG-INFO --- old/virt-scenario-2.1.0/src/virt_scenario.egg-info/PKG-INFO 2023-06-14 14:43:03.000000000 +0200 +++ new/virt-scenario-2.1.1/src/virt_scenario.egg-info/PKG-INFO 2023-06-19 18:59:52.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: virt-scenario -Version: 2.1.0 +Version: 2.1.1 Summary: Virt-scenario Home-page: https://github.com/aginies/virt-scenario Author: Antoine Ginies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/virtscenario/__init__.py new/virt-scenario-2.1.1/src/virtscenario/__init__.py --- old/virt-scenario-2.1.0/src/virtscenario/__init__.py 2023-06-12 19:52:55.000000000 +0200 +++ new/virt-scenario-2.1.1/src/virtscenario/__init__.py 2023-06-19 18:46:32.000000000 +0200 @@ -29,5 +29,5 @@ import builtins builtins.__dict__["_"] = str -__version__ = "2.1.0" +__version__ = "2.1.1" print(" Version: "+__version__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/virtscenario/hypervisors.py new/virt-scenario-2.1.1/src/virtscenario/hypervisors.py --- old/virt-scenario-2.1.0/src/virtscenario/hypervisors.py 2023-06-13 13:09:08.000000000 +0200 +++ new/virt-scenario-2.1.1/src/virtscenario/hypervisors.py 2023-06-19 16:36:40.000000000 +0200 @@ -120,7 +120,8 @@ root = ET.fromstring(host) find_machine_type = root.findall('.//guest/arch/machine') for value in find_machine_type: - all_machine_type.append(value.text) + if value not in all_machine_type: + all_machine_type.append(value.text) return sorted(all_machine_type) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/virtscenario/qemulist.py new/virt-scenario-2.1.1/src/virtscenario/qemulist.py --- old/virt-scenario-2.1.0/src/virtscenario/qemulist.py 2023-06-12 17:06:12.000000000 +0200 +++ new/virt-scenario-2.1.1/src/virtscenario/qemulist.py 2023-06-19 16:38:35.000000000 +0200 @@ -20,21 +20,6 @@ OVMF_PATH = "/usr/share/qemu" OVMF_VARS = "/var/lib/libvirt/qemu/nvram" -# qemu-system-x86_64 -machine help -LIST_MACHINETYPE = ['microvm', 'xenfv-4.2', 'xenfv', 'xenfv-3.1', 'pc', 'pc-i440fx-6.2', - 'pc-i440fx-6.1', 'pc-i440fx-6.0', 'pc-i440fx-5.2', 'pc-i440fx-5.1', - 'pc-i440fx-5.0', 'pc-i440fx-4.2', 'pc-i440fx-4.1', 'pc-i440fx-4.0', - 'pc-i440fx-3.1', 'pc-i440fx-3.0', 'pc-i440fx-2.9', 'pc-i440fx-2.8', - 'pc-i440fx-2.7', 'pc-i440fx-2.6', 'pc-i440fx-2.5', 'pc-i440fx-2.4', - 'pc-i440fx-2.3', 'pc-i440fx-2.2', 'pc-i440fx-2.12', 'pc-i440fx-2.11', - 'pc-i440fx-2.10', 'pc-i440fx-2.1', 'pc-i440fx-2.0', 'pc-i440fx-1.7', - 'pc-i440fx-1.6', 'pc-i440fx-1.5', 'pc-i440fx-1.4', 'q35', 'pc-q35-6.2', - 'pc-q35-6.1', 'pc-q35-6.0', 'pc-q35-5.2', 'pc-q35-5.1', 'pc-q35-5.0', - 'pc-q35-4.2', 'pc-q35-4.1', 'pc-q35-4.0.1', 'pc-q35-4.0', 'pc-q35-3.1', - 'pc-q35-3.0', 'pc-q35-2.9', 'pc-q35-2.8', 'pc-q35-2.7', 'pc-q35-2.6', - 'pc-q35-2.5', 'pc-q35-2.4', 'pc-q35-2.12', 'pc-q35-2.11', 'pc-q35-2.10', - 'isapc'] - LIST_BOOTDEV = ['hd', 'cdrom', 'floppy', 'network'] DISK_CACHE = ['none', 'writeback', 'writethrough', 'unsafe', 'directsync'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/vsmygtk/__init__.py new/virt-scenario-2.1.1/src/vsmygtk/__init__.py --- old/virt-scenario-2.1.0/src/vsmygtk/__init__.py 2023-06-12 19:53:07.000000000 +0200 +++ new/virt-scenario-2.1.1/src/vsmygtk/__init__.py 2023-06-19 18:46:24.000000000 +0200 @@ -27,4 +27,4 @@ text_mdialog = "No connection to LibVirt, Exiting" gtk.dialog_message("Error!", text_mdialog) -__version__ = "2.1.0" +__version__ = "2.1.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/vsmygtk/gtkhelper.py new/virt-scenario-2.1.1/src/vsmygtk/gtkhelper.py --- old/virt-scenario-2.1.0/src/vsmygtk/gtkhelper.py 2023-06-06 13:53:27.000000000 +0200 +++ new/virt-scenario-2.1.1/src/vsmygtk/gtkhelper.py 2023-06-19 17:27:22.000000000 +0200 @@ -33,6 +33,16 @@ return selected_value return False +def set_combobox_value(widget, value): + """ + set a value in the combobox + """ + model = widget.get_model() + for index, item in enumerate(model): + if item[0] == value: + widget.set_active(index) + break + # https://developer-old.gnome.org/hig/stable/visual-layout.html.en def margin_left(widget): """ @@ -129,8 +139,6 @@ label.set_margin_left(18) return label - - def create_entry(data, halign): """ create entry diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-scenario-2.1.0/src/vsmygtk/main.py new/virt-scenario-2.1.1/src/vsmygtk/main.py --- old/virt-scenario-2.1.0/src/vsmygtk/main.py 2023-06-13 17:54:51.000000000 +0200 +++ new/virt-scenario-2.1.1/src/vsmygtk/main.py 2023-06-19 18:44:18.000000000 +0200 @@ -65,6 +65,7 @@ self.conf = conf self.STORAGE_DATA = {} self.STORAGE_DATA_REC = {} + self.password = self.password_check = "" self.liststore = self.userpathincaseof = self.mdialog = self.switch_expert = "" self.vfilechooser_conf = self.hfilechooser_conf = self.main_scenario = self.scenario_combobox = "" self.window_storage = self.main_svbox = self.combobox_disk_target = self.spinbutton_cluster = "" @@ -354,7 +355,7 @@ grid.set_column_homogeneous(True) label_title = gtk.create_label("Comparison table between user and recommended settings", Gtk.Align.START) - gtk.margin_top_left(label_title) + gtk.margin_top_left_right(label_title) label_info = gtk.create_label("Overwrite are from file:\n"+self.conffile+"\nor from Storage settings dialog box\n", Gtk.Align.START) label_info.set_line_wrap(True) @@ -410,15 +411,17 @@ #print("Force SEV mode: "+self.force_sev) #print("#found: "+str(self.get_n_pages())+ " pages") + self.commit() + self.update_buttons_state() # remove virt scenario config and hypervisor if not expert mode if page == self.get_nth_page(1) and self.expert == "off": # skip virtscenario page - self.set_page_complete(current_page, True) - self.next_page() + ###self.set_page_complete(current_page, True) + ###self.next_page() # skip hypervisor page - self.set_page_complete(current_page, True) - self.next_page() - self.commit() + ###self.set_page_complete(current_page, True) + ###self.next_page() + self.set_current_page(3) # check previous config file already exist if page > self.get_nth_page(4) and self.overwrite == "off": @@ -434,7 +437,7 @@ # after scenario check if secure vm and allow force SEV if page > self.get_nth_page(2): - self.commit() + ###self.commit() if self.selected_scenario != "securevm": # or self.expert == "off": #print("Bypassing force SEV page") if page == self.get_nth_page(4): @@ -606,7 +609,7 @@ self.main_scenario = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) self.append_page(self.main_scenario) #self.set_page_title(self.main_scenario, "Scenario Selection") - self.set_page_type(self.main_scenario, Gtk.AssistantPageType.CONTENT) + self.set_page_type(self.main_scenario, Gtk.AssistantPageType.PROGRESS) frame_scena = gtk.create_frame("Scenario") grid_scena = Gtk.Grid(column_spacing=12, row_spacing=6) @@ -668,6 +671,8 @@ self.scenario_combobox.connect("changed", self.on_scenario_changed) if self.scenario_combobox.get_active() != -1: self.set_page_complete(self.main_scenario, True) + else: + self.set_page_complete(self.main_scenario, False) def show_storage(self, _widget): """ PAGE storage""" @@ -792,10 +797,12 @@ label_password = gtk.create_label("Encryption Password", Gtk.Align.END) gtk.margin_left(label_password) self.entry_password = gtk.create_entry_password() + self.entry_password.connect("changed", self.on_password_changed) gtk.margin_right(self.entry_password) label_password_check = gtk.create_label("Confirm Password", Gtk.Align.END) gtk.margin_bottom_left(label_password_check) self.entry_password_check = gtk.create_entry_password() + self.entry_password_check.connect("changed", self.on_password_changed) gtk.margin_bottom_right(self.entry_password_check) self.text_expander = Gtk.Expander() gtk.margin_left(self.text_expander) @@ -826,48 +833,59 @@ grid_button = Gtk.Grid(column_spacing=12, row_spacing=6) grid_button.set_column_homogeneous(True) - ok_button = Gtk.Button.new_with_label("OK") - ok_button.set_halign(Gtk.Align.END) - gtk.margin_all(ok_button) - ok_button.connect("clicked", self.on_storage_ok_button_clicked) + self.ok_button = Gtk.Button.new_with_label("OK") + self.ok_button.set_halign(Gtk.Align.END) + gtk.margin_all(self.ok_button) + self.ok_button.connect("clicked", self.on_storage_ok_button_clicked) cancel_button = Gtk.Button.new_with_label("Cancel") cancel_button.set_halign(Gtk.Align.START) gtk.margin_all(cancel_button) cancel_button.connect("clicked", self.on_storage_cancel_button_clicked) grid_button.attach(cancel_button, 0, 0, 1, 1) - grid_button.attach(ok_button, 1, 0, 1, 1) + grid_button.attach(self.ok_button, 1, 0, 1, 1) ## STORAGE - ## pre load data - search_prealloc = self.STORAGE_DATA_REC['preallocation'] - search_in_comboboxtext(self.combobox_prealloc, search_prealloc) - ## set encryption - search_encryption = self.STORAGE_DATA_REC['encryption'] - search_in_comboboxtext(self.combobox_encryption, search_encryption) - if search_encryption == "on": - self.toggle_edit_focus("on", self.entry_password) - self.toggle_edit_focus("on", self.entry_password_check) - self.text_expander.set_expanded(True) - else: - self.toggle_edit_focus("off", self.entry_password) - self.toggle_edit_focus("off", self.entry_password_check) - self.text_expander.set_expanded(False) - self.window_storage.resize(400, 400) - ## set disk_cache - search_disk_cache = self.STORAGE_DATA_REC['disk_cache'] - search_in_comboboxtext(self.combobox_disk_cache, search_disk_cache) - ## set lazy_ref_count - search_lazyref = self.STORAGE_DATA_REC['lazy_refcounts'] - search_in_comboboxtext(self.combobox_lazyref, search_lazyref) - ## set cluster_size - cluster_size = self.STORAGE_DATA['cluster_size'] - self.spinbutton_cluster.set_value(int(cluster_size)) - ## set disk target - search_disk_target = self.STORAGE_DATA['disk_target'] - search_in_comboboxtext(self.combobox_disk_target, search_disk_target) - ## disk format - search_disk_format = self.STORAGE_DATA_REC['format'] - search_in_comboboxtext(self.combobox_disk_format, search_disk_format) + ## pre load data if laucnh first time + if self.show_storage_window == "off": + search_prealloc = self.STORAGE_DATA_REC['preallocation'] + search_in_comboboxtext(self.combobox_prealloc, search_prealloc) + ## set encryption + search_encryption = self.STORAGE_DATA_REC['encryption'] + search_in_comboboxtext(self.combobox_encryption, search_encryption) + if search_encryption == "on": + self.toggle_edit_focus("on", self.entry_password) + self.toggle_edit_focus("on", self.entry_password_check) + self.text_expander.set_expanded(True) + else: + self.toggle_edit_focus("off", self.entry_password) + self.toggle_edit_focus("off", self.entry_password_check) + self.text_expander.set_expanded(False) + self.window_storage.resize(400, 400) + ## set disk_cache + search_disk_cache = self.STORAGE_DATA_REC['disk_cache'] + search_in_comboboxtext(self.combobox_disk_cache, search_disk_cache) + ## set lazy_ref_count + search_lazyref = self.STORAGE_DATA_REC['lazy_refcounts'] + search_in_comboboxtext(self.combobox_lazyref, search_lazyref) + ## set cluster_size + cluster_size = self.STORAGE_DATA['cluster_size'] + self.spinbutton_cluster.set_value(int(cluster_size)) + ## set disk target + search_disk_target = self.STORAGE_DATA['disk_target'] + search_in_comboboxtext(self.combobox_disk_target, search_disk_target) + ## disk format + search_disk_format = self.STORAGE_DATA_REC['format'] + search_in_comboboxtext(self.combobox_disk_format, search_disk_format) + elif self.show_storage_window == "on": + gtk.set_combobox_value(self.combobox_prealloc, self.STORAGE_DATA['preallocation']) + gtk.set_combobox_value(self.combobox_encryption, self.STORAGE_DATA['encryption']) + gtk.set_combobox_value(self.combobox_disk_cache, self.STORAGE_DATA['disk_cache']) + gtk.set_combobox_value(self.combobox_lazyref, self.STORAGE_DATA['lazy_refcounts']) + gtk.set_combobox_value(self.combobox_disk_target, self.STORAGE_DATA['disk_target']) + gtk.set_combobox_value(self.combobox_disk_format, self.STORAGE_DATA['format']) + self.spinbutton_cluster.set_value(int(self.STORAGE_DATA['cluster_size'])) + self.entry_password.set_text(self.password) + self.entry_password_check.set_text(self.password_check) vbox_scfg.pack_start(grid_sto, False, False, 0) frame_scfg.add(vbox_scfg) @@ -1194,6 +1212,17 @@ self.entry_name.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, "emblem-error") self.set_page_complete(self.main_conf_vbox, False) + def on_password_changed(self, widget): + if self.entry_password.get_text() != "": + if self.entry_password.get_text() == self.entry_password_check.get_text(): + self.entry_password.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, "emblem-ok-symbolic") + self.entry_password_check.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, "emblem-ok-symbolic") + self.ok_button.set_sensitive(True) + else: + self.entry_password.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, "emblem-error") + self.entry_password_check.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, "emblem-error") + self.ok_button.set_sensitive(False) + def on_shv_changed(self, combo_box): """ handle selection of the hypervisor""" tree_iter = combo_box.get_active_iter() @@ -1202,7 +1231,7 @@ selected_item = model[tree_iter][0] print("Selected hypervisor: {}".format(selected_item)) self.hypervisor_name = selected_item - self.machine_list = self.hypervisor.get_all_machine_type() + self.machine_list = sorted(set(self.hypervisor.get_all_machine_type())) if not isinstance(self.scenario_combobox, str): self.scenario_combobox.set_active(-1) @@ -1247,11 +1276,14 @@ self.toggle_edit_focus("on", self.entry_password) self.toggle_edit_focus("on", self.entry_password_check) self.text_expander.set_expanded(True) - else: + if self.entry_password.get_text() == "": + self.ok_button.set_sensitive(False) + elif selected_item == "off": self.toggle_edit_focus("off", self.entry_password) self.toggle_edit_focus("off", self.entry_password_check) self.text_expander.set_expanded(False) self.window_storage.resize(400, 400) + self.ok_button.set_sensitive(True) def on_disk_format_changed(self, combo_box): """ some action are needed !"""