From cbe377ed29a459c6226b75e293c6bda5f1962fe9 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Jul 26 2007 15:35:55 +0000 Subject: Fix for bug #249594, Daniel --- diff --git a/libvirt-qemu.patch b/libvirt-qemu.patch new file mode 100644 index 0000000..603d8cf --- /dev/null +++ b/libvirt-qemu.patch @@ -0,0 +1,14 @@ +diff -rup libvirt-0.3.1.orig/src/qemu_conf.c libvirt-0.3.1.new/src/qemu_conf.c +--- libvirt-0.3.1.orig/src/qemu_conf.c 2007-07-24 11:06:38.000000000 -0400 ++++ libvirt-0.3.1.new/src/qemu_conf.c 2007-07-26 10:22:09.000000000 -0400 +@@ -1088,6 +1088,10 @@ static struct qemud_vm_def *qemudParseXM + if ((obj == NULL) || (obj->type != XPATH_STRING) || + (obj->stringval == NULL) || (obj->stringval[0] == 0)) { + const char *defaultMachine = qemudDefaultMachineForArch(def->os.arch); ++ if (!defaultMachine) { ++ qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "unsupported arch %s", def->os.arch); ++ goto error; ++ } + if (strlen(defaultMachine) >= (QEMUD_OS_MACHINE_MAX_LEN-1)) { + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "machine type too long"); + goto error; diff --git a/libvirt.spec b/libvirt.spec index c1fd8b8..a553c6a 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -3,7 +3,7 @@ Summary: Library providing a simple API virtualization Name: libvirt Version: 0.3.1 -Release: 2%{?dist}%{?extra_release} +Release: 3%{?dist}%{?extra_release} License: LGPL Group: Development/Libraries Source: libvirt-%{version}.tar.gz @@ -24,6 +24,7 @@ BuildRequires: gettext BuildRequires: gnutls-devel Obsoletes: libvir ExclusiveArch: i386 x86_64 ia64 +Patch0: libvirt-qemu.patch %description Libvirt is a C toolkit to interract with the virtualization capabilities @@ -54,6 +55,7 @@ of recent versions of Linux (and other OSes). %prep %setup -q +%patch0 -p1 %build %configure --with-init-script=redhat --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid --with-remote-file=%{_localstatedir}/run/libvirtd.pid @@ -165,6 +167,9 @@ fi %doc docs/examples/python %changelog +* Thu Jul 26 2007 Daniel Veillard - 0.3.1-3.fc8 +- adds fix for bug #249594 + * Wed Jul 25 2007 Jesse Keating - 0.3.1-2 - Rebuild for RH #249435