Rebase to qemu-5.1.0-rc2
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
7ffd7f7fdf
commit
f4bee9e135
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,3 +43,4 @@
|
||||
/qemu-5.0.0-rc2.tar.xz
|
||||
/qemu-5.0.0-rc3.tar.xz
|
||||
/qemu-5.0.0.tar.xz
|
||||
/qemu-5.1.0-rc2.tar.xz
|
||||
|
@ -1,64 +0,0 @@
|
||||
From: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Date: Mon, 11 May 2020 19:36:29 +0100
|
||||
Subject: [PATCH] aio-posix: don't duplicate fd handler deletion in
|
||||
fdmon_io_uring_destroy()
|
||||
|
||||
The io_uring file descriptor monitoring implementation has an internal
|
||||
list of fd handlers that are pending submission to io_uring.
|
||||
fdmon_io_uring_destroy() deletes all fd handlers on the list.
|
||||
|
||||
Don't delete fd handlers directly in fdmon_io_uring_destroy() for two
|
||||
reasons:
|
||||
1. This duplicates the aio-posix.c AioHandler deletion code and could
|
||||
become outdated if the struct changes.
|
||||
2. Only handlers with the FDMON_IO_URING_REMOVE flag set are safe to
|
||||
remove. If the flag is not set then something still has a pointer to
|
||||
the fd handler. Let aio-posix.c and its user worry about that. In
|
||||
practice this isn't an issue because fdmon_io_uring_destroy() is only
|
||||
called when shutting down so all users have removed their fd
|
||||
handlers, but the next patch will need this!
|
||||
|
||||
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
---
|
||||
util/aio-posix.c | 1 +
|
||||
util/fdmon-io_uring.c | 13 ++++++++++---
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/util/aio-posix.c b/util/aio-posix.c
|
||||
index c3613d299e..8af334ab19 100644
|
||||
--- a/util/aio-posix.c
|
||||
+++ b/util/aio-posix.c
|
||||
@@ -679,6 +679,7 @@ void aio_context_destroy(AioContext *ctx)
|
||||
{
|
||||
fdmon_io_uring_destroy(ctx);
|
||||
fdmon_epoll_disable(ctx);
|
||||
+ aio_free_deleted_handlers(ctx);
|
||||
}
|
||||
|
||||
void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
|
||||
diff --git a/util/fdmon-io_uring.c b/util/fdmon-io_uring.c
|
||||
index d5a80ed6fb..1d14177df0 100644
|
||||
--- a/util/fdmon-io_uring.c
|
||||
+++ b/util/fdmon-io_uring.c
|
||||
@@ -342,11 +342,18 @@ void fdmon_io_uring_destroy(AioContext *ctx)
|
||||
|
||||
io_uring_queue_exit(&ctx->fdmon_io_uring);
|
||||
|
||||
- /* No need to submit these anymore, just free them. */
|
||||
+ /* Move handlers due to be removed onto the deleted list */
|
||||
while ((node = QSLIST_FIRST_RCU(&ctx->submit_list))) {
|
||||
+ unsigned flags = atomic_fetch_and(&node->flags,
|
||||
+ ~(FDMON_IO_URING_PENDING |
|
||||
+ FDMON_IO_URING_ADD |
|
||||
+ FDMON_IO_URING_REMOVE));
|
||||
+
|
||||
+ if (flags & FDMON_IO_URING_REMOVE) {
|
||||
+ QLIST_INSERT_HEAD_RCU(&ctx->deleted_aio_handlers, node, node_deleted);
|
||||
+ }
|
||||
+
|
||||
QSLIST_REMOVE_HEAD_RCU(&ctx->submit_list, node_submitted);
|
||||
- QLIST_REMOVE(node, node);
|
||||
- g_free(node);
|
||||
}
|
||||
|
||||
ctx->fdmon_ops = &fdmon_poll_ops;
|
@ -1,171 +0,0 @@
|
||||
From 3e018afbfe005a3448949bfe3954888b9d8460c4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Wed, 15 Jul 2020 16:47:01 +0100
|
||||
Subject: [PATCH] crypto: use a stronger private key for tests
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The unit tests using the x509 crypto functionality have started
|
||||
failing in Fedora 33 rawhide with a message like
|
||||
|
||||
The certificate uses an insecure algorithm
|
||||
|
||||
This is result of Fedora changes to support strong crypto [1]. RSA
|
||||
with 1024 bit key is viewed as legacy and thus insecure. Generate
|
||||
a new private key which is 3072 bits long and reasonable future
|
||||
proof.
|
||||
|
||||
[1] https://fedoraproject.org/wiki/Changes/StrongCryptoSettings2
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Message-Id: <20200715154701.1041325-1-berrange@redhat.com>
|
||||
Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
|
||||
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
---
|
||||
tests/crypto-tls-x509-helpers.c | 59 ++++++++++++++++++++++-----------
|
||||
tests/qemu-iotests/common.tls | 57 +++++++++++++++++++++----------
|
||||
2 files changed, 79 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/tests/crypto-tls-x509-helpers.c b/tests/crypto-tls-x509-helpers.c
|
||||
index 9b669c2a4b..01b3daf358 100644
|
||||
--- a/tests/crypto-tls-x509-helpers.c
|
||||
+++ b/tests/crypto-tls-x509-helpers.c
|
||||
@@ -37,25 +37,46 @@ ASN1_TYPE pkix_asn1;
|
||||
* here's one we prepared earlier :-)
|
||||
*/
|
||||
gnutls_x509_privkey_t privkey;
|
||||
-# define PRIVATE_KEY \
|
||||
- "-----BEGIN PRIVATE KEY-----\n" \
|
||||
- "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALVcr\n" \
|
||||
- "BL40Tm6yq88FBhJNw1aaoCjmtg0l4dWQZ/e9Fimx4ARxFpT+ji4FE\n" \
|
||||
- "Cgl9s/SGqC+1nvlkm9ViSo0j7MKDbnDB+VRHDvMAzQhA2X7e8M0n9\n" \
|
||||
- "rPolUY2lIVC83q0BBaOBkCj2RSmT2xTEbbC2xLukSrg2WP/ihVOxc\n" \
|
||||
- "kXRuyFtzAgMBAAECgYB7slBexDwXrtItAMIH6m/U+LUpNe0Xx48OL\n" \
|
||||
- "IOn4a4whNgO/o84uIwygUK27ZGFZT0kAGAk8CdF9hA6ArcbQ62s1H\n" \
|
||||
- "myxrUbF9/mrLsQw1NEqpuUk9Ay2Tx5U/wPx35S3W/X2AvR/ZpTnCn\n" \
|
||||
- "2q/7ym9fyiSoj86drD7BTvmKXlOnOwQJBAPOFMp4mMa9NGpGuEssO\n" \
|
||||
- "m3Uwbp6lhcP0cA9MK+iOmeANpoKWfBdk5O34VbmeXnGYWEkrnX+9J\n" \
|
||||
- "bM4wVhnnBWtgBMCQQC+qAEmvwcfhauERKYznMVUVksyeuhxhCe7EK\n" \
|
||||
- "mPh+U2+g0WwdKvGDgO0PPt1gq0ILEjspMDeMHVdTwkaVBo/uMhAkA\n" \
|
||||
- "Z5SsZyCP2aTOPFDypXRdI4eqRcjaEPOUBq27r3uYb/jeboVb2weLa\n" \
|
||||
- "L1MmVuHiIHoa5clswPdWVI2y0em2IGoDAkBPSp/v9VKJEZabk9Frd\n" \
|
||||
- "a+7u4fanrM9QrEjY3KhduslSilXZZSxrWjjAJPyPiqFb3M8XXA26W\n" \
|
||||
- "nz1KYGnqYKhLcBAkB7dt57n9xfrhDpuyVEv+Uv1D3VVAhZlsaZ5Pp\n" \
|
||||
- "dcrhrkJn2sa/+O8OKvdrPSeeu/N5WwYhJf61+CPoenMp7IFci\n" \
|
||||
- "-----END PRIVATE KEY-----\n"
|
||||
+# define PRIVATE_KEY \
|
||||
+ "-----BEGIN RSA PRIVATE KEY-----\n" \
|
||||
+ "MIIG5AIBAAKCAYEAyjWyLSNm5PZvYUKUcDWGqbLX10b2ood+YaFjWSnJrqx/q3qh\n" \
|
||||
+ "rVGBJglD25AJENJsmZF3zPP1oMhfIxsXu63Hdkb6Rdlc2RUoUP34x9VC1izH25mR\n" \
|
||||
+ "6c8DPDp1d6IraZ/llDMI1HsBFz0qGWtvOHgm815XG4PAr/N8rDsuqfv/cJ01KlnO\n" \
|
||||
+ "0OdO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x0ldwk0scZsVYXLKd67yzfV7KdGUdaX4N/xYgfZm/9gCG3+q8NN2KxVHQ5F71BOE\n" \
|
||||
+ "JeABOaGo9WvnU+DNMIDZjHJMUWVw4MHz/a/UArDf/2CxaPVBNQKBwASg6j4ohSTk\n" \
|
||||
+ "J7aE6RQ3OBmmDDpixcoCJt9u9SjHVYMlbs5CEJGVSczk0SG3y8P1lOWNDSRnMksZ\n" \
|
||||
+ "xWnHdP/ogcuYMuvK7UACNAF0zNddtzOhzcpNmejFj+WCHYY/UmPr2/Kf6t7Cxk2K\n" \
|
||||
+ "3cZ4tqWsiTmBT8Bknmah7L5DrhS+ZBJliDeFAA8fZHdMH0Xjr4UBp9kF90EMTdW1\n" \
|
||||
+ "Xr5uz7ZrMsYpYQI7mmyqV9SSjUg4iBXwVSoag1iDJ1K8Qg/L7Semgg==\n" \
|
||||
+ "-----END RSA PRIVATE KEY-----\n"
|
||||
|
||||
/*
|
||||
* This loads the private key we defined earlier
|
||||
diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls
|
||||
index 54c331d7a5..6ba28a78d3 100644
|
||||
--- a/tests/qemu-iotests/common.tls
|
||||
+++ b/tests/qemu-iotests/common.tls
|
||||
@@ -50,24 +50,45 @@ tls_x509_init()
|
||||
# use a fixed key so we don't waste system entropy on
|
||||
# each test run
|
||||
cat > "${tls_dir}/key.pem" <<EOF
|
||||
------BEGIN PRIVATE KEY-----
|
||||
-MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALVcr
|
||||
-BL40Tm6yq88FBhJNw1aaoCjmtg0l4dWQZ/e9Fimx4ARxFpT+ji4FE
|
||||
-Cgl9s/SGqC+1nvlkm9ViSo0j7MKDbnDB+VRHDvMAzQhA2X7e8M0n9
|
||||
-rPolUY2lIVC83q0BBaOBkCj2RSmT2xTEbbC2xLukSrg2WP/ihVOxc
|
||||
-kXRuyFtzAgMBAAECgYB7slBexDwXrtItAMIH6m/U+LUpNe0Xx48OL
|
||||
-IOn4a4whNgO/o84uIwygUK27ZGFZT0kAGAk8CdF9hA6ArcbQ62s1H
|
||||
-myxrUbF9/mrLsQw1NEqpuUk9Ay2Tx5U/wPx35S3W/X2AvR/ZpTnCn
|
||||
-2q/7ym9fyiSoj86drD7BTvmKXlOnOwQJBAPOFMp4mMa9NGpGuEssO
|
||||
-m3Uwbp6lhcP0cA9MK+iOmeANpoKWfBdk5O34VbmeXnGYWEkrnX+9J
|
||||
-bM4wVhnnBWtgBMCQQC+qAEmvwcfhauERKYznMVUVksyeuhxhCe7EK
|
||||
-mPh+U2+g0WwdKvGDgO0PPt1gq0ILEjspMDeMHVdTwkaVBo/uMhAkA
|
||||
-Z5SsZyCP2aTOPFDypXRdI4eqRcjaEPOUBq27r3uYb/jeboVb2weLa
|
||||
-L1MmVuHiIHoa5clswPdWVI2y0em2IGoDAkBPSp/v9VKJEZabk9Frd
|
||||
-a+7u4fanrM9QrEjY3KhduslSilXZZSxrWjjAJPyPiqFb3M8XXA26W
|
||||
-nz1KYGnqYKhLcBAkB7dt57n9xfrhDpuyVEv+Uv1D3VVAhZlsaZ5Pp
|
||||
-dcrhrkJn2sa/+O8OKvdrPSeeu/N5WwYhJf61+CPoenMp7IFci
|
||||
------END PRIVATE KEY-----
|
||||
+-----BEGIN RSA PRIVATE KEY-----
|
||||
+MIIG5AIBAAKCAYEAyjWyLSNm5PZvYUKUcDWGqbLX10b2ood+YaFjWSnJrqx/q3qh
|
||||
+rVGBJglD25AJENJsmZF3zPP1oMhfIxsXu63Hdkb6Rdlc2RUoUP34x9VC1izH25mR
|
||||
+6c8DPDp1d6IraZ/llDMI1HsBFz0qGWtvOHgm815XG4PAr/N8rDsuqfv/cJ01KlnO
|
||||
+0OdO5QRXCJf9g/dYd41MPu7wOXk9FqjQlmRoP59HgtJ+zUpE4z+Keruw9cMT9VJj
|
||||
+0oT+pQ9ysenqeZ3gbT224T1khrEhT5kifhtFLNyDssRchUUWH0hiqoOO1vgb+850
|
||||
+W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5DrhS+ZBJliDeFAA8fZHdMH0Xjr4UBp9kF90EMTdW1
|
||||
+Xr5uz7ZrMsYpYQI7mmyqV9SSjUg4iBXwVSoag1iDJ1K8Qg/L7Semgg==
|
||||
+-----END RSA PRIVATE KEY-----
|
||||
EOF
|
||||
}
|
||||
|
||||
--
|
||||
2.28.0.rc2
|
||||
|
@ -1,88 +0,0 @@
|
||||
From: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Date: Mon, 11 May 2020 19:36:30 +0100
|
||||
Subject: [PATCH] aio-posix: disable fdmon-io_uring when GSource is used
|
||||
|
||||
The glib event loop does not call fdmon_io_uring_wait() so fd handlers
|
||||
waiting to be submitted build up in the list. There is no benefit is
|
||||
using io_uring when the glib GSource is being used, so disable it
|
||||
instead of implementing a more complex fix.
|
||||
|
||||
This fixes a memory leak where AioHandlers would build up and increasing
|
||||
amounts of CPU time were spent iterating them in aio_pending(). The
|
||||
symptom is that guests become slow when QEMU is built with io_uring
|
||||
support.
|
||||
|
||||
Buglink: https://bugs.launchpad.net/qemu/+bug/1877716
|
||||
Fixes: 73fd282e7b6dd4e4ea1c3bbb3d302c8db51e4ccf ("aio-posix: add io_uring fd monitoring implementation")
|
||||
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
---
|
||||
include/block/aio.h | 3 +++
|
||||
util/aio-posix.c | 12 ++++++++++++
|
||||
util/aio-win32.c | 4 ++++
|
||||
util/async.c | 1 +
|
||||
4 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/include/block/aio.h b/include/block/aio.h
|
||||
index 62ed954344..b2f703fa3f 100644
|
||||
--- a/include/block/aio.h
|
||||
+++ b/include/block/aio.h
|
||||
@@ -701,6 +701,9 @@ void aio_context_setup(AioContext *ctx);
|
||||
*/
|
||||
void aio_context_destroy(AioContext *ctx);
|
||||
|
||||
+/* Used internally, do not call outside AioContext code */
|
||||
+void aio_context_use_g_source(AioContext *ctx);
|
||||
+
|
||||
/**
|
||||
* aio_context_set_poll_params:
|
||||
* @ctx: the aio context
|
||||
diff --git a/util/aio-posix.c b/util/aio-posix.c
|
||||
index 8af334ab19..1b2a3af65b 100644
|
||||
--- a/util/aio-posix.c
|
||||
+++ b/util/aio-posix.c
|
||||
@@ -682,6 +682,18 @@ void aio_context_destroy(AioContext *ctx)
|
||||
aio_free_deleted_handlers(ctx);
|
||||
}
|
||||
|
||||
+void aio_context_use_g_source(AioContext *ctx)
|
||||
+{
|
||||
+ /*
|
||||
+ * Disable io_uring when the glib main loop is used because it doesn't
|
||||
+ * support mixed glib/aio_poll() usage. It relies on aio_poll() being
|
||||
+ * called regularly so that changes to the monitored file descriptors are
|
||||
+ * submitted, otherwise a list of pending fd handlers builds up.
|
||||
+ */
|
||||
+ fdmon_io_uring_destroy(ctx);
|
||||
+ aio_free_deleted_handlers(ctx);
|
||||
+}
|
||||
+
|
||||
void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
|
||||
int64_t grow, int64_t shrink, Error **errp)
|
||||
{
|
||||
diff --git a/util/aio-win32.c b/util/aio-win32.c
|
||||
index 729d533faf..953c56ab48 100644
|
||||
--- a/util/aio-win32.c
|
||||
+++ b/util/aio-win32.c
|
||||
@@ -414,6 +414,10 @@ void aio_context_destroy(AioContext *ctx)
|
||||
{
|
||||
}
|
||||
|
||||
+void aio_context_use_g_source(AioContext *ctx)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
|
||||
int64_t grow, int64_t shrink, Error **errp)
|
||||
{
|
||||
diff --git a/util/async.c b/util/async.c
|
||||
index 3165a28f2f..1319eee3bc 100644
|
||||
--- a/util/async.c
|
||||
+++ b/util/async.c
|
||||
@@ -362,6 +362,7 @@ static GSourceFuncs aio_source_funcs = {
|
||||
|
||||
GSource *aio_get_g_source(AioContext *ctx)
|
||||
{
|
||||
+ aio_context_use_g_source(ctx);
|
||||
g_source_ref(&ctx->source);
|
||||
return &ctx->source;
|
||||
}
|
@ -4,7 +4,7 @@ Description=Persistent Reservation Daemon for QEMU
|
||||
[Service]
|
||||
WorkingDirectory=/tmp
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/qemu-pr-helper
|
||||
ExecStart=/usr/libexec/qemu-pr-helper
|
||||
PrivateTmp=yes
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=/var/run
|
||||
|
92
qemu.spec
92
qemu.spec
@ -151,7 +151,7 @@
|
||||
%{obsoletes_block_rbd}
|
||||
|
||||
# Release candidate version tracking
|
||||
# global rcver rc3
|
||||
%global rcver rc2
|
||||
%if 0%{?rcver:1}
|
||||
%global rcrel .%{rcver}
|
||||
%global rcstr -%{rcver}
|
||||
@ -160,8 +160,8 @@
|
||||
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Name: qemu
|
||||
Version: 5.0.0
|
||||
Release: 6%{?rcrel}%{?dist}
|
||||
Version: 5.1.0
|
||||
Release: 0.1%{?rcrel}%{?dist}
|
||||
Epoch: 2
|
||||
License: GPLv2 and BSD and MIT and CC-BY
|
||||
URL: http://www.qemu.org/
|
||||
@ -185,14 +185,6 @@ Source20: kvm-x86.modprobe.conf
|
||||
# /etc/security/limits.d/95-kvm-ppc64-memlock.conf
|
||||
Source21: 95-kvm-ppc64-memlock.conf
|
||||
|
||||
# Fix iouring hang (bz #1823751)
|
||||
# https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg02728.html
|
||||
Patch0001: 0001-aio-posix-don-t-duplicate-fd-handler-deletion-in-fdm.patch
|
||||
Patch0002: 0002-aio-posix-disable-fdmon-io_uring-when-GSource-is-use.patch
|
||||
|
||||
# Fix for cert in the test suite that uses an insecure algorithm.
|
||||
Patch0003: 0001-crypto-use-a-stronger-private-key-for-tests.patch
|
||||
|
||||
|
||||
# documentation deps
|
||||
BuildRequires: texinfo
|
||||
@ -337,6 +329,8 @@ BuildRequires: liburing-devel
|
||||
BuildRequires: libzstd-devel
|
||||
# `hostname` used by test suite
|
||||
BuildRequires: hostname
|
||||
# Used for nvdimm dax
|
||||
BuildRequires: daxctl-devel
|
||||
|
||||
BuildRequires: glibc-static pcre-static glib2-static zlib-static
|
||||
|
||||
@ -353,6 +347,7 @@ Requires: %{name}-user = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-aarch64 = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-alpha = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-arm = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-avr = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-cris = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-lm32 = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-system-m68k = %{epoch}:%{version}-%{release}
|
||||
@ -548,6 +543,32 @@ This package provides the additional spice-app UI for QEMU.
|
||||
%endif
|
||||
|
||||
|
||||
%package char-baum
|
||||
Summary: QEMU Baum chardev driver
|
||||
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
%description char-baum
|
||||
This package provides the Baum chardev driver for QEMU.
|
||||
|
||||
|
||||
%package device-display-qxl
|
||||
Summary: QEMU QXL display device
|
||||
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
%description device-display-qxl
|
||||
This package provides the QXL display device for QEMU.
|
||||
|
||||
%package device-usb-redirect
|
||||
Summary: QEMU usbredir device
|
||||
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
%description device-usb-redirect
|
||||
This package provides the usbredir device for QEMU.
|
||||
|
||||
%package device-usb-smartcard
|
||||
Summary: QEMU USB smartcard device
|
||||
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
%description device-usb-smartcard
|
||||
This package provides the USB smartcard device for QEMU.
|
||||
|
||||
|
||||
%if %{have_kvm}
|
||||
%package kvm
|
||||
Summary: QEMU metapackage for KVM support
|
||||
@ -649,6 +670,20 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
|
||||
This package provides the QEMU system emulator for ARM boards.
|
||||
|
||||
|
||||
%package system-avr
|
||||
Summary: QEMU system emulator for AVR
|
||||
Requires: %{name}-system-avr-core = %{epoch}:%{version}-%{release}
|
||||
%{requires_all_modules}
|
||||
%description system-avr
|
||||
This package provides the QEMU system emulator for AVR systems.
|
||||
|
||||
%package system-avr-core
|
||||
Summary: QEMU system emulator for ARM
|
||||
Requires: %{name}-common = %{epoch}:%{version}-%{release}
|
||||
%description system-avr-core
|
||||
This package provides the QEMU system emulator for AVR systems.
|
||||
|
||||
|
||||
%package system-cris
|
||||
Summary: QEMU system emulator for CRIS
|
||||
Requires: %{name}-system-cris-core = %{epoch}:%{version}-%{release}
|
||||
@ -1035,7 +1070,9 @@ run_configure_disable_everything() {
|
||||
--disable-hvf \
|
||||
--disable-iconv \
|
||||
--disable-jemalloc \
|
||||
--disable-keyring \
|
||||
--disable-kvm \
|
||||
--disable-libdaxctl \
|
||||
--disable-libiscsi \
|
||||
--disable-libnfs \
|
||||
--disable-libpmem \
|
||||
@ -1064,6 +1101,7 @@ run_configure_disable_everything() {
|
||||
--disable-rbd \
|
||||
--disable-rdma \
|
||||
--disable-replication \
|
||||
--disable-rng-none \
|
||||
--disable-sdl \
|
||||
--disable-sdl-image \
|
||||
--disable-seccomp \
|
||||
@ -1087,6 +1125,7 @@ run_configure_disable_everything() {
|
||||
--disable-vhost-net \
|
||||
--disable-vhost-scsi \
|
||||
--disable-vhost-user \
|
||||
--disable-vhost-vdpa \
|
||||
--disable-vhost-vsock \
|
||||
--disable-virglrenderer \
|
||||
--disable-virtfs \
|
||||
@ -1096,7 +1135,6 @@ run_configure_disable_everything() {
|
||||
--disable-vnc-sasl \
|
||||
--disable-vte \
|
||||
--disable-vvfat \
|
||||
--disable-vxhs \
|
||||
--disable-whpx \
|
||||
--disable-xen \
|
||||
--disable-xen-pci-passthrough \
|
||||
@ -1412,10 +1450,6 @@ getent passwd qemu >/dev/null || \
|
||||
%files common -f %{name}.lang
|
||||
%dir %{qemudocdir}
|
||||
%doc %{qemudocdir}/Changelog
|
||||
%doc %{qemudocdir}/qemu-ga-ref.html
|
||||
%doc %{qemudocdir}/qemu-ga-ref.txt
|
||||
%doc %{qemudocdir}/qemu-qmp-ref.html
|
||||
%doc %{qemudocdir}/qemu-qmp-ref.txt
|
||||
%doc %{qemudocdir}/README.rst
|
||||
%doc %{qemudocdir}/index.html
|
||||
%doc %{qemudocdir}/interop
|
||||
@ -1465,19 +1499,19 @@ getent passwd qemu >/dev/null || \
|
||||
%{_mandir}/man1/virtiofsd.1*
|
||||
%{_mandir}/man7/qemu-block-drivers.7*
|
||||
%{_mandir}/man7/qemu-cpu-models.7*
|
||||
%{_mandir}/man7/qemu-ga-ref.7*
|
||||
%{_mandir}/man7/qemu-qmp-ref.7*
|
||||
%{_mandir}/man7/qemu-ga-ref.7*
|
||||
%{_bindir}/elf2dmp
|
||||
%{_bindir}/qemu-edid
|
||||
%{_bindir}/qemu-keymap
|
||||
%{_bindir}/qemu-pr-helper
|
||||
%{_bindir}/qemu-storage-daemon
|
||||
%{_bindir}/qemu-trace-stap
|
||||
%{_bindir}/virtfs-proxy-helper
|
||||
%{_unitdir}/qemu-pr-helper.service
|
||||
%{_unitdir}/qemu-pr-helper.socket
|
||||
%attr(4755, root, root) %{_libexecdir}/qemu-bridge-helper
|
||||
%{_libexecdir}/qemu-pr-helper
|
||||
%{_libexecdir}/vhost-user-gpu
|
||||
%{_libexecdir}/virtfs-proxy-helper
|
||||
%{_libexecdir}/virtiofsd
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/qemu.conf
|
||||
%dir %{_sysconfdir}/qemu
|
||||
@ -1544,6 +1578,16 @@ getent passwd qemu >/dev/null || \
|
||||
%{_libdir}/qemu/ui-spice-app.so
|
||||
%endif
|
||||
|
||||
%files char-baum
|
||||
%{_libdir}/qemu/chardev-baum.so
|
||||
|
||||
%files device-display-qxl
|
||||
%{_libdir}/qemu/hw-display-qxl.so
|
||||
%files device-usb-redirect
|
||||
%{_libdir}/qemu/hw-usb-redirect.so
|
||||
%files device-usb-smartcard
|
||||
%{_libdir}/qemu/hw-usb-smartcard.so
|
||||
|
||||
|
||||
%files -n ivshmem-tools
|
||||
%{_bindir}/ivshmem-client
|
||||
@ -1652,6 +1696,13 @@ getent passwd qemu >/dev/null || \
|
||||
%{_mandir}/man1/qemu-system-arm.1*
|
||||
|
||||
|
||||
%files system-avr
|
||||
%files system-avr-core
|
||||
%{_bindir}/qemu-system-avr
|
||||
%{_datadir}/systemtap/tapset/qemu-system-avr*.stp
|
||||
%{_mandir}/man1/qemu-system-avr.1*
|
||||
|
||||
|
||||
%files system-cris
|
||||
%files system-cris-core
|
||||
%{_bindir}/qemu-system-cris
|
||||
@ -1836,6 +1887,9 @@ getent passwd qemu >/dev/null || \
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 04 2020 Cole Robinson <aintdiscole@gmail.com> - 5.1.0-0.1.rc2
|
||||
- Update to qemu 5.1.0 rc2
|
||||
|
||||
* Fri Jul 31 2020 Daniel P. Berrangé <berrange@redhat.com> - 5.0.0-6
|
||||
- Remove obsolete Fedora conditionals (PR#9)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (qemu-5.0.0.tar.xz) = 21ef0cbe107c468a40f0fa2635db2a40048c8790b629dfffca5cd62bb1b502ea8eb133bfc40df5ecf1489e2bffe87f6829aee041cb8a380ff04a8afa23b39fcf
|
||||
SHA512 (qemu-5.1.0-rc2.tar.xz) = 2cd6b4412c721e8556442e12a52e910fb6223812f8bfe0dd90d0537db1d53aa16c2694bc7f5fb39bafe0e2d88014068dcd15eb361c5dad78771aad32bc8d0430
|
||||
|
Loading…
Reference in New Issue
Block a user