diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d6c5596 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-boxes-3.28.5.tar.xz diff --git a/.gnome-boxes.metadata b/.gnome-boxes.metadata new file mode 100644 index 0000000..184b01a --- /dev/null +++ b/.gnome-boxes.metadata @@ -0,0 +1 @@ +5c29480ed1a8d75ce8fa34418ccbf7b745de793a SOURCES/gnome-boxes-3.28.5.tar.xz diff --git a/SOURCES/gnome-boxes-hardcode-recommended-oses.patch b/SOURCES/gnome-boxes-hardcode-recommended-oses.patch new file mode 100644 index 0000000..338a84b --- /dev/null +++ b/SOURCES/gnome-boxes-hardcode-recommended-oses.patch @@ -0,0 +1,332 @@ +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-libgovirt-tracker.patch b/SOURCES/gnome-boxes-libgovirt-tracker.patch new file mode 100644 index 0000000..a1a3d46 --- /dev/null +++ b/SOURCES/gnome-boxes-libgovirt-tracker.patch @@ -0,0 +1,38 @@ +From 92fb1b57abc9fa7b582a82c8e5d58451cdbffad7 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Fri, 8 Jun 2018 13:45:52 +0200 +Subject: [PATCH] build: Revert to using Tracker 1.0.x, and fix the libgovirt + version + +RHEL 7.6 doesn't have Tracker 2.0.x; and libgovirt-0.3.1 is enough. + +https://bugzilla.redhat.com/show_bug.cgi?id=1569793 +--- + src/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index ac79b7fc2677..89727ca44d11 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -129,7 +129,7 @@ dependencies = [ + dependency ('libvirt-gobject-1.0', version: '>= 0.2.0'), + dependency ('libxml-2.0', version: '>= 2.7.8'), + dependency ('spice-client-gtk-3.0', version: '>= 0.32'), +- dependency ('tracker-sparql-2.0'), ++ dependency ('tracker-sparql-1.0'), + dependency ('webkit2gtk-4.0'), + valac.find_library ('gio-2.0-workaround', dirs: vapi_dir), + valac.find_library ('linux'), +@@ -153,7 +153,7 @@ else + vala_args += '--define=HAVE_OVIRT' + + dependencies += [ +- dependency ('govirt-1.0', version: '>= 0.3.4'), ++ dependency ('govirt-1.0', version: '>= 0.3.1'), + valac.find_library ('rest-0.7') + ] + endif +-- +2.14.4 + diff --git a/SOURCES/gnome-boxes-python2.patch b/SOURCES/gnome-boxes-python2.patch new file mode 100644 index 0000000..db65197 --- /dev/null +++ b/SOURCES/gnome-boxes-python2.patch @@ -0,0 +1,8 @@ +--- gnome-boxes-3.28.4/build-aux/post_install.py.python2 2018-05-09 11:48:19.000000000 +0200 ++++ gnome-boxes-3.28.4/build-aux/post_install.py 2018-05-23 22:13:53.921343405 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!/usr/bin/python2 + + import os + import subprocess diff --git a/SOURCES/gnome-boxes-unbreak-the-icon-installation.patch b/SOURCES/gnome-boxes-unbreak-the-icon-installation.patch new file mode 100644 index 0000000..4e24c84 --- /dev/null +++ b/SOURCES/gnome-boxes-unbreak-the-icon-installation.patch @@ -0,0 +1,56 @@ +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 new file mode 100644 index 0000000..b389cfa --- /dev/null +++ b/SOURCES/gnome-boxes-update-rhel-logo.patch @@ -0,0 +1,56 @@ +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..f4772d7 100644 +--- a/data/recommended-downloads.xml ++++ b/data/recommended-downloads.xml +@@ -9,7 +9,8 @@ + available. + --> + +- http://redhat.com/rhel/7.6 ++ http://redhat.com/rhel/8.0 ++ http://redhat.com/rhel/7.7 + http://fedoraproject.org/fedora/29 + http://fedoraproject.org/silverblue/29 + http://ubuntu.com/ubuntu/18.10 diff --git a/SOURCES/revert-use-virtio-video-adapter.patch b/SOURCES/revert-use-virtio-video-adapter.patch new file mode 100644 index 0000000..c492452 --- /dev/null +++ b/SOURCES/revert-use-virtio-video-adapter.patch @@ -0,0 +1,27 @@ +From 9271632f42e0ba4851f47cc0c56584b8c9cdf49b Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Mon, 16 Jul 2018 16:47:23 +0200 +Subject: [PATCH] Revert "vm-configurator: Use VIRTIO video adapter for new + VMs" + +This reverts commit d05c38bb3287b1f8fea75d147f2c982b3de2f9b0. +--- + src/vm-configurator.vala | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala +index 3090e138..3e12cb08 100644 +--- a/src/vm-configurator.vala ++++ b/src/vm-configurator.vala +@@ -355,7 +355,7 @@ private static void set_os_config (Domain domain, InstallerMedia install_media, + + private static void set_video_config (Domain domain, InstallerMedia install_media) { + var video = new DomainVideo (); +- video.set_model (DomainVideoModel.VIRTIO); ++ video.set_model (DomainVideoModel.QXL); + + domain.add_device (video); + } +-- +2.17.1 + diff --git a/SOURCES/use-ps2-bus-by-default.patch b/SOURCES/use-ps2-bus-by-default.patch new file mode 100644 index 0000000..850f63b --- /dev/null +++ b/SOURCES/use-ps2-bus-by-default.patch @@ -0,0 +1,32 @@ +--- + src/vm-configurator.vala | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala +index 49333988..5a4c7f12 100644 +--- a/src/vm-configurator.vala ++++ b/src/vm-configurator.vala +@@ -353,7 +353,7 @@ private static void set_sound_config (Domain domain, InstallerMedia install_medi + } + + private static void set_tablet_config (Domain domain, InstallerMedia install_media) { +- set_input_config (domain, DomainInputDeviceType.TABLET); ++ set_input_config (domain, DomainInputDeviceType.TABLET, DomainInputBus.USB); + } + + private static void set_mouse_config (Domain domain, InstallerMedia install_media) { +@@ -364,10 +364,12 @@ private static void set_keyboard_config (Domain domain, InstallerMedia install_m + set_input_config (domain, DomainInputDeviceType.KEYBOARD); + } + +- private static void set_input_config (Domain domain, DomainInputDeviceType device_type) { ++ private static void set_input_config (Domain domain, ++ DomainInputDeviceType device_type, ++ DomainInputBus input_bus = DomainInputBus.PS2) { + var input = new DomainInput (); + input.set_device_type (device_type); +- input.set_bus (DomainInputBus.USB); ++ input.set_bus (input_bus); + + domain.add_device (input); + } diff --git a/SPECS/gnome-boxes.spec b/SPECS/gnome-boxes.spec new file mode 100644 index 0000000..d09a5b3 --- /dev/null +++ b/SPECS/gnome-boxes.spec @@ -0,0 +1,478 @@ +# Since RHEL-5, QEMU is restricted to x86_64 only +# As Boxes don't really handle the !qemu case very well (untested, the 'box +# creation' UI would still be there but non-functional, ...), better to +# only build Boxes on platforms where qemu/qemu-kvm are available +%if 0%{?rhel} +ExclusiveArch: x86_64 +%endif + + +# The following qemu_kvm_arches/with_qemu_kvm defines come from +# libvirt.spec +%if 0%{?fedora} + %global qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64 + %global distributor_name fedora + %global distributor_version %{fedora} +%endif + +%if 0%{?rhel} >= 7 + %global qemu_kvm_arches x86_64 %{power64} + %global distributor_name rhel + %global distributor_version %{rhel} +%endif + +%ifarch %{qemu_kvm_arches} + %global with_qemu_kvm 1 +%else + %global with_qemu_kvm 0 +%endif + +%global url_ver %%(echo %{version}|cut -d. -f1,2) + +Name: gnome-boxes +Version: 3.28.5 +Release: 4%{?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/show_bug.cgi?id=1449922 +Patch1: use-ps2-bus-by-default.patch + +Patch2: gnome-boxes-python2.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1569793 +Patch3: gnome-boxes-libgovirt-tracker.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1595754 +Patch4: revert-use-virtio-video-adapter.patch + +# https://bugzilla.redhat.com/1656448 +Patch5: gnome-boxes-hardcode-recommended-oses.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1713005 +Patch6: gnome-boxes-update-rhel-logo.patch + +BuildRequires: gettext >= 0.19.8 +BuildRequires: meson +BuildRequires: vala >= 0.36.0 +BuildRequires: yelp-tools +BuildRequires: pkgconfig(clutter-gtk-1.0) +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) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(libsecret-1) +BuildRequires: pkgconfig(libvirt-gobject-1.0) +BuildRequires: pkgconfig(libvirt-gconfig-1.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(gudev-1.0) +BuildRequires: pkgconfig(libosinfo-1.0) >= 1.1.0 +BuildRequires: pkgconfig(libsoup-2.4) >= 2.44 +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(tracker-sparql-1.0) +BuildRequires: pkgconfig(webkit2gtk-4.0) +BuildRequires: spice-gtk3-vala +BuildRequires: libosinfo-vala +BuildRequires: desktop-file-utils + +# Pulls in libvirtd + KVM, but no NAT / firewall configs +%if %{with_qemu_kvm} +Requires: libvirt-daemon-kvm +%else +Requires: libvirt-daemon-qemu +%endif + +# Pulls in the libvirtd NAT 'default' network +# Original request: https://bugzilla.redhat.com/show_bug.cgi?id=1081762 +# +# However, the 'default' network does not mix well with the Fedora livecd +# when it is run inside a VM. The whole saga is documented here: +# +# boxes: https://bugzilla.redhat.com/show_bug.cgi?id=1164492 +# libvirt: https://bugzilla.redhat.com/show_bug.cgi?id=1146232 +# +# Until a workable solution has been determined and implemented, this +# dependency should stay disabled in rawhide and fedora development +# branches so it does not end up on the livecd. Once a Fedora GA is +# released, a gnome-boxes update can be pushed with this dependency +# re-enabled. crobinso will handle this process, see: +# +# https://bugzilla.redhat.com/show_bug.cgi?id=1164492#c71 +Requires: libvirt-daemon-config-network + +# Needed for unattended installations +Requires: mtools +Requires: genisoimage + +Requires: adwaita-icon-theme + +%description +gnome-boxes lets you easily create, setup, access, and use: + * remote machines + * remote virtual machines + * local virtual machines + * When technology permits, set up access for applications on + local virtual machines + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 -b .use-ps2-bus-by-default +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + +%build +%meson \ +%if %{?distributor_name:1}%{!?distributor_name:0} + -D distributor_name=%{distributor_name} \ +%endif +%if 0%{?distributor_version} + -D distributor_version=%{distributor_version} \ +%endif + +%meson_build + +%install +%meson_install +%find_lang %{name} --with-gnome + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Boxes.desktop + +%post +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +update-desktop-database &> /dev/null || : +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + +%files -f %{name}.lang +%license COPYING +%doc AUTHORS README NEWS TODO +%{_bindir}/%{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/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}/metainfo/org.gnome.Boxes.appdata.xml + +%changelog +* Wed May 22 2019 Fabiano Fidêncio - 3.28.5-4 +- Add rhel-8 logo & update rhel logo +- Resolves: #1713005 + +* Wed Dec 05 2018 Felipe Borges - 3.28.5-3 +- Pick our recommended downloads +- Related #1656448 + +* Mon Jul 16 2018 Felipe Borges - 3.28.5-2 +- Revert using VIRTIO video adapter by default for new VMs +- Resolves: #1595754 + +* Fri Jun 08 2018 Debarshi Ray - 3.28.5-1 +- Update to 3.28.5 +- Fix the libgovirt requirement +- Revert to using Python 2 and Tracker 1.0 +- Resolves: #1567399 + +* Thu Jun 08 2017 Felipe Borges - 3.22.4-4 +- Use PS2 bus by default +- Related: #1449922 + +* Wed May 24 2017 Felipe Borges - 3.22.4-3 +- Run "make vala-clean" before make install +- Related: #1435336 + +* Wed Mar 15 2017 Kalev Lember - 3.22.4-2 +- Rebuilt for spice-gtk3 soname bump +- Related: #1402474 + +* Mon Feb 06 2017 Kalev Lember - 3.22.4-1 +- Update to 3.22.4 +- Resolves: #1386879 + +* Fri Jul 1 2016 Matthias Clasen - 3.14.3.1-10 +- Update translations + Resolves: #1304291 + +* Tue May 17 2016 Zeeshan Ali - 3.14.3.1-9 +- Avoid characters in hostname, not accepted by Windows. (related: #1336055). + +* Tue May 10 2016 Zeeshan Ali - 3.14.3.1-8 +- Private SPICE connection. (related: #1043950). + +* Wed Aug 19 2015 Matthias Clasen - 3.14.3.1-7 +- Make window less tall + Resolves: #1250270 + +* Wed Jul 29 2015 Zeeshan Ali - 3.14.3.1-6 +- Wait machine to start before connecting to it. (related: #1034354). + +* Wed Jul 22 2015 Zeeshan Ali - 3.14.3.1-5 +- Fix import of system VMs. (related: #1201255). + +* Fri Jul 17 2015 Zeeshan Ali - 3.14.3.1-4 +- More reliable test for raw images (related: #1211198). + +* Wed Jul 15 2015 Zeeshan Ali - 3.14.3.1-3 +- More reliable storage pool setup (related: #1238719). + +* Fri May 22 2015 Zeeshan Ali - 3.14.3.1-2 +- Look for bridge.conf in qemu-kvm dir too (related: #1214294). + +* Thu Mar 19 2015 Richard Hughes - 3.14.3.1-1 +- Update to 3.14.3.1. + +* Mon Oct 13 2014 Zeeshan Ali - 3.8.3-11 +- Don't hang on failure to handle a URL (related: #1046251). +- Handle paths as well (related: #1046251). +- Handle local paths to remote files (related: #1046251). + +* Thu Oct 9 2014 Zeeshan Ali - 3.8.3-10 +- Set volume capacity in correct units (related: #1049316). +- Refresh volume info after resize (related: #1049316). + +* Thu Jul 24 2014 Marc-Andre Lureau - 3.8.3-9 +- Rebuild to pick new libgovirt + Resolves: #1117928 + +* Mon Mar 17 2014 Zeeshan Ali - 3.8.3-8 +- Don't register for 'x-content/bootable-media' (related: #1072611). +- Ignore CDROM devices (related: #1072611). +- Ignore non-readable devices (related: #1043892) + +* Wed Mar 12 2014 Zeeshan Ali - 3.8.3-7 +- Fix a crash in get_decoded_udev_property (related: #1061216). + +* Fri Feb 28 2014 Matthias Clasen - 3.8.3-6 +- Rebuild +Resolves: #1070807 + +* Fri Dec 27 2013 Daniel Mach - 3.8.3-5 +- Mass rebuild 2013-12-27 + +* Tue Dec 17 2013 Zeeshan Ali - 3.8.3-4 +- Remove media from correct box (related: #846408). +- Remove existing transition before adding new one (related: #1015079). + +* Wed Dec 4 2013 Zeeshan Ali - 3.8.3-3 +- Complete translations (related: #1030336). + +* Fri Nov 8 2013 Zeeshan Ali - 3.8.3-2 +- Fix rhbz#968285 + +* Tue May 28 2013 Zeeshan Ali - 3.8.3-1 +- Update to 3.8.3. + +* Mon May 27 2013 Kalev Lember 3.8.2-5 +- Only pull in qemu on non-kvm arches + +* Fri May 24 2013 Christophe Fergeau 3.8.2-4 +- ... and remove again the ExclusiveArch on fedora. If libvirt-daemon-qemu + is available, this means we can create (very slow) x86 boxes regardless + of the arch + +* Thu May 23 2013 Christophe Fergeau 3.8.2-3 +- Readd ExclusiveArch as Boxes is not really functional on non-x86 + arch even if it can be built. Also, libvirt-daemon-kvm is not + available on every arch, causing rhbz#962325 + +* Thu May 16 2013 Christophe Fergeau 3.8.2-2 +- Add upstream patch for rhbz#963464 + +* Tue May 14 2013 Zeeshan Ali - 3.8.2-1 +- Update to 3.8.2. + +* Thu Apr 18 2013 Christophe Fergeau 3.8.1.2-1 +- Update to 3.8.1.2 + +* Tue Apr 16 2013 Richard Hughes - 3.8.1-1 +- Update to 3.8.1 + +* Tue Mar 26 2013 Richard Hughes - 3.8.0-1 +- Update to 3.8.0 + +* Wed Mar 20 2013 Richard Hughes - 3.7.92-1 +- Update to 3.7.92 + +* Fri Mar 8 2013 Matthias Clasen - 3.7.91-1 +- Update to 3.7.91 + +* Thu Feb 21 2013 Kalev Lember - 3.7.90-2 +- Rebuilt for cogl soname bump + +* Thu Feb 21 2013 Christophe Fergeau 3.7.90-1 +- Update do 3.7.90 + +* Wed Feb 06 2013 Richard Hughes - 3.7.5-1 +- Update to 3.7.5 + +* Sun Jan 27 2013 Kalev Lember - 3.7.4-3 +- Rebuilt for tracker 0.16 ABI + +* Fri Jan 25 2013 Peter Robinson 3.7.4-2 +- Rebuild for new cogl + +* Tue Jan 15 2013 Zeeshan Ali - 3.7.4-1 +- Update to 3.7.4. + +* Thu Dec 20 2012 Christophe Fergeau - 3.7.3-1 +- Update to 3.7.3 + +* Tue Nov 20 2012 Christophe Fergeau - 3.7.2-2 +- Reenable USB redirection (it's disabled by default, packagers must + enable it if appropriate) + +* Tue Nov 20 2012 Zeeshan Ali - 3.7.2-1 +- Update to 3.7.2. + +* Tue Nov 13 2012 Christophe Fergeau - 3.6.2-2 +- Update to 3.6.2 + +* Tue Oct 16 2012 Zeeshan Ali - 3.6.1.1-2 +- Enable USB redirection in new domains. + +* Tue Oct 16 2012 Zeeshan Ali - 3.6.1.1-1 +- Update to 3.6.1.1 + +* Mon Oct 15 2012 Zeeshan Ali - 3.6.1-1 +- Update to 3.6.1 + +* Tue Sep 25 2012 Christophe Fergeau - 3.6.0-1 +- Update to 3.6.0 + +* Wed Sep 19 2012 Richard Hughes - 3.5.92-1 +- Update to 3.5.92 + +* Thu Sep 6 2012 Matthias Clasen - 3.5.91-2 +- Rebuild against new spice + +* Tue Sep 04 2012 Christophe Fergeau - 3.5.91-1 +- Update do 3.5.91 + +* Wed Aug 22 2012 Richard Hughes - 3.5.90-1 +- Update to 3.5.90 + +* Tue Aug 07 2012 Richard Hughes - 3.5.5-1 +- Update to 3.5.5 + +* Thu Jul 19 2012 Fedora Release Engineering - 3.5.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 16 2012 Christophe Fergeau - 3.5.4.1-1 +- Update to 3.5.4.1 + +* Mon Jul 16 2012 Christophe Fergeau - 3.5.4-1 +- Update to 3.5.4 +- Update some BuildRequires min version + +* Tue Jun 26 2012 Richard Hughes - 3.5.3-1 +- Update to 3.5.3 + +* Thu Jun 07 2012 Christophe Fergeau - 3.5.2-2 +- enable logos after getting confirmation this has been approved by + fedora-legal and the Fedora board + +* Thu Jun 07 2012 Richard Hughes - 3.5.2-1 +- Update to 3.5.2 + +* Wed May 16 2012 Christophe Fergeau - 3.4.2-2 +- Remove ExclusiveArch now that spice-gtk is built on all arch + +* Tue May 15 2012 Zeeshan Ali - 3.4.2-1 +- Update to 3.4.2 + +* Thu Apr 26 2012 Christophe Fergeau - 3.4.1-2 +- Backport a few upstream patches: + - asynchronously fetch domain information from libvirt, this makes Boxes + much more responsive + - make the file chooser dialog modal + - fix f17 unattended installation + +* Tue Apr 17 2012 Richard Hughes - 3.4.1-1 +- Update to 3.4.1 + +* Sat Mar 31 2012 Daniel P. Berrange - 3.4.0.1-2 +- Only pull in libvirtd + KVM drivers, without default configs (bug 802475) + +* Sat Mar 31 2012 Zeeshan Ali - 3.4.0.1-1 +- Update to 3.4.0.1 + +* Mon Mar 26 2012 Christophe Fergeau - 3.4.0-1 +- Update to 3.4.0 + +* Mon Mar 26 2012 Dan Horák - 3.3.92-2 +- set ExclusiveArch equal to spice-gtk + +* Tue Mar 20 2012 Christophe Fergeau - 3.3.92-1 +- Update to 3.3.92 + +* Tue Mar 6 2012 Matthias Clasen - 3.3.91-1 +- Update to 3.3.91 + +* Sun Feb 26 2012 Matthias Clasen - 3.3.90-1 +- Update to 3.3.90 + +* Wed Feb 08 2012 Christophe Fergeau - 3.3.5.1-1 +- Update to 3.3.5.1 + +* Wed Jan 25 2012 Christophe Fergeau - 3.3.4.1-1 +- Update to minor 3.3.4.1 release + +* Fri Jan 20 2012 Christophe Fergeau - 3.3.4-4 +- call desktop-file-validate in %%install. gnome-boxes upstream installs + a .desktop file on its own so desktop-file-validate is enough, no need + to call desktop-file-install. + +* Fri Jan 20 2012 Christophe Fergeau - 3.3.4-3 +- Fix %%global use (%%url_ver got expanded to 3.3.4 instead of 3.3 in + -2) + +* Tue Jan 17 2012 Christophe Fergeau - 3.3.4-2 +- Remove use of BuildRoot +- Remove use of defattr +- Use %%global instead of %%define + +* Tue Jan 17 2012 Christophe Fergeau - 3.3.4-1 +- Update to 3.3.4 release + +* Thu Jan 05 2012 Christophe Fergeau - 3.3.3-3 +- Escape %%{buildroot} in changelog +- Remove empty %%pre section + +* Wed Jan 04 2012 Christophe Fergeau - 3.3.3-2 +- Use %%{buildroot} instead of $RPM_BUILD_ROOT +- Remove unneeded patch +- Add missing dependency on fuseiso + +* Fri Dec 23 2011 Christophe Fergeau - 3.3.3-1 +- Initial import +