Remove use of sga

resolves: rhbz#2002325
This commit is contained in:
Richard W.M. Jones 2021-09-13 10:50:23 +01:00
parent 65310658ad
commit 8b5d662685
8 changed files with 100 additions and 13 deletions

View File

@ -0,0 +1,82 @@
From 8a4761c0fb720078757ecaafd26be18293253f2c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 8 Sep 2021 16:06:22 +0100
Subject: [PATCH] lib: direct: Remove use of sga
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
sga (or "sgabios" or "Serial Graphics Adapter") is an option ROM for
seabios which directs output to the serial adapter. This is very
useful for debugging BIOS problems during boot.
RHEL wants to deprecate this feature (in fact, they just deprecated it
without telling us). However there is an equivalent feature in
seabios (seabios >= 1.11 / qemu >= 2.11.0) which can be enabled using
either -nographic or -machine graphics=off
This commit removes sga and enables -machine graphics=off in the
direct backend.
References (for RHEL 9 qemu change):
https://bugzilla.redhat.com/show_bug.cgi?id=2002325
https://bugzilla.redhat.com/show_bug.cgi?id=2000845
https://lists.nongnu.org/archive/html/qemu-devel/2021-09/msg02417.html
https://listman.redhat.com/archives/libvir-list/2021-September/msg00205.html
For the libvirt backend we will continue to use <bios useserial=yes>.
This currently breaks when sga is not available, but I talked to Dan
and the plan there is to adapt libvirt so the same XML will enable
-machine graphics=off. IOW libguestfs does not need to make any
change.
References (for libvirt change):
https://bugzilla.redhat.com/show_bug.cgi?id=2003092
https://listman.redhat.com/archives/libvir-list/2021-September/msg00193.html
Thanks: Gerd Hoffman, Daniel Berrangé
(cherry picked from commit e14ff937422115e23094ca4cce80ec9fb01c10b3)
---
lib/launch-direct.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/lib/launch-direct.c b/lib/launch-direct.c
index 972e77e13..e5b9a5611 100644
--- a/lib/launch-direct.c
+++ b/lib/launch-direct.c
@@ -544,6 +544,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
append_list ("gic-version=host");
#endif
append_list_format ("accel=%s", accel_val);
+#if defined(__i386__) || defined(__x86_64__)
+ /* Tell seabios to send debug messages to the serial port.
+ * This used to be done by sgabios.
+ */
+ if (g->verbose)
+ append_list ("graphics=off");
+#endif
} end_list ();
cpu_model = guestfs_int_get_cpu_model (has_kvm && !force_tcg);
@@ -665,18 +672,6 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
} end_list ();
#endif
- if (g->verbose &&
- guestfs_int_qemu_supports_device (g, data->qemu_data,
- "Serial Graphics Adapter")) {
- /* Use sgabios instead of vgabios. This means we'll see BIOS
- * messages on the serial port, and also works around this bug
- * in qemu 1.1.0:
- * https://bugs.launchpad.net/qemu/+bug/1021649
- * QEmu has included sgabios upstream since just before 1.0.
- */
- arg ("-device", "sga");
- }
-
/* Set up virtio-serial for the communications channel. */
start_list ("-chardev") {
append_list ("socket");
--
2.31.1

View File

@ -1,4 +1,4 @@
From 69751394dccdf5ade209b42aa97b498b59f42010 Mon Sep 17 00:00:00 2001
From 53efe7ddea016a3d27f39af3ea0445e0b1d234be Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 21 Dec 2012 15:50:11 +0000
Subject: [PATCH] RHEL: Remove libguestfs live (RHBZ#798980).

View File

@ -1,4 +1,4 @@
From 3b7d5e86beb84d0a0fefe34d442dc3becdbf1fd5 Mon Sep 17 00:00:00 2001
From 9594b98014ac1dfdfc652d41f4eba38e510c00fe Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 18 Jul 2013 18:31:53 +0100
Subject: [PATCH] RHEL: Remove 9p APIs from RHEL (RHBZ#921710).

View File

@ -1,4 +1,4 @@
From 3ee38c13db6bf6bcea375f66a38fb848d0251d83 Mon Sep 17 00:00:00 2001
From 3f8f68460ffadca3af181cb7c2b0495b85b53f82 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 29 Jul 2013 14:47:56 +0100
Subject: [PATCH] RHEL: Disable unsupported remote drive protocols

View File

@ -1,4 +1,4 @@
From a651907e06fb488ef91fdf8b624cf1d527cfb057 Mon Sep 17 00:00:00 2001
From 0d0c34cba36156e0205cf7ad7d419c8be0ba99cf Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 19 Sep 2014 13:38:20 +0100
Subject: [PATCH] RHEL: Remove User-Mode Linux (RHBZ#1144197).

View File

@ -1,4 +1,4 @@
From 0315e1f00e229c990226203a3e04af1820f688c2 Mon Sep 17 00:00:00 2001
From 3508207fa46f45d5bdd0125f04790428e74aed48 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 7 Jul 2015 09:28:03 -0400
Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for

View File

@ -1,4 +1,4 @@
From 75d88b5fd89655b8c3ac2a385a5ac2f8dea560e5 Mon Sep 17 00:00:00 2001
From 6c98e1924ff73ee5c9361d0ff83d656ac8ee0e77 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Jun 2021 15:29:11 +0100
Subject: [PATCH] RHEL: Create /etc/crypto-policies/back-ends/opensslcnf.config

View File

@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.45.6
Release: 12%{?dist}
Release: 13%{?dist}
License: LGPLv2+
# Build only for architectures that have a kernel
@ -98,15 +98,16 @@ Source8: copy-patches.sh
Patch0001: 0001-build-Don-t-use-non-POSIX-tests.patch
Patch0002: 0002-python-Don-t-leak-fields-when-creating-Python-struct.patch
Patch0003: 0003-appliance-Add-IBM850-iconv-converter-for-syslinux.patch
Patch0004: 0004-lib-direct-Remove-use-of-sga.patch
# Downstream (RHEL-only) patches.
%if 0%{?rhel}
Patch0004: 0004-RHEL-Remove-libguestfs-live-RHBZ-798980.patch
Patch0005: 0005-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
Patch0006: 0006-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
Patch0007: 0007-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch
Patch0008: 0008-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
Patch0009: 0009-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch
Patch0005: 0005-RHEL-Remove-libguestfs-live-RHBZ-798980.patch
Patch0006: 0006-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
Patch0007: 0007-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
Patch0008: 0008-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch
Patch0009: 0009-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
Patch0010: 0010-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch
%endif
%if 0%{patches_touch_autotools}
@ -1146,6 +1147,10 @@ rm ocaml/html/.gitignore
%changelog
* Mon Sep 13 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.6-13
- Remove use of sga
resolves: rhbz#2002325
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.45.6-12
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688