[gnome-boxes/unbreak-runtime-generation] Revert the UEFI series



commit 0ff259ccaeb858bf30a6acc6bfb1cf5617b1797a
Author: Felipe Borges <felipeborges gnome org>
Date:   Fri Oct 4 18:10:31 2019 +0200

    Revert the UEFI series
    
    Revert "installer-media: Add supports_efi() method"
    
    This reverts commit a391cb9a4e82b3251be8c62ac5e0b6cc301df204.
    
    Revert "Revert "installer-media: Add supports_efi() method""
    
    This reverts commit 61f54e04e2a77fa39289299e6501b130822d94de.
    
    Revert "flatpak: Use libosinfo & libvirt-glib from git"
    
    This reverts commit d2ff45405d6dd321b0732e1fe93fb7032ac6ada4.
    
    Revert "meson: Add 'uefi' build option"
    
    This reverts commit dba00e759c61398f3cbb732387d9793a01347fd9.
    
    Revert "vm-creator: Retrieve and use the DomainCapabilities"
    
    This reverts commit f82fd2e6d92ba851b8ec128b238dc9335ca83ca8.
    
    Revert "vm-configurator: Use UEFI when possible"
    
    This reverts commit 7cb459517195d22a0b8606aa977cdb3e51193d6d.
    
    Revert "vm-configurator: Add supports_efi()"
    
    This reverts commit 4f71f40dcf06479024387efe6802cf04721f9e93.
    
    Revert "vm-configurator: Add domain_caps_supports_efi()"
    
    This reverts commit c8e52108746489ac66294ad2ab281b2f1d1946b7.
    
    Revert "vm-configurator: Pass DomainCapabilities set_os_config()"
    
    This reverts commit 921d0ed00b49882e6e98df9dadcf414aad24d1dd.
    
    Revert "installer-media: Add supports_efi() method"
    
    This reverts commit a391cb9a4e82b3251be8c62ac5e0b6cc301df204.
    
    Revert "vm-configurator: Pass DomainCapabilities to create_domain_config()"
    
    This reverts commit 1dbf1aeaaf7d242f8a5e08d65b213c851188f742.

 build-aux/flatpak/org.gnome.Boxes.json | 10 ++++++----
 meson_options.txt                      |  5 -----
 src/installer-media.vala               | 14 --------------
 src/meson.build                        |  3 ---
 src/vm-configurator.vala               | 33 +++------------------------------
 src/vm-creator.vala                    |  3 +--
 6 files changed, 10 insertions(+), 58 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.Boxes.json b/build-aux/flatpak/org.gnome.Boxes.json
index df800cd6..8d49adbe 100644
--- a/build-aux/flatpak/org.gnome.Boxes.json
+++ b/build-aux/flatpak/org.gnome.Boxes.json
@@ -183,8 +183,9 @@
             "name" : "libvirt-glib",
             "sources" : [
                 {
-                    "type" : "git",
-                    "url": "https://libvirt.org/git/libvirt-glib.git";
+                    "type" : "archive",
+                    "url" : "http://libvirt.org/sources/glib/libvirt-glib-2.0.0.tar.gz";,
+                    "sha256" : "94e8c410c67501303d3b32ca8ce2c36edf898511ec4de9b7f29cd35d274b3d6a"
                 }
             ]
         },
@@ -495,8 +496,9 @@
             "name" : "libosinfo",
             "sources" : [
                 {
-                    "type" : "git",
-                    "url" : "https://gitlab.com/libosinfo/libosinfo.git";
+                    "type" : "archive",
+                    "url" : "https://releases.pagure.org/libosinfo/libosinfo-1.4.0.tar.gz";,
+                    "sha256": "a29e61a82b1a5727b145403914812273dfa033a0c07a15500078726bb3b84165"
                 },
                 {
                     "type" : "file",
diff --git a/meson_options.txt b/meson_options.txt
index a5f1be87..c55a4712 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,8 +29,3 @@ option ('profile',
   ],
   value: 'default'
 )
-
-option ('uefi',
-        type: 'boolean',
-        value: true,
-        description: 'Use UEFI whenever it is possible')
diff --git a/src/installer-media.vala b/src/installer-media.vala
index db3e2480..dd66c8a9 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -55,20 +55,6 @@
         }
     }
 
-    public bool supports_efi {
-        get {
-            if (os == null)
-                return false;
-
-            foreach (var iter in os.get_firmware_list (null) .get_elements ()) {
-                var firmware = iter as Firmware;
-                if (firmware.get_firmware_type () == "efi")
-                    return true;
-            }
-            return false;
-        }
-    }
-
     public bool prefers_q35 {
         get {
             if (os == null)
diff --git a/src/meson.build b/src/meson.build
index f6d1cffc..5b59c3b8 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -184,9 +184,6 @@ else
   dependencies += libovf.get_variable('govf_vapi')
 endif
 
-if get_option('uefi')
-    vala_args += '--define=USE_UEFI'
-endif
 
 executable ('gnome-boxes', vala_sources + resources,
             include_directories: config_h_dir,
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 7dba8c49..f3ca1888 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -38,7 +38,7 @@
     private const string LIBOSINFO_XML = "<libosinfo>%s</libosinfo>";
     private const string LIBOSINFO_OS_ID_XML = "<os id=\"%s\"/>";
 
-    public static Domain create_domain_config (InstallerMedia install_media, string target_path, 
Capabilities caps, DomainCapabilities domain_caps)
+    public static Domain create_domain_config (InstallerMedia install_media, string target_path, 
Capabilities caps)
                                         throws VMConfiguratorError {
         var domain = new Domain ();
 
@@ -51,7 +51,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
         var virt_type = guest_kvm_enabled (best_caps) ? DomainVirtType.KVM : DomainVirtType.QEMU;
         domain.set_virt_type (virt_type);
 
-        set_os_config (domain, install_media, best_caps, domain_caps);
+        set_os_config (domain, install_media, best_caps);
 
         string[] features = {};
         if (guest_supports_feature (best_caps, "acpi"))
@@ -368,44 +368,17 @@ private static void set_post_install_os_config (Domain domain) {
 
         os.set_arch (old_os.get_arch ());
         os.set_machine (old_os.get_machine ());
-#if USE_UEFI
-        os.set_firmware (old_os.get_firmware ());
-#endif
 
         domain.set_os (os);
     }
 
-    private static bool domain_caps_supports_efi (DomainCapabilities domain_caps) {
-        foreach (var firmware in domain_caps.get_os ().get_firmwares()) {
-            if (firmware == GVirConfig.DomainOsFirmware.EFI)
-                return true;
-        }
-
-        return false;
-    }
-
-    private static bool supports_efi (InstallerMedia install_media, DomainCapabilities domain_caps) {
-        if (install_media == null || !install_media.supports_efi)
-            return false;
-
-        if (domain_caps == null || !domain_caps_supports_efi (domain_caps))
-            return false;
-
-        return true;
-    }
-
-    private static void set_os_config (Domain domain, InstallerMedia install_media, CapabilitiesGuest 
guest_caps, DomainCapabilities domain_caps) {
+    private static void set_os_config (Domain domain, InstallerMedia install_media, CapabilitiesGuest 
guest_caps) {
         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");
 
-#if USE_UEFI
-        if (supports_efi (install_media, domain_caps))
-            os.set_firmware (GVirConfig.DomainOsFirmware.EFI);
-#endif
-
         var boot_devices = new GLib.List<DomainOsBootDevice> ();
         install_media.set_direct_boot_params (os);
         boot_devices.append (DomainOsBootDevice.CDROM);
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index efee8b68..8851bd4b 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -209,8 +209,7 @@ protected void set_post_install_config (LibvirtMachine machine) {
                                                                     StorageVol   volume,
                                                                     Cancellable? cancellable) throws 
GLib.Error {
         var caps = yield connection.get_capabilities_async (cancellable);
-        var domcaps = yield connection.get_domain_capabilities_async (null, null, null, null, 0, 
cancellable);
-        var config = VMConfigurator.create_domain_config (install_media, volume.get_path (), caps, domcaps);
+        var config = VMConfigurator.create_domain_config (install_media, volume.get_path (), caps);
         config.name = name;
         config.title = title;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]