Update qemu package to mitigate CVE-2015-3456
[packages/centos6/qemu.git] / qemu.spec
index af54851f05ae19e36678a21a67e5793ed0a55b57..8956116c4a241106617328f66e272616724a93cc 100644 (file)
--- a/qemu.spec
+++ b/qemu.spec
 # Enable rbd support.
 #
 # Enable by default, except on RHEL.
+#
+# = separate_kvm =
+# Do not build and install stuff that would colide with separately packaged KVM.
+#
+# Disabled by default, except on EPEL.
 
 %if 0%{?rhel}
 # RHEL-specific defaults:
 %bcond_without kvmonly          # enabled
 %bcond_without exclusive_x86_64 # enabled
+%bcond_without rbd              # enabled
 %bcond_without spice            # enabled
 %bcond_with    seccomp          # disabled
+%bcond_with    xfsprogs         # disabled
+%bcond_with    separate_kvm     # disabled - for EPEL
+%bcond_with    gtk              # disabled
 %else
 # General defaults:
 %bcond_with    kvmonly          # disabled
 %bcond_with    exclusive_x86_64 # disabled
+%bcond_without rbd              # enabled
 %bcond_without spice            # enabled
 %bcond_without seccomp          # enabled
+%bcond_without xfsprogs         # enabled
+%bcond_with    separate_kvm     # disabled
+%bcond_without gtk              # enabled
 %endif
 
-%global SLOF_gittagdate 20120731
+%global SLOF_gittagdate 20130430
 
+%if %{without separate_kvm}
+%global kvm_archs %{ix86} x86_64 ppc64 s390x armv7hl aarch64
+%else
+%global kvm_archs %{ix86} x86_64
+%endif
 %if %{with exclusive_x86_64}
 %global kvm_archs x86_64
-%else
-%global kvm_archs %{ix86} x86_64 ppc64 s390x
 %endif
 
+
+%global have_usbredir 0
+
 %ifarch %{ix86} x86_64
 %if %{with seccomp}
 %global have_seccomp 1
 %if %{with spice}
 %global have_spice   1
 %endif
+%else
+%if 0%{?rhel}
+%global have_usbredir 0
+%endif
 %endif
 
 %global need_qemu_kvm %{with kvmonly}
+%global need_kvm_modfile 0
 
 # These values for system_xyz are overridden below for non-kvmonly builds.
 # Instead, these values for kvm_package are overridden below for kvmonly builds.
 %global kvm_package   system-x86
 %global kvm_target    i386
 %global need_qemu_kvm 1
+%global need_kvm_modfile 1
 %endif
 %ifarch x86_64
 %global system_x86    kvm
 %global kvm_package   system-x86
 %global kvm_target    x86_64
 %global need_qemu_kvm 1
+%global need_kvm_modfile 1
 %endif
 %ifarch ppc64
 %global system_ppc    kvm
 %global kvm_package   system-ppc
 %global kvm_target    ppc64
+%global need_kvm_modfile 1
 %endif
 %ifarch s390x
 %global system_s390x  kvm
 %global kvm_package   system-s390x
 %global kvm_target    s390x
+%global need_kvm_modfile 1
+%endif
+%ifarch armv7hl
+%global system_arm    kvm
+%global kvm_package   system-arm
+%global kvm_target    arm
+%endif
+%ifarch aarch64
+%global system_aarch64 kvm
+%global kvm_package   system-aarch64
+%global kvm_target    aarch64
 %endif
 
 %if %{with kvmonly}
 %global system_x86    system-x86
 %global system_xtensa   system-xtensa
 %global system_unicore32   system-unicore32
+%global system_moxie   system-moxie
+%global system_aarch64   system-aarch64
+%endif
+
+# Only build qemu-system-aarch64 on aarch64 for now
+%ifnarch aarch64
+%undefine system_aarch64
 %endif
 
 # libfdt is only needed to build ARM, Microblaze or PPC emulators
-%if 0%{?system_arm:1}%{?system_microblaze:1}%{?system_ppc:1}
+%if 0%{?system_aarch64:1}%{?system_arm:1}%{?system_microblaze:1}%{?system_ppc:1}
 %global need_fdt      1
 %endif
 
+%define with_xen 0
+
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
-Version: 1.2.0
-Release: 24%{?dist}
-# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
+Version: 2.0.0
+Release: 5
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
 Group: Development/Tools
@@ -123,10 +169,7 @@ ExclusiveArch: %{kvm_archs}
 %define _smp_mflags %{nil}
 %endif
 
-# This is generated from the git qemu-kvm-1.2.0 tag, replace with proper
-# upstream tarbal once available
-Source0: qemu-kvm-%{version}.tar.gz
-#Source0: http://downloads.sourceforge.net/sourceforge/kvm/qemu-kvm-%{version}.tar.gz
+Source0: http://wiki.qemu-project.org/download/%{name}-%{version}.tar.bz2
 
 Source1: qemu.binfmt
 
@@ -144,348 +187,45 @@ Source7: ksmtuned.service
 Source8: ksmtuned
 Source9: ksmtuned.conf
 
-Source10: qemu-guest-agent.service
 Source11: 99-qemu-guest-agent.rules
 Source12: bridge.conf
 
-# Patches queued for 1.2.1 stable
-Patch0001: 0001-target-xtensa-convert-host-errno-values-to-guest.patch
-Patch0002: 0002-target-cris-Fix-buffer-overflow.patch
-Patch0003: 0003-target-xtensa-fix-missing-errno-codes-for-mingw32.patch
-Patch0004: 0004-target-sparc-fix-fcmp-s-d-q-instructions-wrt-excepti.patch
-Patch0005: 0005-target-s390x-fix-style.patch
-Patch0006: 0006-target-s390x-split-FPU-ops.patch
-Patch0007: 0007-target-s390x-split-condition-code-helpers.patch
-Patch0008: 0008-target-s390x-split-integer-helpers.patch
-Patch0009: 0009-target-s390x-split-memory-access-helpers.patch
-Patch0010: 0010-target-s390x-rename-op_helper.c-to-misc_helper.c.patch
-Patch0011: 0011-target-s390x-avoid-AREG0-for-FPU-helpers.patch
-Patch0012: 0012-target-s390x-avoid-AREG0-for-integer-helpers.patch
-Patch0013: 0013-target-s390x-avoid-AREG0-for-condition-code-helpers.patch
-Patch0014: 0014-target-s390x-avoid-AREG0-for-misc-helpers.patch
-Patch0015: 0015-target-s390x-switch-to-AREG0-free-mode.patch
-Patch0016: 0016-tcg-s390-fix-ld-st-with-CONFIG_TCG_PASS_AREG0.patch
-Patch0017: 0017-target-arm-Fix-potential-buffer-overflow.patch
-Patch0018: 0018-tcg-optimize-split-expression-simplification.patch
-Patch0019: 0019-tcg-optimize-simplify-or-xor-r-a-0-cases.patch
-Patch0020: 0020-tcg-optimize-simplify-and-r-a-0-cases.patch
-Patch0021: 0021-tcg-optimize-simplify-shift-rot-r-0-a-movi-r-0-cases.patch
-Patch0022: 0022-tcg-optimize-swap-brcond-setcond-arguments-when-poss.patch
-Patch0023: 0023-tcg-optimize-add-constant-folding-for-setcond.patch
-Patch0024: 0024-tcg-optimize-add-constant-folding-for-brcond.patch
-Patch0025: 0025-tcg-optimize-fix-if-else-break-coding-style.patch
-Patch0026: 0026-target-s390x-avoid-cpu_single_env.patch
-Patch0027: 0027-target-lm32-switch-to-AREG0-free-mode.patch
-Patch0028: 0028-target-m68k-switch-to-AREG0-free-mode.patch
-Patch0029: 0029-target-m68k-avoid-using-cpu_single_env.patch
-Patch0030: 0030-target-unicore32-switch-to-AREG0-free-mode.patch
-Patch0031: 0031-target-arm-convert-void-helpers.patch
-Patch0032: 0032-target-arm-convert-remaining-helpers.patch
-Patch0033: 0033-target-arm-final-conversion-to-AREG0-free-mode.patch
-Patch0034: 0034-target-microblaze-switch-to-AREG0-free-mode.patch
-Patch0035: 0035-target-cris-Avoid-AREG0-for-helpers.patch
-Patch0036: 0036-target-cris-Switch-to-AREG0-free-mode.patch
-Patch0037: 0037-target-sh4-switch-to-AREG0-free-mode.patch
-Patch0038: 0038-target-mips-switch-to-AREG0-free-mode.patch
-Patch0039: 0039-Remove-unused-CONFIG_TCG_PASS_AREG0-and-dead-code.patch
-Patch0040: 0040-tcg-i386-allow-constants-in-load-store-ops.patch
-Patch0041: 0041-tcg-mark-set_label-with-TCG_OPF_BB_END-flag.patch
-Patch0042: 0042-revert-TCG-fix-copy-propagation.patch
-Patch0043: 0043-target-mips-Set-opn-in-gen_ldst_multiple.patch
-Patch0044: 0044-target-mips-Fix-MIPS_DEBUG.patch
-Patch0045: 0045-target-mips-Always-evaluate-debugging-macro-argument.patch
-Patch0046: 0046-tcg-optimize-fix-end-of-basic-block-detection.patch
-Patch0047: 0047-target-xtensa-fix-extui-shift-amount.patch
-Patch0048: 0048-target-xtensa-don-t-emit-extra-tcg_gen_goto_tb.patch
-Patch0049: 0049-tcg-Introduce-movcond.patch
-Patch0050: 0050-target-alpha-Use-movcond.patch
-Patch0051: 0051-tcg-i386-Implement-movcond.patch
-Patch0052: 0052-tcg-Optimize-movcond-for-constant-comparisons.patch
-Patch0053: 0053-tcg-Optimize-two-address-commutative-operations.patch
-Patch0054: 0054-gdbstub-sh4-fix-build-with-USE_SOFTFLOAT_STRUCT_TYPE.patch
-Patch0055: 0055-tcg-Fix-USE_DIRECT_JUMP.patch
-Patch0056: 0056-tcg-hppa-Fix-brcond2-and-setcond2.patch
-Patch0057: 0057-tcg-hppa-Fix-broken-load-store-helpers.patch
-Patch0058: 0058-tcg-mips-fix-wrong-usage-of-Z-constraint.patch
-Patch0059: 0059-tcg-mips-kill-warnings-in-user-mode.patch
-Patch0060: 0060-tcg-mips-use-TCGArg-or-TCGReg-instead-of-int.patch
-Patch0061: 0061-tcg-mips-don-t-use-global-pointer.patch
-Patch0062: 0062-tcg-mips-use-stack-for-TCG-temps.patch
-Patch0063: 0063-tcg-mips-optimize-brcond-arg-0.patch
-Patch0064: 0064-tcg-mips-optimize-bswap-16-16s-32-on-MIPS32R2.patch
-Patch0065: 0065-tcg-mips-implement-rotl-rotr-ops-on-MIPS32R2.patch
-Patch0066: 0066-tcg-mips-implement-deposit-op-on-MIPS32R2.patch
-Patch0067: 0067-tcg-mips-implement-movcond-op-on-MIPS32R2.patch
-Patch0068: 0068-tcg-optimize-remove-TCG_TEMP_ANY.patch
-Patch0069: 0069-tcg-optimize-check-types-in-copy-propagation.patch
-Patch0070: 0070-tcg-optimize-rework-copy-progagation.patch
-Patch0071: 0071-tcg-optimize-do-copy-propagation-for-all-operations.patch
-Patch0072: 0072-tcg-optimize-optimize-op-r-a-a-mov-r-a.patch
-Patch0073: 0073-tcg-optimize-optimize-op-r-a-a-movi-r-0.patch
-Patch0074: 0074-tcg-optimize-further-optimize-brcond-movcond-setcond.patch
-Patch0075: 0075-tcg-optimize-prefer-the-op-a-a-b-form-for-commutativ.patch
-Patch0076: 0076-tcg-remove-ifdef-endif-around-TCGOpcode-tests.patch
-Patch0077: 0077-tcg-optimize-add-constant-folding-for-deposit.patch
-Patch0078: 0078-tcg-README-document-tcg_gen_goto_tb-restrictions.patch
-Patch0079: 0079-w64-Fix-TCG-helper-functions-with-5-arguments.patch
-Patch0080: 0080-tcg-ppc32-Implement-movcond32.patch
-Patch0081: 0081-tcg-sparc-Hack-in-qemu_ld-st64-for-32-bit.patch
-Patch0082: 0082-tcg-sparc-Fix-ADDX-opcode.patch
-Patch0083: 0083-tcg-sparc-Don-t-MAP_FIXED-on-top-of-the-program.patch
-Patch0084: 0084-tcg-sparc-Assume-v9-cpu-always-i.e.-force-v8plus-in-.patch
-Patch0085: 0085-tcg-sparc-Fix-qemu_ld-st-to-handle-32-bit-host.patch
-Patch0086: 0086-tcg-sparc-Support-GUEST_BASE.patch
-Patch0087: 0087-tcg-sparc-Change-AREG0-in-generated-code-to-i0.patch
-Patch0088: 0088-tcg-sparc-Clean-up-cruft-stemming-from-attempts-to-u.patch
-Patch0089: 0089-tcg-sparc-Mask-shift-immediates-to-avoid-illegal-ins.patch
-Patch0090: 0090-tcg-sparc-Use-defines-for-temporaries.patch
-Patch0091: 0091-tcg-sparc-Add-g-o-registers-to-alloc_order.patch
-Patch0092: 0092-tcg-sparc-Fix-and-enable-direct-TB-chaining.patch
-Patch0093: 0093-tcg-sparc-Preserve-branch-destinations-during-retran.patch
-Patch0094: 0094-target-alpha-Initialize-env-cpu_model_str.patch
-Patch0095: 0095-tcg-mips-fix-MIPS32-R2-detection.patch
-Patch0096: 0096-tcg-Adjust-descriptions-of-cond-opcodes.patch
-Patch0097: 0097-tcg-i386-fix-build-with-march-i686.patch
-Patch0098: 0098-tcg-Fix-MAX_OPC_PARAM_IARGS.patch
-Patch0099: 0099-tci-Fix-for-AREG0-free-mode.patch
-Patch0100: 0100-spice-abort-on-invalid-streaming-cmdline-params.patch
-Patch0101: 0101-spice-notify-spice-server-on-vm-start-stop.patch
-Patch0102: 0102-spice-notify-on-vm-state-change-only-via-spice_serve.patch
-Patch0103: 0103-spice-migration-add-QEVENT_SPICE_MIGRATE_COMPLETED.patch
-Patch0104: 0104-spice-add-migrated-flag-to-spice-info.patch
-Patch0105: 0105-spice-adding-seamless-migration-option-to-the-comman.patch
-Patch0106: 0106-spice-increase-the-verbosity-of-spice-section-in-qem.patch
-Patch0107: 0107-qxl-update_area_io-guest_bug-on-invalid-parameters.patch
-Patch0108: 0108-qxl-add-QXL_IO_MONITORS_CONFIG_ASYNC.patch
-Patch0109: 0109-configure-print-spice-protocol-and-spice-server-vers.patch
-Patch0110: 0110-fix-doc-of-using-raw-values-with-sendkey.patch
-Patch0111: 0111-qapi-Fix-potential-NULL-pointer-segfault.patch
-Patch0112: 0112-json-parser-Fix-potential-NULL-pointer-segfault.patch
-Patch0113: 0113-pcie-drop-version_id-field-for-live-migration.patch
-Patch0114: 0114-pcie_aer-clear-cmask-for-Advanced-Error-Interrupt-Me.patch
-Patch0115: 0115-fix-entry-pointer-for-ELF-kernels-loaded-with-kernel.patch
-Patch0116: 0116-lan9118-fix-multicast-filtering.patch
-Patch0117: 0117-MIPS-user-Fix-reset-CPU-state-initialization.patch
-Patch0118: 0118-Add-MAINTAINERS-entry-for-leon3.patch
-Patch0119: 0119-musicpal-Fix-flash-mapping.patch
-Patch0120: 0120-qemu-Use-valgrind-annotations-to-mark-kvm-guest-memo.patch
-Patch0121: 0121-hw-wm8750-Fix-potential-buffer-overflow.patch
-Patch0122: 0122-hw-mcf5206-Fix-buffer-overflow-for-MBAR-read-write.patch
-Patch0123: 0123-use-libexecdir-instead-of-ignoring-it-first-and-rein.patch
-Patch0124: 0124-socket-don-t-attempt-to-reconnect-a-TCP-socket-in-se.patch
-Patch0125: 0125-Add-ability-to-force-enable-disable-of-tools-build.patch
-Patch0126: 0126-usb-controllers-do-not-need-to-check-for-babble-them.patch
-Patch0127: 0127-usb-core-Don-t-set-packet-state-to-complete-on-a-nak.patch
-Patch0128: 0128-usb-core-Add-a-usb_ep_find_packet_by_id-helper-funct.patch
-Patch0129: 0129-usb-core-Allow-the-first-packet-of-a-pipelined-ep-to.patch
-Patch0130: 0130-Revert-ehci-don-t-flush-cache-on-doorbell-rings.patch
-Patch0131: 0131-ehci-Validate-qh-is-not-changed-unexpectedly-by-the-.patch
-Patch0132: 0132-ehci-Update-copyright-headers-to-reflect-recent-work.patch
-Patch0133: 0133-ehci-Properly-cleanup-packets-on-cancel.patch
-Patch0134: 0134-ehci-Properly-report-completed-but-not-yet-processed.patch
-Patch0135: 0135-ehci-check-for-EHCI_ASYNC_FINISHED-first-in-ehci_fre.patch
-Patch0136: 0136-ehci-trace-guest-bugs.patch
-Patch0137: 0137-ehci-add-doorbell-trace-events.patch
-Patch0138: 0138-ehci-Add-some-additional-ehci_trace_guest_bug-calls.patch
-Patch0139: 0139-ehci-Fix-memory-leak-in-handling-of-NAK-ed-packets.patch
-Patch0140: 0140-ehci-Handle-USB_RET_PROCERR-in-ehci_fill_queue.patch
-Patch0141: 0141-ehci-Correct-a-comment-in-fetchqtd-packet-processing.patch
-Patch0142: 0142-usb-redir-Never-return-USB_RET_NAK-for-async-handled.patch
-Patch0143: 0143-usb-redir-Don-t-delay-handling-of-open-events-to-a-b.patch
-Patch0144: 0144-usb-redir-Get-rid-of-async-struct-get-member.patch
-Patch0145: 0145-usb-redir-Get-rid-of-local-shadow-copy-of-packet-hea.patch
-Patch0146: 0146-usb-redir-Get-rid-of-unused-async-struct-dev-member.patch
-Patch0147: 0147-usb-redir-Move-to-core-packet-id-and-queue-handling.patch
-Patch0148: 0148-usb-redir-Return-babble-when-getting-more-bulk-data-.patch
-Patch0149: 0149-Better-name-usb-braille-device.patch
-Patch0150: 0150-usb-audio-fix-usb-version.patch
-Patch0151: 0151-xhci-rip-out-background-transfer-code.patch
-Patch0152: 0152-xhci-drop-buffering.patch
-Patch0153: 0153-xhci-fix-runtime-write-tracepoint.patch
-Patch0154: 0154-xhci-allow-bytewise-capability-register-reads.patch
-Patch0155: 0155-qxl-dont-update-invalid-area.patch
-Patch0156: 0156-usb-host-allow-emulated-non-async-control-requests-w.patch
-Patch0157: 0157-qxl-better-cleanup-for-surface-destroy.patch
-Patch0158: 0158-ehci-switch-to-new-style-memory-ops.patch
-Patch0159: 0159-ehci-Fix-interrupts-stopping-when-Interrupt-Threshol.patch
-Patch0160: 0160-ehci-Don-t-process-too-much-frames-in-1-timer-tick-v.patch
-Patch0161: 0161-sheepdog-fix-savevm-and-loadvm.patch
-Patch0162: 0162-ide-Fix-error-messages-from-static-code-analysis-no-.patch
-Patch0163: 0163-block-curl-Fix-wrong-free-statement.patch
-Patch0164: 0164-vdi-Fix-warning-from-clang.patch
-Patch0165: 0165-block-fix-block-tray-status.patch
-Patch0166: 0166-ahci-properly-reset-PxCMD-on-HBA-reset.patch
-Patch0167: 0167-Don-t-require-encryption-password-for-qemu-img-info-.patch
-Patch0168: 0168-block-Don-t-forget-to-delete-temporary-file.patch
-Patch0169: 0169-hw-qxl-tracing-fixes.patch
-Patch0170: 0170-configure-usbredir-fixes.patch
-Patch0171: 0171-ehci-Don-t-set-seen-to-0-when-removing-unseen-queue-.patch
-Patch0172: 0172-ehci-Walk-async-schedule-before-and-after-migration.patch
-Patch0173: 0173-usb-redir-Revert-usb-redir-part-of-commit-93bfef4c.patch
-Patch0174: 0174-uhci-Don-t-queue-up-packets-after-one-with-the-SPD-f.patch
-Patch0175: 0175-slirp-Remove-wrong-type-casts-ins-debug-statements.patch
-Patch0176: 0176-slirp-Fix-error-reported-by-static-code-analysis.patch
-Patch0177: 0177-slirp-improve-TFTP-performance.patch
-Patch0178: 0178-slirp-Handle-more-than-65535-blocks-in-TFTP-transfer.patch
-Patch0179: 0179-slirp-Implement-TFTP-Blocksize-option.patch
-Patch0180: 0180-srp-Don-t-use-QEMU_PACKED-for-single-elements-of-a-s.patch
-Patch0181: 0181-Spelling-fixes-in-comments-and-documentation.patch
-Patch0182: 0182-console-Clean-up-bytes-per-pixel-calculation.patch
-Patch0183: 0183-qapi-Fix-enumeration-typo-error.patch
-Patch0184: 0184-kvm-Fix-warning-from-static-code-analysis.patch
-Patch0185: 0185-arch_init.c-add-missing-symbols-before-PRIu64-in-deb.patch
-Patch0186: 0186-net-notify-iothread-after-flushing-queue.patch
-Patch0187: 0187-e1000-flush-queue-whenever-can_receive-can-go-from-f.patch
-Patch0188: 0188-xen-flush-queue-when-getting-an-event.patch
-Patch0189: 0189-eepro100-Fix-network-hang-when-rx-buffers-run-out.patch
-Patch0190: 0190-net-add-receive_disabled-logic-to-iov-delivery-path.patch
-Patch0191: 0191-net-do-not-report-queued-packets-as-sent.patch
-Patch0192: 0192-net-add-netdev-options-to-man-page.patch
-Patch0193: 0193-net-clean-up-usbnet_receive.patch
-Patch0194: 0194-net-fix-usbnet_receive-packet-drops.patch
-Patch0195: 0195-net-broadcast-hub-packets-if-at-least-one-port-can-r.patch
-Patch0196: 0196-net-asynchronous-send-receive-infrastructure-for-net.patch
-Patch0197: 0197-net-EAGAIN-handling-for-net-socket.c-UDP.patch
-Patch0198: 0198-net-EAGAIN-handling-for-net-socket.c-TCP.patch
-Patch0199: 0199-configure-fix-seccomp-check.patch
-Patch0200: 0200-configure-properly-check-if-lrt-and-lm-is-needed.patch
-Patch0201: 0201-Revert-455aa1e08-and-c3767ed0eb.patch
-Patch0202: 0202-qemu-char-BUGFIX-don-t-call-FD_ISSET-with-negative-f.patch
-Patch0203: 0203-cpu_physical_memory_write_rom-needs-to-do-TB-invalid.patch
-Patch0204: 0204-arch_init.c-Improve-soundhw-help-for-non-HAS_AUDIO_C.patch
-Patch0205: 0205-xilinx_timer-Removed-comma-in-device-name.patch
-Patch0206: 0206-xilinx_timer-Send-dbg-msgs-to-stderr-not-stdout.patch
-Patch0207: 0207-xilinx.h-Error-check-when-setting-links.patch
-Patch0208: 0208-xilinx_timer-Fix-a-compile-error-if-debug-enabled.patch
-Patch0209: 0209-pflash_cfi01-fix-vendor-specific-extended-query.patch
-Patch0210: 0210-MAINTAINERS-Add-entry-for-QOM-CPU.patch
-Patch0211: 0211-iSCSI-We-need-to-support-SG_IO-also-from-iscsi_ioctl.patch
-Patch0212: 0212-iSCSI-We-dont-need-to-explicitely-call-qemu_notify_e.patch
-Patch0213: 0213-scsi-disk-introduce-check_lba_range.patch
-Patch0214: 0214-scsi-disk-fix-check-for-out-of-range-LBA.patch
-Patch0215: 0215-SCSI-Standard-INQUIRY-data-should-report-HiSup-flag-.patch
-Patch0216: 0216-audio-Fix-warning-from-static-code-analysis.patch
-Patch0217: 0217-qemu-ga-Remove-unreachable-code-after-g_error.patch
-Patch0218: 0218-qemu-sockets-Fix-potential-memory-leak.patch
-Patch0219: 0219-cadence_uart-Fix-buffer-overflow.patch
-Patch0220: 0220-lm4549-Fix-buffer-overflow.patch
-Patch0221: 0221-ioh3420-Remove-unreachable-code.patch
-Patch0222: 0222-pflash_cfi01-Fix-warning-caused-by-unreachable-code.patch
-Patch0223: 0223-curses-don-t-initialize-curses-when-qemu-is-daemoniz.patch
-Patch0224: 0224-TextConsole-saturate-escape-parameter-in-TTY_STATE_C.patch
-Patch0225: 0225-linux-user-Remove-redundant-null-check-and-replace-f.patch
-Patch0226: 0226-net-socket-Fix-compiler-warning-regression-for-MinGW.patch
-Patch0227: 0227-w32-Always-use-standard-instead-of-native-format-str.patch
-Patch0228: 0228-w32-Add-implementation-of-gmtime_r-localtime_r.patch
-Patch0229: 0229-blockdev-preserve-readonly-and-snapshot-states-acros.patch
-Patch0230: 0230-block-correctly-set-the-keep_read_only-flag.patch
-Patch0231: 0231-configure-Allow-builds-without-any-system-or-user-em.patch
-Patch0232: 0232-Refactor-inet_connect_opts-function.patch
-Patch0233: 0233-Separate-inet_connect-into-inet_connect-blocking-and.patch
-Patch0234: 0234-Fix-address-handling-in-inet_nonblocking_connect.patch
-Patch0235: 0235-Clear-handler-only-for-valid-fd.patch
-Patch0236: 0236-pl190-fix-read-of-VECTADDR.patch
-Patch0237: 0237-hw-armv7m_nvic-Correctly-register-GIC-region-when-se.patch
-Patch0238: 0238-Versatile-Express-Fix-NOR-flash-0-address-and-remove.patch
-Patch0239: 0239-i386-kvm-bit-10-of-CPUID-8000_0001-.EDX-is-reserved.patch
-Patch0240: 0240-fpu-softfloat.c-Return-correctly-signed-values-from-.patch
-Patch0241: 0241-pseries-Don-t-test-for-MSR_PR-for-hypercalls-under-K.patch
-Patch0242: 0242-update-VERSION-for-v1.2.1.patch
-
-# The infamous chardev flow control patches
-Patch0400: 0400-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
-Patch0401: 0401-char-Add-a-QemuChrHandlers-struct-to-initialise-char.patch
-Patch0402: 0402-iohandlers-Add-enable-disable_write_fd_handler-funct.patch
-Patch0403: 0403-char-Add-framework-for-a-write-unblocked-callback.patch
-Patch0404: 0404-char-Update-send_all-to-handle-nonblocking-chardev-w.patch
-Patch0405: 0405-char-Equip-the-unix-tcp-backend-to-handle-nonblockin.patch
-Patch0406: 0406-char-Throttle-when-host-connection-is-down.patch
-Patch0407: 0407-virtio-console-Enable-port-throttling-when-chardev-i.patch
-Patch0408: 0408-spice-qemu-char.c-add-throttling.patch
-Patch0409: 0409-spice-qemu-char.c-remove-intermediate-buffer.patch
-Patch0410: 0410-usb-redir-Add-flow-control-support.patch
-# 411 superceded by 414 which does the same thing but on top of 413 that is
-# going upstream.
-Patch0412: 0412-char-Disable-write-callback-if-throttled-chardev-is-.patch
-Patch0413: 0413-hw-virtio-serial-bus-post_load-send_event-when-vm-is.patch
-Patch0414: 0414-hw-virtio-serial-bus-replay-guest-open-on-destinatio.patch
-
-# Spice features from upstream master: seamless migration & dynamic monitors
-Patch0500: 0500-qxl-disallow-unknown-revisions.patch
-Patch0501: 0501-spice-make-number-of-surfaces-runtime-configurable.patch
-Patch0502: 0502-qxl-Add-set_client_capabilities-interface-to-QXLInte.patch
-Patch0503: 0503-Remove-ifdef-QXL_COMMAND_FLAG_COMPAT_16BPP.patch
-Patch0504: 0504-spice-switch-to-queue-for-vga-mode-updates.patch
-Patch0505: 0505-spice-split-qemu_spice_create_update.patch
-Patch0506: 0506-spice-add-screen-mirror.patch
-Patch0507: 0507-spice-send-updates-only-for-changed-screen-content.patch
-Patch0508: 0508-qxl-Ignore-set_client_capabilities-pre-post-migrate.patch
-Patch0509: 0509-qxl-add-trace-event-for-QXL_IO_LOG.patch
-Patch0510: 0510-hw-qxl-support-client-monitor-configuration-via-devi.patch
-Patch0511: 0511-qxl-always-update-displaysurface-on-resize.patch
-Patch0512: 0512-qxl-update_area_io-cleanup-invalid-parameters-handli.patch
-Patch0513: 0513-qxl-fix-range-check-for-rev3-io-commands.patch
-Patch0514: 0514-hw-qxl-exit-on-failure-to-register-qxl-interface.patch
-Patch0515: 0515-hw-qxl-fix-condition-for-exiting-guest_bug.patch
-Patch0516: 0516-hw-qxl-qxl_dirty_surfaces-use-uintptr_t.patch
-Patch0517: 0517-spice-raise-requirement-to-0.12.patch
-Patch0518: 0518-qxl-set-default-revision-to-4.patch
-
-# usb-redir live-migration and misc bits, will be in before 1.3.0
-Patch0600: 0600-usb-redir-Convert-to-new-libusbredirparser-0.5-API.patch
-Patch0601: 0601-usb-redir-Set-ep-max_packet_size-if-available.patch
-Patch0602: 0602-usb-redir-Add-a-usbredir_reject_device-helper-functi.patch
-Patch0603: 0603-usb-redir-Ensure-our-peer-has-the-necessary-caps-whe.patch
-Patch0604: 0604-usb-redir-Enable-pipelining-for-bulk-endpoints.patch
-Patch0605: 0605-xhci-move-device-lookup-into-xhci_setup_packet.patch
-Patch0606: 0606-xhci-implement-mfindex.patch
-Patch0607: 0607-xhci-iso-xfer-support.patch
-Patch0608: 0608-xhci-trace-cc-codes-in-cleartext.patch
-Patch0609: 0609-xhci-add-trace_usb_xhci_ep_set_dequeue.patch
-Patch0610: 0610-xhci-update-register-layout.patch
-Patch0611: 0611-xhci-update-port-handling.patch
-Patch0612: 0612-usb3-superspeed-descriptors.patch
-Patch0613: 0613-usb3-superspeed-endpoint-companion.patch
-Patch0614: 0614-usb3-bos-decriptor.patch
-Patch0615: 0615-usb-storage-usb3-support.patch
-Patch0616: 0616-xhci-fix-cleanup-msi.patch
-Patch0617: 0617-xhci-rework-interrupt-handling.patch
-Patch0618: 0618-xhci-add-msix-support.patch
-Patch0619: 0619-xhci-move-register-update-into-xhci_intr_raise.patch
-Patch0620: 0620-xhci-add-XHCIInterrupter.patch
-Patch0621: 0621-xhci-prepare-xhci_runtime_-read-write-for-multiple-i.patch
-Patch0622: 0622-xhci-pick-target-interrupter.patch
-Patch0623: 0623-xhci-support-multiple-interrupters.patch
-Patch0624: 0624-xhci-kill-xhci_mem_-read-write-dispatcher-functions.patch
-Patch0625: 0625-usb-redir-Change-cancelled-packet-code-into-a-generi.patch
-Patch0626: 0626-usb-redir-Add-an-already_in_flight-packet-id-queue.patch
-Patch0627: 0627-usb-redir-Store-max_packet_size-in-endp_data.patch
-Patch0628: 0628-usb-redir-Add-support-for-migration.patch
-Patch0629: 0629-usb-redir-Add-chardev-open-close-debug-logging.patch
-Patch0630: 0630-usb-redir-Revert-usb-redir-part-of-commit-93bfef4c.patch
-Patch0631: 0631-ehci-Fix-interrupt-packet-MULT-handling.patch
-Patch0632: 0632-usb-redir-Adjust-pkg-config-check-for-usbredirparser.patch
-Patch0633: 0633-usb-redir-Change-usbredir_open_chardev-into-usbredir.patch
-Patch0634: 0634-usb-redir-Don-t-make-migration-fail-in-none-seamless.patch
-
-# Non upstream build fix, http://www.spinics.net/lists/kvm/msg80589.html
-Patch0800: 0800-mips-Fix-link-error-with-piix4_pm_init.patch
-# Add ./configure --disable-kvm-options
-# keep: Carrying locally until qemu-kvm is fully merged into qemu.git
-Patch0801: 0801-configure-Add-disable-kvm-options.patch
-# Fix loading arm initrd if kernel is very large (bz 862766)
-Patch802: 0802-arm_boot-Change-initrd-load-address-to-halfway-throu.patch
-# Don't use reserved word 'function' in systemtap files (bz 870972)
-Patch803: 0803-dtrace-backend-add-function-to-reserved-words.patch
-# Drop assertion that was triggering when pausing guests w/ qxl (bz
-# 870972)
-Patch804: 0804-wip-hw-qxl-inject-interrupts-in-any-state.patch
-# 38f419f (configure: Fix CONFIG_QEMU_HELPERDIR generation, 2012-10-17)
-Patch805: 0805-configure-Fix-CONFIG_QEMU_HELPERDIR-generation.patch
+# qemu-kvm back compat wrapper
+Source13: qemu-kvm.sh
+
+# Change gtk quit accelerator to ctrl+shift+q (bz #1062393)
+# Patches queued for 2.1
+Patch0001: 0001-Change-gtk-quit-accelerator-to-ctrl-shift-q-bz-10623.patch
+# Migration CVEs: CVE-2014-0182 etc.
+Patch0002: 0002-vmstate-add-VMS_MUST_EXIST.patch
+Patch0003: 0003-vmstate-add-VMSTATE_VALIDATE.patch
+Patch0004: 0004-virtio-net-fix-buffer-overflow-on-invalid-state-load.patch
+Patch0005: 0005-virtio-net-out-of-bounds-buffer-write-on-invalid-sta.patch
+Patch0006: 0006-virtio-out-of-bounds-buffer-write-on-invalid-state-l.patch
+Patch0007: 0007-ahci-fix-buffer-overrun-on-invalid-state-load.patch
+Patch0008: 0008-hpet-fix-buffer-overrun-on-invalid-state-load.patch
+Patch0009: 0009-hw-pci-pcie_aer.c-fix-buffer-overruns-on-invalid-sta.patch
+Patch0010: 0010-pl022-fix-buffer-overun-on-invalid-state-load.patch
+Patch0011: 0011-vmstate-fix-buffer-overflow-in-target-arm-machine.c.patch
+Patch0012: 0012-virtio-avoid-buffer-overrun-on-incoming-migration.patch
+Patch0013: 0013-virtio-validate-num_sg-when-mapping.patch
+Patch0014: 0014-pxa2xx-avoid-buffer-overrun-on-incoming-migration.patch
+Patch0015: 0015-ssd0323-fix-buffer-overun-on-invalid-state-load.patch
+Patch0016: 0016-tsc210x-fix-buffer-overrun-on-invalid-state-load.patch
+Patch0017: 0017-zaurus-fix-buffer-overrun-on-invalid-state-load.patch
+Patch0018: 0018-virtio-scsi-fix-buffer-overrun-on-invalid-state-load.patch
+Patch0019: 0019-vmstate-s-VMSTATE_INT32_LE-VMSTATE_INT32_POSITIVE_LE.patch
+Patch0020: 0020-usb-sanity-check-setup_index-setup_len-in-post_load.patch
+Patch0021: 0021-ssi-sd-fix-buffer-overrun-on-invalid-state-load.patch
+Patch0022: 0022-openpic-avoid-buffer-overrun-on-incoming-migration.patch
+Patch0023: 0023-virtio-net-out-of-bounds-buffer-write-on-load.patch
+Patch0024: 0024-virtio-validate-config_len-on-load.patch
+Patch0025: 0025-fdc-force-the-fifo-access-to-be-in-bounds-of-the-allocated-buffer.patch
 
 BuildRequires: SDL-devel
 BuildRequires: zlib-devel
 BuildRequires: which
+BuildRequires: chrpath
 BuildRequires: texi2html
 BuildRequires: gnutls-devel
 BuildRequires: cyrus-sasl-devel
@@ -494,28 +234,39 @@ BuildRequires: libaio-devel
 BuildRequires: rsync
 BuildRequires: pciutils-devel
 BuildRequires: pulseaudio-libs-devel
+BuildRequires: libiscsi-devel
 BuildRequires: ncurses-devel
 BuildRequires: libattr-devel
-BuildRequires: usbredir-devel >= 0.5.1
+#%if 0%{?have_usbredir:1}
+#BuildRequires: usbredir-devel >= 0.5.2
+#%endif
 BuildRequires: texinfo
+# for /usr/bin/pod2man
+%if 0%{?fedora} > 18
+BuildRequires: perl-podlators
+%endif
 %if 0%{?have_spice:1}
 BuildRequires: spice-protocol >= 0.12.2
 BuildRequires: spice-server-devel >= 0.12.0
 %endif
 %if 0%{?have_seccomp:1}
-BuildRequires: libseccomp-devel >= 1.0.0
+BuildRequires: libseccomp-devel >= 2.1.0
 %endif
 # For network block driver
 BuildRequires: libcurl-devel
+%if %{with rbd}
 # For rbd block driver
-BuildRequires: ceph-devel
+BuildRequires: ceph-devel >= 0.61
+%endif
 # We need both because the 'stap' binary is probed for by configure
 BuildRequires: systemtap
 BuildRequires: systemtap-sdt-devel
 # For smartcard NSS support
 BuildRequires: nss-devel
 # For XFS discard support in raw-posix.c
+%if %{with xfsprogs}
 BuildRequires: xfsprogs-devel
+%endif
 # For VNC JPEG support
 BuildRequires: libjpeg-devel
 # For VNC PNG support
@@ -530,10 +281,43 @@ BuildRequires: brlapi-devel
 # For FDT device tree support
 BuildRequires: libfdt-devel
 %endif
-# For test suite
-BuildRequires: check-devel
 # For virtfs
 BuildRequires: libcap-devel
+# Hard requirement for version >= 1.3
+BuildRequires: pixman-devel
+%if 0%{?fedora} > 18
+# For gluster support
+BuildRequires: glusterfs-devel >= 3.4.0
+BuildRequires: glusterfs-api-devel >= 3.4.0
+%endif
+# Needed for usb passthrough for qemu >= 1.5
+BuildRequires: libusbx-devel
+# SSH block driver
+%if 0%{?fedora} >= 20
+BuildRequires: libssh2-devel
+%endif
+%if %{with gtk}
+# GTK frontend
+BuildRequires: gtk3-devel
+BuildRequires: vte3-devel
+%endif
+# GTK translations
+BuildRequires: gettext
+# RDMA migration
+%ifnarch s390 s390x
+BuildRequires: librdmacm-devel
+%endif
+# For sanity test
+%if 0%{?fedora} >= 20
+BuildRequires: qemu-sanity-check-nodeps
+BuildRequires: kernel
+%endif
+BuildRequires: iasl
+%if %{with_xen}
+BuildRequires: xen-devel
+%endif
+
+
 %if 0%{?user:1}
 Requires: %{name}-%{user} = %{epoch}:%{version}-%{release}
 %endif
@@ -582,7 +366,17 @@ Requires: %{name}-%{system_x86} = %{epoch}:%{version}-%{release}
 %if 0%{?system_xtensa:1}
 Requires: %{name}-%{system_xtensa} = %{epoch}:%{version}-%{release}
 %endif
+%if 0%{?system_moxie:1}
+Requires: %{name}-%{system_moxie} = %{epoch}:%{version}-%{release}
+%endif
+%if 0%{?system_aarch64:1}
+Requires: %{name}-%{system_aarch64} = %{epoch}:%{version}-%{release}
+%endif
+%if %{without separate_kvm}
 Requires: %{name}-img = %{epoch}:%{version}-%{release}
+%else
+Requires: %{name}-img
+%endif
 
 %define qemudocdir %{_docdir}/%{name}
 
@@ -616,11 +410,6 @@ will install qemu-system-x86
 %package  img
 Summary: QEMU command line tool for manipulating disk images
 Group: Development/Tools
-# librbd (from ceph) added new symbol rbd_flush recently.  If you
-# update qemu-img without updating librdb you get:
-# qemu-img: undefined symbol: rbd_flush
-# ** NB ** This can be removed after Fedora 17 is released.
-Conflicts: ceph < 0.37-2
 
 %description img
 This package provides a command line tool for manipulating disk images
@@ -631,6 +420,7 @@ Group: Development/Tools
 Requires(post): /usr/bin/getent
 Requires(post): /usr/sbin/groupadd
 Requires(post): /usr/sbin/useradd
+
 %description common
 QEMU is a generic and open source processor emulator which achieves a good
 emulation speed by using dynamic translation.
@@ -669,6 +459,15 @@ if [ $1 -ge 1 ] ; then
     /bin/systemctl try-restart qemu-guest-agent.service >/dev/null 2>&1 || :
 fi
 
+%package -n ksm
+Summary: Kernel Samepage Merging services
+Group: Development/Tools
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+%description -n ksm
+Kernel Samepage Merging (KSM) is a memory-saving de-duplication feature,
+that merges anonymous (private) pages (not pagecache ones).
+
+This package provides service files for disabling and tuning KSM.
 
 
 %if 0%{?user:1}
@@ -690,10 +489,11 @@ Group: Development/Tools
 Requires: %{name}-common = %{epoch}:%{version}-%{release}
 Provides: kvm = 85
 Obsoletes: kvm < 85
-Requires: vgabios >= 0.6c-2
-Requires: seabios-bin >= 0.6.0-2
+Requires: seavgabios-bin
+# First version that ships bios-256k.bin
+Requires: seabios-bin >= 1.7.4-3
 Requires: sgabios-bin
-Requires: ipxe-roms-qemu
+Requires: ipxe-roms-qemu >= 20130517-2.gitc4bce43
 %if 0%{?have_seccomp:1}
 Requires: libseccomp >= 1.0.0
 %endif
@@ -846,7 +646,7 @@ Summary: QEMU system emulator for PPC
 Group: Development/Tools
 Requires: %{name}-common = %{epoch}:%{version}-%{release}
 Requires: openbios
-Requires: SLOF = 0.1.git%{SLOF_gittagdate}
+Requires: SLOF >= 0.1.git%{SLOF_gittagdate}
 %description %{system_ppc}
 QEMU is a generic and open source processor emulator which achieves a good
 emulation speed by using dynamic translation.
@@ -878,6 +678,31 @@ emulation speed by using dynamic translation.
 This package provides the system emulator for Unicore32 boards.
 %endif
 
+%if 0%{?system_moxie:1}
+%package %{system_moxie}
+Summary: QEMU system emulator for Moxie
+Group: Development/Tools
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+%description %{system_moxie}
+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 for Moxie boards.
+%endif
+
+%if 0%{?system_aarch64:1}
+%package %{system_aarch64}
+Summary: QEMU system emulator for AArch64
+Group: Development/Tools
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+%description %{system_aarch64}
+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 for AArch64.
+%endif
+
+
 %ifarch %{kvm_archs}
 %package kvm-tools
 Summary: KVM debugging and diagnostics tools
@@ -888,10 +713,39 @@ This package contains some diagnostics and debugging tools for KVM,
 such as kvm_stat.
 %endif
 
+%if %{without separate_kvm}
+%package -n libcacard
+Summary:        Common Access Card (CAC) Emulation
+Group:          Development/Libraries
+
+%description -n libcacard
+Common Access Card (CAC) emulation library.
+
+%package -n libcacard-tools
+Summary:        CAC Emulation tools
+Group:          Development/Libraries
+Requires:       libcacard = %{epoch}:%{version}-%{release}
+
+%description -n libcacard-tools
+CAC emulation tools.
+
+%package -n libcacard-devel
+Summary:        CAC Emulation devel
+Group:          Development/Libraries
+Requires:       libcacard = %{epoch}:%{version}-%{release}
+
+%description -n libcacard-devel
+CAC emulation development files.
+%endif
+
+
 %prep
-%setup -q -n qemu-kvm-%{version}
+%setup -q
 
+# Change gtk quit accelerator to ctrl+shift+q (bz #1062393)
+# Patches queued for 2.1
 %patch0001 -p1
+# Migration CVEs: CVE-2014-0182 etc.
 %patch0002 -p1
 %patch0003 -p1
 %patch0004 -p1
@@ -916,320 +770,31 @@ such as kvm_stat.
 %patch0023 -p1
 %patch0024 -p1
 %patch0025 -p1
-%patch0026 -p1
-%patch0027 -p1
-%patch0028 -p1
-%patch0029 -p1
-%patch0030 -p1
-%patch0031 -p1
-%patch0032 -p1
-%patch0033 -p1
-%patch0034 -p1
-%patch0035 -p1
-%patch0036 -p1
-%patch0037 -p1
-%patch0038 -p1
-%patch0039 -p1
-%patch0040 -p1
-%patch0041 -p1
-%patch0042 -p1
-%patch0043 -p1
-%patch0044 -p1
-%patch0045 -p1
-%patch0046 -p1
-%patch0047 -p1
-%patch0048 -p1
-%patch0049 -p1
-%patch0050 -p1
-%patch0051 -p1
-%patch0052 -p1
-%patch0053 -p1
-%patch0054 -p1
-%patch0055 -p1
-%patch0056 -p1
-%patch0057 -p1
-%patch0058 -p1
-%patch0059 -p1
-%patch0060 -p1
-%patch0061 -p1
-%patch0062 -p1
-%patch0063 -p1
-%patch0064 -p1
-%patch0065 -p1
-%patch0066 -p1
-%patch0067 -p1
-%patch0068 -p1
-%patch0069 -p1
-%patch0070 -p1
-%patch0071 -p1
-%patch0072 -p1
-%patch0073 -p1
-%patch0074 -p1
-%patch0075 -p1
-%patch0076 -p1
-%patch0077 -p1
-%patch0078 -p1
-%patch0079 -p1
-%patch0080 -p1
-%patch0081 -p1
-%patch0082 -p1
-%patch0083 -p1
-%patch0084 -p1
-%patch0085 -p1
-%patch0086 -p1
-%patch0087 -p1
-%patch0088 -p1
-%patch0089 -p1
-%patch0090 -p1
-%patch0091 -p1
-%patch0092 -p1
-%patch0093 -p1
-%patch0094 -p1
-%patch0095 -p1
-%patch0096 -p1
-%patch0097 -p1
-%patch0098 -p1
-%patch0099 -p1
-%patch0100 -p1
-%patch0101 -p1
-%patch0102 -p1
-%patch0103 -p1
-%patch0104 -p1
-%patch0105 -p1
-%patch0106 -p1
-%patch0107 -p1
-%patch0108 -p1
-%patch0109 -p1
-%patch0110 -p1
-%patch0111 -p1
-%patch0112 -p1
-%patch0113 -p1
-%patch0114 -p1
-%patch0115 -p1
-%patch0116 -p1
-%patch0117 -p1
-%patch0118 -p1
-%patch0119 -p1
-%patch0120 -p1
-%patch0121 -p1
-%patch0122 -p1
-%patch0123 -p1
-%patch0124 -p1
-%patch0125 -p1
-%patch0126 -p1
-%patch0127 -p1
-%patch0128 -p1
-%patch0129 -p1
-%patch0130 -p1
-%patch0131 -p1
-%patch0132 -p1
-%patch0133 -p1
-%patch0134 -p1
-%patch0135 -p1
-%patch0136 -p1
-%patch0137 -p1
-%patch0138 -p1
-%patch0139 -p1
-%patch0140 -p1
-%patch0141 -p1
-%patch0142 -p1
-%patch0143 -p1
-%patch0144 -p1
-%patch0145 -p1
-%patch0146 -p1
-%patch0147 -p1
-%patch0148 -p1
-%patch0149 -p1
-%patch0150 -p1
-%patch0151 -p1
-%patch0152 -p1
-%patch0153 -p1
-%patch0154 -p1
-%patch0155 -p1
-%patch0156 -p1
-%patch0157 -p1
-%patch0158 -p1
-%patch0159 -p1
-%patch0160 -p1
-%patch0161 -p1
-%patch0162 -p1
-%patch0163 -p1
-%patch0164 -p1
-%patch0165 -p1
-%patch0166 -p1
-%patch0167 -p1
-%patch0168 -p1
-%patch0169 -p1
-%patch0170 -p1
-%patch0171 -p1
-%patch0172 -p1
-%patch0173 -p1
-%patch0174 -p1
-%patch0175 -p1
-%patch0176 -p1
-%patch0177 -p1
-%patch0178 -p1
-%patch0179 -p1
-%patch0180 -p1
-%patch0181 -p1
-%patch0182 -p1
-%patch0183 -p1
-%patch0184 -p1
-%patch0185 -p1
-%patch0186 -p1
-%patch0187 -p1
-%patch0188 -p1
-%patch0189 -p1
-%patch0190 -p1
-%patch0191 -p1
-%patch0192 -p1
-%patch0193 -p1
-%patch0194 -p1
-%patch0195 -p1
-%patch0196 -p1
-%patch0197 -p1
-%patch0198 -p1
-%patch0199 -p1
-%patch0200 -p1
-%patch0201 -p1
-%patch0202 -p1
-%patch0203 -p1
-%patch0204 -p1
-%patch0205 -p1
-%patch0206 -p1
-%patch0207 -p1
-%patch0208 -p1
-%patch0209 -p1
-%patch0210 -p1
-%patch0211 -p1
-%patch0212 -p1
-%patch0213 -p1
-%patch0214 -p1
-%patch0215 -p1
-%patch0216 -p1
-%patch0217 -p1
-%patch0218 -p1
-%patch0219 -p1
-%patch0220 -p1
-%patch0221 -p1
-%patch0222 -p1
-%patch0223 -p1
-%patch0224 -p1
-%patch0225 -p1
-%patch0226 -p1
-%patch0227 -p1
-%patch0228 -p1
-%patch0229 -p1
-%patch0230 -p1
-%patch0231 -p1
-%patch0232 -p1
-%patch0233 -p1
-%patch0234 -p1
-%patch0235 -p1
-%patch0236 -p1
-%patch0237 -p1
-%patch0238 -p1
-%patch0239 -p1
-%patch0240 -p1
-%patch0241 -p1
-%patch0242 -p1
-
-%patch0400 -p1
-%patch0401 -p1
-%patch0402 -p1
-%patch0403 -p1
-%patch0404 -p1
-%patch0405 -p1
-%patch0406 -p1
-%patch0407 -p1
-%patch0408 -p1
-%patch0409 -p1
-%patch0410 -p1
-# 411 superceded by 414
-%patch0412 -p1
-%patch0413 -p1
-%patch0414 -p1
-
-%patch0500 -p1
-%patch0501 -p1
-%patch0502 -p1
-%patch0503 -p1
-%patch0504 -p1
-%patch0505 -p1
-%patch0506 -p1
-%patch0507 -p1
-%patch0508 -p1
-%patch0509 -p1
-%patch0510 -p1
-%patch0511 -p1
-%patch0512 -p1
-%patch0513 -p1
-%patch0514 -p1
-%patch0515 -p1
-%patch0516 -p1
-%patch0517 -p1
-%patch0518 -p1
-
-%patch0600 -p1
-%patch0601 -p1
-%patch0602 -p1
-%patch0603 -p1
-%patch0604 -p1
-%patch0605 -p1
-%patch0606 -p1
-%patch0607 -p1
-%patch0608 -p1
-%patch0609 -p1
-%patch0610 -p1
-%patch0611 -p1
-%patch0612 -p1
-%patch0613 -p1
-%patch0614 -p1
-%patch0615 -p1
-%patch0616 -p1
-%patch0617 -p1
-%patch0618 -p1
-%patch0619 -p1
-%patch0620 -p1
-%patch0621 -p1
-%patch0622 -p1
-%patch0623 -p1
-%patch0624 -p1
-%patch0625 -p1
-%patch0626 -p1
-%patch0627 -p1
-%patch0628 -p1
-%patch0629 -p1
-%patch0630 -p1
-%patch0631 -p1
-%patch0632 -p1
-%patch0633 -p1
-%patch0634 -p1
-
-%patch0800 -p1
-%patch0801 -p1
-%patch802 -p1
-%patch803 -p1
-%patch804 -p1
-%patch805 -p1
 
 %build
 %if %{with kvmonly}
     buildarch="%{kvm_target}-softmmu"
 %else
-buildarch="i386-softmmu x86_64-softmmu alpha-softmmu arm-softmmu cris-softmmu \
-    lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu \
-    mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu \
-    or32-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu s390x-softmmu \
-    sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu \
-    xtensa-softmmu xtensaeb-softmmu unicore32-softmmu \
-    i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user \
-    armeb-linux-user cris-linux-user m68k-linux-user \
-    microblaze-linux-user microblazeel-linux-user mips-linux-user \
-    mipsel-linux-user or32-linux-user ppc-linux-user ppc64-linux-user \
-    ppc64abi32-linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user \
-    sparc-linux-user sparc64-linux-user sparc32plus-linux-user \
-    unicore32-linux-user"
+    buildarch="i386-softmmu x86_64-softmmu alpha-softmmu arm-softmmu \
+cris-softmmu lm32-softmmu m68k-softmmu microblaze-softmmu \
+microblazeel-softmmu mips-softmmu mipsel-softmmu mips64-softmmu \
+mips64el-softmmu or32-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu \
+s390x-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu \
+xtensa-softmmu xtensaeb-softmmu unicore32-softmmu moxie-softmmu \
+i386-linux-user x86_64-linux-user aarch64-linux-user alpha-linux-user \
+arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user \
+microblaze-linux-user microblazeel-linux-user mips-linux-user \
+mipsel-linux-user mips64-linux-user mips64el-linux-user \
+mipsn32-linux-user mipsn32el-linux-user \
+or32-linux-user ppc-linux-user ppc64-linux-user \
+ppc64abi32-linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user \
+sparc-linux-user sparc64-linux-user sparc32plus-linux-user \
+unicore32-linux-user"
+
+%if 0%{?system_aarch64:1}
+    buildarch="$buildarch aarch64-softmmu"
+%endif
+
 %endif
 
 # --build-id option is used for giving info to the debug packages.
@@ -1242,114 +807,116 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
 sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
 %endif
 
-
-dobuild() {
-    ./configure \
-        --prefix=%{_prefix} \
-        --sysconfdir=%{_sysconfdir} \
-        --interp-prefix=%{_prefix}/qemu-%%M \
-        --audio-drv-list=pa,sdl,alsa,oss \
-        --disable-strip \
-        --extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" \
-        --extra-cflags="%{optflags} -fPIE -DPIE" \
+./configure \
+    --prefix=%{_prefix} \
+    --libdir=%{_libdir} \
+    --sysconfdir=%{_sysconfdir} \
+    --interp-prefix=%{_prefix}/qemu-%%M \
+    --localstatedir=%{_localstatedir} \
+    --libexecdir=%{_libexecdir} \
+    --disable-strip \
+    --extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" \
+    --extra-cflags="%{optflags} -fPIE -DPIE" \
+    --disable-werror \
+    --target-list="$buildarch" \
+    --audio-drv-list=pa,sdl,alsa,oss \
+    --enable-trace-backend=dtrace \
+    --enable-kvm \
+    --enable-tpm \
+%if %{with_xen}
+    --enable-xen \
+%else
+    --disable-xen \
+%endif
 %if 0%{?have_spice:1}
-        --enable-spice \
+    --enable-spice \
+%else
+    --disable-spice \
 %endif
-        --enable-mixemu \
 %if 0%{?have_seccomp:1}
-        --enable-seccomp \
+    --enable-seccomp \
+%else
+    --disable-seccomp \
+%endif
+%if %{without rbd}
+    --disable-rbd \
 %endif
-        --enable-rbd \
 %if 0%{?need_fdt:1}
-        --enable-fdt \
+    --enable-fdt \
 %else
-        --disable-fdt \
+    --disable-fdt \
 %endif
-        --enable-trace-backend=dtrace \
-        --disable-werror \
-        --disable-xen \
-        --enable-kvm \
-        "$@"
-
-    echo "config-host.mak contents:"
-    echo "==="
-    cat config-host.mak
-    echo "==="
-
-    make V=1 %{?_smp_mflags} $buildldflags
-}
-
-# This is kind of confusing. We run ./configure + make twice here to
-# preserve some back compat: if on x86, we want to provide a qemu-kvm
-# binary that defaults to KVM=on. All other qemu-system* should be
-# able to use KVM, but default to KVM=off (upstream qemu semantics).
-#
-# Once qemu-kvm and qemu fully merge, and we base off qemu releases,
-# all qemu-system-* will default to KVM=off, so we hopefully won't need
-# to do these double builds. But then I'm not sure how we are going to
-# generate a back compat qemu-kvm binary...
-
-%if 0%{?need_qemu_kvm}
-# Build qemu-kvm back compat binary
-dobuild --target-list=%{kvm_target}-softmmu
-
-# Setup back compat qemu-kvm binary which defaults to KVM=on
-./scripts/tracetool.py --backend dtrace --format stap \
-  --binary %{_bindir}/qemu-kvm --target-arch %{kvm_target} --target-type system \
-  --probe-prefix qemu.kvm < ./trace-events > qemu-kvm.stp
-
-cp -a %{kvm_target}-softmmu/qemu-system-%{kvm_target} qemu-kvm
-
+%if %{with gtk}
+    --with-gtkabi="3.0" \
 %endif
-
-%if %{without kvmonly}
-%if 0%{?need_qemu_kvm}
-make clean
+%ifarch s390
+    --enable-tcg-interpreter \
 %endif
+    --disable-quorum \
+    "$@"
 
-# Build qemu-system-* with consistent default of kvm=off
-dobuild --target-list="$buildarch" --disable-kvm-options
-%endif
+echo "config-host.mak contents:"
+echo "==="
+cat config-host.mak
+echo "==="
+
+make V=1 %{?_smp_mflags} $buildldflags
 
 gcc %{SOURCE6} -O2 -g -o ksmctl
 
+# Check the binary runs (see eg RHBZ#998722).
+%ifarch %{kvm_archs}
+b="./x86_64-softmmu/qemu-system-x86_64"
+if [ -x "$b" ]; then "$b" -help; fi
+%endif
+
 
 %install
 
 %define _udevdir /lib/udev/rules.d
 
+install -D -p -m 0744 %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/ksm.service
 install -D -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ksm
+install -D -p -m 0755 ksmctl $RPM_BUILD_ROOT/lib/systemd/ksmctl
 
+install -D -p -m 0744 %{SOURCE7} $RPM_BUILD_ROOT/lib/systemd/system/ksmtuned.service
 install -D -p -m 0755 %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
 install -D -p -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
 
 %ifarch %{kvm_archs}
+%if 0%{?need_kvm_modfile}
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
+install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/kvm.modules
+%endif
+
 mkdir -p $RPM_BUILD_ROOT%{_bindir}/
 mkdir -p $RPM_BUILD_ROOT%{_udevdir}
 
-install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/kvm.modules
 install -m 0755 scripts/kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}/
 install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_udevdir}
 %endif
 
 make DESTDIR=$RPM_BUILD_ROOT install
 
-%if 0%{?need_qemu_kvm}
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset
+#%find_lang %{name}
 
-install -m 0755 qemu-kvm $RPM_BUILD_ROOT%{_bindir}/
-install -m 0644 qemu-kvm.stp $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/
+%if 0%{?need_qemu_kvm}
+install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT%{_bindir}/qemu-kvm
 %endif
 
 %if %{with kvmonly}
-rm $RPM_BUILD_ROOT%{_bindir}/qemu-system-%{kvm_target}
-rm $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/qemu-system-%{kvm_target}.stp
+#rm $RPM_BUILD_ROOT%{_bindir}/qemu-system-%{kvm_target}
+#rm $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/qemu-system-%{kvm_target}.stp
 %endif
 
 chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
-install -D -p -m 0644 -t ${RPM_BUILD_ROOT}%{qemudocdir} Changelog README TODO COPYING COPYING.LIB LICENSE
+install -D -p -m 0644 -t ${RPM_BUILD_ROOT}%{qemudocdir} Changelog README COPYING COPYING.LIB LICENSE
+for emu in $RPM_BUILD_ROOT%{_bindir}/qemu-system-*; do
+    ln -sf qemu.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/$(basename $emu).1.gz
+done
+%if 0%{?need_qemu_kvm}
+ln -sf qemu.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/qemu-kvm.1.gz
+%endif
 
 install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf
 
@@ -1378,14 +945,22 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/spapr-rtas.bin
 %endif
 %if 0%{!?system_s390x:1}
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/s390-zipl.rom
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/s390-ccw.img
+%endif
+%if 0%{!?system_sparc:1}
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/QEMU,tcx.bin
 %endif
 
 # Provided by package ipxe
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/pxe*rom
-# Provided by package vgabios
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/efi*rom
+# Provided by package seavgabios
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/vgabios*bin
 # Provided by package seabios
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/bios.bin
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/bios-256k.bin
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/acpi-dsdt.aml
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/q35-acpi-dsdt.aml
 # Provided by package sgabios
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/sgabios.bin
 
@@ -1395,6 +970,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/sgabios.bin
 # for other paths, yet.
 pxe_link() {
   ln -s ../ipxe/$2.rom %{buildroot}%{_datadir}/%{name}/pxe-$1.rom
+  ln -s ../ipxe.efi/$2.rom %{buildroot}%{_datadir}/%{name}/efi-$1.rom
 }
 
 pxe_link e1000 8086100e
@@ -1407,12 +983,15 @@ rom_link() {
     ln -s $1 %{buildroot}%{_datadir}/%{name}/$2
 }
 
-rom_link ../vgabios/VGABIOS-lgpl-latest.bin vgabios.bin
-rom_link ../vgabios/VGABIOS-lgpl-latest.cirrus.bin vgabios-cirrus.bin
-rom_link ../vgabios/VGABIOS-lgpl-latest.qxl.bin vgabios-qxl.bin
-rom_link ../vgabios/VGABIOS-lgpl-latest.stdvga.bin vgabios-stdvga.bin
-rom_link ../vgabios/VGABIOS-lgpl-latest.vmware.bin vgabios-vmware.bin
+rom_link ../seavgabios/vgabios-isavga.bin vgabios.bin
+rom_link ../seavgabios/vgabios-cirrus.bin vgabios-cirrus.bin
+rom_link ../seavgabios/vgabios-qxl.bin vgabios-qxl.bin
+rom_link ../seavgabios/vgabios-stdvga.bin vgabios-stdvga.bin
+rom_link ../seavgabios/vgabios-vmware.bin vgabios-vmware.bin
 rom_link ../seabios/bios.bin bios.bin
+rom_link ../seabios/bios-256k.bin bios-256k.bin
+rom_link ../seabios/acpi-dsdt.aml acpi-dsdt.aml
+rom_link ../seabios/q35-acpi-dsdt.aml q35-acpi-dsdt.aml
 rom_link ../sgabios/sgabios.bin sgabios.bin
 %endif
 
@@ -1425,24 +1004,26 @@ for i in dummy \
 %ifnarch alpha
     qemu-alpha \
 %endif
-%ifnarch arm
+%ifnarch %{arm}
     qemu-arm \
 %endif
     qemu-armeb \
+    qemu-cris \
+    qemu-microblaze qemu-microblazeel \
 %ifnarch mips
-    qemu-mips qemu-mipsn32 qemu-mips64 \
+    qemu-mips qemu-mips64 \
 %endif
 %ifnarch mipsel
-    qemu-mipsel qemu-mipsn32el qemu-mips64el \
+    qemu-mipsel qemu-mips64el \
 %endif
 %ifnarch m68k
     qemu-m68k \
 %endif
 %ifnarch ppc ppc64
-    qemu-ppc \
+    qemu-ppc qemu-ppc64abi32 qemu-ppc64 \
 %endif
 %ifnarch sparc sparc64
-    qemu-sparc \
+    qemu-sparc qemu-sparc32plus qemu-sparc64 \
 %endif
 %ifnarch s390 s390x
     qemu-s390x \
@@ -1460,38 +1041,101 @@ done < %{SOURCE1}
 
 # For the qemu-guest-agent subpackage install the systemd
 # service and udev rules.
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
 mkdir -p $RPM_BUILD_ROOT%{_udevdir}
 install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevdir}
 
 # Install rules to use the bridge helper with libvirt's virbr0
 install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/qemu
-chmod u+s $RPM_BUILD_ROOT%{_libexecdir}/qemu-bridge-helper
+
+find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
+find $RPM_BUILD_ROOT -name "libcacard.so*" -exec chmod +x \{\} \;
+
+%if %{with separate_kvm}
+rm -f $RPM_BUILD_ROOT%{_bindir}/qemu-kvm
+rm -f $RPM_BUILD_ROOT%{_bindir}/qemu-img
+rm -f $RPM_BUILD_ROOT%{_bindir}/qemu-io
+rm -f $RPM_BUILD_ROOT%{_bindir}/qemu-nbd
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man8/qemu-nbd.8*
+
+rm -f $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ksm
+rm -f $RPM_BUILD_ROOT/lib/systemd/ksmctl
+rm -f $RPM_BUILD_ROOT/lib/systemd/system/ksm.service
+rm -f $RPM_BUILD_ROOT/lib/systemd/system/ksmtuned.service
+
+rm -f $RPM_BUILD_ROOT%{_bindir}/qemu-ga
+rm -f $RPM_BUILD_ROOT%{_udevdir}/99-qemu-guest-agent.rules
+
+rm -f $RPM_BUILD_ROOT%{_bindir}/vscclient
+rm -f $RPM_BUILD_ROOT%{_libdir}/libcacard*
+rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libcacard.pc
+rm -rf $RPM_BUILD_ROOT%{_includedir}/cacard
+%endif
+
+# When building using 'rpmbuild' or 'fedpkg local', RPATHs can be left in
+# the binaries and libraries (although this doesn't occur when
+# building in Koji, for some unknown reason). Some discussion here:
+#
+# https://lists.fedoraproject.org/pipermail/devel/2013-November/192553.html
+#
+# In any case it should always be safe to remove RPATHs from
+# the final binaries:
+for f in $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_libdir}/* \
+         $RPM_BUILD_ROOT%{_libexecdir}/*; do
+  if file $f | grep -q ELF; then chrpath --delete $f; fi
+done
 
 %check
-make check
+# Disabled on aarch64 where it fails with several errors.  Will
+# investigate and fix when we have access to real hardware - RWMJ.
+# 2014-03-24: Suddenly failing on arm32 as well - crobinso
+%ifnarch aarch64
+#make check
+%endif
+
+# Sanity-check current kernel can boot on this qemu.
+# The results are advisory only.
+%if 0%{?fedora} >= 20
+%ifarch %{arm}
+hostqemu=arm-softmmu/qemu-system-arm
+%endif
+%ifarch %{ix86}
+hostqemu=i386-softmmu/qemu-system-i386
+%endif
+%ifarch x86_64
+hostqemu=x86_64-softmmu/qemu-system-x86_64
+%endif
+#if test -f "$hostqemu"; then qemu-sanity-check --qemu=$hostqemu ||: ; fi
+%endif
 
 %ifarch %{kvm_archs}
 %post %{kvm_package}
 # 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 || :
-udevadm trigger --sysname-match=kvm || :
+sh %{_sysconfdir}/sysconfig/modules/kvm.modules &> /dev/null || :
+setfacl --remove-all /dev/kvm &> /dev/null || :
+udevadm trigger --subsystem-match=misc --sysname-match=kvm --action=add || :
 %endif
 
+%if %{without separate_kvm}
 %post common
-if [ $1 -eq 1 ] ; then
-    # Initial installation
-    /bin/systemctl enable ksm.service >/dev/null 2>&1 || :
-    /bin/systemctl enable ksmtuned.service >/dev/null 2>&1 || :
-fi
-
 getent group kvm >/dev/null || groupadd -g 36 -r kvm
 getent group qemu >/dev/null || groupadd -g 107 -r qemu
 getent passwd qemu >/dev/null || \
   useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
     -c "qemu user" qemu
 
-%preun common
+%post -n ksm
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl enable ksm.service >/dev/null 2>&1 || :
+    /bin/systemctl enable ksmtuned.service >/dev/null 2>&1 || :
+fi
+
+%preun -n ksm
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /bin/systemctl --no-reload disable ksmtuned.service > /dev/null 2>&1 || :
@@ -1500,23 +1144,38 @@ if [ $1 -eq 0 ] ; then
     /bin/systemctl stop ksm.service > /dev/null 2>&1 || :
 fi
 
-%postun common
+%postun -n ksm
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /bin/systemctl try-restart ksmtuned.service >/dev/null 2>&1 || :
     /bin/systemctl try-restart ksm.service >/dev/null 2>&1 || :
 fi
+%endif
 
+%if %{without separate_kvm}
+%post -n libcacard -p /sbin/ldconfig
+%postun -n libcacard -p /sbin/ldconfig
+%endif
+
+%if 0%{?user:1}
+%post %{user}
+/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || :
+
+%postun %{user}
+/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || :
+%endif
 
 %global kvm_files \
+%if 0%{?need_kvm_modfile} \
 %{_sysconfdir}/sysconfig/modules/kvm.modules \
+%endif \
 %{_udevdir}/80-kvm.rules
 
 %if 0%{?need_qemu_kvm}
 %global qemu_kvm_files \
 %{_bindir}/qemu-kvm \
-%{_datadir}/systemtap/tapset/qemu-kvm.stp
+%{_mandir}/man1/qemu-kvm.1*
 %endif
 
 %files
@@ -1532,7 +1191,6 @@ fi
 %dir %{qemudocdir}
 %doc %{qemudocdir}/Changelog
 %doc %{qemudocdir}/README
-%doc %{qemudocdir}/TODO
 %doc %{qemudocdir}/qemu-doc.html
 %doc %{qemudocdir}/qemu-tech.html
 %doc %{qemudocdir}/qmp-commands.txt
@@ -1540,25 +1198,35 @@ fi
 %doc %{qemudocdir}/COPYING.LIB
 %doc %{qemudocdir}/LICENSE
 %dir %{_datadir}/%{name}/
+%{_datadir}/%{name}/qemu-icon.bmp
+%{_datadir}/%{name}/qemu_logo_no_text.svg
 %{_datadir}/%{name}/keymaps/
 %{_mandir}/man1/qemu.1*
 %{_mandir}/man1/virtfs-proxy-helper.1*
-%{_mandir}/man8/qemu-nbd.8*
-%{_bindir}/qemu-nbd
+%{_mandir}/man1/qemu-system-*.1.gz
 %{_bindir}/virtfs-proxy-helper
-%{_libexecdir}/qemu-bridge-helper
+%attr(4755, root, root) %{_libexecdir}/qemu-bridge-helper
 %config(noreplace) %{_sysconfdir}/sasl2/qemu.conf
+%dir %{_sysconfdir}/qemu
+%config(noreplace) %{_sysconfdir}/qemu/bridge.conf
+
+%if %{without separate_kvm}
+%files -n ksm
+/lib/systemd/system/ksm.service
+/lib/systemd/ksmctl
 %config(noreplace) %{_sysconfdir}/sysconfig/ksm
+/lib/systemd/system/ksmtuned.service
 %{_sbindir}/ksmtuned
 %config(noreplace) %{_sysconfdir}/ksmtuned.conf
-%dir %{_sysconfdir}/qemu
-%config(noreplace) %{_sysconfdir}/qemu/bridge.conf
+%endif
 
+%if %{without separate_kvm}
 %files guest-agent
 %defattr(-,root,root,-)
 %doc COPYING README
 %{_bindir}/qemu-ga
 %{_udevdir}/99-qemu-guest-agent.rules
+%endif
 
 %if 0%{?user:1}
 %files %{user}
@@ -1566,6 +1234,7 @@ fi
 %{_exec_prefix}/lib/binfmt.d/qemu-*.conf
 %{_bindir}/qemu-i386
 %{_bindir}/qemu-x86_64
+%{_bindir}/qemu-aarch64
 %{_bindir}/qemu-alpha
 %{_bindir}/qemu-arm
 %{_bindir}/qemu-armeb
@@ -1575,6 +1244,10 @@ fi
 %{_bindir}/qemu-microblazeel
 %{_bindir}/qemu-mips
 %{_bindir}/qemu-mipsel
+%{_bindir}/qemu-mips64
+%{_bindir}/qemu-mips64el
+%{_bindir}/qemu-mipsn32
+%{_bindir}/qemu-mipsn32el
 %{_bindir}/qemu-or32
 %{_bindir}/qemu-ppc
 %{_bindir}/qemu-ppc64
@@ -1588,6 +1261,7 @@ fi
 %{_bindir}/qemu-unicore32
 %{_datadir}/systemtap/tapset/qemu-i386.stp
 %{_datadir}/systemtap/tapset/qemu-x86_64.stp
+%{_datadir}/systemtap/tapset/qemu-aarch64.stp
 %{_datadir}/systemtap/tapset/qemu-alpha.stp
 %{_datadir}/systemtap/tapset/qemu-arm.stp
 %{_datadir}/systemtap/tapset/qemu-armeb.stp
@@ -1597,6 +1271,10 @@ fi
 %{_datadir}/systemtap/tapset/qemu-microblazeel.stp
 %{_datadir}/systemtap/tapset/qemu-mips.stp
 %{_datadir}/systemtap/tapset/qemu-mipsel.stp
+%{_datadir}/systemtap/tapset/qemu-mips64.stp
+%{_datadir}/systemtap/tapset/qemu-mips64el.stp
+%{_datadir}/systemtap/tapset/qemu-mipsn32.stp
+%{_datadir}/systemtap/tapset/qemu-mipsn32el.stp
 %{_datadir}/systemtap/tapset/qemu-or32.stp
 %{_datadir}/systemtap/tapset/qemu-ppc.stp
 %{_datadir}/systemtap/tapset/qemu-ppc64.stp
@@ -1613,13 +1291,18 @@ fi
 %if 0%{?system_x86:1}
 %files %{system_x86}
 %defattr(-,root,root)
-%if %{without kvmonly}
-%{_bindir}/qemu-system-i386
+#%if %{without kvmonly}
+#%{_bindir}/qemu-system-i386
 %{_bindir}/qemu-system-x86_64
-%{_datadir}/systemtap/tapset/qemu-system-i386.stp
+#%{_datadir}/systemtap/tapset/qemu-system-i386.stp
 %{_datadir}/systemtap/tapset/qemu-system-x86_64.stp
-%endif
+#%{_mandir}/man1/qemu-system-i386.1*
+#%{_mandir}/man1/qemu-system-x86_64.1*
+#%endif
+%{_datadir}/%{name}/acpi-dsdt.aml
+%{_datadir}/%{name}/q35-acpi-dsdt.aml
 %{_datadir}/%{name}/bios.bin
+%{_datadir}/%{name}/bios-256k.bin
 %{_datadir}/%{name}/sgabios.bin
 %{_datadir}/%{name}/linuxboot.bin
 %{_datadir}/%{name}/multiboot.bin
@@ -1630,18 +1313,24 @@ fi
 %{_datadir}/%{name}/vgabios-stdvga.bin
 %{_datadir}/%{name}/vgabios-vmware.bin
 %{_datadir}/%{name}/pxe-e1000.rom
+%{_datadir}/%{name}/efi-e1000.rom
 %{_datadir}/%{name}/pxe-virtio.rom
+%{_datadir}/%{name}/efi-virtio.rom
 %{_datadir}/%{name}/pxe-pcnet.rom
+%{_datadir}/%{name}/efi-pcnet.rom
 %{_datadir}/%{name}/pxe-rtl8139.rom
+%{_datadir}/%{name}/efi-rtl8139.rom
 %{_datadir}/%{name}/pxe-ne2k_pci.rom
-%{_datadir}/%{name}/cpus-x86_64.conf
-%{_datadir}/%{name}/qemu-icon.bmp
+%{_datadir}/%{name}/efi-ne2k_pci.rom
+%{_datadir}/%{name}/QEMU,cgthree.bin
 %config(noreplace) %{_sysconfdir}/qemu/target-x86_64.conf
+%if %{without separate_kvm}
 %ifarch %{ix86} x86_64
 %{?kvm_files:}
 %{?qemu_kvm_files:}
 %endif
 %endif
+%endif
 
 %ifarch %{kvm_archs}
 %files kvm-tools
@@ -1654,6 +1343,7 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-alpha
 %{_datadir}/systemtap/tapset/qemu-system-alpha.stp
+%{_mandir}/man1/qemu-system-alpha.1*
 %{_datadir}/%{name}/palcode-clipper
 %endif
 
@@ -1662,6 +1352,14 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-arm
 %{_datadir}/systemtap/tapset/qemu-system-arm.stp
+%{_mandir}/man1/qemu-system-arm.1*
+%if %{without separate_kvm}
+%ifarch armv7hl
+%{?kvm_files:}
+%{?qemu_kvm_files:}
+%endif
+%endif
+
 %endif
 
 %if 0%{?system_mips:1}
@@ -1675,6 +1373,10 @@ fi
 %{_datadir}/systemtap/tapset/qemu-system-mipsel.stp
 %{_datadir}/systemtap/tapset/qemu-system-mips64el.stp
 %{_datadir}/systemtap/tapset/qemu-system-mips64.stp
+%{_mandir}/man1/qemu-system-mips.1*
+%{_mandir}/man1/qemu-system-mipsel.1*
+%{_mandir}/man1/qemu-system-mips64el.1*
+%{_mandir}/man1/qemu-system-mips64.1*
 %endif
 
 %if 0%{?system_cris:1}
@@ -1682,6 +1384,7 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-cris
 %{_datadir}/systemtap/tapset/qemu-system-cris.stp
+%{_mandir}/man1/qemu-system-cris.1*
 %endif
 
 %if 0%{?system_lm32:1}
@@ -1689,6 +1392,7 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-lm32
 %{_datadir}/systemtap/tapset/qemu-system-lm32.stp
+%{_mandir}/man1/qemu-system-lm32.1*
 %endif
 
 %if 0%{?system_m68k:1}
@@ -1696,6 +1400,7 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-m68k
 %{_datadir}/systemtap/tapset/qemu-system-m68k.stp
+%{_mandir}/man1/qemu-system-m68k.1*
 %endif
 
 %if 0%{?system_microblaze:1}
@@ -1705,6 +1410,8 @@ fi
 %{_bindir}/qemu-system-microblazeel
 %{_datadir}/systemtap/tapset/qemu-system-microblaze.stp
 %{_datadir}/systemtap/tapset/qemu-system-microblazeel.stp
+%{_mandir}/man1/qemu-system-microblaze.1*
+%{_mandir}/man1/qemu-system-microblazeel.1*
 %{_datadir}/%{name}/petalogix*.dtb
 %endif
 
@@ -1713,6 +1420,7 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-or32
 %{_datadir}/systemtap/tapset/qemu-system-or32.stp
+%{_mandir}/man1/qemu-system-or32.1*
 %endif
 
 %if 0%{?system_s390x:1}
@@ -1720,7 +1428,9 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-s390x
 %{_datadir}/systemtap/tapset/qemu-system-s390x.stp
+%{_mandir}/man1/qemu-system-s390x.1*
 %{_datadir}/%{name}/s390-zipl.rom
+%{_datadir}/%{name}/s390-ccw.img
 %ifarch s390x
 %{?kvm_files:}
 %{?qemu_kvm_files:}
@@ -1734,6 +1444,8 @@ fi
 %{_bindir}/qemu-system-sh4eb
 %{_datadir}/systemtap/tapset/qemu-system-sh4.stp
 %{_datadir}/systemtap/tapset/qemu-system-sh4eb.stp
+%{_mandir}/man1/qemu-system-sh4.1*
+%{_mandir}/man1/qemu-system-sh4eb.1*
 %endif
 
 %if 0%{?system_sparc:1}
@@ -1743,6 +1455,10 @@ fi
 %{_bindir}/qemu-system-sparc64
 %{_datadir}/systemtap/tapset/qemu-system-sparc.stp
 %{_datadir}/systemtap/tapset/qemu-system-sparc64.stp
+%{_mandir}/man1/qemu-system-sparc.1*
+%{_mandir}/man1/qemu-system-sparc64.1*
+%{_datadir}/%{name}/QEMU,tcx.bin
+%{_datadir}/%{name}/QEMU,cgthree.bin
 %endif
 
 %if 0%{?system_ppc:1}
@@ -1755,6 +1471,9 @@ fi
 %{_datadir}/systemtap/tapset/qemu-system-ppc.stp
 %{_datadir}/systemtap/tapset/qemu-system-ppc64.stp
 %{_datadir}/systemtap/tapset/qemu-system-ppcemb.stp
+%{_mandir}/man1/qemu-system-ppc.1*
+%{_mandir}/man1/qemu-system-ppc64.1*
+%{_mandir}/man1/qemu-system-ppcemb.1*
 %endif
 %{_datadir}/%{name}/bamboo.dtb
 %{_datadir}/%{name}/ppc_rom.bin
@@ -1770,6 +1489,7 @@ fi
 %defattr(-,root,root)
 %{_bindir}/qemu-system-unicore32
 %{_datadir}/systemtap/tapset/qemu-system-unicore32.stp
+%{_mandir}/man1/qemu-system-unicore32.1*
 %endif
 
 %if 0%{?system_xtensa:1}
 %{_bindir}/qemu-system-xtensaeb
 %{_datadir}/systemtap/tapset/qemu-system-xtensa.stp
 %{_datadir}/systemtap/tapset/qemu-system-xtensaeb.stp
+%{_mandir}/man1/qemu-system-xtensa.1*
+%{_mandir}/man1/qemu-system-xtensaeb.1*
+%endif
+
+%if 0%{?system_moxie:1}
+%files %{system_moxie}
+%defattr(-,root,root)
+%{_bindir}/qemu-system-moxie
+%{_datadir}/systemtap/tapset/qemu-system-moxie.stp
+%{_mandir}/man1/qemu-system-moxie.1*
 %endif
 
+%if 0%{?system_aarch64:1}
+%files %{system_aarch64}
+%defattr(-,root,root)
+%{_bindir}/qemu-system-aarch64
+%{_datadir}/systemtap/tapset/qemu-system-aarch64.stp
+%{_mandir}/man1/qemu-system-aarch64.1*
+%ifarch aarch64
+%{?kvm_files:}
+%{?qemu_kvm_files:}
+%endif
+%endif
+
+%if %{without separate_kvm}
 %files img
 %defattr(-,root,root)
 %{_bindir}/qemu-img
 %{_bindir}/qemu-io
-%{_bindir}/vscclient
+%{_bindir}/qemu-nbd
 %{_mandir}/man1/qemu-img.1*
+%{_mandir}/man8/qemu-nbd.8*
+
+
+%files -n libcacard
+%defattr(-,root,root,-)
+%{_libdir}/libcacard.so.*
+
+%files -n libcacard-tools
+%defattr(-,root,root,-)
+%{_bindir}/vscclient
+
+%files -n libcacard-devel
+%defattr(-,root,root,-)
+%{_includedir}/cacard
+%{_libdir}/libcacard.so
+%{_libdir}/pkgconfig/libcacard.pc
+%endif
 
 %changelog
-* Thu Aug 22 2013 Mirantis Product <product@mirantis.com> - 2:1.2.0-24
-- remove systemd stuff not needed for Centos
-- lower usbredir req to >= 0.5.1
-- unconditionally enable rbd
+* Wed May 13 2015 Aleksandr Mogylchenko <amogylchenko@mirantis.com> - 2:2.0.0-5
+- VENOM, or CVE-2015-3456;
+
+* Sun May 11 2014 Cole Robinson <crobinso@redhat.com> - 2:2.0.0-4
+- Migration CVEs: CVE-2014-0182 etc.
+
+* Wed Apr 30 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2:2.0.0-3
+- Fix aarch64 build
+
+* Mon Apr 21 2014 Cole Robinson <crobinso@redhat.com> - 2:2.0.0-2
+- Don't use SDL2 API support, it's incomplete
+- Build qemu-system-aarch64 only on aarch64 for now
+
+* Thu Apr 17 2014 Cole Robinson <crobinso@redhat.com> - 2:2.0.0-1
+- Update to 2.0.0 GA
+
+* Tue Apr 15 2014 Cole Robinson <crobinso@redhat.com> - 2:2.0.0-0.3.rc3
+- Update to qemu 2.0-rc3
+- Fix crash when restoring from snapshot (bz #1085632)
+
+* Mon Mar 24 2014 Cole Robinson <crobinso@redhat.com> - 2:2.0.0-0.2.rc0
+- Change gtk quit accelerator to ctrl+shift+q (bz #1062393)
+- Fix mouse with spice
+- Enable xen support for xen 4.4
+
+* Tue Mar 18 2014 Cole Robinson <crobinso@redhat.com> 2:2.0.0-0.1.rc0
+- Update to qemu 2.0.0-rc0
+
+* Tue Feb 18 2014 Richard W.M. Jones <rjones@redhat.com> - 2:1.7.0-5
+- Run qemu-sanity-check on x86 and armv7 too.  The results are still
+  only advisory.
+
+* Mon Jan 13 2014 Richard W.M. Jones <rjones@redhat.com> - 2:1.7.0-4
+- Disable make check on aarch64.
+
+* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 2:1.7.0-3
+- Add libcacard ldconfig %%post* scriptlets.
+
+* Wed Dec 18 2013 Cole Robinson <crobinso@redhat.com> - 2:1.7.0-2
+- Add kill() to seccomp whitelist, fix AC97 with -sandbox on (bz #1043521)
+- Changing streaming mode default to off for spice (bz #1038336)
+- Fix guest scsi verify command (bz #1001617)
+
+* Mon Dec 02 2013 Cole Robinson <crobinso@redhat.com> - 2:1.7.0-1
+- Fix qemu-img create with NBD backing file (bz #1034433)
+- Rebase to qemu-1.7 GA
+- New monitor command blockdev-add for full featured block device hotplug.
+- Performance and functionality improvements for USB 3.0.
+- Many VFIO improvements
+- ACPI tables can be generated by QEMU and can be used by firmware directly.
+- Support creating and writing .vhdx images.
+- qemu-img map: dump detailed image file metadata
+
+* Fri Nov 29 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.7.0-0.2.rc1
+- Run chrpath on binaries, so qemu can be built using rpmbuild.
+
+* Thu Nov 21 2013 Cole Robinson <crobinso@redhat.com> - 2:1.7.0-0.1.rc1
+- Update qemu-1.7.0-rc1
 
-* Tue Nov 17 2012 Alon Levy <alevy@redhat.com> - 2:1.2.0-23
+* Sun Nov 17 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.1-2
+- Fix drive discard options via libvirt (bz #1029953)
+- Fix process exit with -sandbox on (bz #1027421)
+
+* Tue Nov 05 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.1-1
+- Reduce CPU usage when audio is playing (bz #1017644)
+- Base on qemu 1.6.1 tarball
+- ksmtuned: Fix matching qemu w/o set_process_name (bz #1012604)
+- ksmtuned: Fix committed_memory when no qemu running (bz #1012610)
+- Make sure bridge helper is setuid (bz #1017660)
+
+* Wed Oct 09 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.0-10
+- Fix migration from qemu <= 1.5
+
+* Sun Oct 06 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.0-9
+- Rebase to pending 1.6.1 stable
+- CVE-2013-4377: Fix crash when unplugging virtio devices (bz #1012633, bz
+  #1012641)
+- Fix 'new snapshot' slowness after the first snap (bz #988436)
+- Fix 9pfs xattrs on kernel 3.11 (bz #1013676)
+- CVE-2013-4344: buffer overflow in scsi_target_emulate_report_luns (bz
+  #1015274, bz #1007330)
+
+* Tue Sep 24 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.0-8
+- Fix -vga qxl with -display vnc (bz #948717)
+- Fix USB crash when installing reactos (bz #1005495)
+- Don't ship x86 kvm wrapper on arm (bz #1005581)
+
+* Thu Sep 12 2013 Dan Horák <dan[at]danny.cz> - 2:1.6.0-7
+- Enable TCG interpreter for s390 as the native backend supports 64-bit only
+- Don't require RDMA on s390(x)
+
+* Tue Sep 03 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.0-6
+- Fix qmp capabilities calls on i686 (bz #1003162)
+- Fix crash with -M isapc -cpu Haswell (bz #986790)
+- Fix crash in lsi_soft_reset (bz #1000947)
+- Fix initial /dev/kvm permissions (bz #993491)
+
+* Wed Aug 28 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.6.0-5
+- Enable qemu-sanity-check, however do not fail the build if it fails.
+
+* Wed Aug 21 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.6.0-4
+- Require newer libssh2 to fix missing libssh2_sftp_fsync (bz #999161)
+
+* Tue Aug 20 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.0-3
+- Require newer ceph-libs to fix symbol error (bz #995883)
+
+* Tue Aug 20 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.6.0-2
+- Try to rebuild since previous i686 build was broken (RHBZ#998722).
+- In build, qemu -help just to check the binary is not broken.
+
+* Fri Aug 16 2013 Cole Robinson <crobinso@redhat.com> - 2:1.6.0-1
+- Rebased to version 1.6.0
+- Support for live migration over RDMA
+- TCG target for aarch64.
+- Support for auto-convergence in live migration ("CPU stunning")
+- The XHCI (USB 3.0) controller supports live migration.
+- New device "nvme" provides a PCI device that implements the NVMe
+  standard.
+- ACPI hotplug of devices behind a PCI bridge is supported
+
+* Sun Aug 04 2013 Dennis Gilmore <dennis@ausil.us> - 2:1.5.2-4
+- re-enable spice support
+
+* Fri Aug 02 2013 Dennis Gilmore <dennis@ausil.us> - 2:1.5.2-3
+- build without spice support to build against new libiscsi
+- spice requires parts of qemu
+
+* Fri Aug 2 2013 Paolo Bonzini <pbonzini@redhat.com> - 2:1.5.2-2
+- Rebuild for libiscsi soname bump
+
+* Mon Jul 29 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.2-1
+- Rebased to version 1.5.2
+- Fix mouse display with spice and latest libvirt (bz #981094)
+
+* Tue Jul 09 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.1-2
+- Update to work with seabios 1.7.3
+
+* Fri Jun 28 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.1-1
+- Rebased to version 1.5.1
+
+* Wed Jun 19 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.0-9
+- Don't install conflicting binfmt handler on arm (bz #974804)
+- Use upstream patch for libfdt build fix
+
+* Fri Jun 14 2013 Peter Robinson <pbrobinson@fedoraproject.org> 2:1.5.0-8
+- Put ARM kvm bits in right sub package
+
+* Thu Jun 13 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.0-7
+- Fix build with both new and old fdt
+
+* Wed Jun 12 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.0-6
+- Fix build with rawhide libfdt
+
+* Tue Jun 11 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.0-5
+- Fix rtl8139 + windows 7 + large transfers (bz #970240)
+
+* Sat Jun  1 2013 Peter Robinson <pbrobinson@fedoraproject.org> 2:1.5.0-4
+- build qemu-kvm on ARMv7
+
+* Mon May 27 2013 Dan Horák <dan[at]danny.cz> - 2:1.5.0-3
+- Install the qemu-kvm.1 man page only on arches with kvm
+
+* Sat May 25 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.0-2
+- Alias qemu-system-* man page to qemu.1 (bz #907746)
+- Drop execute bit on service files (bz #963917)
+- Conditionalize KSM service on host virt support (bz #963681)
+- Split out KSM package, make it not pulled in by default
+
+* Tue May 21 2013 Cole Robinson <crobinso@redhat.com> - 2:1.5.0-1
+- Update to qemu 1.5
+- KVM for ARM support
+- A native GTK+ UI with internationalization support
+- Experimental VFIO support for VGA passthrough
+- Support for VMware PVSCSI and VMXNET3 device emulation
+- CPU hot-add support
+
+* Thu May 16 2013 Paolo Bonzini <pbonzini@redhat.com> - 2:1.4.1-3
+- Drop loading of vhost-net module (bz #963198)
+
+* Wed May 15 2013 Cole Robinson <crobinso@redhat.com> - 2:1.4.1-2
+- Fix crash with usbredir (bz #962826)
+- Drop unneeded kvm.modules on x86 (bz #963198)
+- Make ksmtuned handle set_progname usage (bz #955230)
+- Enable gluster support
+
+* Sat Apr 20 2013 Cole Robinson <crobinso@redhat.com> - 2:1.4.1-1
+- Rebased to version 1.4.1
+- qemu stable release 1.4.1 (bz 952599)
+- CVE-2013-1922: qemu-nbd block format auto-detection vulnerability (bz
+  952574, bz 923219)
+
+* Thu Apr 04 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.4.0-11
+- Rebuild to attempt to fix broken dep on libbrlapi.so.0.5
+
+* Wed Apr 03 2013 Nathaniel McCallum <nathaniel@themccallums.org> - 2:1.4.0-10
+- Sorted qemu.binfmt
+- Remove mipsn32 / mipsn32el binfmt support (it is broken and can't be fixed)
+- Fix binfmt support for mips / mipsel to match what qemu can do
+- Add binfmt support for cris
+- Add binfmt support for microblaze / microblazeel
+- Add binfmt support for sparc64 / sparc32plus
+- Add binfmt support for ppc64 / ppc64abi32
+
+* Wed Apr 03 2013 Hans de Goede <hdegoede@redhat.com> - 2:1.4.0-9
+- Fix USB-tablet not working with some Linux guests (bz #929068)
+
+* Tue Apr 02 2013 Cole Robinson <crobinso@redhat.com> - 2:1.4.0-8
+- Fix dep on seavgabios-bin
+
+* Mon Apr 01 2013 Cole Robinson <crobinso@redhat.com> - 2:1.4.0-7
+- Fixes for iscsi dep
+- Fix TCG ld/st optimization (lp 1127369)
+- Fix possible crash with VNC and qxl (bz #919777)
+- Fix kvm module permissions after first install (bz #907215)
+- Switch to seavgabios by default
+
+* Sun Mar 31 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.4.0-6
+- Fix TCG ld/st optimization. https://bugs.launchpad.net/bugs/1127369
+
+* Thu Mar 14 2013 Paolo Bonzini <pbonzini@redhat.com> - 2:1.4.0-5
+- do not package libcacard in the separate_kvm case
+- backport xfsprogs and usbredir flags from el6
+
+* Mon Mar 11 2013 Paolo Bonzini <pbonzini@redhat.com> - 2:1.4.0-4
+- Use pkg-config to search for libiscsi
+
+* Mon Mar 11 2013 Paolo Bonzini <pbonzini@redhat.com> - 2:1.4.0-3
+- Added libiscsi-devel BuildRequires
+
+* Fri Mar 01 2013 Cole Robinson <crobinso@redhat.com> - 2:1.4.0-2
+- Fix test ordering with latest glib
+
+* Tue Feb 19 2013 Cole Robinson <crobinso@redhat.com> - 2:1.4.0-1
+- Rebased to version 1.4.0
+- block: dataplane for virtio, potentially large performance improvment
+- migration: threaded live migration
+- usb-tablet: usb 2.0 support, significantly lowering CPU usage
+- usb: improved support for pass-through of USB serial devices
+- virtio-net: added support supports multiqueue operation
+
+* Sat Feb  2 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 2:1.3.0-9
+- add BR perl-podlators for pod2man (F19 development)
+- fix "bogus date" entries in %%changelog to fix rebuild
+
+* Fri Feb 01 2013 Alon Levy <alevy@redhat.com> - 2:1.3.0-8
+- rebuilt, removing the two added Provides & Obsoletes lines, since
+  the current EVR already does that by being 1.3.0 > 1.2.2 , and having
+  the same package name of "libcacard"
+
+* Tue Jan 29 2013 Alon Levy <alevy@redhat.com> - 2:1.3.0-7
+- Bump and rebuild for updated Provides & Obsoletes of libcacard 1.2.2-4
+
+* Mon Jan 28 2013 Richard W.M. Jones <rjones@redhat.com> - 2:1.3.0-6
+- Bump and rebuild for updated libseccomp.
+
+* Tue Jan 22 2013 Alon Levy <alevy redhat com> - 2:1.3.0-5
+- Fix missing error_set symbol in libcacard.so (bz #891552)
+
+* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 2:1.3.0-4
+- rebuild due to "jpeg8-ABI" feature drop
+
+* Tue Jan 15 2013 Cole Robinson <crobinso@redhat.com> - 2:1.3.0-3
+- Fix migration from qemu-kvm
+- Fix the test suite on i686
+- Use systemd macros in specfile (bz #850285)
+
+* Tue Jan 15 2013 Hans de Goede <hdegoede@redhat.com> - 2:1.3.0-2
+- Fix 0110-usb-redir-Add-flow-control-support.patch being mangled on rebase
+  to 1.3.0, breaking usbredir support
+
+* Fri Dec 07 2012 Cole Robinson <crobinso@redhat.com> - 2:1.3.0-1
+- Switch base tarball from qemu-kvm to qemu
+- qemu 1.3 release
+- Option to use linux VFIO driver to assign PCI devices
+- Many USB3 improvements
+- New paravirtualized hardware random number generator device.
+- Support for Glusterfs volumes with "gluster://" -drive URI
+- Block job commands for live block commit and storage migration
+
+* Wed Nov 28 2012 Alon Levy <alevy@redhat.com> - 2:1.2.0-25
+* Merge libcacard into qemu, since they both use the same sources now.
+
+* Thu Nov 22 2012 Paolo Bonzini <pbonzini@redhat.com> - 2:1.2.0-24
+- Move vscclient to qemu-common, qemu-nbd to qemu-img
+
+* Tue Nov 20 2012 Alon Levy <alevy@redhat.com> - 2:1.2.0-23
 - Rewrite fix for bz #725965 based on fix for bz #867366
 - Resolve bz #867366
 
+* Fri Nov 16 2012 Paolo Bonzini <pbonzini@redhat.com> - 2:1.2.0-23
+- Backport --with separate_kvm support from EPEL branch
+
 * Fri Nov 16 2012 Paolo Bonzini <pbonzini@redhat.com> - 2:1.2.0-22
 - Fix previous commit
 
@@ -2147,7 +2190,7 @@ fi
 * Thu Apr 15 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.3-5
 - Update virtio console patches from upstream
 
-* Mon Mar 11 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.3-4
+* Thu Mar 11 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.3-4
 - Detect cdrom via ioctl (#473154)
 - re add increased buffer for USB control requests (#546483)
 
@@ -2184,7 +2227,7 @@ fi
 * Mon Jan 25 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.2-1
 - Update to 0.12.2 upstream
 
-* Fri Jan 10 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.1.2-3
+* Sun Jan 10 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.1.2-3
 - Point to seabios instead of bochs, and add a requires for seabios
 
 * Mon Jan  4 2010 Justin M. Forbes <jforbes@redhat.com> - 2:0.12.1.2-2
@@ -2632,7 +2675,7 @@ fi
 - Update to 0.7.0
 - Fix dyngen for PPC functions which end in unconditional branch
 
-* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+* Thu Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
 - rebuilt
 
 * Sun Feb 13 2005 David Woodhouse <dwmw2@infradead.org> 0.6.1-2
@@ -2644,13 +2687,13 @@ fi
 * Tue Jul 20 2004 David Woodhouse <dwmw2@redhat.com> 0.6.0-2
 - Compile fix from qemu CVS, add x86_64 host support
 
-* Mon May 12 2004 David Woodhouse <dwmw2@redhat.com> 0.6.0-1
+* Wed May 12 2004 David Woodhouse <dwmw2@redhat.com> 0.6.0-1
 - Update to 0.6.0.
 
 * Sat May 8 2004 David Woodhouse <dwmw2@redhat.com> 0.5.5-1
 - Update to 0.5.5.
 
-* Thu May 2 2004 David Woodhouse <dwmw2@redhat.com> 0.5.4-1
+* Sun May 2 2004 David Woodhouse <dwmw2@redhat.com> 0.5.4-1
 - Update to 0.5.4.
 
 * Thu Apr 22 2004 David Woodhouse <dwmw2@redhat.com> 0.5.3-1