]> git.pld-linux.org Git - packages/qemu.git/blobdiff - qemu.spec
- unified opengl bcond name
[packages/qemu.git] / qemu.spec
index 98eb35ac31c86e6f61e461e86ddde30db8aa5423..dd4b717e7c454b4788e46f4de97720e75d4db59d 100644 (file)
--- a/qemu.spec
+++ b/qemu.spec
@@ -1,7 +1,7 @@
 #
 # Conditional build:
 %bcond_without sdl             # SDL UI and audio support
-%bcond_without gl              # Don't require gl deps
+%bcond_without opengl          # Don't require GL deps
 %bcond_without ceph            # Ceph/RBD support
 %bcond_without glusterfs       # GlusterFS backend
 %bcond_without rdma            # RDMA-based migration support
 Summary:       QEMU CPU Emulator
 Summary(pl.UTF-8):     QEMU - emulator procesora
 Name:          qemu
-Version:       3.1.0
+Version:       4.2.0
 Release:       1
-License:       GPL v2
+License:       GPL v2, BSD (edk2 firmware files)
 Group:         Applications/Emulators
 Source0:       http://wiki.qemu-project.org/download/%{name}-%{version}.tar.xz
-# Source0-md5: fb687ce0b02d3bf4327e36d3b99427a8
-Source2:       %{name}.binfmt
+# Source0-md5: 278eeb294e4b497e79af7a57e660cb9a
 # Loads kvm kernel modules at boot
 Source3:       kvm-modules-load.conf
 # Creates /dev/kvm
@@ -54,16 +53,17 @@ Source9:    ksmtuned
 Source10:      ksmtuned.conf
 Source11:      %{name}-guest-agent.service
 Source12:      99-%{name}-guest-agent.rules
+Source13:      %{name}-guest-agent.init
+Source14:      %{name}-guest-agent.logrotate
 Patch0:                %{name}-cflags.patch
 Patch1:                %{name}-whitelist.patch
 Patch2:                %{name}-user-execve.patch
 Patch3:                %{name}-xattr.patch
 Patch4:                libjpeg-boolean.patch
 Patch5:                x32.patch
-Patch6:                %{name}-CVE-2018-20815.patch
 URL:           http://www.qemu-project.org/
-%{?with_gl:BuildRequires:      OpenGL-GLX-devel}
-%{?with_gl:BuildRequires:      OpenGL-devel}
+%{?with_opengl:BuildRequires:  OpenGL-GLX-devel}
+%{?with_opengl:BuildRequires:  OpenGL-devel}
 %{?with_sdl:BuildRequires:     SDL2-devel >= 2.0}
 BuildRequires: alsa-lib-devel
 BuildRequires: bcc >= 0.16.21-2
@@ -81,7 +81,7 @@ BuildRequires:        libaio-devel
 %{?with_smartcard:BuildRequires:       libcacard-devel}
 BuildRequires: libcap-devel
 BuildRequires: libcap-ng-devel
-%{?with_gl:BuildRequires:      libepoxy-devel}
+%{?with_opengl:BuildRequires:  libepoxy-devel}
 BuildRequires: libfdt-devel >= 1.4.2
 %{?with_rdma:BuildRequires:    libibverbs-devel}
 %{?with_iscsi:BuildRequires:   libiscsi-devel >= 1.9.0}
@@ -90,7 +90,7 @@ BuildRequires:        libjpeg-devel
 %{?with_libnfs:BuildRequires:  libnfs-devel >= 1.9.3}
 BuildRequires: libpng-devel
 %{?with_rdma:BuildRequires:    librdmacm-devel}
-%{?with_seccomp:BuildRequires: libseccomp-devel >= 2.2.0}
+%{?with_seccomp:BuildRequires: libseccomp-devel >= 2.3.0}
 BuildRequires: libssh2-devel >= 1.2.8
 BuildRequires: libusb-devel >= 1.0.13
 BuildRequires: libuuid-devel
@@ -110,7 +110,7 @@ BuildRequires:      sed >= 4.0
 %{?with_snappy:BuildRequires:  snappy-devel}
 %if %{with spice}
 BuildRequires: spice-protocol >= 0.12.3
-BuildRequires: spice-server-devel >= 0.12.0
+BuildRequires: spice-server-devel >= 0.12.5
 %endif
 %{?with_systemtap:BuildRequires:       systemtap-sdt-devel}
 BuildRequires: texi2html
@@ -127,7 +127,7 @@ BuildRequires:      xorg-lib-libX11-devel
 BuildRequires: zlib-devel
 %if %{with gtk3}
 BuildRequires: gtk+3-devel >= 3.14.0
-%{?with_vte:BuildRequires:     vte2.90-devel >= 0.32.0}
+%{?with_vte:BuildRequires:     vte-devel >= 0.32.0}
 %endif
 %if %{with user_static}
 BuildRequires: glib2-static
@@ -135,6 +135,7 @@ BuildRequires:      glibc-static
 BuildRequires: pcre-static
 BuildRequires: zlib-static
 %endif
+BuildConflicts:        libslirp-devel
 Requires:      %{name}-img = %{version}-%{release}
 Requires:      %{name}-system-aarch64 = %{version}-%{release}
 Requires:      %{name}-system-alpha = %{version}-%{release}
@@ -168,16 +169,16 @@ Requires: SDL2 \
 %endif \
 Requires:      libfdt >= 1.4.2 \
 %if %{with seccomp} \
-Requires:      libseccomp >= 2.2.0 \
+Requires:      libseccomp >= 2.3.0 \
 %endif \
-Requires:      libusb >= 1.0.13 \
+Requires:      libusb >= 1.0.22 \
 Requires:      pixman >= 0.21.8 \
 %if %{with usbredir} \
 Requires:      usbredir >= 0.6 \
 %endif \
 %if %{with gtk3} \
 Requires:      gtk+3 >= 3.14.0 \
-%{?with_vte:Requires:  vte2.90 >= 0.32.0} \
+%{?with_vte:Requires:  vte >= 0.32.0} \
 %endif
 
 # don't strip/chrpath anything in there; these are boot images, roms etc
@@ -706,10 +707,14 @@ Obsoletes:        qemu-kvm-system-x86
 QEMU is a generic and open source processor emulator which achieves a
 good emulation speed by using dynamic translation.
 
+This package provides the system emulator with x86 CPU.
+
 %description system-x86 -l pl.UTF-8
 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
 
+Ten pakiet zawiera emulator systemu z procesorem x86.
+
 %package system-xtensa
 Summary:       QEMU system emulator for Xtensa
 Summary(pl.UTF-8):     QEMU - emulator systemu z procesorem Xtensa
@@ -738,6 +743,7 @@ Requires(post,preun,postun):        systemd-units >= 38
 Requires:      glib2 >= 1:2.22
 Requires:      systemd-units >= 38
 Obsoletes:     qemu-kvm-guest-agent
+Conflicts:     SysVinit < 2.96-2
 
 %description guest-agent
 QEMU is a generic and open source processor emulator which achieves a
@@ -829,7 +835,6 @@ Moduł QEMU dla urządeń blokowych typu 'ssh'.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
 
 # workaround for conflict with alsa/error.h
 ln -s ../error.h qapi/error.h
@@ -880,7 +885,6 @@ build dynamic \
        %{__enable_disable ceph rbd} \
        %{__enable_disable rdma} \
        %{__enable_disable sdl} \
-       --with-sdlabi=2.0 \
        %{__enable_disable seccomp} \
        %{__enable_disable spice} \
        %{__enable_disable smartcard smartcard} \
@@ -933,7 +937,7 @@ build static \
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/usr/lib/binfmt.d} \
-       $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d} \
+       $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d,rc.d/init.d,logrotate.d} \
        $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
 
 %if %{with user_static}
@@ -980,57 +984,71 @@ install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
 install -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
 install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
 
+install -p %{SOURCE13} $RPM_BUILD_ROOT/etc/rc.d/init.d/qemu-ga
+install -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/qemu-ga
+
 # Install binfmt
-for i in dummy \
+BINFMT_CPUS=" \
 %ifnarch %{ix86} %{x8664} x32
-       qemu-i386 \
+       i386 x86_64 \
+%endif
+%ifnarch aarch64
+       aarch64 \
 %endif
 %ifnarch alpha
-       qemu-alpha \
+       alpha \
 %endif
 %ifnarch %{arm}
-       qemu-arm \
+       arm \
 %endif
-       qemu-armeb \
-       qemu-cris \
-       qemu-microblaze qemu-microblazeel \
+       aarch64_be \
+       armeb \
+       microblaze microblazeel \
 %ifnarch mips64
-       qemu-mips64 \
+       mips64 \
 %ifnarch mips
-       qemu-mips \
+       mips \
 %endif
 %endif
 %ifnarch mips64el
-       qemu-mips64el \
+       mips64el \
 %ifnarch mipsel
-       qemu-mipsel \
+       mipsel \
 %endif
 %endif
 %ifnarch m68k
-       qemu-m68k \
+       m68k \
 %endif
 %ifnarch ppc ppc64 ppc64le
-       qemu-ppc qemu-ppc64abi32 qemu-ppc64 \
+       ppc ppc64 ppc64le \
 %endif
 %ifnarch sparc sparc64
-       qemu-sparc qemu-sparc32plus qemu-sparc64 \
+       sparc sparc32plus sparc64 \
 %endif
 %ifnarch s390 s390x
-       qemu-s390x \
+       s390x \
 %endif
 %ifnarch sh4
-       qemu-sh4 \
+       sh4 \
 %endif
-       qemu-sh4eb \
-; do
-       test $i = dummy && continue
-       grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i-dynamic.conf
+       sh4eb \
+"
+
+if [ -n "$BINFMT_CPUS" ]; then
+       for cpu in $BINFMT_CPUS; do
+               bash ./scripts/qemu-binfmt-conf.sh --systemd "$cpu" --exportdir $RPM_BUILD_ROOT/usr/lib/binfmt.d --qemu-path %{_bindir}
+       done
+       for i in /$RPM_BUILD_ROOT/usr/lib/binfmt.d/*.conf; do
+               mv $i ${i%.conf}-dynamic.conf
+       done
 
        %if %{with user_static}
-       grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i-static.conf
-       %{__sed} -i -e "s/$i/$i-static/" $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i-static.conf
+       for regularfmt in $RPM_BUILD_ROOT/usr/lib/binfmt.d/*; do
+               staticfmt="${regularfmt%\-dynamic.conf}-static.conf"
+               cat $regularfmt | tr -d '\n' | sed "s/:$/-static:F/" > $staticfmt
+       done
        %endif
-done < %{SOURCE2}
+fi
 
 # packaged as %doc
 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
@@ -1054,6 +1072,8 @@ done
 : > qemu.lang
 %endif
 
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/qemu
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -1095,9 +1115,15 @@ fi
 %systemd_service_restart systemd-binfmt.service
 
 %post guest-agent
+/sbin/chkconfig --add qemu-ga
+%service qemu-ga restart "qemu-ga"
 %systemd_reload
 
 %preun guest-agent
+if [ "$1" = "0" ]; then
+       %service qemu-ga stop
+       /sbin/chkconfig --del qemu-ga
+fi
 %systemd_preun qemu-guest-agent.service
 
 %postun guest-agent
@@ -1108,7 +1134,7 @@ fi
 
 %files common -f %{name}.lang
 %defattr(644,root,root,755)
-%doc LICENSE README
+%doc LICENSE README.rst
 %doc build-dynamic/qemu-doc.html
 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
 %config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf
@@ -1118,9 +1144,11 @@ fi
 %attr(640,root,qemu) %config(noreplace) %verify(not md5 mtime size) /etc/qemu/bridge.conf
 %{systemdunitdir}/ksm.service
 %{systemdunitdir}/ksmtuned.service
+%attr(755,root,root) %{_bindir}/elf2dmp
 %attr(755,root,root) %{_bindir}/ivshmem-client
 %attr(755,root,root) %{_bindir}/ivshmem-server
 %attr(755,root,root) %{_bindir}/virtfs-proxy-helper
+%attr(755,root,root) %{_bindir}/qemu-edid
 %{?with_xkbcommon:%attr(755,root,root) %{_bindir}/qemu-keymap}
 %attr(755,root,root) %{_bindir}/qemu-nbd
 %attr(755,root,root) %{_bindir}/qemu-pr-helper
@@ -1130,12 +1158,13 @@ fi
 %attr(755,root,root) %{_sbindir}/ksmtuned
 %{_mandir}/man1/qemu.1*
 %{_mandir}/man1/virtfs-proxy-helper.1*
+%{_mandir}/man7/qemu-cpu-models.7*
 %{_mandir}/man7/qemu-block-drivers.7*
 %{_mandir}/man8/qemu-nbd.8*
 
 %dir %{_datadir}/qemu
+%dir %{_datadir}/%{name}/firmware
 %{_datadir}/%{name}/keymaps
-%{_datadir}/%{name}/qemu-icon.bmp
 %{_datadir}/%{name}/trace-events-all
 
 # various bios images
@@ -1159,6 +1188,7 @@ fi
 %{_datadir}/%{name}/petalogix-ml605.dtb
 %{_datadir}/%{name}/petalogix-s3adsp1800.dtb
 %{_datadir}/%{name}/ppc_rom.bin
+%{_datadir}/%{name}/pvh.bin
 %{_datadir}/%{name}/pxe-e1000.rom
 %{_datadir}/%{name}/pxe-eepro100.rom
 %{_datadir}/%{name}/pxe-ne2k_pci.rom
@@ -1166,14 +1196,14 @@ fi
 %{_datadir}/%{name}/pxe-rtl8139.rom
 %{_datadir}/%{name}/pxe-virtio.rom
 %{_datadir}/%{name}/QEMU,cgthree.bin
-%{_datadir}/%{name}/qemu_logo_no_text.svg
 %{_datadir}/%{name}/QEMU,tcx.bin
 %{_datadir}/%{name}/s390-ccw.img
 %{_datadir}/%{name}/sgabios.bin
 %{_datadir}/%{name}/skiboot.lid
 %{_datadir}/%{name}/slof.bin
-%{_datadir}/%{name}/spapr-rtas.bin
+#%{_datadir}/%{name}/spapr-rtas.bin
 %{_datadir}/%{name}/vgabios.bin
+%{_datadir}/%{name}/vgabios-ati.bin
 %{_datadir}/%{name}/vgabios-bochs-display.bin
 %{_datadir}/%{name}/vgabios-cirrus.bin
 %{_datadir}/%{name}/vgabios-qxl.bin
@@ -1196,6 +1226,7 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/ui-gtk.so
 %endif
 %{?with_sdl:%attr(755,root,root) %{_libdir}/%{name}/ui-sdl.so}
+%{?with_spice:%attr(755,root,root) %{_libdir}/%{name}/ui-spice-app.so}
 
 %files img
 %defattr(644,root,root,755)
@@ -1285,6 +1316,8 @@ fi
 %files system-aarch64
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/qemu-system-aarch64
+%{_datadir}/%{name}/edk2-aarch64-code.fd
+%{_datadir}/%{name}/firmware/60-edk2-aarch64.json
 
 %files system-alpha
 %defattr(644,root,root,755)
@@ -1293,6 +1326,9 @@ fi
 %files system-arm
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/qemu-system-arm
+%{_datadir}/%{name}/edk2-arm-code.fd
+%{_datadir}/%{name}/edk2-arm-vars.fd
+%{_datadir}/%{name}/firmware/60-edk2-arm.json
 
 %files system-cris
 %defattr(644,root,root,755)
@@ -1347,10 +1383,13 @@ fi
 %files system-riscv32
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/qemu-system-riscv32
+%{_datadir}/%{name}/opensbi-riscv32-virt-fw_jump.bin
 
 %files system-riscv64
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/qemu-system-riscv64
+%{_datadir}/%{name}/opensbi-riscv64-sifive_u-fw_jump.bin
+%{_datadir}/%{name}/opensbi-riscv64-virt-fw_jump.bin
 
 %files system-s390x
 %defattr(644,root,root,755)
@@ -1385,6 +1424,16 @@ fi
 %endif
 %{_datadir}/%{name}/bios.bin
 %{_datadir}/%{name}/bios-256k.bin
+%{_datadir}/%{name}/bios-microvm.bin
+%{_datadir}/%{name}/edk2-i386-code.fd
+%{_datadir}/%{name}/edk2-i386-secure-code.fd
+%{_datadir}/%{name}/edk2-i386-vars.fd
+%{_datadir}/%{name}/edk2-x86_64-code.fd
+%{_datadir}/%{name}/edk2-x86_64-secure-code.fd
+%{_datadir}/%{name}/firmware/50-edk2-i386-secure.json
+%{_datadir}/%{name}/firmware/50-edk2-x86_64-secure.json
+%{_datadir}/%{name}/firmware/60-edk2-i386.json
+%{_datadir}/%{name}/firmware/60-edk2-x86_64.json
 
 %files system-xtensa
 %defattr(644,root,root,755)
@@ -1395,7 +1444,10 @@ fi
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules
 %{systemdunitdir}/qemu-guest-agent.service
+%attr(754,root,root) /etc/rc.d/init.d/qemu-ga
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/qemu-ga
 %attr(755,root,root) %{_bindir}/qemu-ga
+%{_mandir}/man7/qemu-ga-ref.7*
 %{_mandir}/man8/qemu-ga.8*
 
 %files module-block-curl
This page took 0.053962 seconds and 4 git commands to generate.