New upstream version 1.45.1.
This commit is contained in:
parent
7e7de18823
commit
d8408afe21
@ -1,80 +0,0 @@
|
|||||||
From 282e2f74cf1209ecf6bb18655018b2000a5b36a1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 28 Jan 2021 12:20:49 +0000
|
|
||||||
Subject: [PATCH] appliance: Use -cpu max.
|
|
||||||
|
|
||||||
QEMU has a newish feature (from about 2017 / qemu 2.9) called -cpu max
|
|
||||||
which is supposed to select the best CPU, ideal for libguestfs.
|
|
||||||
|
|
||||||
After this change, on x86-64:
|
|
||||||
|
|
||||||
KVM TCG
|
|
||||||
|
|
||||||
Direct -cpu max -cpu max
|
|
||||||
(non-libvirt)
|
|
||||||
|
|
||||||
Libvirt <cpu mode="host-passthrough"> <cpu mode="host-model">
|
|
||||||
<model fallback="allow"/> <model fallback="allow"/>
|
|
||||||
</cpu> </cpu>
|
|
||||||
---
|
|
||||||
lib/appliance-cpu.c | 16 ++++++++--------
|
|
||||||
lib/launch-libvirt.c | 9 +++++++++
|
|
||||||
2 files changed, 17 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/appliance-cpu.c b/lib/appliance-cpu.c
|
|
||||||
index 5ef9f5c72..54ac6e2e3 100644
|
|
||||||
--- a/lib/appliance-cpu.c
|
|
||||||
+++ b/lib/appliance-cpu.c
|
|
||||||
@@ -38,6 +38,11 @@
|
|
||||||
*
|
|
||||||
* The literal string C<"host"> means use C<-cpu host>.
|
|
||||||
*
|
|
||||||
+ * =item C<"max">
|
|
||||||
+ *
|
|
||||||
+ * The literal string C<"max"> means use C<-cpu max> (the best
|
|
||||||
+ * possible). This requires awkward translation for libvirt.
|
|
||||||
+ *
|
|
||||||
* =item some string
|
|
||||||
*
|
|
||||||
* Some string such as C<"cortex-a57"> means use C<-cpu cortex-a57>.
|
|
||||||
@@ -80,14 +85,9 @@ guestfs_int_get_cpu_model (int kvm)
|
|
||||||
/* See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1605071 */
|
|
||||||
return NULL;
|
|
||||||
#else
|
|
||||||
- /* On most architectures, it is faster to pass the CPU host model to
|
|
||||||
- * the appliance, allowing maximum speed for things like checksums
|
|
||||||
- * and encryption. Only do this with KVM. It is broken in subtle
|
|
||||||
- * ways on TCG, and fairly pointless when you're emulating anyway.
|
|
||||||
+ /* On most architectures we can use "max" to get the best possible CPU.
|
|
||||||
+ * For recent qemu this should work even on TCG.
|
|
||||||
*/
|
|
||||||
- if (kvm)
|
|
||||||
- return "host";
|
|
||||||
- else
|
|
||||||
- return NULL;
|
|
||||||
+ return "max";
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
|
|
||||||
index 026dc6b26..eff1c8f7e 100644
|
|
||||||
--- a/lib/launch-libvirt.c
|
|
||||||
+++ b/lib/launch-libvirt.c
|
|
||||||
@@ -1169,6 +1169,15 @@ construct_libvirt_xml_cpu (guestfs_h *g,
|
|
||||||
attribute ("fallback", "allow");
|
|
||||||
} end_element ();
|
|
||||||
}
|
|
||||||
+ else if (STREQ (cpu_model, "max")) {
|
|
||||||
+ if (params->data->is_kvm)
|
|
||||||
+ attribute ("mode", "host-passthrough");
|
|
||||||
+ else
|
|
||||||
+ attribute ("mode", "host-model");
|
|
||||||
+ start_element ("model") {
|
|
||||||
+ attribute ("fallback", "allow");
|
|
||||||
+ } end_element ();
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
single_element ("model", cpu_model);
|
|
||||||
} end_element ();
|
|
||||||
--
|
|
||||||
2.29.0.rc2
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 5f499208cf53ebd3f05525918c213a36c3ca13b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Tue, 2 Mar 2021 10:42:49 +0000
|
|
||||||
Subject: [PATCH] builder: Don't redefine Val_none (OCaml 4.12).
|
|
||||||
|
|
||||||
CC virt_builder-setlocale-c.o
|
|
||||||
setlocale-c.c:38: error: "Val_none" redefined [-Werror]
|
|
||||||
38 | #define Val_none (Val_int (0))
|
|
||||||
|
|
|
||||||
In file included from /usr/lib64/ocaml/caml/alloc.h:24,
|
|
||||||
from setlocale-c.c:23:
|
|
||||||
/usr/lib64/ocaml/caml/mlvalues.h:395: note: this is the location of the previous definition
|
|
||||||
395 | #define Val_none Val_int(0)
|
|
||||||
|
|
|
||||||
---
|
|
||||||
builder/setlocale-c.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/builder/setlocale-c.c b/builder/setlocale-c.c
|
|
||||||
index 6d877e7ac..1834c11df 100644
|
|
||||||
--- a/builder/setlocale-c.c
|
|
||||||
+++ b/builder/setlocale-c.c
|
|
||||||
@@ -35,7 +35,9 @@ static const int lc_string_table[7] = {
|
|
||||||
LC_MESSAGES
|
|
||||||
};
|
|
||||||
|
|
||||||
+#ifndef Val_none
|
|
||||||
#define Val_none (Val_int (0))
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
extern value virt_builder_setlocale (value val_category, value val_name);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.0.rc2
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Tue, 2 Mar 2021 10:39:15 +0000
|
|
||||||
Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12.
|
|
||||||
|
|
||||||
We were using a default function from somewhere called "compare"
|
|
||||||
instead of the actual function (Pervasives.compare / Stdlib.compare).
|
|
||||||
Since the wrong default function was used it had a different type from
|
|
||||||
what we expected:
|
|
||||||
|
|
||||||
File "std_utils.ml", line 312, characters 36-37:
|
|
||||||
312 | | (y, y') :: _ when cmp x y = 0 -> y'
|
|
||||||
^
|
|
||||||
Error: This expression has type int but an expression was expected of type
|
|
||||||
'weak1 list -> int
|
|
||||||
---
|
|
||||||
common/mlstdutils/std_utils.ml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml
|
|
||||||
index 4237ea519..88477179a 100644
|
|
||||||
--- a/common/mlstdutils/std_utils.ml
|
|
||||||
+++ b/common/mlstdutils/std_utils.ml
|
|
||||||
@@ -307,7 +307,7 @@ module List = struct
|
|
||||||
| x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs
|
|
||||||
| _ -> invalid_arg "combine3"
|
|
||||||
|
|
||||||
- let rec assoc_lbl ?(cmp = compare) ~default x = function
|
|
||||||
+ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function
|
|
||||||
| [] -> default
|
|
||||||
| (y, y') :: _ when cmp x y = 0 -> y'
|
|
||||||
| _ :: ys -> assoc_lbl ~cmp ~default x ys
|
|
||||||
--
|
|
||||||
2.29.0.rc2
|
|
||||||
|
|
@ -41,10 +41,10 @@
|
|||||||
%global verify_tarball_signature 1
|
%global verify_tarball_signature 1
|
||||||
|
|
||||||
# If there are patches which touch autotools files, set this to 1.
|
# If there are patches which touch autotools files, set this to 1.
|
||||||
%global patches_touch_autotools 1
|
%global patches_touch_autotools %{nil}
|
||||||
|
|
||||||
# The source directory.
|
# The source directory.
|
||||||
%global source_directory 1.44-stable
|
%global source_directory 1.45-development
|
||||||
|
|
||||||
# Filter perl provides.
|
# Filter perl provides.
|
||||||
%{?perl_default_filter}
|
%{?perl_default_filter}
|
||||||
@ -55,8 +55,8 @@
|
|||||||
Summary: Access and modify virtual machine disk images
|
Summary: Access and modify virtual machine disk images
|
||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.44.0
|
Version: 1.45.1
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
|
||||||
# Build only for architectures that have a kernel
|
# Build only for architectures that have a kernel
|
||||||
@ -86,13 +86,6 @@ Source7: libguestfs.keyring
|
|||||||
# Maintainer script which helps with handling patches.
|
# Maintainer script which helps with handling patches.
|
||||||
Source8: copy-patches.sh
|
Source8: copy-patches.sh
|
||||||
|
|
||||||
# Upstream patch to use -cpu max.
|
|
||||||
Patch1: 0001-appliance-Use-cpu-max.patch
|
|
||||||
|
|
||||||
# Upstream patches for OCaml 4.12.
|
|
||||||
Patch2: 0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch
|
|
||||||
Patch3: 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch
|
|
||||||
|
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||||
%endif
|
%endif
|
||||||
@ -1313,7 +1306,10 @@ rm ocaml/html/.gitignore
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Mar 2 10:06:30 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.44.0-8
|
* Wed Mar 3 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.1-1
|
||||||
|
- New upstream version 1.45.1.
|
||||||
|
|
||||||
|
* Tue Mar 2 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.44.0-8
|
||||||
- OCaml 4.12.0 build
|
- OCaml 4.12.0 build
|
||||||
- Fixes for OCaml 4.12.
|
- Fixes for OCaml 4.12.
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (libguestfs-1.44.0.tar.gz) = e5052d6deb130f9bceea06d2d6626162991cb83ffaf0ed9923ff5d8bb67137e565053104d8854d37ea8c871dce2a5ca29507d17357de813a8ac49896f00be103
|
SHA512 (libguestfs-1.45.1.tar.gz) = 8a4a39908d0697bd0b1dd99348b830e500e61bde6768f8518befc025ae67ee9ac44ada8795c54cb6faa8e95049b1c14b46887372b9e0569a52e9219c4fd54d52
|
||||||
SHA512 (libguestfs-1.44.0.tar.gz.sig) = 26cb5b97dbc0d649466668964080220acc28c3fabc565563df0da5472420e61893907b4bedcb9f8977d7df9e867855d7178e4ad097df41dcbcaa98d0c07feac3
|
SHA512 (libguestfs-1.45.1.tar.gz.sig) = e2ade5f67402b618f60bb2bf4264f23528a6cf27537091a0ccfd5bf045901eab8aa2d0b6db89edee0c9141837967f7e9f769ffd4f49bca9c950fadeb7617eb01
|
||||||
|
Loading…
Reference in New Issue
Block a user