virt-manager/virtman-python2-to-python3-conversion.patch
Charles Arnold 1a980429d2 - bsc#1140211 - VUL-1: CVE-2019-10183: virt-manager: unattended
option leaks password via command line argument
  58c68764-unattended-Read-the-passwords-from-a-file.patch
  51d28f04-unattended-Dont-log-user-admin-passwords.patch
- Upstream bug fix (bsc#1027942)
  5312a961-virt-install-Revive-wait-0-as-alias-for-noautoconsole.patch

- Update to virt-manager 2.2.0 (fate#326786)
  virt-manager-2.2.0.tar.bz2
  *  libvirt XML viewing and editing UI for new and existing domain, pools, volumes, networks
  *  virt-install: libosinfo –unattended support (Fabiano Fidêncio, Cole Robinson)
  *  Improve CPU model security defaults (Pavel Hrdina)
  *  virt-install: new –install option. Ex: virt-install –install fedora29
  *  virt-install: new –install kernel=,initrd=
  *  virt-install: –disk, –memory, –name defaults from libosinfo (Fabiano Fidêncio, Cole Robinson)
  *  virt-install: add device suboption aliases which consistently match libvirt XML naming
  *  virt-xml: new –start, –no-define options (Marc Hartmayer)
  *  virt-install: Add driver_queues argument to –controller (Vasudeva Kamath)
  *  RISC-V support (Andrea Bolognani)
  *  Device default improvements for non-x86 KVM (Andrea Bolognani)
  *  Redesigned ‘New Network’ wizard
  *  libguestfs inspection improvements (Pino Toscano)
  *  virt-install: Add support for xenbus controller (Jim Fehlig)
  *  cli: Add –disk wwn=,rawio= (Athina Plaskasoviti)
  *  cli: Add –memballoon autodeflate=,stats.period= (Athina Plaskasoviti)
  *  cli: Add –iothreads (Athina Plaskasoviti)
  *  cli: Add –numatune memory.placement (Athina Plaskasoviti)
  *  cli: Add –launchSecurity option (Erik Skultety)
  *  cli: Fill in –memorybacking options
  *  cli: –smartcard: support database= and certificate[0-9]*=

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=476
2019-07-03 18:19:42 +00:00

251 lines
8.8 KiB
Diff

Index: virt-manager-2.2.0/virt-manager
===================================================================
--- virt-manager-2.2.0.orig/virt-manager
+++ virt-manager-2.2.0/virt-manager
@@ -66,7 +66,7 @@ def _import_gtk(leftovers):
print("gtk3 3.22.0 or later is required.")
sys.exit(1)
- if os.environ.has_key('DISPLAY') and os.environ['DISPLAY']:
+ if 'DISPLAY' in os.environ and os.environ['DISPLAY']:
# This will error if Gtk wasn't correctly initialized
Gtk.Window()
else:
Index: virt-manager-2.2.0/virtManager/details/console.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/details/console.py
+++ virt-manager-2.2.0/virtManager/details/console.py
@@ -21,7 +21,7 @@ from ..vmwindow import DETAILS_PAGE_CONS
(_CONSOLE_PAGE_UNAVAILABLE,
_CONSOLE_PAGE_AUTHENTICATE,
_CONSOLE_PAGE_SERIAL,
- _CONSOLE_PAGE_VIEWER) = range(4)
+ _CONSOLE_PAGE_VIEWER) = list(range(4))
class _TimedRevealer(vmmGObject):
Index: virt-manager-2.2.0/virtManager/connection.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/connection.py
+++ virt-manager-2.2.0/virtManager/connection.py
@@ -159,7 +159,7 @@ class vmmConnection(vmmGObject):
(_STATE_DISCONNECTED,
_STATE_CONNECTING,
- _STATE_ACTIVE) = range(1, 4)
+ _STATE_ACTIVE) = list(range(1, 4))
def __init__(self, uri):
self._uri = uri
Index: virt-manager-2.2.0/virtManager/addhardware.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/addhardware.py
+++ virt-manager-2.2.0/virtManager/addhardware.py
@@ -44,7 +44,7 @@ from .xmleditor import vmmXMLEditor
PAGE_TPM,
PAGE_RNG,
PAGE_PANIC,
- PAGE_VSOCK) = range(17)
+ PAGE_VSOCK) = list(range(17))
def _build_combo(combo, values, default_value=None, sort=True):
Index: virt-manager-2.2.0/virtManager/details/snapshots.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/details/snapshots.py
+++ virt-manager-2.2.0/virtManager/details/snapshots.py
@@ -55,7 +55,7 @@ def _make_screenshot_pixbuf(mime, sdata)
def _mime_to_ext(val, reverse=False):
- for m, e in mimemap.items():
+ for m, e in list(mimemap.items()):
if val == m and not reverse:
return e
if val == e and reverse:
Index: virt-manager-2.2.0/virtManager/engine.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/engine.py
+++ virt-manager-2.2.0/virtManager/engine.py
@@ -22,7 +22,7 @@ from .lib.inspection import vmmInspectio
from .systray import vmmSystray
(PRIO_HIGH,
- PRIO_LOW) = range(1, 3)
+ PRIO_LOW) = list(range(1, 3))
def _show_startup_error(fn):
Index: virt-manager-2.2.0/virtManager/device/mediacombo.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/device/mediacombo.py
+++ virt-manager-2.2.0/virtManager/device/mediacombo.py
@@ -22,7 +22,7 @@ class vmmMediaCombo(vmmGObjectUI):
(MEDIA_FIELD_PATH,
MEDIA_FIELD_LABEL,
MEDIA_FIELD_HAS_MEDIA,
- MEDIA_FIELD_KEY) = range(MEDIA_FIELDS_NUM)
+ MEDIA_FIELD_KEY) = list(range(MEDIA_FIELDS_NUM))
def __init__(self, conn, builder, topwin):
vmmGObjectUI.__init__(self, None, None, builder=builder, topwin=topwin)
Index: virt-manager-2.2.0/virtManager/manager.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/manager.py
+++ virt-manager-2.2.0/virtManager/manager.py
@@ -33,7 +33,7 @@ ROW_IS_CONN_CONNECTED,
ROW_IS_VM,
ROW_IS_VM_RUNNING,
ROW_COLOR,
-ROW_INSPECTION_OS_ICON) = range(11)
+ROW_INSPECTION_OS_ICON) = list(range(11))
# Columns in the tree view
(COL_NAME,
@@ -41,7 +41,7 @@ COL_GUEST_CPU,
COL_HOST_CPU,
COL_MEM,
COL_DISK,
-COL_NETWORK) = range(6)
+COL_NETWORK) = list(range(6))
def _style_get_prop(widget, propname):
Index: virt-manager-2.2.0/virtManager/device/addstorage.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/device/addstorage.py
+++ virt-manager-2.2.0/virtManager/device/addstorage.py
@@ -108,7 +108,7 @@ class vmmAddStorage(vmmGObjectUI):
errmsg = _("Errors were encountered changing permissions for the "
"following directories:")
details = ""
- for p, error in errors.items():
+ for p, error in list(errors.items()):
if p not in broken_paths:
continue
details += "%s : %s\n" % (p, error)
Index: virt-manager-2.2.0/virtManager/details/details.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/details/details.py
+++ virt-manager-2.2.0/virtManager/details/details.py
@@ -104,7 +104,7 @@ from ..xmleditor import vmmXMLEditor
EDIT_FS,
- EDIT_HOSTDEV_ROMBAR) = range(1, 59)
+ EDIT_HOSTDEV_ROMBAR) = list(range(1, 59))
# Columns in hw list model
@@ -112,7 +112,7 @@ from ..xmleditor import vmmXMLEditor
HW_LIST_COL_ICON_NAME,
HW_LIST_COL_TYPE,
HW_LIST_COL_DEVICE,
- HW_LIST_COL_KEY) = range(5)
+ HW_LIST_COL_KEY) = list(range(5))
# Types for the hw list model: numbers specify what order they will be listed
(HW_LIST_TYPE_GENERAL,
@@ -137,7 +137,7 @@ from ..xmleditor import vmmXMLEditor
HW_LIST_TYPE_TPM,
HW_LIST_TYPE_RNG,
HW_LIST_TYPE_PANIC,
- HW_LIST_TYPE_VSOCK) = range(23)
+ HW_LIST_TYPE_VSOCK) = list(range(23))
remove_pages = [HW_LIST_TYPE_NIC, HW_LIST_TYPE_INPUT,
HW_LIST_TYPE_GRAPHICS, HW_LIST_TYPE_SOUND, HW_LIST_TYPE_CHAR,
@@ -152,7 +152,7 @@ remove_pages = [HW_LIST_TYPE_NIC, HW_LIS
BOOT_LABEL,
BOOT_ICON,
BOOT_ACTIVE,
- BOOT_CAN_SELECT) = range(5)
+ BOOT_CAN_SELECT) = list(range(5))
def _calculate_disk_bus_index(disklist):
Index: virt-manager-2.2.0/virtManager/createvm.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/createvm.py
+++ virt-manager-2.2.0/virtManager/createvm.py
@@ -40,7 +40,7 @@ DEFAULT_MEM = 1024
PAGE_INSTALL,
PAGE_MEM,
PAGE_STORAGE,
- PAGE_FINISH) = range(5)
+ PAGE_FINISH) = list(range(5))
(INSTALL_PAGE_ISO,
INSTALL_PAGE_URL,
@@ -48,13 +48,13 @@ DEFAULT_MEM = 1024
INSTALL_PAGE_IMPORT,
INSTALL_PAGE_CONTAINER_APP,
INSTALL_PAGE_CONTAINER_OS,
- INSTALL_PAGE_VZ_TEMPLATE) = range(7)
+ INSTALL_PAGE_VZ_TEMPLATE) = list(range(7))
# Column numbers for os type/version list models
(OS_COL_ID,
OS_COL_LABEL,
OS_COL_IS_SEP,
- OS_COL_IS_SHOW_ALL) = range(4)
+ OS_COL_IS_SHOW_ALL) = list(range(4))
#####################
@@ -2127,7 +2127,7 @@ class vmmCreateVM(vmmGObjectUI):
'insecure': self._get_config_oscontainer_isecure,
'root_password': self._get_config_oscontainer_root_password,
}
- for key, getter in bootstrap_arg_keys.items():
+ for key, getter in list(bootstrap_arg_keys.items()):
bootstrap_args[key] = getter()
parentobj = self._customize_window or self
Index: virt-manager-2.2.0/virtManager/preferences.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/preferences.py
+++ virt-manager-2.2.0/virtManager/preferences.py
@@ -129,7 +129,7 @@ class vmmPreferences(vmmGObjectUI):
}
model.append([-1, _("System default (%s)") %
vals[self.config.default_console_resizeguest]])
- for key, val in vals.items():
+ for key, val in list(vals.items()):
model.append([key, val])
combo.set_model(model)
uiutil.init_combo_text_column(combo, 1)
Index: virt-manager-2.2.0/virtManager/migrate.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/migrate.py
+++ virt-manager-2.2.0/virtManager/migrate.py
@@ -23,7 +23,7 @@ from .object.domain import vmmDomain
NUM_COLS = 3
(COL_LABEL,
COL_URI,
- COL_CAN_MIGRATE) = range(NUM_COLS)
+ COL_CAN_MIGRATE) = list(range(NUM_COLS))
class vmmMigrateDialog(vmmGObjectUI):
Index: virt-manager-2.2.0/virtManager/hoststorage.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/hoststorage.py
+++ virt-manager-2.2.0/virtManager/hoststorage.py
@@ -32,13 +32,13 @@ VOL_NUM_COLUMNS = 7
VOL_COLUMN_SIZESTR,
VOL_COLUMN_FORMAT,
VOL_COLUMN_INUSEBY,
- VOL_COLUMN_SENSITIVE) = range(VOL_NUM_COLUMNS)
+ VOL_COLUMN_SENSITIVE) = list(range(VOL_NUM_COLUMNS))
POOL_NUM_COLUMNS = 4
(POOL_COLUMN_CONNKEY,
POOL_COLUMN_LABEL,
POOL_COLUMN_ISACTIVE,
- POOL_COLUMN_PERCENT) = range(POOL_NUM_COLUMNS)
+ POOL_COLUMN_PERCENT) = list(range(POOL_NUM_COLUMNS))
ICON_RUNNING = "state_running"
ICON_SHUTOFF = "state_shutoff"