SHA256
1
0
forked from pool/qemu

Accepting request 408598 from home:bfrogers:branches:Virtualization

Improve the spec file and conditionals used to maximize feature availability. Work is done with an eye toward syncing more closely with the IBS qemu spec file. More passes are needed but this was some of the low hanging fruit.

OBS-URL: https://build.opensuse.org/request/show/408598
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=306
This commit is contained in:
Andreas Färber 2016-07-15 15:50:58 +00:00 committed by Git OBS Bridge
parent 8c721a87ae
commit aa166ca60f
10 changed files with 320 additions and 54 deletions

View File

@ -0,0 +1,61 @@
From 79607d09f8670a92feb8e63455f6be59842f985a Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Fri, 6 May 2016 14:03:09 -0400
Subject: [PATCH] configure: add echo_version helper
Simplifies printing library versions, dependent on if the library
was even found
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Message-id: 3c9ab16123e06bb4109771ef6ee8acd82d449ba0.1462557436.git.crobinso@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 02d34f62fdecb54637e5a66d254bd68fcbfa397f)
[BR: BSC#988855]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
configure | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/configure b/configure
index b455035..767658e 100755
--- a/configure
+++ b/configure
@@ -4748,6 +4748,12 @@ EOF
fi
fi
+echo_version() {
+ if test "$1" = "yes" ; then
+ echo "($2)"
+ fi
+}
+
# prepend pixman and ftd flags after all config tests are done
QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS"
libs_softmmu="$pixman_libs $libs_softmmu"
@@ -4805,11 +4811,7 @@ echo "GNUTLS hash $gnutls_hash"
echo "GNUTLS rnd $gnutls_rnd"
echo "libgcrypt $gcrypt"
echo "libgcrypt kdf $gcrypt_kdf"
-if test "$nettle" = "yes"; then
- echo "nettle $nettle ($nettle_version)"
-else
- echo "nettle $nettle"
-fi
+echo "nettle $nettle `echo_version $nettle $nettle_version`"
echo "nettle kdf $nettle_kdf"
echo "libtasn1 $tasn1"
echo "VTE support $vte"
@@ -4861,11 +4863,7 @@ echo "Trace backends $trace_backends"
if have_backend "simple"; then
echo "Trace output file $trace_file-<pid>"
fi
-if test "$spice" = "yes"; then
-echo "spice support $spice ($spice_protocol_version/$spice_server_version)"
-else
-echo "spice support $spice"
-fi
+echo "spice support $spice `echo_version $spice $spice_protocol_version/$spice_server_version`"
echo "rbd support $rbd"
echo "xfsctl support $xfs"
echo "smartcard support $smartcard"

View File

@ -0,0 +1,70 @@
From 8c4afe82d5eb1cfd33d64fa9b1a3f7fd92bc02f3 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Fri, 6 May 2016 14:03:12 -0400
Subject: [PATCH] configure: support vte-2.91
vte >= 0.37 expores API version 2.91, which is where all the active
development is. qemu builds and runs fine with that version, so use it
if it's available.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Message-id: b4f0375647f7b368d3dbd3834aee58cb0253566a.1462557436.git.crobinso@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit c6feff9e09aa999b77a37f532adbb89682ecb1b6)
[BR: BSC#988855]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
configure | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 767658e..f32cff5 100755
--- a/configure
+++ b/configure
@@ -2395,20 +2395,25 @@ fi
if test "$vte" != "no"; then
if test "$gtkabi" = "3.0"; then
- vtepackage="vte-2.90"
- vteversion="0.32.0"
+ vteminversion="0.32.0"
+ if $pkg_config --exists "vte-2.91"; then
+ vtepackage="vte-2.91"
+ else
+ vtepackage="vte-2.90"
+ fi
else
vtepackage="vte"
- vteversion="0.24.0"
+ vteminversion="0.24.0"
fi
- if $pkg_config --exists "$vtepackage >= $vteversion"; then
+ if $pkg_config --exists "$vtepackage >= $vteminversion"; then
vte_cflags=`$pkg_config --cflags $vtepackage`
vte_libs=`$pkg_config --libs $vtepackage`
+ vteversion=`$pkg_config --modversion $vtepackage`
libs_softmmu="$vte_libs $libs_softmmu"
vte="yes"
elif test "$vte" = "yes"; then
if test "$gtkabi" = "3.0"; then
- feature_not_found "vte" "Install libvte-2.90 devel"
+ feature_not_found "vte" "Install libvte-2.90/2.91 devel"
else
feature_not_found "vte" "Install libvte devel"
fi
@@ -4806,6 +4811,7 @@ echo "pixman $pixman"
echo "SDL support $sdl"
echo "GTK support $gtk"
echo "GTK GL support $gtk_gl"
+echo "VTE support $vte `echo_version $vte $vteversion`"
echo "GNUTLS support $gnutls"
echo "GNUTLS hash $gnutls_hash"
echo "GNUTLS rnd $gnutls_rnd"
@@ -4814,7 +4820,6 @@ echo "libgcrypt kdf $gcrypt_kdf"
echo "nettle $nettle `echo_version $nettle $nettle_version`"
echo "nettle kdf $nettle_kdf"
echo "libtasn1 $tasn1"
-echo "VTE support $vte"
echo "curses support $curses"
echo "virgl support $virglrenderer"
echo "curl support $curl"

3
kvm.conf Normal file
View File

@ -0,0 +1,3 @@
# load kvm module at boot time
kvm

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Jul 14 19:38:39 UTC 2016 - brogers@suse.com
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6
* Patches added:
0061-configure-add-echo_version-helper.patch
0062-configure-support-vte-2.91.patch
-------------------------------------------------------------------
Thu Jul 7 16:16:40 UTC 2016 - agraf@suse.com

View File

@ -85,6 +85,8 @@ Patch0057: 0057-xen-add-pvUSB-backend.patch
Patch0058: 0058-usb-Fix-conditions-that-xen-usb.c-i.patch
Patch0059: 0059-vnc-add-configurable-keyboard-delay.patch
Patch0060: 0060-scsi-megasas-initialise-local-confi.patch
Patch0061: 0061-configure-add-echo_version-helper.patch
Patch0062: 0062-configure-support-vte-2.91.patch
# Please do not add patches manually here, run update_git.sh.
# this is to make lint happy
Source300: qemu-rpmlintrc
@ -198,6 +200,8 @@ run cross-architecture builds.
%patch0058 -p1
%patch0059 -p1
%patch0060 -p1
%patch0061 -p1
%patch0062 -p1
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Jul 14 19:38:39 UTC 2016 - brogers@suse.com
- Build SLOF for SLE12 now that we have gcc fix (bsc#949000)
- Add script for loading kvm module on s390x
- Enable seccomp and iscsi support in more configurations
- Enable more support for virtio-gpu
- Fix /dev/kvm permissions problem with package install and no
reboot (bnc#867867)
- Remove libtool dependency
- Disable more aggressive stack protector for performance reasons
- Enable vte to be used again in more configurations (bsc#988855)
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6
* Patches added:
0061-configure-add-echo_version-helper.patch
0062-configure-support-vte-2.91.patch
-------------------------------------------------------------------
Thu Jul 14 14:59:37 UTC 2016 - agraf@suse.com

View File

@ -28,9 +28,7 @@
%define build_slof_from_source 1
%endif
%ifarch ppc64le
# Needs a compatible gcc (bsc#949000)
# TODO: include 1315 for SLE12 once possible
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%define build_slof_from_source 1
%endif
%endif
@ -47,11 +45,25 @@
%define noarch_supported 1110
%ifarch x86_64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} == 120200 ) )
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
%define with_rbd 1
%endif
%endif
%ifarch aarch64
%if 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120100 )
%define with_rbd 1
%endif
%endif
%if 0%{?suse_version} > 1320
%define with_seccomp 1
%endif
%ifarch %ix86 x86_64
%define with_seccomp 1
%endif
Name: qemu-testsuite
Url: http://www.qemu.org/
Summary: Universal CPU emulator
@ -70,6 +82,7 @@ Source6: ksm.service
Source7: 60-kvm.x86.rules
Source8: 80-qemu-ga.rules
Source9: qemu-ga.service
Source10: kvm.conf
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
@ -132,6 +145,8 @@ Patch0057: 0057-xen-add-pvUSB-backend.patch
Patch0058: 0058-usb-Fix-conditions-that-xen-usb.c-i.patch
Patch0059: 0059-vnc-add-configurable-keyboard-delay.patch
Patch0060: 0060-scsi-megasas-initialise-local-confi.patch
Patch0061: 0061-configure-add-echo_version-helper.patch
Patch0062: 0062-configure-support-vte-2.91.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
@ -194,7 +209,7 @@ BuildRequires: libcacard-devel
BuildRequires: libcap-devel
BuildRequires: libcap-ng-devel
BuildRequires: libdrm-devel
%if 0%{?suse_version} >= 1320
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: libepoxy-devel
%endif
%if 0%{?suse_version} >= 1310
@ -214,7 +229,7 @@ BuildRequires: librbd-devel
BuildRequires: ceph-devel
%endif
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: libiscsi-devel
%endif
BuildRequires: libjpeg-devel
@ -237,13 +252,12 @@ BuildRequires: libpulse-devel
%if 0%{?suse_version} >= 1315
BuildRequires: librdmacm-devel
%endif
%if 0%{?suse_version} > 1320
%if 0%{?with_seccomp}
BuildRequires: libseccomp-devel
%endif
%if 0%{?suse_version} > 1140
BuildRequires: libssh2-devel
%endif
BuildRequires: libtool
%if 0%{?suse_version} > 1310
BuildRequires: libusb-1_0-devel
%endif
@ -252,6 +266,7 @@ BuildRequires: lzo-devel
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
BuildRequires: Mesa-devel
BuildRequires: mozilla-nss-devel
BuildRequires: ncurses-devel
%if 0%{?build_x86_fw_from_source}
@ -279,7 +294,7 @@ BuildRequires: pkgconfig(udev)
%if 0%{?sles_version} != 11
BuildRequires: usbredir-devel
%endif
%if 0%{?suse_version} >= 1320
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: virglrenderer-devel >= 0.4.1
%endif
%if 0%{?suse_version} >= 1210
@ -344,7 +359,7 @@ Suggests: qemu-block-dmg
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
Suggests: qemu-block-gluster
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
Suggests: qemu-block-iscsi
%endif
%if 0%{?with_rbd}
@ -548,7 +563,7 @@ This sub-package contains a module for accessing network-based image files
over a GlusterFS network connection from qemu-img tool and QEMU system emulation.
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
%package block-iscsi
Summary: Universal CPU emulator -- iSCSI block support
Group: System/Emulators/PC
@ -772,6 +787,8 @@ This package provides a service file for starting and stopping KSM.
%patch0058 -p1
%patch0059 -p1
%patch0060 -p1
%patch0061 -p1
%patch0062 -p1
%if %{build_x86_fw_from_source}
pushd roms/seabios
@ -808,6 +825,7 @@ rm -f pc-bios/slof.bin
--libexecdir=%_libexecdir \
--localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--with-pkgversion="%(echo '%{distribution}' | sed 's/ (.*)//')" \
--enable-system --disable-linux-user \
@ -852,7 +870,7 @@ rm -f pc-bios/slof.bin
%else
--disable-kvm \
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-libiscsi \
%else
--disable-libiscsi \
@ -884,6 +902,9 @@ rm -f pc-bios/slof.bin
--enable-numa \
%endif
%endif
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-opengl \
%endif
%if 0%{?with_rbd}
--enable-rbd \
%else
@ -900,7 +921,7 @@ rm -f pc-bios/slof.bin
%else
--with-sdlabi=1.2 \
%endif
%if 0%{?suse_version} > 1320
%if 0%{?with_seccomp}
--enable-seccomp \
%else
--disable-seccomp \
@ -930,15 +951,17 @@ rm -f pc-bios/slof.bin
--enable-vde \
--enable-vhdx \
--enable-vhost-net \
%if 0%{?suse_version} >= 1320
--enable-virglrenderer \
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-virglrenderer \
%endif
--enable-virtfs \
--enable-vnc \
--enable-vnc-jpeg \
--enable-vnc-png \
--enable-vnc-sasl \
%if 0%{?suse_version} == 1310 || (0%{?suse_version} == 1315 && 0%{?is_opensuse} == 0)
%if 0%{?suse_version} == 1320
--disable-vte \
%else
--enable-vte \
%endif
%ifarch x86_64
@ -948,7 +971,7 @@ rm -f pc-bios/slof.bin
%else
--disable-xen \
%endif
--enable-xfsctl \
--enable-xfsctl \
%if "%{name}" != "qemu-testsuite"
@ -1087,6 +1110,9 @@ install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rules
%if 0%{?with_systemd}
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/qemu-ga.service
%ifarch s390x
install -D -m 0644 %{SOURCE10} %{buildroot}%{_libexecdir}/modules-load.d/kvm.conf
%endif
%endif
%fdupes -s $RPM_BUILD_ROOT
@ -1110,6 +1136,9 @@ install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%if %{kvm_available}
%post
if [ "$(readlink -f /proc/1/root)" = "/" ]; then
setfacl --remove-all /dev/kvm &> /dev/null || :
fi
%if 0%{?with_systemd}
%udev_rules_update
%else
@ -1184,6 +1213,9 @@ fi
%endif
%ifarch s390x
%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%if 0%{?with_systemd}
%_libexecdir/modules-load.d/kvm.conf
%endif
%endif
%endif
@ -1270,7 +1302,7 @@ fi
%_libdir/%name/block-gluster.so
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
%files block-iscsi
%defattr(-, root, root)
%_libdir/%name/block-iscsi.so

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Jul 14 19:38:39 UTC 2016 - brogers@suse.com
- Build SLOF for SLE12 now that we have gcc fix (bsc#949000)
- Add script for loading kvm module on s390x
- Enable seccomp and iscsi support in more configurations
- Enable more support for virtio-gpu
- Fix /dev/kvm permissions problem with package install and no
reboot (bnc#867867)
- Remove libtool dependency
- Disable more aggressive stack protector for performance reasons
- Enable vte to be used again in more configurations (bsc#988855)
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6
* Patches added:
0061-configure-add-echo_version-helper.patch
0062-configure-support-vte-2.91.patch
-------------------------------------------------------------------
Thu Jul 14 14:59:37 UTC 2016 - agraf@suse.com

View File

@ -28,9 +28,7 @@
%define build_slof_from_source 1
%endif
%ifarch ppc64le
# Needs a compatible gcc (bsc#949000)
# TODO: include 1315 for SLE12 once possible
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%define build_slof_from_source 1
%endif
%endif
@ -47,11 +45,25 @@
%define noarch_supported 1110
%ifarch x86_64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} == 120200 ) )
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
%define with_rbd 1
%endif
%endif
%ifarch aarch64
%if 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120100 )
%define with_rbd 1
%endif
%endif
%if 0%{?suse_version} > 1320
%define with_seccomp 1
%endif
%ifarch %ix86 x86_64
%define with_seccomp 1
%endif
Name: qemu
Url: http://www.qemu.org/
Summary: Universal CPU emulator
@ -70,6 +82,7 @@ Source6: ksm.service
Source7: 60-kvm.x86.rules
Source8: 80-qemu-ga.rules
Source9: qemu-ga.service
Source10: kvm.conf
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
@ -132,6 +145,8 @@ Patch0057: 0057-xen-add-pvUSB-backend.patch
Patch0058: 0058-usb-Fix-conditions-that-xen-usb.c-i.patch
Patch0059: 0059-vnc-add-configurable-keyboard-delay.patch
Patch0060: 0060-scsi-megasas-initialise-local-confi.patch
Patch0061: 0061-configure-add-echo_version-helper.patch
Patch0062: 0062-configure-support-vte-2.91.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
@ -194,7 +209,7 @@ BuildRequires: libcacard-devel
BuildRequires: libcap-devel
BuildRequires: libcap-ng-devel
BuildRequires: libdrm-devel
%if 0%{?suse_version} >= 1320
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: libepoxy-devel
%endif
%if 0%{?suse_version} >= 1310
@ -214,7 +229,7 @@ BuildRequires: librbd-devel
BuildRequires: ceph-devel
%endif
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: libiscsi-devel
%endif
BuildRequires: libjpeg-devel
@ -237,13 +252,12 @@ BuildRequires: libpulse-devel
%if 0%{?suse_version} >= 1315
BuildRequires: librdmacm-devel
%endif
%if 0%{?suse_version} > 1320
%if 0%{?with_seccomp}
BuildRequires: libseccomp-devel
%endif
%if 0%{?suse_version} > 1140
BuildRequires: libssh2-devel
%endif
BuildRequires: libtool
%if 0%{?suse_version} > 1310
BuildRequires: libusb-1_0-devel
%endif
@ -252,6 +266,7 @@ BuildRequires: lzo-devel
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
BuildRequires: Mesa-devel
BuildRequires: mozilla-nss-devel
BuildRequires: ncurses-devel
%if 0%{?build_x86_fw_from_source}
@ -279,7 +294,7 @@ BuildRequires: pkgconfig(udev)
%if 0%{?sles_version} != 11
BuildRequires: usbredir-devel
%endif
%if 0%{?suse_version} >= 1320
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: virglrenderer-devel >= 0.4.1
%endif
%if 0%{?suse_version} >= 1210
@ -344,7 +359,7 @@ Suggests: qemu-block-dmg
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
Suggests: qemu-block-gluster
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
Suggests: qemu-block-iscsi
%endif
%if 0%{?with_rbd}
@ -548,7 +563,7 @@ This sub-package contains a module for accessing network-based image files
over a GlusterFS network connection from qemu-img tool and QEMU system emulation.
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
%package block-iscsi
Summary: Universal CPU emulator -- iSCSI block support
Group: System/Emulators/PC
@ -772,6 +787,8 @@ This package provides a service file for starting and stopping KSM.
%patch0058 -p1
%patch0059 -p1
%patch0060 -p1
%patch0061 -p1
%patch0062 -p1
%if %{build_x86_fw_from_source}
pushd roms/seabios
@ -808,6 +825,7 @@ rm -f pc-bios/slof.bin
--libexecdir=%_libexecdir \
--localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--with-pkgversion="%(echo '%{distribution}' | sed 's/ (.*)//')" \
--enable-system --disable-linux-user \
@ -852,7 +870,7 @@ rm -f pc-bios/slof.bin
%else
--disable-kvm \
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-libiscsi \
%else
--disable-libiscsi \
@ -884,6 +902,9 @@ rm -f pc-bios/slof.bin
--enable-numa \
%endif
%endif
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-opengl \
%endif
%if 0%{?with_rbd}
--enable-rbd \
%else
@ -900,7 +921,7 @@ rm -f pc-bios/slof.bin
%else
--with-sdlabi=1.2 \
%endif
%if 0%{?suse_version} > 1320
%if 0%{?with_seccomp}
--enable-seccomp \
%else
--disable-seccomp \
@ -930,15 +951,17 @@ rm -f pc-bios/slof.bin
--enable-vde \
--enable-vhdx \
--enable-vhost-net \
%if 0%{?suse_version} >= 1320
--enable-virglrenderer \
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-virglrenderer \
%endif
--enable-virtfs \
--enable-vnc \
--enable-vnc-jpeg \
--enable-vnc-png \
--enable-vnc-sasl \
%if 0%{?suse_version} == 1310 || (0%{?suse_version} == 1315 && 0%{?is_opensuse} == 0)
%if 0%{?suse_version} == 1320
--disable-vte \
%else
--enable-vte \
%endif
%ifarch x86_64
@ -948,7 +971,7 @@ rm -f pc-bios/slof.bin
%else
--disable-xen \
%endif
--enable-xfsctl \
--enable-xfsctl \
%if "%{name}" != "qemu-testsuite"
@ -1087,6 +1110,9 @@ install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rules
%if 0%{?with_systemd}
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/qemu-ga.service
%ifarch s390x
install -D -m 0644 %{SOURCE10} %{buildroot}%{_libexecdir}/modules-load.d/kvm.conf
%endif
%endif
%fdupes -s $RPM_BUILD_ROOT
@ -1110,6 +1136,9 @@ install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%if %{kvm_available}
%post
if [ "$(readlink -f /proc/1/root)" = "/" ]; then
setfacl --remove-all /dev/kvm &> /dev/null || :
fi
%if 0%{?with_systemd}
%udev_rules_update
%else
@ -1184,6 +1213,9 @@ fi
%endif
%ifarch s390x
%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%if 0%{?with_systemd}
%_libexecdir/modules-load.d/kvm.conf
%endif
%endif
%endif
@ -1270,7 +1302,7 @@ fi
%_libdir/%name/block-gluster.so
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
%files block-iscsi
%defattr(-, root, root)
%_libdir/%name/block-iscsi.so

View File

@ -28,9 +28,7 @@
%define build_slof_from_source 1
%endif
%ifarch ppc64le
# Needs a compatible gcc (bsc#949000)
# TODO: include 1315 for SLE12 once possible
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%define build_slof_from_source 1
%endif
%endif
@ -47,7 +45,7 @@
%define noarch_supported 1110
%ifarch x86_64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} == 120200 ) )
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
%define with_rbd 1
%endif
%endif
@ -58,6 +56,14 @@
%endif
%endif
%if 0%{?suse_version} > 1320
%define with_seccomp 1
%endif
%ifarch %ix86 x86_64
%define with_seccomp 1
%endif
Name: qemu
Url: http://www.qemu.org/
Summary: Universal CPU emulator
@ -76,6 +82,7 @@ Source6: ksm.service
Source7: 60-kvm.x86.rules
Source8: 80-qemu-ga.rules
Source9: qemu-ga.service
Source10: kvm.conf
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
PATCH_FILES
@ -141,7 +148,7 @@ BuildRequires: libcacard-devel
BuildRequires: libcap-devel
BuildRequires: libcap-ng-devel
BuildRequires: libdrm-devel
%if 0%{?suse_version} >= 1320
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: libepoxy-devel
%endif
%if 0%{?suse_version} >= 1310
@ -161,7 +168,7 @@ BuildRequires: librbd-devel
BuildRequires: ceph-devel
%endif
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: libiscsi-devel
%endif
BuildRequires: libjpeg-devel
@ -184,13 +191,12 @@ BuildRequires: libpulse-devel
%if 0%{?suse_version} >= 1315
BuildRequires: librdmacm-devel
%endif
%if 0%{?suse_version} > 1320
%if 0%{?with_seccomp}
BuildRequires: libseccomp-devel
%endif
%if 0%{?suse_version} > 1140
BuildRequires: libssh2-devel
%endif
BuildRequires: libtool
%if 0%{?suse_version} > 1310
BuildRequires: libusb-1_0-devel
%endif
@ -199,6 +205,7 @@ BuildRequires: lzo-devel
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
BuildRequires: Mesa-devel
BuildRequires: mozilla-nss-devel
BuildRequires: ncurses-devel
%if 0%{?build_x86_fw_from_source}
@ -226,7 +233,7 @@ BuildRequires: pkgconfig(udev)
%if 0%{?sles_version} != 11
BuildRequires: usbredir-devel
%endif
%if 0%{?suse_version} >= 1320
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
BuildRequires: virglrenderer-devel >= 0.4.1
%endif
%if 0%{?suse_version} >= 1210
@ -291,7 +298,7 @@ Suggests: qemu-block-dmg
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
Suggests: qemu-block-gluster
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
Suggests: qemu-block-iscsi
%endif
%if 0%{?with_rbd}
@ -495,7 +502,7 @@ This sub-package contains a module for accessing network-based image files
over a GlusterFS network connection from qemu-img tool and QEMU system emulation.
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
%package block-iscsi
Summary: Universal CPU emulator -- iSCSI block support
Group: System/Emulators/PC
@ -697,6 +704,7 @@ rm -f pc-bios/slof.bin
--libexecdir=%_libexecdir \
--localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--with-pkgversion="%(echo '%{distribution}' | sed 's/ (.*)//')" \
--enable-system --disable-linux-user \
@ -741,7 +749,7 @@ rm -f pc-bios/slof.bin
%else
--disable-kvm \
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-libiscsi \
%else
--disable-libiscsi \
@ -773,6 +781,9 @@ rm -f pc-bios/slof.bin
--enable-numa \
%endif
%endif
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-opengl \
%endif
%if 0%{?with_rbd}
--enable-rbd \
%else
@ -789,7 +800,7 @@ rm -f pc-bios/slof.bin
%else
--with-sdlabi=1.2 \
%endif
%if 0%{?suse_version} > 1320
%if 0%{?with_seccomp}
--enable-seccomp \
%else
--disable-seccomp \
@ -819,15 +830,17 @@ rm -f pc-bios/slof.bin
--enable-vde \
--enable-vhdx \
--enable-vhost-net \
%if 0%{?suse_version} >= 1320
--enable-virglrenderer \
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-virglrenderer \
%endif
--enable-virtfs \
--enable-vnc \
--enable-vnc-jpeg \
--enable-vnc-png \
--enable-vnc-sasl \
%if 0%{?suse_version} == 1310 || (0%{?suse_version} == 1315 && 0%{?is_opensuse} == 0)
%if 0%{?suse_version} == 1320
--disable-vte \
%else
--enable-vte \
%endif
%ifarch x86_64
@ -837,7 +850,7 @@ rm -f pc-bios/slof.bin
%else
--disable-xen \
%endif
--enable-xfsctl \
--enable-xfsctl \
%if "%{name}" != "qemu-testsuite"
@ -977,6 +990,9 @@ install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rules
%if 0%{?with_systemd}
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/qemu-ga.service
%ifarch s390x
install -D -m 0644 %{SOURCE10} %{buildroot}%{_libexecdir}/modules-load.d/kvm.conf
%endif
%endif
%fdupes -s $RPM_BUILD_ROOT
@ -1001,6 +1017,9 @@ install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%if %{kvm_available}
%post
if [ "$(readlink -f /proc/1/root)" = "/" ]; then
setfacl --remove-all /dev/kvm &> /dev/null || :
fi
%if 0%{?with_systemd}
%udev_rules_update
%else
@ -1075,6 +1094,9 @@ fi
%endif
%ifarch s390x
%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%if 0%{?with_systemd}
%_libexecdir/modules-load.d/kvm.conf
%endif
%endif
%endif
@ -1161,7 +1183,7 @@ fi
%_libdir/%name/block-gluster.so
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
%files block-iscsi
%defattr(-, root, root)
%_libdir/%name/block-iscsi.so