import gnome-boxes-3.36.5-6.el8
This commit is contained in:
parent
027fe7ce7a
commit
6bf6c7e416
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/gnome-boxes-3.28.5.tar.xz
|
||||
SOURCES/gnome-boxes-3.36.5.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
5c29480ed1a8d75ce8fa34418ccbf7b745de793a SOURCES/gnome-boxes-3.28.5.tar.xz
|
||||
ae816759c3f366162048f8faf2f4b11f6054c791 SOURCES/gnome-boxes-3.36.5.tar.xz
|
||||
|
25
SOURCES/gnome-boxes-disable-3d-acceleration.patch
Normal file
25
SOURCES/gnome-boxes-disable-3d-acceleration.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 932e84eff38302ff7c6b89213a911589cbb06bfe Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges <felipeborges@gnome.org>
|
||||
Date: Mon, 13 Jul 2020 10:54:41 +0200
|
||||
Subject: [PATCH] disable-3d-acceleration
|
||||
|
||||
---
|
||||
src/libvirt-machine-properties.vala | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
|
||||
index 5f5392e3..aa69fc85 100644
|
||||
--- a/src/libvirt-machine-properties.vala
|
||||
+++ b/src/libvirt-machine-properties.vala
|
||||
@@ -116,7 +116,7 @@ public string collect_logs () {
|
||||
add_string_property (ref list, _("Display URL"), machine.display.uri);
|
||||
}
|
||||
|
||||
- add_3d_acceleration_property (ref list);
|
||||
+ //add_3d_acceleration_property (ref list);
|
||||
|
||||
break;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
29
SOURCES/gnome-boxes-dont-be-critical.patch
Normal file
29
SOURCES/gnome-boxes-dont-be-critical.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 1de7984024732d18450cfba96b4975b98c885167 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges <felipeborges@gnome.org>
|
||||
Date: Tue, 30 Jun 2020 12:49:22 +0200
|
||||
Subject: [PATCH] WIP
|
||||
|
||||
---
|
||||
src/wizard-source.vala | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
|
||||
index b596741e..ab2ea37c 100644
|
||||
--- a/src/wizard-source.vala
|
||||
+++ b/src/wizard-source.vala
|
||||
@@ -91,8 +91,10 @@ public WizardDownloadableEntry (Osinfo.Media media) {
|
||||
|
||||
url = media.url;
|
||||
|
||||
- var media_file = GLib.File.new_for_uri (media.url);
|
||||
- set_tooltip_text (media_file.get_basename ());
|
||||
+ if (media.url != null) {
|
||||
+ var media_file = GLib.File.new_for_uri (media.url);
|
||||
+ set_tooltip_text (media_file.get_basename ());
|
||||
+ }
|
||||
}
|
||||
|
||||
public WizardDownloadableEntry.from_os (Osinfo.Os os) {
|
||||
--
|
||||
2.26.2
|
||||
|
116
SOURCES/gnome-boxes-download-from-url.patch
Normal file
116
SOURCES/gnome-boxes-download-from-url.patch
Normal file
@ -0,0 +1,116 @@
|
||||
From bb0e600c9931d053d85f684953ec4aa2c20b7584 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges <felipeborges@gnome.org>
|
||||
Date: Wed, 24 Jun 2020 15:35:00 +0200
|
||||
Subject: [PATCH] assistant, downloads-hub: Restore support to download from
|
||||
URI
|
||||
|
||||
Fixes #520
|
||||
---
|
||||
src/assistant/downloads-page.vala | 9 +++++++++
|
||||
src/assistant/index-page.vala | 1 +
|
||||
src/downloads-hub.vala | 25 +++++++++++++++++++++----
|
||||
3 files changed, 31 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/assistant/downloads-page.vala b/src/assistant/downloads-page.vala
|
||||
index 41b93581..98086cee 100644
|
||||
--- a/src/assistant/downloads-page.vala
|
||||
+++ b/src/assistant/downloads-page.vala
|
||||
@@ -20,6 +20,7 @@
|
||||
private GLib.ListStore recommended_model;
|
||||
|
||||
public signal void media_selected (Gtk.ListBoxRow row);
|
||||
+ public signal void url_entered ();
|
||||
|
||||
private AssistantDownloadsPageView _page;
|
||||
public AssistantDownloadsPageView page {
|
||||
@@ -105,6 +106,14 @@ private void on_search_changed () {
|
||||
if (text == null)
|
||||
return;
|
||||
|
||||
+ var uri = Xml.URI.parse (text);
|
||||
+ if (uri.scheme.has_prefix ("http")) {
|
||||
+ DownloadsHub.get_instance ().add_url (text);
|
||||
+
|
||||
+ url_entered ();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
search.text = text;
|
||||
}
|
||||
|
||||
diff --git a/src/assistant/index-page.vala b/src/assistant/index-page.vala
|
||||
index 097220be..c7637407 100644
|
||||
--- a/src/assistant/index-page.vala
|
||||
+++ b/src/assistant/index-page.vala
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
source_medias.set_header_func (use_list_box_separator);
|
||||
featured_medias.set_header_func (use_list_box_separator);
|
||||
+ recommended_downloads_page.url_entered.connect (() => { dialog.hide (); });
|
||||
}
|
||||
|
||||
public void setup (VMAssistant dialog) {
|
||||
diff --git a/src/downloads-hub.vala b/src/downloads-hub.vala
|
||||
index 3b1bc8ef..61c1e53f 100644
|
||||
--- a/src/downloads-hub.vala
|
||||
+++ b/src/downloads-hub.vala
|
||||
@@ -33,10 +33,12 @@ public static DownloadsHub get_instance () {
|
||||
}
|
||||
|
||||
public void add_item (WizardDownloadableEntry entry) {
|
||||
- n_items+=1;
|
||||
-
|
||||
var row = new DownloadsHubRow.from_entry (entry);
|
||||
+ add_row (row);
|
||||
+ }
|
||||
|
||||
+ private void add_row (DownloadsHubRow row) {
|
||||
+ n_items+=1;
|
||||
if (!button.visible)
|
||||
button.visible = true;
|
||||
|
||||
@@ -62,6 +64,11 @@ public void add_item (WizardDownloadableEntry entry) {
|
||||
popup ();
|
||||
}
|
||||
|
||||
+ public void add_url (string url) {
|
||||
+ var row = new DownloadsHubRow.from_url (url);
|
||||
+ add_row (row);
|
||||
+ }
|
||||
+
|
||||
private void on_row_deleted () {
|
||||
n_items-= 1;
|
||||
if (!ongoing_downloads) {
|
||||
@@ -163,17 +170,27 @@ private bool draw_button_pie (Widget drawing_area, Cairo.Context context) {
|
||||
|
||||
Downloader.fetch_os_logo.begin (image, entry.os, 64);
|
||||
|
||||
+ setup (entry.url);
|
||||
+ }
|
||||
+
|
||||
+ public DownloadsHubRow.from_url (string url) {
|
||||
+ label.label = url;
|
||||
+
|
||||
+ setup (url);
|
||||
+ }
|
||||
+
|
||||
+ private void setup (string url) {
|
||||
progress_notify_id = progress.notify["progress"].connect (() => {
|
||||
progress_bar.fraction = progress.progress;
|
||||
});
|
||||
progress_bar.fraction = progress.progress = 0;
|
||||
|
||||
- var soup_download_uri = new Soup.URI (entry.url);
|
||||
+ var soup_download_uri = new Soup.URI (url);
|
||||
var download_path = soup_download_uri.get_path ();
|
||||
|
||||
var filename = GLib.Path.get_basename (download_path);
|
||||
|
||||
- download.begin (entry.url, filename);
|
||||
+ download.begin (url, filename);
|
||||
}
|
||||
|
||||
private async void download (string url, string filename) {
|
||||
--
|
||||
2.26.2
|
||||
|
49
SOURCES/gnome-boxes-download-on-activate-signal.patch
Normal file
49
SOURCES/gnome-boxes-download-on-activate-signal.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 376baa1bdfe2dfbe9f4973b33465fa35c102c086 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges
|
||||
<feborges@ibm-p8-kvm-03-guest-02.virt.pnr.lab.eng.rdu2.redhat.com>
|
||||
Date: Mon, 10 Aug 2020 14:42:22 +0200
|
||||
Subject: [PATCH] downloads-page: Start URL download on ENTER (activate)
|
||||
|
||||
---
|
||||
src/assistant/downloads-page.vala | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/assistant/downloads-page.vala b/src/assistant/downloads-page.vala
|
||||
index 98086cee..5be638a0 100644
|
||||
--- a/src/assistant/downloads-page.vala
|
||||
+++ b/src/assistant/downloads-page.vala
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
// TODO: move this into a UI file
|
||||
search_entry.search_changed.connect (on_search_changed);
|
||||
+ search_entry.activate.connect (on_search_activated);
|
||||
search_entry.width_chars = 50;
|
||||
search_entry.can_focus = true;
|
||||
search_entry.placeholder_text = _("Search for an OS or enter a download link…");
|
||||
@@ -103,6 +104,14 @@ private void on_show_more_button_clicked () {
|
||||
private void on_search_changed () {
|
||||
var text = search_entry.get_text ();
|
||||
|
||||
+ if (text == null)
|
||||
+ return;
|
||||
+
|
||||
+ search.text = text;
|
||||
+ }
|
||||
+
|
||||
+ private void on_search_activated () {
|
||||
+ var text = search_entry.get_text ();
|
||||
if (text == null)
|
||||
return;
|
||||
|
||||
@@ -113,8 +122,6 @@ private void on_search_changed () {
|
||||
url_entered ();
|
||||
return;
|
||||
}
|
||||
-
|
||||
- search.text = text;
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 4de5a560474d4e5a9e4084f3fa47a18426c2217a Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges <feborges@redhat.com>
|
||||
Date: Tue, 21 Jan 2020 11:44:14 +0100
|
||||
Subject: [PATCH] media-manager: Filter architectures only for known medias
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1793413
|
||||
|
||||
os-database: Only offer supported arches for download
|
||||
|
||||
app-window: Fix build with new Vala
|
||||
---
|
||||
src/app-window.vala | 2 +-
|
||||
src/installed-media.vala | 2 +-
|
||||
src/media-manager.vala | 11 ++++++++++-
|
||||
src/os-database.vala | 3 +++
|
||||
4 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/app-window.vala b/src/app-window.vala
|
||||
index ebe7007a..7e951945 100644
|
||||
--- a/src/app-window.vala
|
||||
+++ b/src/app-window.vala
|
||||
@@ -422,7 +422,7 @@ public bool on_key_pressed (Widget widget, Gdk.EventKey event) {
|
||||
|
||||
return true;
|
||||
} else if (event.keyval == Gdk.Key.A &&
|
||||
- (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.SHIFT_MASK) {
|
||||
+ (event.state & default_modifiers) == (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.SHIFT_MASK)) {
|
||||
foreach_view ((view) => { view.unselect_all (); });
|
||||
|
||||
return true;
|
||||
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..f3651d4b 100644
|
||||
--- a/src/media-manager.vala
|
||||
+++ b/src/media-manager.vala
|
||||
@@ -150,7 +150,16 @@ else if (VMConfigurator.is_libvirt_cloning_config (config))
|
||||
continue;
|
||||
}
|
||||
|
||||
- list.insert_sorted (media, compare_media_by_vendor);
|
||||
+ if (os_id != null) {
|
||||
+ 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 == null || !(os_media.architecture in InstalledMedia.supported_architectures)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ list.insert_sorted (media, compare_media_by_vendor);
|
||||
} catch (GLib.Error error) {
|
||||
warning ("Failed to use ISO '%s': %s", path, error.message);
|
||||
}
|
||||
diff --git a/src/os-database.vala b/src/os-database.vala
|
||||
index d636cae2..26c0a500 100644
|
||||
--- a/src/os-database.vala
|
||||
+++ b/src/os-database.vala
|
||||
@@ -124,6 +124,9 @@ public async Os get_os_by_id (string id) throws OSDatabaseError {
|
||||
if (media.url == null)
|
||||
continue;
|
||||
|
||||
+ if (!(media.architecture in InstalledMedia.supported_architectures))
|
||||
+ continue;
|
||||
+
|
||||
var eol = (os as Product).get_eol_date ();
|
||||
if (eol == null || now.compare (eol) > 1)
|
||||
after_list.append (media);
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,332 +0,0 @@
|
||||
From b874d9355644eb686a8af9df03884a0a19513059 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges <felipeborges@gnome.org>
|
||||
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 @@
|
||||
<gresource prefix="/org/gnome/Boxes">
|
||||
<file>gtk-style.css</file>
|
||||
<file preprocess="xml-stripblanks" alias="gtk/menus.ui">ui/menus.ui</file>
|
||||
+ <file preprocess="xml-stripblanks">recommended-downloads.xml</file>
|
||||
<file>icons/boxes-arrow.svg</file>
|
||||
<file>icons/boxes-create.png</file>
|
||||
<file>icons/empty-boxes.png</file>
|
||||
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 @@
|
||||
+<?xml version="1.0" encoding="utf-8" ?>
|
||||
+<!--
|
||||
+ These are OSes listed in the recommended section of the "Download an OS" page.
|
||||
+
|
||||
+ This list is powered by libosinfo, therefore the URLs are unique identifiers
|
||||
+ for each OS in osinfo-db.
|
||||
+
|
||||
+ Downstreams are encouraged to tweak the list as they wish. Sorting is also
|
||||
+ available.
|
||||
+ -->
|
||||
+<list>
|
||||
+ <os_id>http://redhat.com/rhel/7.6</os_id>
|
||||
+ <os_id>http://fedoraproject.org/fedora/29</os_id>
|
||||
+ <os_id>http://fedoraproject.org/silverblue/29</os_id>
|
||||
+ <os_id>http://ubuntu.com/ubuntu/18.10</os_id>
|
||||
+ <os_id>http://opensuse.org/opensuse/15.0</os_id>
|
||||
+ <os_id>http://debian.org/debian/9</os_id>
|
||||
+</list>
|
||||
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 @@
|
||||
<child>
|
||||
<object class="BoxesWizardScrolled" id="downloads_scrolled">
|
||||
<property name="visible">False</property>
|
||||
- <signal name="show" handler="on_downloads_scrolled_shown"/>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
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<Osinfo.Media>? 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<Osinfo.Media> list = new GLib.List<Osinfo.Media> ();
|
||||
+ 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
|
||||
|
@ -1,56 +0,0 @@
|
||||
From e8b9d5ca5ebed5f2e076e6e6c975ec37efc21c5b Mon Sep 17 00:00:00 2001
|
||||
From: Debarshi Ray <debarshir@gnome.org>
|
||||
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
|
||||
|
@ -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 @@
|
||||
<!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
|
||||
|
||||
<os id="http://redhat.com/rhel/4.0">
|
||||
- <logo>https://people.gnome.org/~zeeshanak/logos/shadownman-pill.svg</logo>
|
||||
+ <logo>https://gitlab.gnome.org/GNOME/gnome-boxes-logos/raw/master/logos/shadownman-pill.svg</logo>
|
||||
</os>
|
||||
|
||||
</libosinfo>
|
||||
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 @@
|
||||
+<libosinfo version="0.0.1">
|
||||
+
|
||||
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
|
||||
+
|
||||
+ <os id="http://redhat.com/rhel/8.0">
|
||||
+ <logo>https://gitlab.gnome.org/GNOME/gnome-boxes-logos/raw/master/logos/shadownman-pill.svg</logo>
|
||||
+ </os>
|
||||
+
|
||||
+</libosinfo>
|
||||
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.
|
||||
-->
|
||||
<list>
|
||||
- <os_id>http://redhat.com/rhel/7.6</os_id>
|
||||
- <os_id>http://fedoraproject.org/fedora/29</os_id>
|
||||
- <os_id>http://fedoraproject.org/silverblue/29</os_id>
|
||||
- <os_id>http://ubuntu.com/ubuntu/18.10</os_id>
|
||||
- <os_id>http://opensuse.org/opensuse/15.0</os_id>
|
||||
+ <os_id>http://redhat.com/rhel/8.1</os_id>
|
||||
+ <os_id>http://redhat.com/rhel/7.7</os_id>
|
||||
+ <os_id>http://fedoraproject.org/fedora/30</os_id>
|
||||
+ <os_id>http://fedoraproject.org/silverblue/30</os_id>
|
||||
+ <os_id>http://ubuntu.com/ubuntu/19.04</os_id>
|
||||
+ <os_id>http://opensuse.org/opensuse/15.1</os_id>
|
||||
<os_id>http://debian.org/debian/9</os_id>
|
||||
</list>
|
@ -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<DomainOsBootDevice> ();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
@ -30,38 +30,30 @@ ExclusiveArch: x86_64
|
||||
%global url_ver %%(echo %{version}|cut -d. -f1,2)
|
||||
|
||||
Name: gnome-boxes
|
||||
Version: 3.28.5
|
||||
Release: 8%{?dist}
|
||||
Version: 3.36.5
|
||||
Release: 6%{?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
|
||||
# https://bugzilla.redhat.com/1793413
|
||||
Patch4: gnome-boxes-filter-supported-arches.patch
|
||||
# https://bugzilla.redhat.com/1851089
|
||||
Patch0: gnome-boxes-download-from-url.patch
|
||||
# https://bugzilla.redhat.com/1851043
|
||||
Patch1: gnome-boxes-dont-be-critical.patch
|
||||
# https://bugzilla.redhat.com/1856717
|
||||
Patch2: gnome-boxes-disable-3d-acceleration.patch
|
||||
Patch3: gnome-boxes-download-on-activate-signal.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)
|
||||
@ -75,11 +67,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
|
||||
@ -125,7 +121,6 @@ gnome-boxes lets you easily create, setup, access, and use:
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%meson \
|
||||
@ -147,22 +142,47 @@ 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 Aug 10 2020 Felipe Borges <feborges@redhat.com> - 3.36.5-6
|
||||
- Start downloads on the Assistant when pressing ENTER
|
||||
- Related: #1851089
|
||||
|
||||
* Mon Jul 13 2020 Felipe Borges <feborges@redhat.com> - 3.36.5-5
|
||||
- Disable 3D acceleration
|
||||
- Related: #1856717
|
||||
|
||||
* Tue Jun 30 2020 Felipe Borges <feborges@redhat.com> - 3.36.5-4
|
||||
- Don't create a tooltip if the URL for the OS is null
|
||||
- Related: #1851043
|
||||
|
||||
* Wed Jun 24 2020 Felipe Borges <feborges@redhat.com> - 3.36.5-3
|
||||
- Allow pasting URLs in the Assistant "Download an OS" search
|
||||
- Related: #1851089
|
||||
|
||||
* Mon Jun 22 2020 Felipe Borges <feborges@redhat.com> - 3.36.5-2
|
||||
- Recommend openssh-askpass
|
||||
- Related: #1052945
|
||||
|
||||
* Thu Jun 11 2020 Felipe Borges <feborges@redhat.com> - 3.36.5-1
|
||||
- Rebase to 3.36.5
|
||||
|
||||
* Tue Jan 21 2020 Felipe Borges <feborges@redhat.com> - 3.28.5-8
|
||||
- Present undetected OSes
|
||||
- Related: #1793413
|
||||
|
Loading…
Reference in New Issue
Block a user