diff --git a/0001-Improve-container-image-url-example.patch b/0001-Improve-container-image-url-example.patch new file mode 100644 index 00000000..fe14d785 --- /dev/null +++ b/0001-Improve-container-image-url-example.patch @@ -0,0 +1,28 @@ +From b567947b82bb175c3f6234a3b059a2141c70a805 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Tue, 12 Dec 2017 17:12:34 +0100 +Subject: [PATCH 1/3] Improve container image url example + +Replace the docker://fedora example by a string that shows more of the +possible values, like how to specify a user or server. While at it, +the image name is no distro agnostic. +--- + ui/create.ui | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui/create.ui b/ui/create.ui +index dd50cdf0..142a7356 100644 +--- a/ui/create.ui ++++ b/ui/create.ui +@@ -1776,7 +1776,7 @@ connections is not yet supported.</small> + + + True +- docker://fedora ++ docker://srv:1234/myimg:tag + + + +-- +2.15.1 + diff --git a/0002-create-wizard-fix-alignment-in-os-container-page.patch b/0002-create-wizard-fix-alignment-in-os-container-page.patch new file mode 100644 index 00000000..03faf699 --- /dev/null +++ b/0002-create-wizard-fix-alignment-in-os-container-page.patch @@ -0,0 +1,442 @@ +From 1e5437158dc83069d84cb27503414306a25d7264 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Wed, 13 Dec 2017 15:49:50 +0100 +Subject: [PATCH 2/3] create wizard: fix alignment in os container page + +The checkbox to create the root FS should be aligned with the label of +the root FS folder. +--- + ui/create.ui | 317 +++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 166 insertions(+), 151 deletions(-) + +diff --git a/ui/create.ui b/ui/create.ui +index 142a7356..ae9d47d3 100644 +--- a/ui/create.ui ++++ b/ui/create.ui +@@ -1600,11 +1600,13 @@ User shouldn't see this. + + True + False ++ start + 12 + + + True + False ++ start + vertical + 12 + +@@ -1651,107 +1653,180 @@ User shouldn't see this. + 0 + + ++ ++ ++ ++ ++ False ++ True ++ 1 ++ ++ ++ ++ ++ True ++ False ++ vertical ++ 12 ++ ++ ++ True ++ False ++ 6 + +- ++ + True + False +- 6 +- +- +- True +- False +- gtk-dialog-warning +- +- +- False +- True +- 0 +- +- +- +- +- True +- False +- start +- <small>The OS directory tree must already exist. To enable OS directory tree creation, ++ gtk-dialog-warning ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ start ++ <small>The OS directory tree must already exist. To enable OS directory tree creation, + please install <a href="https://github.com/virt-manager/virt-bootstrap">virt-bootrap</a></small> +- True +- +- +- True +- True +- 1 +- +- ++ True ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ gtk-dialog-warning + + + False + True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ start ++ <small>The OS directory tree must already exist. Creating an OS directory tree for remote ++connections is not yet supported.</small> ++ True ++ ++ ++ True ++ True + 1 + + ++ ++ ++ False ++ True ++ 1 ++ ++ ++ ++ ++ Create OS directory tree from container image ++ True ++ True ++ False ++ True ++ ++ ++ ++ False ++ True ++ 2 ++ ++ ++ ++ ++ True ++ False ++ False ++ 10 ++ vertical ++ 10 + +- ++ + True + False +- 6 + +- ++ + True + False +- gtk-dialog-warning ++ Source URI: + + +- False +- True +- 0 ++ 0 ++ 0 + + + +- ++ + True + False +- start +- <small>The OS directory tree must already exist. Creating an OS directory tree for remote +-connections is not yet supported.</small> +- True ++ True ++ True ++ ++ ++ True ++ docker://srv:1234/myimg:tag ++ ++ + + +- True +- True +- 1 ++ 1 ++ 0 + + + + + False + True +- 2 ++ 0 + + + +- +- Create OS directory tree from container image ++ ++ Do not verify TLS certificates of registry + True + True + False + True +- + + + False + True +- 3 ++ 1 + + + +- ++ + True +- False +- False +- 10 +- vertical +- 10 ++ True + + + True +@@ -1760,7 +1835,8 @@ connections is not yet supported.</small> + + True + False +- Source URI: ++ 10 ++ Username: + + + 0 +@@ -1768,129 +1844,68 @@ connections is not yet supported.</small> + + + +- ++ + True + False +- True +- True +- +- +- True +- docker://srv:1234/myimg:tag +- +- ++ 10 ++ Password: + + +- 1 +- 0 ++ 0 ++ 1 + + +- +- +- False +- True +- 0 +- +- +- +- +- Do not verify TLS certificates of registry +- True +- True +- False +- True +- +- +- False +- True +- 1 +- +- +- +- +- True +- True + +- ++ + True +- False +- +- +- True +- False +- 10 +- Username: +- +- +- 0 +- 0 +- +- +- +- +- True +- False +- 10 +- Password: +- +- +- 0 +- 1 +- +- +- +- +- True +- True +- +- +- 1 +- 0 +- +- +- +- +- True +- True +- False +- * +- password +- +- +- 1 +- 1 +- +- ++ True + ++ ++ 1 ++ 0 ++ + +- +- ++ ++ + True +- False +- Credentials for accessing the source registry ++ True ++ False ++ * ++ password + ++ ++ 1 ++ 1 ++ + + +- +- False +- True +- 2 +- ++ ++ ++ ++ True ++ False ++ Credentials for accessing the source registry ++ + + + + False + True +- 4 ++ 2 + + + ++ ++ False ++ True ++ 3 ++ + + + + True + True +- 1 ++ 2 + + + +-- +2.15.1 + diff --git a/0003-oscontainer-ask-root-password-in-the-wizard.patch b/0003-oscontainer-ask-root-password-in-the-wizard.patch new file mode 100644 index 00000000..98d84c63 --- /dev/null +++ b/0003-oscontainer-ask-root-password-in-the-wizard.patch @@ -0,0 +1,120 @@ +From 7fb94b1bec19cb01243b6f50483a7ae4ba5b4b76 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Thu, 14 Dec 2017 08:49:53 +0100 +Subject: [PATCH 3/3] oscontainer: ask root password in the wizard + +When creating a new root file system out of an downloaded image, +the root password is likely to be changed. Add a field for this +in the new guest wizard. +--- + ui/create.ui | 36 ++++++++++++++++++++++++++++++++++++ + virtManager/create.py | 14 ++++++++++++-- + 2 files changed, 48 insertions(+), 2 deletions(-) + +Index: virt-manager-1.4.3/ui/create.ui +=================================================================== +--- virt-manager-1.4.3.orig/ui/create.ui ++++ virt-manager-1.4.3/ui/create.ui +@@ -1901,6 +1901,42 @@ connections is not yet supported.</sm + 3 + + ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ Root password: ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ True ++ True ++ False ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ True ++ 4 ++ ++ + + + True +Index: virt-manager-1.4.3/virtManager/create.py +=================================================================== +--- virt-manager-1.4.3.orig/virtManager/create.py ++++ virt-manager-1.4.3/virtManager/create.py +@@ -465,6 +465,7 @@ class vmmCreate(vmmGObjectUI): + self.widget("install-oscontainer-source-insecure").set_active(False) + self.widget("install-oscontainer-bootstrap").set_active(False) + self.widget("install-oscontainer-auth-options").set_expanded(False) ++ self.widget("install-oscontainer-rootpw").set_text("") + src_model = (self.widget("install-oscontainer-source-url-combo") + .get_model()) + _populate_media_model(src_model, self.config.get_container_urls()) +@@ -701,7 +702,8 @@ class vmmCreate(vmmGObjectUI): + "install-oscontainer-notsupport-conn": not is_local, + "install-oscontainer-notsupport": not vb_installed, + "install-oscontainer-bootstrap": vb_enabled, +- "install-oscontainer-source": vb_enabled ++ "install-oscontainer-source": vb_enabled, ++ "install-oscontainer-rootpw-box": vb_enabled + } + for w in oscontainer_widget_conf: + self.widget(w).set_visible(oscontainer_widget_conf[w]) +@@ -1329,6 +1331,10 @@ class vmmCreate(vmmGObjectUI): + return self.widget("install-oscontainer-source-insecure").get_active() + + ++ def _get_config_oscontainer_root_password(self): ++ return self.widget("install-oscontainer-rootpw").get_text() ++ ++ + def _should_skip_disk_page(self): + return self._get_config_install_page() in [INSTALL_PAGE_IMPORT, + INSTALL_PAGE_CONTAINER_APP, +@@ -1732,6 +1738,7 @@ class vmmCreate(vmmGObjectUI): + def _container_source_toggle(self, ignore): + enable_src = self.widget("install-oscontainer-bootstrap").get_active() + self.widget("install-oscontainer-source").set_sensitive(enable_src) ++ self.widget("install-oscontainer-rootpw-box").set_sensitive(enable_src) + + # Auto-generate a path if not specified + if enable_src and not self.widget("install-oscontainer-fs").get_text(): +@@ -2577,7 +2584,8 @@ class vmmCreate(vmmGObjectUI): + 'dest': self.widget("install-oscontainer-fs").get_text, + 'user': self._get_config_oscontainer_source_username, + 'passwd': self._get_config_oscontainer_source_password, +- 'insecure': self._get_config_oscontainer_isecure ++ 'insecure': self._get_config_oscontainer_isecure, ++ 'root_password': self._get_config_oscontainer_root_password, + } + for key, getter in list(bootstrap_arg_keys.items()): + bootstrap_args[key] = getter() +@@ -2733,6 +2741,8 @@ class vmmCreate(vmmGObjectUI): + if bootstrap_args['user'] and bootstrap_args['passwd']: + kwargs['username'] = bootstrap_args['user'] + kwargs['password'] = bootstrap_args['passwd'] ++ if bootstrap_args['root_password']: ++ kwargs['root_password'] = bootstrap_args['root_password'] + logging.debug('Start container bootstrap') + try: + virtBootstrap.bootstrap(**kwargs) diff --git a/0004-Harmonize-invisible_char-values.patch b/0004-Harmonize-invisible_char-values.patch new file mode 100644 index 00000000..8dc9e8e2 --- /dev/null +++ b/0004-Harmonize-invisible_char-values.patch @@ -0,0 +1,73 @@ +From 697b86a84a2bfd267a30c765b19ba550a55d85c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Thu, 14 Dec 2017 09:02:30 +0100 +Subject: [PATCH] Harmonize invisible_char values + +To be consistent across the UI, change the few remaining different +invisible_char values to match the most common one. +--- + ui/addhardware.ui | 2 +- + ui/create.ui | 4 ++-- + ui/migrate.ui | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ui/addhardware.ui b/ui/addhardware.ui +index eb476dab..44b23068 100644 +--- a/ui/addhardware.ui ++++ b/ui/addhardware.ui +@@ -1290,7 +1290,7 @@ + + True + True +- ++ + + + True +diff --git a/ui/create.ui b/ui/create.ui +index ea92756d..1749ff35 100644 +--- a/ui/create.ui ++++ b/ui/create.ui +@@ -1039,7 +1039,7 @@ bar + True + center + True +- ++ + + + 1 +@@ -1870,7 +1870,7 @@ connections is not yet supported.</small> + True + True + False +- * ++ + password + + +diff --git a/ui/migrate.ui b/ui/migrate.ui +index 943ecb9e..4a98d509 100644 +--- a/ui/migrate.ui ++++ b/ui/migrate.ui +@@ -266,7 +266,7 @@ + + True + True +- ++ + 0 + adjustment1 + +@@ -303,7 +303,7 @@ + + True + True +- ++ + + + False +-- +2.15.1 + diff --git a/python3-fix-bytes-string-mess-in-serial-console.patch b/python3-fix-bytes-string-mess-in-serial-console.patch new file mode 100644 index 00000000..00e17946 --- /dev/null +++ b/python3-fix-bytes-string-mess-in-serial-console.patch @@ -0,0 +1,45 @@ +From e025b9c0fe78621f1c6f9f7655c142a8a3d516fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Wed, 13 Dec 2017 11:35:39 +0100 +Subject: [PATCH] python3: fix bytes/string mess in serial console + +Add a few encode() and decode() to convert between libvirt stream +functions expecting bytes arrays and Vte callbacks providing strings. +--- + virtManager/serialcon.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/virtManager/serialcon.py b/virtManager/serialcon.py +index 7caf6db4..21ab8ae7 100644 +--- a/virtManager/serialcon.py ++++ b/virtManager/serialcon.py +@@ -149,7 +149,7 @@ class LibvirtConsoleConnection(ConsoleConnection): + + self.stream = None + +- self.streamToTerminal = "" ++ self.streamToTerminal = b"" + self.terminalToStream = "" + + def _event_on_stream(self, stream, events, opaque): +@@ -187,7 +187,7 @@ class LibvirtConsoleConnection(ConsoleConnection): + self.terminalToStream): + + try: +- done = self.stream.send(self.terminalToStream) ++ done = self.stream.send(self.terminalToStream.encode()) + except Exception: + logging.exception("Error sending stream data") + self.close() +@@ -262,7 +262,7 @@ class LibvirtConsoleConnection(ConsoleConnection): + return + + terminal.feed(self.streamToTerminal) +- self.streamToTerminal = "" ++ self.streamToTerminal = b"" + + + class vmmSerialConsole(vmmGObject): +-- +2.15.1 + diff --git a/virt-manager.changes b/virt-manager.changes index be68abaa..4d2e89f0 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Dec 13 10:50:04 UTC 2017 - cbosdonnat@suse.com + +- Fix display and input of text in serial console (bsc#1070896) + python3-fix-bytes-string-mess-in-serial-console.patch +- Fix virt-bootstrap UI integration (bsc#1063367) + 0001-Improve-container-image-url-example.patch + 0002-create-wizard-fix-alignment-in-os-container-page.patch + 0003-oscontainer-ask-root-password-in-the-wizard.patch + 0004-Harmonize-invisible_char-values.patch + ------------------------------------------------------------------- Mon Dec 11 14:50:59 MST 2017 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index a43d8eeb..11f6aedc 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -127,6 +127,12 @@ Patch207: 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch Patch208: 0003-virtinst-python3-avoid-using-long-type.patch Patch209: 0004-virtinst-python3-use-binary-mode-for-kernel.patch Patch210: virtman-register-delete-event-for-details-dialog.patch +Patch211: python3-fix-bytes-string-mess-in-serial-console.patch +# For upstream review +Patch500: 0001-Improve-container-image-url-example.patch +Patch501: 0002-create-wizard-fix-alignment-in-os-container-page.patch +Patch502: 0003-oscontainer-ask-root-password-in-the-wizard.patch +Patch503: 0004-Harmonize-invisible_char-values.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -299,6 +305,11 @@ machine). %patch208 -p1 %patch209 -p1 %patch210 -p1 +%patch211 -p1 +%patch500 -p1 +%patch501 -p1 +%patch502 -p1 +%patch503 -p1 %build %if %{qemu_user}