Accepting request 295465 from home:a_faerber:branches:Virtualization

Split off qemu-testsuite.spec to decouple retriggering the sometimes-failing tests from the lengthy build of the binaries. Extend test coverage to include iotests for block backends. Drop the SUSE-only MAC address warning for now, to keep output-checking tests from failing. Re-enable glusterfs support for Factory (updated to v3.6.2). Re-enable libseccomp support for armv7l (submission of patched v2.2.0 pending).

OBS-URL: https://build.opensuse.org/request/show/295465
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=248
This commit is contained in:
Andreas Färber 2015-04-12 09:13:49 +00:00 committed by Git OBS Bridge
parent 601e598d21
commit 460cfc231f
20 changed files with 3332 additions and 117 deletions

View File

@ -1,4 +1,4 @@
From 495a5acd9650ef793443d716f2e2c80f42c75b54 Mon Sep 17 00:00:00 2001 From 0826bf904b5f7cd9fcf0de34adee98ce01ba56da Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de> From: Alexander Graf <agraf@suse.de>
Date: Mon, 6 Jun 2011 06:53:52 +0200 Date: Mon, 6 Jun 2011 06:53:52 +0200
Subject: [PATCH] console: add question-mark escape operator Subject: [PATCH] console: add question-mark escape operator

View File

@ -1,59 +0,0 @@
From 1a709119c593c74fb7db745030a0dda33e7dd18c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 12 Dec 2012 19:11:31 +0100
Subject: [PATCH] net: Warn about default MAC address
[AF: Suppress for QTest]
---
net/net.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/net/net.c b/net/net.c
index 0be084d..552e233 100644
--- a/net/net.c
+++ b/net/net.c
@@ -42,6 +42,7 @@
#include "qapi/opts-visitor.h"
#include "qapi/dealloc-visitor.h"
#include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
/* Net bridge is currently not supported for W32. */
#if !defined(_WIN32)
@@ -160,6 +161,28 @@ void qemu_format_nic_info_str(NetClientState *nc, uint8_t macaddr[6])
macaddr[3], macaddr[4], macaddr[5]);
}
+static void default_mac_check(void)
+{
+ static const MACAddr def_mac = { .a = { 0x52,0x54,0x00,0x12,0x34,0x56 } };
+ static int warned = 0;
+ int i;
+
+ for (i = 0; i < MAX_NICS; i++) {
+ if (!nd_table[i].used) {
+ continue;
+ }
+ if (memcmp(nd_table[i].macaddr.a, def_mac.a, 5)) {
+ continue;
+ }
+ if (nd_table[i].macaddr.a[5] >= 0x56 &&
+ nd_table[i].macaddr.a[5] < 0x56 + MAX_NICS && !warned && !qtest_enabled()) {
+ warned = 1;
+ fprintf(stderr, "Warning: default mac address being used, creating "
+ "potential for address conflict\n");
+ }
+ }
+}
+
void qemu_macaddr_default_if_unset(MACAddr *macaddr)
{
static int index = 0;
@@ -1313,6 +1336,7 @@ int net_init_clients(void)
if (qemu_opts_foreach(net, net_init_client, NULL, 1) == -1) {
return -1;
}
+ default_mac_check();
return 0;
}

View File

@ -1,4 +1,4 @@
From ae8f274f387c2401d6e17cd9e9889aa0d76b1b9b Mon Sep 17 00:00:00 2001 From 1219fd28c73d209a210f07e1ffafe3fa611dd62c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de> From: Alexander Graf <agraf@suse.de>
Date: Thu, 1 Apr 2010 17:36:23 +0200 Date: Thu, 1 Apr 2010 17:36:23 +0200
Subject: [PATCH] Make char muxer more robust wrt small FIFOs Subject: [PATCH] Make char muxer more robust wrt small FIFOs

View File

@ -1,4 +1,4 @@
From 9fe73c4701b0ccecc6d6c6662e6092351aa4f381 Mon Sep 17 00:00:00 2001 From e3cab8361bc2f1905721e25426991473c7e806b2 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de> From: Alexander Graf <agraf@suse.de>
Date: Thu, 13 Dec 2012 14:29:22 +0100 Date: Thu, 13 Dec 2012 14:29:22 +0100
Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed

View File

@ -1,4 +1,4 @@
From 31d35e1ce9f365e2b0c98d5a6d7cb2c12123a8b1 Mon Sep 17 00:00:00 2001 From 8948d8682b0955eecfeda389015715e87070c872 Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com> From: Bruce Rogers <brogers@suse.com>
Date: Thu, 16 May 2013 12:39:10 +0200 Date: Thu, 16 May 2013 12:39:10 +0200
Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken

View File

@ -1,4 +1,4 @@
From 06cfe0f8276cdd0de53c4ec27d72ffd716e2a5ae Mon Sep 17 00:00:00 2001 From 2dc7e5dd836a228b7c2c721eee36d76c2c58f6c5 Mon Sep 17 00:00:00 2001
From: Dinar Valeev <k0da@opensuse.org> From: Dinar Valeev <k0da@opensuse.org>
Date: Wed, 2 Oct 2013 17:56:03 +0200 Date: Wed, 2 Oct 2013 17:56:03 +0200
Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts

View File

@ -1,4 +1,4 @@
From f50b5dc24e9bbe259d1c64f6da4732012f03b2cc Mon Sep 17 00:00:00 2001 From 17be03c91c591682d8e5e1177345d6e1b2b9eaa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de> From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Thu, 17 Apr 2014 18:39:10 +0200 Date: Thu, 17 Apr 2014 18:39:10 +0200
Subject: [PATCH] qtest: Increase socket timeout Subject: [PATCH] qtest: Increase socket timeout

View File

@ -1,4 +1,4 @@
From e0c150ca4efc0f172e34c0b5a204d1fd87ee02c1 Mon Sep 17 00:00:00 2001 From dd7584c2d0ffdd72da452681268cf3a9c21e98ee Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de> From: Alexander Graf <agraf@suse.de>
Date: Wed, 14 Jan 2015 01:32:11 +0100 Date: Wed, 14 Jan 2015 01:32:11 +0100
Subject: [PATCH] AIO: Reduce number of threads for 32bit hosts Subject: [PATCH] AIO: Reduce number of threads for 32bit hosts

View File

@ -1,4 +1,4 @@
From 4a886245fce97b79af5841d6b0849124c8d30243 Mon Sep 17 00:00:00 2001 From 32333d39aaa8044991140d4c1f255f14c1f79d73 Mon Sep 17 00:00:00 2001
From: Peter Maydell <peter.maydell@linaro.org> From: Peter Maydell <peter.maydell@linaro.org>
Date: Wed, 8 Apr 2015 20:57:09 +0100 Date: Wed, 8 Apr 2015 20:57:09 +0100
Subject: [PATCH] tcg/tcg-op.c: Fix ld/st of 64 bit values on 32-bit bigendian Subject: [PATCH] tcg/tcg-op.c: Fix ld/st of 64 bit values on 32-bit bigendian

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Sat Apr 11 13:15:55 UTC 2015 - afaerber@suse.de
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3
* Patches dropped:
0030-net-Warn-about-default-MAC-address.patch
* Patches renamed:
0031-console-add-question-mark-escape-op.patch -> 0030-console-add-question-mark-escape-op.patch
0032-Make-char-muxer-more-robust-wrt-sma.patch -> 0031-Make-char-muxer-more-robust-wrt-sma.patch
0033-linux-user-lseek-explicitly-cast-no.patch -> 0032-linux-user-lseek-explicitly-cast-no.patch
0034-virtfs-proxy-helper-Provide-__u64-f.patch -> 0033-virtfs-proxy-helper-Provide-__u64-f.patch
0035-configure-Enable-PIE-for-ppc-and-pp.patch -> 0034-configure-Enable-PIE-for-ppc-and-pp.patch
0036-qtest-Increase-socket-timeout.patch -> 0035-qtest-Increase-socket-timeout.patch
0037-AIO-Reduce-number-of-threads-for-32.patch -> 0036-AIO-Reduce-number-of-threads-for-32.patch
0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch -> 0037-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 8 20:47:40 UTC 2015 - afaerber@suse.de Wed Apr 8 20:47:40 UTC 2015 - afaerber@suse.de

View File

@ -54,15 +54,14 @@ Patch0026: 0026-linux-user-use-target_ulong.patch
Patch0027: 0027-block-Add-support-for-DictZip-enabl.patch Patch0027: 0027-block-Add-support-for-DictZip-enabl.patch
Patch0028: 0028-block-Add-tar-container-format.patch Patch0028: 0028-block-Add-tar-container-format.patch
Patch0029: 0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch Patch0029: 0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
Patch0030: 0030-net-Warn-about-default-MAC-address.patch Patch0030: 0030-console-add-question-mark-escape-op.patch
Patch0031: 0031-console-add-question-mark-escape-op.patch Patch0031: 0031-Make-char-muxer-more-robust-wrt-sma.patch
Patch0032: 0032-Make-char-muxer-more-robust-wrt-sma.patch Patch0032: 0032-linux-user-lseek-explicitly-cast-no.patch
Patch0033: 0033-linux-user-lseek-explicitly-cast-no.patch Patch0033: 0033-virtfs-proxy-helper-Provide-__u64-f.patch
Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0034: 0034-configure-Enable-PIE-for-ppc-and-pp.patch
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0035: 0035-qtest-Increase-socket-timeout.patch
Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch
Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
Patch0038: 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
# Please do not add patches manually here, run update_git.sh. # Please do not add patches manually here, run update_git.sh.
# this is to make lint happy # this is to make lint happy
Source300: qemu-rpmlintrc Source300: qemu-rpmlintrc
@ -159,7 +158,6 @@ This sub-package contains development files for the Smartcard library.
%patch0035 -p1 %patch0035 -p1
%patch0036 -p1 %patch0036 -p1
%patch0037 -p1 %patch0037 -p1
%patch0038 -p1
%build %build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \

8
pre_checkin.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
cp qemu.changes qemu-testsuite.changes
if [ "$1" != "-q" ]; then
echo "Note that the patch queue needs to be regenerated via update_git.sh"
echo "before running $0."
fi

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Sat Apr 11 13:15:51 UTC 2015 - afaerber@suse.de
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3
* Patches dropped:
0030-net-Warn-about-default-MAC-address.patch
* Patches renamed:
0031-console-add-question-mark-escape-op.patch -> 0030-console-add-question-mark-escape-op.patch
0032-Make-char-muxer-more-robust-wrt-sma.patch -> 0031-Make-char-muxer-more-robust-wrt-sma.patch
0033-linux-user-lseek-explicitly-cast-no.patch -> 0032-linux-user-lseek-explicitly-cast-no.patch
0034-virtfs-proxy-helper-Provide-__u64-f.patch -> 0033-virtfs-proxy-helper-Provide-__u64-f.patch
0035-configure-Enable-PIE-for-ppc-and-pp.patch -> 0034-configure-Enable-PIE-for-ppc-and-pp.patch
0036-qtest-Increase-socket-timeout.patch -> 0035-qtest-Increase-socket-timeout.patch
0037-AIO-Reduce-number-of-threads-for-32.patch -> 0036-AIO-Reduce-number-of-threads-for-32.patch
0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch -> 0037-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 8 20:47:36 UTC 2015 - afaerber@suse.de Wed Apr 8 20:47:36 UTC 2015 - afaerber@suse.de

View File

@ -54,15 +54,14 @@ Patch0026: 0026-linux-user-use-target_ulong.patch
Patch0027: 0027-block-Add-support-for-DictZip-enabl.patch Patch0027: 0027-block-Add-support-for-DictZip-enabl.patch
Patch0028: 0028-block-Add-tar-container-format.patch Patch0028: 0028-block-Add-tar-container-format.patch
Patch0029: 0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch Patch0029: 0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
Patch0030: 0030-net-Warn-about-default-MAC-address.patch Patch0030: 0030-console-add-question-mark-escape-op.patch
Patch0031: 0031-console-add-question-mark-escape-op.patch Patch0031: 0031-Make-char-muxer-more-robust-wrt-sma.patch
Patch0032: 0032-Make-char-muxer-more-robust-wrt-sma.patch Patch0032: 0032-linux-user-lseek-explicitly-cast-no.patch
Patch0033: 0033-linux-user-lseek-explicitly-cast-no.patch Patch0033: 0033-virtfs-proxy-helper-Provide-__u64-f.patch
Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0034: 0034-configure-Enable-PIE-for-ppc-and-pp.patch
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0035: 0035-qtest-Increase-socket-timeout.patch
Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch
Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
Patch0038: 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
# Please do not add patches manually here, run update_git.sh. # Please do not add patches manually here, run update_git.sh.
# this is to make lint happy # this is to make lint happy
Source300: qemu-rpmlintrc Source300: qemu-rpmlintrc
@ -153,7 +152,6 @@ run cross-architecture builds.
%patch0035 -p1 %patch0035 -p1
%patch0036 -p1 %patch0036 -p1
%patch0037 -p1 %patch0037 -p1
%patch0038 -p1
%build %build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \

2000
qemu-testsuite.changes Normal file

File diff suppressed because it is too large Load Diff

1058
qemu-testsuite.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Sat Apr 11 13:15:47 UTC 2015 - afaerber@suse.de
- Split off qemu-testsuite.spec
* Package check-report.html and check-report.xml
* Enable quick iotests
- Dropped 0030-net-Warn-about-default-MAC-address.patch
The warning is relevant only for bridged setups, not for the
default SLIRP based -net user / -netdev user setup,
and it breaks output expectations of some iotests.
* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3
* Patches renamed:
0031-console-add-question-mark-escape-op.patch -> 0030-console-add-question-mark-escape-op.patch
0032-Make-char-muxer-more-robust-wrt-sma.patch -> 0031-Make-char-muxer-more-robust-wrt-sma.patch
0033-linux-user-lseek-explicitly-cast-no.patch -> 0032-linux-user-lseek-explicitly-cast-no.patch
0034-virtfs-proxy-helper-Provide-__u64-f.patch -> 0033-virtfs-proxy-helper-Provide-__u64-f.patch
0035-configure-Enable-PIE-for-ppc-and-pp.patch -> 0034-configure-Enable-PIE-for-ppc-and-pp.patch
0036-qtest-Increase-socket-timeout.patch -> 0035-qtest-Increase-socket-timeout.patch
0037-AIO-Reduce-number-of-threads-for-32.patch -> 0036-AIO-Reduce-number-of-threads-for-32.patch
0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch -> 0037-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
- Re-enable glusterfs on Factory (updated from v3.6.1 to v3.6.2)
- Re-enable seccomp for armv7l (libseccomp submission pending)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 10 08:59:34 UTC 2015 - afaerber@suse.de Fri Apr 10 08:59:34 UTC 2015 - afaerber@suse.de

115
qemu.spec
View File

@ -45,8 +45,8 @@ License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC Group: System/Emulators/PC
Version: 2.2.92 Version: 2.2.92
Release: 0 Release: 0
Source: http://wiki.qemu.org/download/%name-2.3.0-rc2.tar.bz2 Source: http://wiki.qemu.org/download/qemu-2.3.0-rc2.tar.bz2
Source99: http://wiki.qemu.org/download/%name-2.3.0-rc2.tar.bz2.sig Source99: http://wiki.qemu.org/download/qemu-2.3.0-rc2.tar.bz2.sig
Source1: 80-kvm.rules Source1: 80-kvm.rules
Source2: qemu-ifup Source2: qemu-ifup
Source3: kvm_stat Source3: kvm_stat
@ -85,15 +85,14 @@ Patch0026: 0026-linux-user-use-target_ulong.patch
Patch0027: 0027-block-Add-support-for-DictZip-enabl.patch Patch0027: 0027-block-Add-support-for-DictZip-enabl.patch
Patch0028: 0028-block-Add-tar-container-format.patch Patch0028: 0028-block-Add-tar-container-format.patch
Patch0029: 0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch Patch0029: 0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
Patch0030: 0030-net-Warn-about-default-MAC-address.patch Patch0030: 0030-console-add-question-mark-escape-op.patch
Patch0031: 0031-console-add-question-mark-escape-op.patch Patch0031: 0031-Make-char-muxer-more-robust-wrt-sma.patch
Patch0032: 0032-Make-char-muxer-more-robust-wrt-sma.patch Patch0032: 0032-linux-user-lseek-explicitly-cast-no.patch
Patch0033: 0033-linux-user-lseek-explicitly-cast-no.patch Patch0033: 0033-virtfs-proxy-helper-Provide-__u64-f.patch
Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0034: 0034-configure-Enable-PIE-for-ppc-and-pp.patch
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0035: 0035-qtest-Increase-socket-timeout.patch
Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch
Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
Patch0038: 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch
# Please do not add QEMU patches manually here. # Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue. # Run update_git.sh to regenerate this queue.
@ -223,6 +222,15 @@ BuildRequires: libspice-server-devel
BuildRequires: spice-protocol-devel BuildRequires: spice-protocol-devel
%endif %endif
%endif %endif
%if "%{name}" == "qemu-testsuite"
BuildRequires: bc
BuildRequires: qemu-arm = %version
BuildRequires: qemu-extra = %version
BuildRequires: qemu-ppc = %version
BuildRequires: qemu-s390 = %version
BuildRequires: qemu-tools = %version
BuildRequires: qemu-x86 = %version
%endif
Requires: /usr/sbin/groupadd Requires: /usr/sbin/groupadd
Requires: pwdutils Requires: pwdutils
Requires: timezone Requires: timezone
@ -263,6 +271,8 @@ binaries for different architectures under your native operating
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
as PC and PowerMac systems. as PC and PowerMac systems.
%if "%{name}" != "qemu-testsuite"
%package x86 %package x86
Summary: Universal CPU emulator -- x86 Summary: Universal CPU emulator -- x86
Group: System/Emulators/PC Group: System/Emulators/PC
@ -401,7 +411,7 @@ as PC and PowerMac systems.
This sub-package contains a module for accessing network-based image files This sub-package contains a module for accessing network-based image files
over a network connection from qemu-img tool and QEMU system emulation. over a network connection from qemu-img tool and QEMU system emulation.
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 && 0%{?suse_version} <= 1320 %if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%package block-gluster %package block-gluster
Summary: Universal CPU emulator -- GlusterFS block support Summary: Universal CPU emulator -- GlusterFS block support
Group: System/Emulators/PC Group: System/Emulators/PC
@ -539,8 +549,10 @@ that merges anonymous (private) pages (not pagecache ones).
This package provides a service file for starting and stopping KSM. This package provides a service file for starting and stopping KSM.
%endif %endif
%endif # !qemu-testsuite
%prep %prep
%setup -q -n %name-2.3.0-rc2 %setup -q -n qemu-2.3.0-rc2
%patch0001 -p1 %patch0001 -p1
%patch0002 -p1 %patch0002 -p1
%patch0003 -p1 %patch0003 -p1
@ -578,7 +590,6 @@ This package provides a service file for starting and stopping KSM.
%patch0035 -p1 %patch0035 -p1
%patch0036 -p1 %patch0036 -p1
%patch0037 -p1 %patch0037 -p1
%patch0038 -p1
%if %{build_x86_fw_from_source} %if %{build_x86_fw_from_source}
pushd roms/seabios pushd roms/seabios
@ -611,14 +622,16 @@ done
--enable-attr \ --enable-attr \
--enable-bluez \ --enable-bluez \
%if 0%{?suse_version} >= 1130 %if 0%{?suse_version} >= 1130
--enable-brlapi \ --enable-brlapi \
%else
--disable-brlapi \
%endif %endif
--enable-bzip2 \ --enable-bzip2 \
--enable-cap-ng \ --enable-cap-ng \
--enable-curl \ --enable-curl \
--enable-curses \ --enable-curses \
--enable-fdt \ --enable-fdt \
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 && 0%{?suse_version} <= 1320 %if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
--enable-glusterfs \ --enable-glusterfs \
%else %else
--disable-glusterfs \ --disable-glusterfs \
@ -626,17 +639,25 @@ done
--enable-gtk \ --enable-gtk \
%if 0%{?suse_version} >= 1220 %if 0%{?suse_version} >= 1220
--with-gtkabi=3.0 \ --with-gtkabi=3.0 \
%else
--with-gtkabi=2.0 \
%endif %endif
%if %{kvm_available} %if %{kvm_available}
--enable-kvm \ --enable-kvm \
%else
--disable-kvm \
%endif %endif
--disable-libiscsi \ --disable-libiscsi \
--disable-libnfs \ --disable-libnfs \
%if 0%{?suse_version} > 1140 %if 0%{?suse_version} > 1140
--enable-libssh2 \ --enable-libssh2 \
%else
--disable-libssh2 \
%endif %endif
%if 0%{?suse_version} > 1310 %if 0%{?suse_version} > 1310
--enable-libusb \ --enable-libusb \
%else
--disable-libusb \
%endif %endif
--enable-linux-aio \ --enable-linux-aio \
--enable-lzo \ --enable-lzo \
@ -656,14 +677,18 @@ done
%endif %endif
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
--enable-quorum \ --enable-quorum \
%else
--disable-quorum \
%endif %endif
--disable-rbd \ --disable-rbd \
%if 0%{?suse_version} >= 1315 %if 0%{?suse_version} >= 1315
--enable-rdma \ --enable-rdma \
%else
--disable-rdma \
%endif %endif
--enable-sdl \ --enable-sdl \
--with-sdlabi=1.2 \ --with-sdlabi=1.2 \
%ifnarch ppc64le %arm %ifnarch ppc64le
%if 0%{?suse_version} > 1320 %if 0%{?suse_version} > 1320
--enable-seccomp \ --enable-seccomp \
%else %else
@ -675,6 +700,8 @@ done
--enable-smartcard-nss \ --enable-smartcard-nss \
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
--enable-snappy \ --enable-snappy \
%else
--disable-snappy \
%endif %endif
%if 0%{?suse_version} >= 1140 %if 0%{?suse_version} >= 1140
%ifarch %ix86 x86_64 %ifarch %ix86 x86_64
@ -689,6 +716,8 @@ done
--enable-trace-backends=nop \ --enable-trace-backends=nop \
%if 0%{?sles_version} != 11 %if 0%{?sles_version} != 11
--enable-usb-redir \ --enable-usb-redir \
%else
--disable-usb-redir \
%endif %endif
--enable-uuid \ --enable-uuid \
--enable-vde \ --enable-vde \
@ -704,8 +733,12 @@ done
%ifarch x86_64 %ifarch x86_64
--enable-xen \ --enable-xen \
--enable-xen-pci-passthrough \ --enable-xen-pci-passthrough \
%else
--disable-xen \
%endif %endif
%if "%{name}" != "qemu-testsuite"
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
# Firmware # Firmware
@ -719,10 +752,40 @@ make -C roms sgabios
cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img
%endif %endif
%else # qemu-testsuite
for conf in default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|default-configs/\(.*\)-softmmu.mak|\1|g'`
ln -s %{_bindir}/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
%endif
%check %check
make check V=1 %if "%{name}" == "qemu-testsuite"
%if 0%{?suse_version} >= 1310
make check-report.html V=1
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%else
make check-report.xml V=1
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%ifnarch %ix86 x64_64
export QEMU_PROG=%{_bindir}/qemu-system-x86_64
%endif
export QEMU_IMG_PROG=%{_bindir}/qemu-img
export QEMU_IO_PROG=%{_bindir}/qemu-io
export QEMU_NBD_PROG=%{_bindir}/qemu-nbd
# make check-block would rebuild qemu-img and qemu-io
make tests/qemu-iotests/socket_scm_helper V=1
pushd tests/qemu-iotests
# -qcow 001 seems to hang?
for fmt in -raw -bochs -cloop -parallels -qcow2 -qed -vdi -vpc -vhdx -vmdk; do
./check -v -T $fmt -file -g quick || true
done
popd
%endif
%install %install
%if "%{name}" != "qemu-testsuite"
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc rm -fr $RPM_BUILD_ROOT/%_datadir/doc
rm $RPM_BUILD_ROOT/%_libdir/libcacard* rm $RPM_BUILD_ROOT/%_libdir/libcacard*
@ -764,6 +827,9 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
%endif %endif
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT %fdupes -s $RPM_BUILD_ROOT
%endif
%if "%{name}" != "qemu-testsuite"
%pre %pre
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null %{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
@ -809,9 +875,11 @@ fi
%service_del_postun ksm.service %service_del_postun ksm.service
%endif %endif
%endif # !qemu-testsuite
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%dir %_libdir/%name %if "%{name}" != "qemu-testsuite"
%doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html %doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html
%doc %_mandir/man1/qemu.1.gz %doc %_mandir/man1/qemu.1.gz
%dir %_datadir/%name %dir %_datadir/%name
@ -904,7 +972,7 @@ fi
%defattr(-, root, root) %defattr(-, root, root)
%_libdir/%name/block-curl.so %_libdir/%name/block-curl.so
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 && 0%{?suse_version} <= 1320 %if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%files block-gluster %files block-gluster
%defattr(-, root, root) %defattr(-, root, root)
%_libdir/%name/block-gluster.so %_libdir/%name/block-gluster.so
@ -980,4 +1048,11 @@ fi
%{_unitdir}/ksm.service %{_unitdir}/ksm.service
%endif %endif
%else # qemu-testsuite
%doc %_datadir/qemu/check-report.xml
%if 0%{?suse_version} >= 1310
%doc %_datadir/qemu/check-report.html
%endif
%endif
%changelog %changelog

View File

@ -45,8 +45,8 @@ License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC Group: System/Emulators/PC
QEMU_VERSION QEMU_VERSION
Release: 0 Release: 0
Source: http://wiki.qemu.org/download/%name-2.3.0-rc2.tar.bz2 Source: http://wiki.qemu.org/download/qemu-2.3.0-rc2.tar.bz2
Source99: http://wiki.qemu.org/download/%name-2.3.0-rc2.tar.bz2.sig Source99: http://wiki.qemu.org/download/qemu-2.3.0-rc2.tar.bz2.sig
Source1: 80-kvm.rules Source1: 80-kvm.rules
Source2: qemu-ifup Source2: qemu-ifup
Source3: kvm_stat Source3: kvm_stat
@ -186,6 +186,15 @@ BuildRequires: libspice-server-devel
BuildRequires: spice-protocol-devel BuildRequires: spice-protocol-devel
%endif %endif
%endif %endif
%if "%{name}" == "qemu-testsuite"
BuildRequires: bc
BuildRequires: qemu-arm = %version
BuildRequires: qemu-extra = %version
BuildRequires: qemu-ppc = %version
BuildRequires: qemu-s390 = %version
BuildRequires: qemu-tools = %version
BuildRequires: qemu-x86 = %version
%endif
Requires: /usr/sbin/groupadd Requires: /usr/sbin/groupadd
Requires: pwdutils Requires: pwdutils
Requires: timezone Requires: timezone
@ -226,6 +235,8 @@ binaries for different architectures under your native operating
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
as PC and PowerMac systems. as PC and PowerMac systems.
%if "%{name}" != "qemu-testsuite"
%package x86 %package x86
Summary: Universal CPU emulator -- x86 Summary: Universal CPU emulator -- x86
Group: System/Emulators/PC Group: System/Emulators/PC
@ -364,7 +375,7 @@ as PC and PowerMac systems.
This sub-package contains a module for accessing network-based image files This sub-package contains a module for accessing network-based image files
over a network connection from qemu-img tool and QEMU system emulation. over a network connection from qemu-img tool and QEMU system emulation.
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 && 0%{?suse_version} <= 1320 %if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%package block-gluster %package block-gluster
Summary: Universal CPU emulator -- GlusterFS block support Summary: Universal CPU emulator -- GlusterFS block support
Group: System/Emulators/PC Group: System/Emulators/PC
@ -502,8 +513,10 @@ that merges anonymous (private) pages (not pagecache ones).
This package provides a service file for starting and stopping KSM. This package provides a service file for starting and stopping KSM.
%endif %endif
%endif # !qemu-testsuite
%prep %prep
%setup -q -n %name-2.3.0-rc2 %setup -q -n qemu-2.3.0-rc2
PATCH_EXEC PATCH_EXEC
%if %{build_x86_fw_from_source} %if %{build_x86_fw_from_source}
@ -537,14 +550,16 @@ done
--enable-attr \ --enable-attr \
--enable-bluez \ --enable-bluez \
%if 0%{?suse_version} >= 1130 %if 0%{?suse_version} >= 1130
--enable-brlapi \ --enable-brlapi \
%else
--disable-brlapi \
%endif %endif
--enable-bzip2 \ --enable-bzip2 \
--enable-cap-ng \ --enable-cap-ng \
--enable-curl \ --enable-curl \
--enable-curses \ --enable-curses \
--enable-fdt \ --enable-fdt \
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 && 0%{?suse_version} <= 1320 %if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
--enable-glusterfs \ --enable-glusterfs \
%else %else
--disable-glusterfs \ --disable-glusterfs \
@ -552,17 +567,25 @@ done
--enable-gtk \ --enable-gtk \
%if 0%{?suse_version} >= 1220 %if 0%{?suse_version} >= 1220
--with-gtkabi=3.0 \ --with-gtkabi=3.0 \
%else
--with-gtkabi=2.0 \
%endif %endif
%if %{kvm_available} %if %{kvm_available}
--enable-kvm \ --enable-kvm \
%else
--disable-kvm \
%endif %endif
--disable-libiscsi \ --disable-libiscsi \
--disable-libnfs \ --disable-libnfs \
%if 0%{?suse_version} > 1140 %if 0%{?suse_version} > 1140
--enable-libssh2 \ --enable-libssh2 \
%else
--disable-libssh2 \
%endif %endif
%if 0%{?suse_version} > 1310 %if 0%{?suse_version} > 1310
--enable-libusb \ --enable-libusb \
%else
--disable-libusb \
%endif %endif
--enable-linux-aio \ --enable-linux-aio \
--enable-lzo \ --enable-lzo \
@ -582,14 +605,18 @@ done
%endif %endif
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
--enable-quorum \ --enable-quorum \
%else
--disable-quorum \
%endif %endif
--disable-rbd \ --disable-rbd \
%if 0%{?suse_version} >= 1315 %if 0%{?suse_version} >= 1315
--enable-rdma \ --enable-rdma \
%else
--disable-rdma \
%endif %endif
--enable-sdl \ --enable-sdl \
--with-sdlabi=1.2 \ --with-sdlabi=1.2 \
%ifnarch ppc64le %arm %ifnarch ppc64le
%if 0%{?suse_version} > 1320 %if 0%{?suse_version} > 1320
--enable-seccomp \ --enable-seccomp \
%else %else
@ -601,6 +628,8 @@ done
--enable-smartcard-nss \ --enable-smartcard-nss \
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
--enable-snappy \ --enable-snappy \
%else
--disable-snappy \
%endif %endif
%if 0%{?suse_version} >= 1140 %if 0%{?suse_version} >= 1140
%ifarch %ix86 x86_64 %ifarch %ix86 x86_64
@ -615,6 +644,8 @@ done
--enable-trace-backends=nop \ --enable-trace-backends=nop \
%if 0%{?sles_version} != 11 %if 0%{?sles_version} != 11
--enable-usb-redir \ --enable-usb-redir \
%else
--disable-usb-redir \
%endif %endif
--enable-uuid \ --enable-uuid \
--enable-vde \ --enable-vde \
@ -630,8 +661,12 @@ done
%ifarch x86_64 %ifarch x86_64
--enable-xen \ --enable-xen \
--enable-xen-pci-passthrough \ --enable-xen-pci-passthrough \
%else
--disable-xen \
%endif %endif
%if "%{name}" != "qemu-testsuite"
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
# Firmware # Firmware
@ -645,10 +680,40 @@ make -C roms sgabios
cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img
%endif %endif
%else # qemu-testsuite
for conf in default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|default-configs/\(.*\)-softmmu.mak|\1|g'`
ln -s %{_bindir}/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
%endif
%check %check
make check V=1 %if "%{name}" == "qemu-testsuite"
%if 0%{?suse_version} >= 1310
make check-report.html V=1
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%else
make check-report.xml V=1
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%ifnarch %ix86 x64_64
export QEMU_PROG=%{_bindir}/qemu-system-x86_64
%endif
export QEMU_IMG_PROG=%{_bindir}/qemu-img
export QEMU_IO_PROG=%{_bindir}/qemu-io
export QEMU_NBD_PROG=%{_bindir}/qemu-nbd
# make check-block would rebuild qemu-img and qemu-io
make tests/qemu-iotests/socket_scm_helper V=1
pushd tests/qemu-iotests
# -qcow 001 seems to hang?
for fmt in -raw -bochs -cloop -parallels -qcow2 -qed -vdi -vpc -vhdx -vmdk; do
./check -v -T $fmt -file -g quick || true
done
popd
%endif
%install %install
%if "%{name}" != "qemu-testsuite"
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc rm -fr $RPM_BUILD_ROOT/%_datadir/doc
rm $RPM_BUILD_ROOT/%_libdir/libcacard* rm $RPM_BUILD_ROOT/%_libdir/libcacard*
@ -690,6 +755,9 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
%endif %endif
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT %fdupes -s $RPM_BUILD_ROOT
%endif
%if "%{name}" != "qemu-testsuite"
%pre %pre
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null %{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
@ -735,9 +803,11 @@ fi
%service_del_postun ksm.service %service_del_postun ksm.service
%endif %endif
%endif # !qemu-testsuite
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%dir %_libdir/%name %if "%{name}" != "qemu-testsuite"
%doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html %doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html
%doc %_mandir/man1/qemu.1.gz %doc %_mandir/man1/qemu.1.gz
%dir %_datadir/%name %dir %_datadir/%name
@ -830,7 +900,7 @@ fi
%defattr(-, root, root) %defattr(-, root, root)
%_libdir/%name/block-curl.so %_libdir/%name/block-curl.so
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 && 0%{?suse_version} <= 1320 %if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%files block-gluster %files block-gluster
%defattr(-, root, root) %defattr(-, root, root)
%_libdir/%name/block-gluster.so %_libdir/%name/block-gluster.so
@ -906,4 +976,11 @@ fi
%{_unitdir}/ksm.service %{_unitdir}/ksm.service
%endif %endif
%else # qemu-testsuite
%doc %_datadir/qemu/check-report.xml
%if 0%{?suse_version} >= 1310
%doc %_datadir/qemu/check-report.html
%endif
%endif
%changelog %changelog

View File

@ -145,3 +145,8 @@ rm -rf $GIT_DIR
) )
rm -rf $CMP_DIR rm -rf $CMP_DIR
sed -e 's|^\(Name:.*qemu\)|\1-testsuite|' < qemu.spec > qemu-testsuite.spec
osc service localrun format_spec_file
/bin/sh pre_checkin.sh -q