%define qemu_name qemu-kvm %define qemu_version 0.14.0 %define qemu_rel 5.2 #define qemu_snapshot 0 %define qemu_release %mkrel %{?qemu_snapshot:0.%{qemu_snapshot}.}%{qemu_rel} Summary: QEMU CPU Emulator Name: qemu Version: %{qemu_version} Release: %{qemu_release} Source0: http://kent.dl.sourceforge.net/sourceforge/kvm/%{qemu_name}-%{version}%{?qemu_snapshot:-%{qemu_snapshot}}.tar.gz Source1: kvm.modules # do not seems needed anymore ( as this seems to be Fedora specific ) Patch0: pc-add-a-Fedora-13-machine-type-for-backward-compat.patch # fix for non-x86 target that do not have pci support ( not sure if this is needed too ) Patch1: qemu-fix-non-PCI-target-build.patch # patches from debian # patch coming from upstream # virtio-blk-fail-unaligned-access-CVE-2011-1750-52c050236e.diff Patch3: qemu-kvm-CVE-2011-1750.diff # patch applied upstream, coming from debian # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632987 Patch4: qemu-kvm-CVE-2011-2212.diff # patch from upstream, found on redhat bugzilla # http://patchwork.ozlabs.org/patch/94604/ Patch5: qemu-kvm-CVE-2011-2512.diff # patch from upstream, found on redhat bugzilla # http://patchwork.ozlabs.org/patch/96331/ Patch6: qemu-kvm-CVE-2011-1751.diff # patch from upstream, found on novell and redhat bugzilla # http://marc.info/?l=qemu-devel&m=133819025731504&w=2 Patch7: qemu-0.14.0-CVE-2012-2652.patch # patch from upstream, found on redhat bugzilla Patch8: qemu-kvm-CVE-2011-2527.diff # patch from fedora Patch9: qemu-kvm-CVE-2012-0029.diff # KSM control scripts Source4: ksm.init Source5: ksm.sysconfig Source6: ksmtuned.init Source7: ksmtuned Source8: ksmtuned.conf License: GPLv2+ URL: http://wiki.qemu.org/Main_Page Group: Emulators Provides: kvm # remove once 2010.0 is EOL Obsoletes: kvm < 86 Requires: qemu-img = %{version}-%{release} # for %%{_sysconfdir}/sasl2 Requires: cyrus-sasl BuildRequires: libSDL-devel BuildRequires: tetex-texi2html BuildRequires: e2fsprogs-devel BuildRequires: kernel-headers BuildRequires: pulseaudio-devel BuildRequires: zlib-devel BuildRequires: brlapi-devel BuildRequires: gnutls-devel BuildRequires: libsasl2-devel BuildRequires: pciutils-devel BuildRequires: texinfo BuildRequires: vde-devel BuildRequires: dev86 BuildRequires: iasl ExclusiveArch: %{ix86} ppc x86_64 amd64 %{sunsparc} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description QEMU is a FAST! processor emulator. By using dynamic translation it achieves a reasonnable speed while being easy to port on new host CPUs. QEMU has two operating modes: * User mode emulation. In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU. Linux system calls are converted because of endianness and 32/64 bit mismatches. Wine (Windows emulation) and DOSEMU (DOS emulation) are the main targets for QEMU. * Full system emulation. In this mode, QEMU emulates a full system, including a processor and various peripherials. Currently, it is only used to launch an x86 Linux kernel on an x86 Linux system. It enables easier testing and debugging of system code. It can also be used to provide virtual hosting of several virtual PC on a single server. %package img Summary: QEMU disk image utility Group: Emulators Version: %{qemu_version} Release: %{qemu_release} %description img This package contains the QEMU disk image utility that is used to create, commit, convert and get information from a disk image. %prep %setup -q -n %{qemu_name}-%{qemu_version}%{?qemu_snapshot:-%{qemu_snapshot}} %patch0 -p1 %patch1 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %build extraldflags="-Wl,--build-id"; buildldflags="VL_LDFLAGS=-Wl,--build-id" %ifarch %{ix86} x86_64 # sdl outputs to alsa or pulseaudio depending on system config, but it's broken (RH bug #495964) # alsa works, but causes huge CPU load due to bugs # oss works, but is very problematic because it grabs exclusive control of the device causing other apps to go haywire ./configure \ --target-list=x86_64-softmmu \ --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir} \ --audio-drv-list=pa,sdl,alsa,oss \ --extra-ldflags=$extraldflags \ --extra-cflags="$CFLAGS" %make V=1 $buildldflags cp -a x86_64-softmmu/qemu-system-x86_64 qemu-kvm make clean %endif ./configure \ --target-list="i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu \ mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu \ ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu \ i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user \ armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user \ mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user \ sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user \ sparc32plus-linux-user" \ --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir} \ --interp-prefix=%{_prefix}/qemu-%%M \ --audio-drv-list=pa,sdl,alsa,oss \ --disable-kvm \ --extra-ldflags=$extraldflags \ --extra-cflags="$CFLAGS" %make V=1 $buildldflags %install rm -rf $RPM_BUILD_ROOT install -D -p -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_initddir}/ksm install -D -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ksm install -D -p -m 0755 %{SOURCE6} $RPM_BUILD_ROOT%{_initddir}/ksmtuned install -D -p -m 0755 %{SOURCE7} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned install -D -p -m 0644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf %ifarch %{ix86} x86_64 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules mkdir -p $RPM_BUILD_ROOT%{_bindir}/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules/kvm.modules install -m 0755 kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}/ install -m 0755 qemu-kvm $RPM_BUILD_ROOT%{_bindir}/ %endif %makeinstall_std BUILD_DOCS="yes" install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf # remove unpackaged files rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu %clean rm -rf $RPM_BUILD_ROOT %post %ifarch %{ix86} x86_64 # load kvm modules now, so we can make sure no reboot is needed. # If there's already a kvm module installed, we don't mess with it sh /%{_sysconfdir}/sysconfig/modules/kvm.modules %endif %_post_service ksmtuned %_post_service ksm %preun %_preun_service ksm %_preun_service ksmtuned # remove once 2009.1 is EOL %triggerpostun -- qemu < 0.10.4-6 rm -f /etc/rc.d/*/{K,S}??qemu %files %defattr(-,root,root) %doc README qemu-doc.html qemu-tech.html %config(noreplace)%{_sysconfdir}/sasl2/qemu.conf %{_initddir}/ksm %config(noreplace) %{_sysconfdir}/sysconfig/ksm %{_initddir}/ksmtuned %{_sbindir}/ksmtuned %config(noreplace) %{_sysconfdir}/ksmtuned.conf %{_sysconfdir}/sysconfig/modules/kvm.modules %{_sysconfdir}/qemu/target-x86_64.conf %{_bindir}/kvm_stat %{_bindir}/qemu-io %{_bindir}/qemu-kvm %{_bindir}/qemu %{_bindir}/qemu-alpha %{_bindir}/qemu-arm* %{_bindir}/qemu-cris %{_bindir}/qemu-i386 %{_bindir}/qemu-m68k %{_bindir}/qemu-mips* %{_bindir}/qemu-nbd %{_bindir}/qemu-ppc* %{_bindir}/qemu-sh4* %{_bindir}/qemu-sparc* %{_bindir}/qemu-x86_64 %{_bindir}/qemu-system-arm %{_bindir}/qemu-system-cris %{_bindir}/qemu-system-m68k %{_bindir}/qemu-system-sh4* %{_bindir}/qemu-system-ppc* %{_bindir}/qemu-system-mips* %{_bindir}/qemu-system-sparc %{_bindir}/qemu-system-x86_64 %{_mandir}/man1/qemu.1* %{_mandir}/man8/qemu-nbd.8* %dir %{_datadir}/qemu %{_datadir}/qemu/*.bin %{_datadir}/qemu/*.rom %{_datadir}/qemu/keymaps %{_datadir}/qemu/openbios-sparc32 %{_datadir}/qemu/openbios-sparc64 %{_datadir}/qemu/openbios-ppc %{_datadir}/qemu/bamboo.dtb %{_datadir}/qemu/petalogix-s3adsp1800.dtb %files img %defattr(-,root,root) %{_bindir}/qemu-img %{_mandir}/man1/qemu-img.1* %changelog * Fri Aug 10 2012 luigiwalser <luigiwalser> 0.14.0-5.2.mga1 + Revision: 280435 - add upstream patch to fix CVE-2011-2527 - add patch from fedora to fix CVE-2012-0029 - re-diff upstream patch to fix CVE-2012-2652 + misc <misc> - add patch for CVE-2011-1751 - fix rpmlint warning preventing upload - fix rpmlint issue - add patch for CVE-2011-2212 and CVE-2011-2512, denial or service, or possible execution of code under the uid of the VM due to improper validation when using virtqueue requests. * Tue May 03 2011 misc <misc> 0.14.0-5.mga1 + Revision: 94340 - add fix for CVE-2011-1750, patch from debian and upstream * Sat Apr 16 2011 blino <blino> 0.14.0-4.mga1 + Revision: 86505 - sync ksm initscripts with Fedora (to silence an error about missing max_kernel_pages with current kernels) * Tue Apr 05 2011 misc <misc> 0.14.0-3.mga1 + Revision: 80843 - rebuild - remove old comments and all trace of kvmtrace - add comments about obsoletes and trigger to remove - remove old commented part of the spec about kvmtrace ( tool deprecated upstream ) - remove hack around mtune, since this is the default flag it is supported by gcc or not specified, and as the remplacement is using pentiumpro, this is already highly x86 specific ) - qemu do not seems to use private symbol of glibc, so remove the hack to filter them * Tue Apr 05 2011 misc <misc> 0.14.0-2.mga1 + Revision: 80767 - reenable vde, Fedora not using it is not a reason for us to not use it - use single digit for patch, more readable - add comments on the 2 patchs - remove old patch not referenced in spec * Mon Mar 07 2011 saispo <saispo> 0.14.0-1.mga1 + Revision: 65897 - Remove video.x file - Fix apply patch00 and patch01 - Add two patches come from Fedora - Disable vde-devel BuildRequires, don't need it - New release 0.14.0 + misc <misc> - fix License - enable vde support ( since we do not have main/contribs ) - clean overzealous requires - remove old conflicts against 2007.1 packages - imported package qemu