!11 [sync] PR-8: Add four patches to make gome-boxes avoid setting qemu unsupported modules then can create virtual machine
From: @openeuler-sync-bot Reviewed-by: @dwl301 Signed-off-by: @dwl301
This commit is contained in:
commit
d240fc09e6
@ -0,0 +1,19 @@
|
||||
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
|
||||
index ede5e0e..010faa0 100644
|
||||
--- a/src/vm-configurator.vala
|
||||
+++ b/src/vm-configurator.vala
|
||||
@@ -443,11 +443,11 @@ private class Boxes.VMConfigurator {
|
||||
|
||||
private static void set_video_config (Domain domain, InstallerMedia install_media) {
|
||||
var video = new DomainVideo ();
|
||||
- video.set_model (DomainVideoModel.QXL);
|
||||
+ //video.set_model (DomainVideoModel.QXL);
|
||||
|
||||
- if (install_media.supports_virtio_gpu) {
|
||||
+ //if (install_media.supports_virtio_gpu) {
|
||||
video.set_model (DomainVideoModel.VIRTIO);
|
||||
- }
|
||||
+ //}
|
||||
|
||||
domain.add_device (video);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
|
||||
index 010faa0..66e435b 100644
|
||||
--- a/src/vm-configurator.vala
|
||||
+++ b/src/vm-configurator.vala
|
||||
@@ -114,7 +114,7 @@ private class Boxes.VMConfigurator {
|
||||
|
||||
add_usb_support (domain);
|
||||
#if !FLATPAK
|
||||
- add_smartcard_support (domain);
|
||||
+ //add_smartcard_support (domain);
|
||||
#endif
|
||||
|
||||
set_video_config (domain, install_media);
|
||||
@@ -651,14 +651,14 @@ private class Boxes.VMConfigurator {
|
||||
} catch (GLib.Error error) { assert_not_reached (); /* We are so screwed if this happens */ }
|
||||
}
|
||||
}
|
||||
-
|
||||
+/*
|
||||
public static void add_smartcard_support (Domain domain) {
|
||||
var smartcard = new DomainSmartcardPassthrough ();
|
||||
var vmc = new DomainChardevSourceSpiceVmc ();
|
||||
smartcard.set_source (vmc);
|
||||
domain.add_device (smartcard);
|
||||
}
|
||||
-
|
||||
+*/
|
||||
public static void add_usb_support (Domain domain) {
|
||||
// 4 USB redirection channels
|
||||
for (int i = 0; i < 4; i++) {
|
||||
@ -0,0 +1,46 @@
|
||||
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
|
||||
index fad5114..77de4a2 100644
|
||||
--- a/src/libvirt-machine.vala
|
||||
+++ b/src/libvirt-machine.vala
|
||||
@@ -60,9 +60,15 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
|
||||
|
||||
GLib.List<GVirConfig.DomainDevice> devices = null;
|
||||
foreach (var device in domain_config.get_devices ()) {
|
||||
+/*
|
||||
if (device is GVirConfig.DomainGraphicsSpice) {
|
||||
var graphics_device = VMConfigurator.create_graphics_device (_acceleration_3d);
|
||||
|
||||
+ devices.prepend (graphics_device);
|
||||
+*/
|
||||
+ if (device is GVirConfig.DomainGraphicsVnc) {
|
||||
+ var graphics_device = VMConfigurator.create_graphics_device (_acceleration_3d);
|
||||
+
|
||||
devices.prepend (graphics_device);
|
||||
} else if (device is GVirConfig.DomainVideo) {
|
||||
var video_device = device as GVirConfig.DomainVideo;
|
||||
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
|
||||
index 66e435b..695cb90 100644
|
||||
--- a/src/vm-configurator.vala
|
||||
+++ b/src/vm-configurator.vala
|
||||
@@ -699,6 +699,7 @@ private class Boxes.VMConfigurator {
|
||||
return iface;
|
||||
}
|
||||
|
||||
+/*
|
||||
public static DomainGraphicsSpice create_graphics_device (bool accel3d = false) {
|
||||
var graphics = new DomainGraphicsSpice ();
|
||||
graphics.set_autoport (false);
|
||||
@@ -707,6 +708,13 @@ private class Boxes.VMConfigurator {
|
||||
|
||||
return graphics;
|
||||
}
|
||||
+*/
|
||||
+ public static DomainGraphicsVnc create_graphics_device (bool accel3d = false) {
|
||||
+ var graphics = new DomainGraphicsVnc ();
|
||||
+ graphics.set_autoport (true);
|
||||
+
|
||||
+ return graphics;
|
||||
+ }
|
||||
|
||||
public static DomainChannel create_webdav_channel () {
|
||||
var channel_webdav = new DomainChannel ();
|
||||
@ -0,0 +1,43 @@
|
||||
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
|
||||
index 695cb90..b02beeb 100644
|
||||
--- a/src/vm-configurator.vala
|
||||
+++ b/src/vm-configurator.vala
|
||||
@@ -104,8 +104,10 @@ private class Boxes.VMConfigurator {
|
||||
var channel = new DomainChannel ();
|
||||
channel.set_target_type (DomainChannelTargetType.VIRTIO);
|
||||
channel.set_target_name ("com.redhat.spice.0");
|
||||
+/*
|
||||
var vmc = new DomainChardevSourceSpiceVmc ();
|
||||
channel.set_source (vmc);
|
||||
+*/
|
||||
domain.add_device (channel);
|
||||
|
||||
// Webdav channel. This is needed for the shared folder feature to work.
|
||||
@@ -661,6 +663,7 @@ private class Boxes.VMConfigurator {
|
||||
*/
|
||||
public static void add_usb_support (Domain domain) {
|
||||
// 4 USB redirection channels
|
||||
+/*
|
||||
for (int i = 0; i < 4; i++) {
|
||||
var usb_redir = new DomainRedirdev ();
|
||||
usb_redir.set_bus (DomainRedirdevBus.USB);
|
||||
@@ -668,6 +671,7 @@ private class Boxes.VMConfigurator {
|
||||
usb_redir.set_source (vmc);
|
||||
domain.add_device (usb_redir);
|
||||
}
|
||||
+*/
|
||||
|
||||
// USB controllers
|
||||
var master_controller = create_usb_controller (DomainControllerUsbModel.ICH9_EHCI1);
|
||||
@@ -721,9 +725,11 @@ private class Boxes.VMConfigurator {
|
||||
channel_webdav.set_target_type (DomainChannelTargetType.VIRTIO);
|
||||
channel_webdav.set_target_name (WEBDAV_CHANNEL_URI);
|
||||
|
||||
+/*
|
||||
var spice_port = new DomainChardevSourceSpicePort ();
|
||||
spice_port.set_channel (WEBDAV_CHANNEL_URI);
|
||||
channel_webdav.set_source (spice_port);
|
||||
+*/
|
||||
|
||||
return channel_webdav;
|
||||
}
|
||||
@ -4,12 +4,16 @@
|
||||
|
||||
Name: gnome-boxes
|
||||
Version: 3.38.2
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: An application of the GNOME Desktop Environment
|
||||
License: LGPLv2+
|
||||
URL: https://wiki.gnome.org/Apps/Boxes
|
||||
Source0: http://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz
|
||||
Patch0: 0001-make-gnome-boxes-correctly-select-virtualization-cpu-mode.patch
|
||||
Patch1: 0002-disable-domain-conf-video-model-qxl-because-qemu-not-open-this-support.patch
|
||||
Patch2: 0003-disable-domain-conf-smartcard-because-qemu-not-open-this-support-now.patch
|
||||
Patch3: 0004-disable-domain-conf-spice-graphics-because-qemu-not-open-this-support-now-and-add-vnc-instead.patch
|
||||
Patch4: 0005-disable-domain-conf-USB-redirection--because-qemu-this-version-unsupport-now.patch
|
||||
|
||||
BuildRequires: gettext >= 0.19.8 meson itstool vala >= 0.36.0 yelp-tools
|
||||
BuildRequires: pkgconfig(clutter-gtk-1.0) pkgconfig(freerdp2) pkgconfig(glib-2.0) >= 2.52
|
||||
@ -71,6 +75,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Boxes.deskt
|
||||
%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
%changelog
|
||||
* Tue Mar 15 2022 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-4
|
||||
- Add four patches to make gome-boxes avoid setting qemu unsupported modules
|
||||
add vnc instead of spice
|
||||
|
||||
* Mon Oct 11 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-3
|
||||
- Add 0001-make-gnome-boxes-correctly-select-virtualization-cpu-mode.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user