From 0ee10baac08daf9131d185960f75c649f5695753 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Jul 2020 10:06:17 -0400 Subject: [PATCH] import gnome-boxes-3.36.5-2.el8 --- .gitignore | 2 +- .gnome-boxes.metadata | 2 +- ...nome-boxes-hardcode-recommended-oses.patch | 332 ---------------- ...me-boxes-offer-only-supported-arches.patch | 43 --- ...-boxes-unbreak-the-icon-installation.patch | 56 --- SOURCES/gnome-boxes-update-rhel-logo.patch | 63 ---- .../gnome-boxes-use-q35-machine-type.patch | 354 ------------------ SPECS/gnome-boxes.spec | 49 ++- 8 files changed, 25 insertions(+), 876 deletions(-) delete mode 100644 SOURCES/gnome-boxes-hardcode-recommended-oses.patch delete mode 100644 SOURCES/gnome-boxes-offer-only-supported-arches.patch delete mode 100644 SOURCES/gnome-boxes-unbreak-the-icon-installation.patch delete mode 100644 SOURCES/gnome-boxes-update-rhel-logo.patch delete mode 100644 SOURCES/gnome-boxes-use-q35-machine-type.patch diff --git a/.gitignore b/.gitignore index d6c5596..7851e88 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gnome-boxes-3.28.5.tar.xz +SOURCES/gnome-boxes-3.36.5.tar.xz diff --git a/.gnome-boxes.metadata b/.gnome-boxes.metadata index 184b01a..535c374 100644 --- a/.gnome-boxes.metadata +++ b/.gnome-boxes.metadata @@ -1 +1 @@ -5c29480ed1a8d75ce8fa34418ccbf7b745de793a SOURCES/gnome-boxes-3.28.5.tar.xz +ae816759c3f366162048f8faf2f4b11f6054c791 SOURCES/gnome-boxes-3.36.5.tar.xz diff --git a/SOURCES/gnome-boxes-hardcode-recommended-oses.patch b/SOURCES/gnome-boxes-hardcode-recommended-oses.patch deleted file mode 100644 index 338a84b..0000000 --- a/SOURCES/gnome-boxes-hardcode-recommended-oses.patch +++ /dev/null @@ -1,332 +0,0 @@ -From b874d9355644eb686a8af9df03884a0a19513059 Mon Sep 17 00:00:00 2001 -From: Felipe Borges -Date: Tue, 13 Nov 2018 14:26:12 +0100 -Subject: [PATCH] wizard-downloads: Load recommended downloads from an XML file - -This way downstreams (vendors, distros) could easily tweak the -list and offer the Osinfo downloads that they prefer, with the -sorting they want. - -Cherry-picked from eb3af034b5cda6ce1fa6812624b531ea53f90f72 ---- - data/gnome-boxes.gresource.xml | 1 + - data/recommended-downloads.xml | 18 +++++++ - data/ui/wizard-source.ui | 1 - - src/util-app.vala | 80 ++++++++++++++++++++++++++++ - src/wizard-downloads-page.vala | 95 ++++++++++++++++++++++++++++++++++ - src/wizard-source.vala | 33 ++++-------- - 6 files changed, 204 insertions(+), 24 deletions(-) - create mode 100644 data/recommended-downloads.xml - create mode 100644 src/wizard-downloads-page.vala - -diff --git a/data/gnome-boxes.gresource.xml b/data/gnome-boxes.gresource.xml -index 01c72d59..8a9b8b95 100644 ---- a/data/gnome-boxes.gresource.xml -+++ b/data/gnome-boxes.gresource.xml -@@ -3,6 +3,7 @@ - - gtk-style.css - ui/menus.ui -+ recommended-downloads.xml - icons/boxes-arrow.svg - icons/boxes-create.png - icons/empty-boxes.png -diff --git a/data/recommended-downloads.xml b/data/recommended-downloads.xml -new file mode 100644 -index 00000000..b389e945 ---- /dev/null -+++ b/data/recommended-downloads.xml -@@ -0,0 +1,18 @@ -+ -+ -+ -+ http://redhat.com/rhel/7.6 -+ http://fedoraproject.org/fedora/29 -+ http://fedoraproject.org/silverblue/29 -+ http://ubuntu.com/ubuntu/18.10 -+ http://opensuse.org/opensuse/15.0 -+ http://debian.org/debian/9 -+ -diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui -index b59fccfc..6762d2d6 100644 ---- a/data/ui/wizard-source.ui -+++ b/data/ui/wizard-source.ui -@@ -49,7 +49,6 @@ - - - False -- - - - -diff --git a/src/util-app.vala b/src/util-app.vala -index aba87cfd..253d1b74 100644 ---- a/src/util-app.vala -+++ b/src/util-app.vala -@@ -102,6 +102,86 @@ public void fetch_os_logo (Gtk.Image image, Osinfo.Os os, int size) { - } - } - -+ public string serialize_os_title (Osinfo.Media media) { -+ var title = "unknown"; -+ -+ /* Libosinfo lacks some OS variant names, so we do some -+ parsing here to compose a unique human-readable media -+ identifier. */ -+ var variant = ""; -+ var variants = media.get_os_variants (); -+ if (variants.get_length () > 0) -+ variant = (variants.get_nth (0) as Osinfo.OsVariant).get_name (); -+ else if ((media.os as Osinfo.Product).name != null) { -+ variant = (media.os as Osinfo.Product).name; -+ if (media.url != null && media.url.contains ("server")) -+ variant += " Server"; -+ } else { -+ var file = File.new_for_uri (media.url); -+ -+ title = file.get_basename ().replace ("_", ""); -+ } -+ -+ var subvariant = ""; -+ -+ if (media.url != null) { -+ if (media.url.contains ("netinst")) -+ subvariant = "(netinst)"; -+ else if (media.url.contains ("minimal")) -+ subvariant = "(minimal)"; -+ else if (media.url.contains ("dvd")) -+ subvariant = "(DVD)"; -+ } -+ -+ var is_live = media.live ? " (" + _("Live") + ")" : ""; -+ -+ title = @"$variant $(media.architecture) $subvariant $is_live"; -+ -+ /* Strip consequent whitespaces */ -+ return title.replace (" ", ""); -+ } -+ -+ public async GLib.List? get_recommended_downloads () { -+ uint8[] contents; -+ -+ try { -+ File file = File.new_for_uri ("resource:///org/gnome/Boxes/recommended-downloads.xml"); -+ -+ file.load_contents (null, out contents, null); -+ } catch (GLib.Error e) { -+ warning ("Failed to load recommended downloads file: %s", e.message); -+ -+ return null; -+ } -+ -+ Xml.Doc* doc = Xml.Parser.parse_doc ((string)contents); -+ if (doc == null) -+ return null; -+ -+ Xml.Node* root = doc->get_root_element (); -+ if (root == null || root->name != "list") { -+ warning ("Failed to parse recommended downloads"); -+ -+ return null; -+ } -+ -+ GLib.List list = new GLib.List (); -+ var os_db = MediaManager.get_instance ().os_db; -+ for (Xml.Node* iter = root->children; iter != null; iter = iter->next) { -+ var os_id = iter->get_content (); -+ try { -+ var os = yield os_db.get_os_by_id (os_id); -+ var media = os.get_media_list ().get_nth (0) as Osinfo.Media; -+ -+ list.append (media); -+ } catch (OSDatabaseError error) { -+ warning ("Failed to find OS with id: '%s': %s", os_id, error.message); -+ } -+ } -+ -+ return list; -+ } -+ - public async GVir.StoragePool ensure_storage_pool (GVir.Connection connection) throws GLib.Error { - var pool = get_storage_pool (connection); - if (pool == null) { -diff --git a/src/wizard-downloads-page.vala b/src/wizard-downloads-page.vala -new file mode 100644 -index 00000000..0b77a9cb ---- /dev/null -+++ b/src/wizard-downloads-page.vala -@@ -0,0 +1,95 @@ -+// This file is part of GNOME Boxes. License: LGPLv2+ -+ -+public enum WizardDownloadsPageView { -+ RECOMMENDED, -+ SEARCH_RESULTS, -+ NO_RESULTS, -+} -+ -+public delegate void Boxes.DownloadChosenFunc (Boxes.WizardDownloadableEntry entry); -+ -+[GtkTemplate (ui = "/org/gnome/Boxes/ui/wizard-downloads-page.ui")] -+public class Boxes.WizardDownloadsPage : Gtk.Stack { -+ private OSDatabase os_db = new OSDatabase (); -+ public DownloadsSearch search { private set; get; } -+ -+ public DownloadChosenFunc download_chosen_func; -+ -+ [GtkChild] -+ private Gtk.ListBox listbox; -+ [GtkChild] -+ private Gtk.ListBox recommended_listbox; -+ -+ private GLib.ListStore recommended_model; -+ -+ private WizardDownloadsPageView _page; -+ public WizardDownloadsPageView page { -+ get { return _page; } -+ set { -+ _page = value; -+ -+ switch (_page) { -+ case WizardDownloadsPageView.SEARCH_RESULTS: -+ visible_child_name = "search-results"; -+ break; -+ case WizardDownloadsPageView.NO_RESULTS: -+ visible_child_name = "no-results"; -+ break; -+ case WizardDownloadsPageView.RECOMMENDED: -+ default: -+ visible_child_name = "recommended"; -+ break; -+ } -+ } -+ } -+ -+ construct { -+ os_db.load.begin (); -+ -+ search = new DownloadsSearch (); -+ -+ recommended_model = new GLib.ListStore (typeof (Osinfo.Media)); -+ recommended_listbox.bind_model (recommended_model, create_downloads_entry); -+ populate_recommended_list.begin (); -+ -+ listbox.bind_model (search.model, create_downloads_entry); -+ -+ search.search_changed.connect (set_visible_view); -+ } -+ -+ private void set_visible_view () { -+ if (search.text.length == 0) { -+ page = WizardDownloadsPageView.RECOMMENDED; -+ } else if (search.model.get_n_items () == 0) { -+ page = WizardDownloadsPageView.NO_RESULTS; -+ } else { -+ page = WizardDownloadsPageView.SEARCH_RESULTS; -+ } -+ } -+ -+ private async void populate_recommended_list () { -+ foreach (var media in yield get_recommended_downloads ()) { -+ recommended_model.append (media); -+ } -+ } -+ -+ private Gtk.Widget create_downloads_entry (Object item) { -+ var media = item as Osinfo.Media; -+ -+ return new WizardDownloadableEntry (media); -+ } -+ -+ [GtkCallback] -+ private void on_listbox_row_activated (Gtk.ListBoxRow row) { -+ var entry = row as WizardDownloadableEntry; -+ -+ download_chosen_func (entry); -+ } -+ -+ [GtkCallback] -+ private void on_show_more_button_clicked () { -+ search.show_all (); -+ -+ page = WizardDownloadsPageView.SEARCH_RESULTS; -+ } -+} -diff --git a/src/wizard-source.vala b/src/wizard-source.vala -index 9ea0a9b1..494c5561 100644 ---- a/src/wizard-source.vala -+++ b/src/wizard-source.vala -@@ -310,6 +310,7 @@ private void on_notify_estimated_load_progress () { - - private Gtk.ListBox media_vbox; - private Gtk.ListBox downloads_vbox; -+ private GLib.ListStore downloads_model; - private Osinfo.Os rhel_os; - - private Cancellable? rhel_cancellable; -@@ -318,12 +319,6 @@ private void on_notify_estimated_load_progress () { - - public string filename { get; set; } - -- private string[] recommended_downloads = { -- "http://ubuntu.com/ubuntu/16.04", -- "http://opensuse.org/opensuse/42.2", -- "http://fedoraproject.org/fedora/27", -- }; -- - public bool download_required { - get { - string scheme = Uri.parse_scheme (uri); -@@ -409,6 +404,8 @@ private void on_notify_estimated_load_progress () { - } - }); - -+ downloads_model = new GLib.ListStore (typeof (Osinfo.Media)); -+ - rhel_web_view.view.decide_policy.connect (on_rhel_web_view_decide_policy); - } - -@@ -425,26 +422,16 @@ public void setup_ui (AppWindow window) { - assert (window != null); - - this.window = window; -+ -+ downloads_vbox.bind_model (downloads_model, create_downloadable_entry); -+ -+ populate_recommended_downloads.begin (); - } - -- [GtkCallback] -- private void on_downloads_scrolled_shown () { -+ private async void populate_recommended_downloads () { - var os_db = media_manager.os_db; -- foreach (var os_id in recommended_downloads) { -- os_db.get_os_by_id.begin (os_id, (obj, res) => { -- try { -- var os = os_db.get_os_by_id.end (res); -- -- // TODO: Select the desktop/workstation variant. -- var media = os.get_media_list ().get_nth (0) as Osinfo.Media; -- var entry = create_downloadable_entry (media); -- -- downloads_vbox.insert (entry, -1); -- } catch (OSDatabaseError error) { -- warning ("Failed to find OS with ID '%s': %s", os_id, error.message); -- return; -- } -- }); -+ foreach (var media in yield get_recommended_downloads ()) { -+ downloads_model.append (media); - } - } - --- -2.19.2 - diff --git a/SOURCES/gnome-boxes-offer-only-supported-arches.patch b/SOURCES/gnome-boxes-offer-only-supported-arches.patch deleted file mode 100644 index a178faa..0000000 --- a/SOURCES/gnome-boxes-offer-only-supported-arches.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 788d5bb418abe88727d33f2b21d56f4ed671b927 Mon Sep 17 00:00:00 2001 -From: Felipe Borges -Date: Thu, 15 Aug 2019 13:11:45 +0200 -Subject: [PATCH] offer-only-supported-arches - ---- - src/installed-media.vala | 2 +- - src/media-manager.vala | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/installed-media.vala b/src/installed-media.vala -index 09ceffdf..e60f3508 100644 ---- a/src/installed-media.vala -+++ b/src/installed-media.vala -@@ -12,7 +12,7 @@ - ".vpc", ".vpc.gz", - ".cloop", ".cloop.gz" }; - public const string[] supported_architectures = { -- "i686", "i586", "i486", "i386" -+ "i686", "i586", "i486", "i386", "x86_64", "amd64" - }; - private static Regex date_regex = /20[0-9]{6,6}/; - -diff --git a/src/media-manager.vala b/src/media-manager.vala -index 427ce874..dc7cc997 100644 ---- a/src/media-manager.vala -+++ b/src/media-manager.vala -@@ -150,7 +150,11 @@ else if (VMConfigurator.is_libvirt_cloning_config (config)) - continue; - } - -- list.insert_sorted (media, compare_media_by_vendor); -+ var os = yield os_db.get_os_by_id (os_id); -+ var os_media = os_db.get_media_by_id (os, media_id); -+ -+ if (os_media.architecture in InstalledMedia.supported_architectures) -+ list.insert_sorted (media, compare_media_by_vendor); - } catch (GLib.Error error) { - warning ("Failed to use ISO '%s': %s", path, error.message); - } --- -2.21.0 - diff --git a/SOURCES/gnome-boxes-unbreak-the-icon-installation.patch b/SOURCES/gnome-boxes-unbreak-the-icon-installation.patch deleted file mode 100644 index 4e24c84..0000000 --- a/SOURCES/gnome-boxes-unbreak-the-icon-installation.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e8b9d5ca5ebed5f2e076e6e6c975ec37efc21c5b Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Fri, 8 Jun 2018 12:42:49 +0200 -Subject: [PATCH] build: Unbreak the icon installation in gnome-3-28 - -The icons were getting directly copied to $data_dir/icons without -retaining the directory hierarchy inside. - -Fallout from d2410d0959094dee8cc3e1276b255e8fb991fe31 - -It was also broken in master, but was fixed by -c115f5bfb56aa9fe42356c5f4f9ee87f6c87f454 and -578707e9924c32a808e12c2830f18156ccb109f6 - -https://gitlab.gnome.org/GNOME/gnome-boxes/issues/217 ---- - data/meson.build | 26 +------------------------- - 1 file changed, 1 insertion(+), 25 deletions(-) - -diff --git a/data/meson.build b/data/meson.build -index 847734e59715..9f1c4b482356 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -1,28 +1,4 @@ --icondir = join_paths(data_dir, 'icons') -- --install_data('icons/hicolor/16x16/apps/org.gnome.Boxes.png', -- install_dir: icondir, --) -- --install_data('icons/hicolor/24x24/apps/org.gnome.Boxes.png', -- install_dir: icondir, --) -- --install_data('icons/hicolor/symbolic/apps/org.gnome.Boxes-symbolic.svg', -- install_dir: icondir, --) --install_data('icons/hicolor/32x32/apps/org.gnome.Boxes.png', -- install_dir: icondir, --) -- --install_data('icons/hicolor/48x48/apps/org.gnome.Boxes.png', -- install_dir: icondir, --) -- --install_data('icons/hicolor/256x256/apps/org.gnome.Boxes.png', -- install_dir: icondir, --) -- -+install_subdir('icons/hicolor/', install_dir: join_paths (data_dir, 'icons')) - - resource_files = files ('gnome-boxes.gresource.xml') - resources = gnome.compile_resources ('org.gnome.Boxes', --- -2.14.4 - diff --git a/SOURCES/gnome-boxes-update-rhel-logo.patch b/SOURCES/gnome-boxes-update-rhel-logo.patch deleted file mode 100644 index 44b3bc1..0000000 --- a/SOURCES/gnome-boxes-update-rhel-logo.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/data/osinfo/meson.build b/data/osinfo/meson.build -index 0f4982f..c7c6017 100644 ---- a/data/osinfo/meson.build -+++ b/data/osinfo/meson.build -@@ -10,7 +10,8 @@ osinfo_db = [ - ['rhel-4.0.xml', 'gnome-boxes/osinfo/os/redhat.com'], - ['rhel-5.0.xml', 'gnome-boxes/osinfo/os/redhat.com'], - ['rhel-6.0.xml', 'gnome-boxes/osinfo/os/redhat.com'], -- ['rhel-7.0.xml', 'gnome-boxes/osinfo/os/redhat.com'] -+ ['rhel-7.0.xml', 'gnome-boxes/osinfo/os/redhat.com'], -+ ['rhel-8.0.xml', 'gnome-boxes/osinfo/os/redhat.com'] - ] - - foreach os: osinfo_db -diff --git a/data/osinfo/rhel-4.0.xml b/data/osinfo/rhel-4.0.xml -index 2839687..318544e 100644 ---- a/data/osinfo/rhel-4.0.xml -+++ b/data/osinfo/rhel-4.0.xml -@@ -3,7 +3,7 @@ - - - -- https://people.gnome.org/~zeeshanak/logos/shadownman-pill.svg -+ https://gitlab.gnome.org/GNOME/gnome-boxes-logos/raw/master/logos/shadownman-pill.svg - - - -diff --git a/data/osinfo/rhel-8.0.xml b/data/osinfo/rhel-8.0.xml -new file mode 100644 -index 0000000..ad7a785 ---- /dev/null -+++ b/data/osinfo/rhel-8.0.xml -@@ -0,0 +1,9 @@ -+ -+ -+ -+ -+ -+ https://gitlab.gnome.org/GNOME/gnome-boxes-logos/raw/master/logos/shadownman-pill.svg -+ -+ -+ -diff --git a/data/recommended-downloads.xml b/data/recommended-downloads.xml -index b389e94..6f2ccce 100644 ---- a/data/recommended-downloads.xml -+++ b/data/recommended-downloads.xml -@@ -9,10 +9,11 @@ - available. - --> - -- http://redhat.com/rhel/7.6 -- http://fedoraproject.org/fedora/29 -- http://fedoraproject.org/silverblue/29 -- http://ubuntu.com/ubuntu/18.10 -- http://opensuse.org/opensuse/15.0 -+ http://redhat.com/rhel/8.1 -+ http://redhat.com/rhel/7.7 -+ http://fedoraproject.org/fedora/30 -+ http://fedoraproject.org/silverblue/30 -+ http://ubuntu.com/ubuntu/19.04 -+ http://opensuse.org/opensuse/15.1 - http://debian.org/debian/9 - diff --git a/SOURCES/gnome-boxes-use-q35-machine-type.patch b/SOURCES/gnome-boxes-use-q35-machine-type.patch deleted file mode 100644 index fcae63a..0000000 --- a/SOURCES/gnome-boxes-use-q35-machine-type.patch +++ /dev/null @@ -1,354 +0,0 @@ ---- - src/meson.build | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/meson.build b/src/meson.build -index ac79b7fc..00903170 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -125,8 +125,8 @@ dependencies = [ - dependency ('libsecret-1'), - dependency ('libsoup-2.4', version: '>= 2.38'), - dependency ('libusb-1.0', version: '>= 1.0.9'), -- dependency ('libvirt-gconfig-1.0', version: '>= 0.2.0'), -- dependency ('libvirt-gobject-1.0', version: '>= 0.2.0'), -+ dependency ('libvirt-gconfig-1.0', version: '>= 2.0.0'), -+ dependency ('libvirt-gobject-1.0', version: '>= 2.0.0'), - dependency ('libxml-2.0', version: '>= 2.7.8'), - dependency ('spice-client-gtk-3.0', version: '>= 0.32'), - dependency ('tracker-sparql-2.0'), --- - ---- - src/installer-media.vala | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/installer-media.vala b/src/installer-media.vala -index feb5d7b..b29c10b 100644 ---- a/src/installer-media.vala -+++ b/src/installer-media.vala -@@ -25,12 +25,24 @@ private class Boxes.InstallerMedia : GLib.Object { - public virtual bool need_user_input_for_vm_creation { get { return false; } } - public virtual bool ready_to_create { get { return true; } } - -+ public bool supports_virtio1_disk { -+ get { -+ return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio1.0-block") != null); -+ } -+ } -+ - public bool supports_virtio_disk { - get { - return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio-block") != null); - } - } - -+ public bool supports_virtio1_net { -+ get { -+ return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio1.0-net") != null); -+ } -+ } -+ - public bool supports_virtio_net { - get { - return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio-net") != null); --- - ---- - src/unattended-installer.vala | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala -index 4e0ba23..6a37e20 100644 ---- a/src/unattended-installer.vala -+++ b/src/unattended-installer.vala -@@ -232,7 +232,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia { - if (os.distro == "win") - config.set_target_disk ("C"); - else -- config.set_target_disk (supports_virtio_disk? "/dev/vda" : "/dev/sda"); -+ config.set_target_disk (supports_virtio_disk || supports_virtio1_disk? "/dev/vda" : "/dev/sda"); - - var disk_config = get_unattended_disk_config (script.path_format); - var device_path = device_name_to_path (script.path_format, disk_config.get_target_dev ()); -@@ -360,7 +360,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia { - disk.set_target_bus (DomainDiskBus.FDC); - } else { - // Path format checks below are most probably practically redundant but a small price for future safety -- if (supports_virtio_disk) -+ if (supports_virtio_disk || supports_virtio1_disk) - disk.set_target_dev ((path_format == PathFormat.UNIX)? "sda" : "E"); - else - disk.set_target_dev ((path_format == PathFormat.UNIX)? "sdb" : "E"); --- - ---- - src/vm-configurator.vala | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala -index e8eefa3..ceadc80 100644 ---- a/src/vm-configurator.vala -+++ b/src/vm-configurator.vala -@@ -114,9 +114,10 @@ private class Boxes.VMConfigurator { - console.set_source (new DomainChardevSourcePty ()); - domain.add_device (console); - -+ var supports_virtio_net = install_media.supports_virtio_net || install_media.supports_virtio1_net; - var iface = create_network_interface (domain, - is_libvirt_bridge_net_available (), -- install_media.supports_virtio_net); -+ supports_virtio_net); - domain.add_device (iface); - - return domain; -@@ -309,7 +310,7 @@ private class Boxes.VMConfigurator { - disk.set_driver_cache (DomainDiskCacheType.WRITEBACK); - - var dev_letter_str = ((char) (dev_index + 97)).to_string (); -- if (install_media.supports_virtio_disk) { -+ if (install_media.supports_virtio_disk || install_media.supports_virtio1_disk) { - debug ("Using virtio controller for the main disk"); - disk.set_target_bus (DomainDiskBus.VIRTIO); - disk.set_target_dev ("vd" + dev_letter_str); --- - ---- - src/installer-media.vala | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/installer-media.vala b/src/installer-media.vala -index b29c10b..0a83ba0 100644 ---- a/src/installer-media.vala -+++ b/src/installer-media.vala -@@ -49,6 +49,12 @@ private class Boxes.InstallerMedia : GLib.Object { - } - } - -+ public bool prefers_q35 { -+ get { -+ return false; -+ } -+ } -+ - public virtual bool live { get { return os_media == null || os_media.live; } } - public virtual bool eject_after_install { get { return os_media == null || os_media.eject_after_install; } } - --- - ---- - src/installer-media.vala | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/installer-media.vala b/src/installer-media.vala -index 0a83ba0..7d95d65 100644 ---- a/src/installer-media.vala -+++ b/src/installer-media.vala -@@ -55,6 +55,12 @@ private class Boxes.InstallerMedia : GLib.Object { - } - } - -+ public bool prefers_ich9 { -+ get { -+ return false; -+ } -+ } -+ - public virtual bool live { get { return os_media == null || os_media.live; } } - public virtual bool eject_after_install { get { return os_media == null || os_media.eject_after_install; } } - --- - ---- - src/installer-media.vala | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/installer-media.vala b/src/installer-media.vala -index 7d95d65..ba6bfc8 100644 ---- a/src/installer-media.vala -+++ b/src/installer-media.vala -@@ -173,7 +173,7 @@ private class Boxes.InstallerMedia : GLib.Object { - disk.set_target_dev (device_name); - if (iso_path != null) - disk.set_source (iso_path); -- disk.set_target_bus (DomainDiskBus.IDE); -+ disk.set_target_bus (prefers_q35? DomainDiskBus.SATA : DomainDiskBus.IDE); - if (mandatory) - disk.set_startup_policy (DomainDiskStartupPolicy.MANDATORY); - --- - ---- - src/unattended-installer.vala | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala -index 6a37e20..e3fd115 100644 ---- a/src/unattended-installer.vala -+++ b/src/unattended-installer.vala -@@ -379,7 +379,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia { - disk.set_source (secondary_disk_file.get_path ()); - disk.set_target_dev ((path_format == PathFormat.DOS)? "E" : "hdd"); - disk.set_guest_device_type (DomainDiskGuestDeviceType.CDROM); -- disk.set_target_bus (DomainDiskBus.IDE); -+ disk.set_target_bus (prefers_q35? DomainDiskBus.SATA : DomainDiskBus.IDE); - - return disk; - } --- - ---- - src/vm-configurator.vala | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala -index ceadc80..c537316 100644 ---- a/src/vm-configurator.vala -+++ b/src/vm-configurator.vala -@@ -315,8 +315,13 @@ private class Boxes.VMConfigurator { - disk.set_target_bus (DomainDiskBus.VIRTIO); - disk.set_target_dev ("vd" + dev_letter_str); - } else { -- debug ("Using IDE controller for the main disk"); -- disk.set_target_bus (DomainDiskBus.IDE); -+ if (install_media.prefers_q35) { -+ debug ("Using SATA controller for the main disk"); -+ disk.set_target_bus (DomainDiskBus.SATA); -+ } else { -+ debug ("Using IDE controller for the main disk"); -+ disk.set_target_bus (DomainDiskBus.IDE); -+ } - disk.set_target_dev ("hd" + dev_letter_str); - } - --- - ---- - src/vm-configurator.vala | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala -index c537316..07804f9 100644 ---- a/src/vm-configurator.vala -+++ b/src/vm-configurator.vala -@@ -363,13 +363,22 @@ private class Boxes.VMConfigurator { - domain.add_device (video); - } - -- private static void set_sound_config (Domain domain, InstallerMedia install_media) { -- var sound = new DomainSound (); -+ private static DomainSoundModel get_sound_model (InstallerMedia install_media) { -+ if (install_media.prefers_ich9) -+ return (DomainSoundModel) DomainSoundModel.ICH9; -+ - var device = find_device_by_prop (install_media.supported_devices, DEVICE_PROP_CLASS, "audio"); -- var model = (device != null)? get_enum_value (device.get_name (), typeof (DomainSoundModel)) : -- DomainSoundModel.AC97; -+ if (device == null) -+ return (DomainSoundModel) DomainSoundModel.ICH6; -+ -+ var model = get_enum_value (device.get_name (), typeof (DomainSoundModel)); - return_if_fail (model != -1); -- sound.set_model ((DomainSoundModel) model); -+ return (DomainSoundModel) model; -+ } -+ -+ private static void set_sound_config (Domain domain, InstallerMedia install_media) { -+ var sound = new DomainSound (); -+ sound.set_model (get_sound_model (install_media)); - - domain.add_device (sound); - } --- - ---- - src/vm-configurator.vala | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala -index 07804f9..3dc1c8e 100644 ---- a/src/vm-configurator.vala -+++ b/src/vm-configurator.vala -@@ -338,6 +338,7 @@ private class Boxes.VMConfigurator { - os.set_boot_devices (boot_devices); - - os.set_arch (old_os.get_arch ()); -+ os.set_machine (old_os.get_machine ()); - - domain.set_os (os); - } --- - ---- - src/vm-configurator.vala | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala -index 3dc1c8e..6c20f5e 100644 ---- a/src/vm-configurator.vala -+++ b/src/vm-configurator.vala -@@ -347,6 +347,8 @@ private class Boxes.VMConfigurator { - var os = new DomainOs (); - os.set_os_type (DomainOsType.HVM); - os.set_arch (guest_caps.get_arch ().get_name ()); -+ if (install_media.prefers_q35) -+ os.set_machine ("q35"); - - var boot_devices = new GLib.List (); - install_media.set_direct_boot_params (os); --- - ---- - src/installer-media.vala | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/installer-media.vala b/src/installer-media.vala -index ba6bfc8..4a8d913 100644 ---- a/src/installer-media.vala -+++ b/src/installer-media.vala -@@ -57,7 +57,14 @@ private class Boxes.InstallerMedia : GLib.Object { - - public bool prefers_ich9 { - get { -- return false; -+ if (!prefers_q35) -+ return false; -+ -+ var device = find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "ich9-hda"); -+ if (device == null) -+ return false; -+ -+ return true; - } - } - --- - ---- - src/installer-media.vala | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/src/installer-media.vala b/src/installer-media.vala -index 4a8d913..5bde3ca 100644 ---- a/src/installer-media.vala -+++ b/src/installer-media.vala -@@ -51,7 +51,17 @@ private class Boxes.InstallerMedia : GLib.Object { - - public bool prefers_q35 { - get { -- return false; -+ if (os == null) -+ return true; -+ -+ var device = find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "qemu-x86-q35"); -+ if (device == null) -+ return false; -+ -+ if (supports_virtio_net && !supports_virtio1_net) -+ return false; -+ -+ return true; - } - } - --- diff --git a/SPECS/gnome-boxes.spec b/SPECS/gnome-boxes.spec index 2e9afd1..f3b277e 100644 --- a/SPECS/gnome-boxes.spec +++ b/SPECS/gnome-boxes.spec @@ -30,37 +30,22 @@ ExclusiveArch: x86_64 %global url_ver %%(echo %{version}|cut -d. -f1,2) Name: gnome-boxes -Version: 3.28.5 -Release: 7%{?dist} +Version: 3.36.5 +Release: 2%{?dist} Summary: A simple GNOME 3 application to access remote or virtual systems License: LGPLv2+ URL: https://wiki.gnome.org/Apps/Boxes Source0: http://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz -# https://gitlab.gnome.org/GNOME/gnome-boxes/issues/217 -Patch0: gnome-boxes-unbreak-the-icon-installation.patch - -# https://bugzilla.redhat.com/1581422 -Patch1: gnome-boxes-use-q35-machine-type.patch - -# https://bugzilla.redhat.com/1656446 -Patch2: gnome-boxes-hardcode-recommended-oses.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1713130 -Patch3: gnome-boxes-update-rhel-logo.patch - -# https://bugzilla.redhat.com/1739897 -Patch4: gnome-boxes-offer-only-supported-arches.patch - BuildRequires: gettext >= 0.19.8 BuildRequires: meson BuildRequires: vala >= 0.36.0 BuildRequires: yelp-tools BuildRequires: pkgconfig(clutter-gtk-1.0) +BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(glib-2.0) >= 2.52 BuildRequires: pkgconfig(gobject-introspection-1.0) -BuildRequires: pkgconfig(govirt-1.0) BuildRequires: pkgconfig(gtk+-3.0) >= 3.22.20 BuildRequires: pkgconfig(gtk-vnc-2.0) BuildRequires: pkgconfig(libarchive) @@ -74,11 +59,15 @@ BuildRequires: pkgconfig(libosinfo-1.0) >= 1.2.0 BuildRequires: pkgconfig(libsoup-2.4) >= 2.44 BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(tracker-sparql-2.0) +BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: spice-gtk3-vala BuildRequires: libosinfo-vala BuildRequires: desktop-file-utils +# See https://bugzilla.redhat.com/1052945 +Recommends: openssh-askpass + # Pulls in libvirtd + KVM, but no NAT / firewall configs %if %{with_qemu_kvm} Requires: libvirt-daemon-kvm @@ -120,11 +109,6 @@ gnome-boxes lets you easily create, setup, access, and use: %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build %meson \ @@ -146,22 +130,35 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Boxes.deskt %files -f %{name}.lang %license COPYING -%doc AUTHORS README NEWS TODO +%doc AUTHORS README.md NEWS %{_bindir}/%{name} +%{_libdir}/%{name} +%{_includedir}/%{name} %{_datadir}/%{name}/ %{_datadir}/applications/org.gnome.Boxes.desktop %{_datadir}/glib-2.0/schemas/org.gnome.boxes.gschema.xml -%{_datadir}/icons/hicolor/*/apps/org.gnome.Boxes.png +%{_datadir}/icons/hicolor/*/apps/org.gnome.Boxes.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Boxes-symbolic.svg %{_libexecdir}/gnome-boxes-search-provider %{_datadir}/dbus-1/services/org.gnome.Boxes.SearchProvider.service %{_datadir}/dbus-1/services/org.gnome.Boxes.service %dir %{_datadir}/gnome-shell %dir %{_datadir}/gnome-shell/search-providers -%{_datadir}/gnome-shell/search-providers/gnome-boxes-search-provider.ini +%{_datadir}/gnome-shell/search-providers/org.gnome.Boxes.SearchProvider.ini %{_datadir}/metainfo/org.gnome.Boxes.appdata.xml %changelog +* Mon Jun 22 2020 Felipe Borges - 3.36.5-2 +- Recommend openssh-askpass +- Related: #1052945 + +* Thu Jun 11 2020 Felipe Borges - 3.36.5-1 +- Rebase to 3.36.5 + +* Tue Jan 21 2020 Felipe Borges - 3.28.5-8 +- Present undetected OSes +- Related: #1793413 + * Thu Aug 15 2019 Felipe Borges - 3.28.5-7 - Bump the release to 3.28.5-7 - Related: #1739897