[qemu/f16] Enable fedora-13 machine type (to be removed in F17)

Justin M. Forbes jforbes at fedoraproject.org
Fri Nov 18 21:10:41 UTC 2011


commit 45e28a1ee3a75dff5fa708acd439518e1e3e7871
Author: Justin M. Forbes <jforbes at redhat.com>
Date:   Fri Nov 18 15:10:31 2011 -0600

    Enable fedora-13 machine type (to be removed in F17)

 ...edora-13-machine-type-for-backward-compat.patch |   37 ++++++++++++++++++++
 qemu.spec                                          |   28 ++++++++++-----
 2 files changed, 56 insertions(+), 9 deletions(-)
---
diff --git a/pc-add-a-Fedora-13-machine-type-for-backward-compat.patch b/pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
new file mode 100644
index 0000000..bbd7551
--- /dev/null
+++ b/pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
@@ -0,0 +1,37 @@
+From: Justin M. Forbes <jforbes at redhat.com>
+Date: Thu, Aug 19 09:13:45 2010 -0500
+Subject: pc: Add a Fedora-13 machine type for backwards compatibility.
+
+In Fedora 13 a fedora-13 machine type was added as default to allow
+interaction with upstream stable qemu which did not support the same
+feature set.  As a result we need to support this machine type through
+the Fedora 15 release.
+
+
+diff --git a/hw/pc_piix.c b/hw/pc_piix.c
+index 9e4bac8..eb1ed05 100644
+--- a/hw/pc_piix.c
++++ b/hw/pc_piix.c
+@@ -266,6 +266,14 @@ static QEMUMachine pc_machine_v0_13 = {
+     },
+ };
+ 
++static QEMUMachine pc_machine_f13 = {
++    .name = "fedora-13",
++    .desc = "Standard PC",
++    .init = pc_init_pci,
++    .max_cpus = 255,
++    .is_default = 0,
++};
++
+ static QEMUMachine pc_machine_v0_12 = {
+     .name = "pc-0.12",
+     .desc = "Standard PC",
+@@ -397,6 +405,7 @@ static QEMUMachine isapc_machine = {
+ static void pc_machine_init(void)
+ {
+     qemu_register_machine(&pc_machine);
++    qemu_register_machine(&pc_machine_f13);
+     qemu_register_machine(&pc_machine_v0_13);
+     qemu_register_machine(&pc_machine_v0_12);
+     qemu_register_machine(&pc_machine_v0_11);
diff --git a/qemu.spec b/qemu.spec
index 1a334f9..4118598 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -1,7 +1,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 0.15.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 # Epoch because we pushed a qemu-1.0 package
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
@@ -38,6 +38,9 @@ Source9: ksmtuned.conf
 Source10: qemu-guest-agent.service
 Source11: 99-qemu-guest-agent.rules
 
+# Add compatibility to fedora-13 machine type, to be removed fir F17
+Patch00: pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
+
 # Amit's flow control patches, waiting to glib conversion before going upstream
 Patch01: 0001-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
 Patch02: 0002-char-Add-a-QemuChrHandlers-struct-to-initialise-char.patch
@@ -290,6 +293,7 @@ such as kvm_stat.
 
 %prep
 %setup -q -n qemu-kvm-%{version}
+%patch00 -p1
 %patch01 -p1
 %patch02 -p1
 %patch03 -p1
@@ -520,14 +524,16 @@ sh %{_sysconfdir}/sysconfig/modules/kvm.modules
 %endif
 
 %post common
-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
-
-/bin/systemctl enable ksm.service
-/bin/systemctl enable ksmtuned.service
+if [ $1 -eq 1 ] ; then
+    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
+
+    /bin/systemctl enable ksm.service
+    /bin/systemctl enable ksmtuned.service
+fi
 
 %preun common
 if [ $1 -eq 0 ]; then
@@ -698,6 +704,10 @@ fi
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Fri Nov 18 2011 Justin M. Forbes <jforbes at redhat.com> - 2:0.15.1-3
+- Enable support for fedora-13 machine type (#748218)
+- don't force ksm enable on updates (#754946)
+
 * Thu Nov 03 2011 Justin M. Forbes <jforbes at redhat.com> - 2:0.15.1-2
 - Fix POSTIN scriplet failure (#748281)
 


More information about the scm-commits mailing list