rpms/libvirt-cim/devel remove_net_name.patch, NONE, 1.1 xen_migration_uri.patch, NONE, 1.1 libvirt-cim.spec, 1.31, 1.32

Kaitlin Rupert kaitlin at fedoraproject.org
Wed Dec 16 21:08:42 UTC 2009


Author: kaitlin

Update of /cvs/pkgs/rpms/libvirt-cim/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10111

Modified Files:
	libvirt-cim.spec 
Added Files:
	remove_net_name.patch xen_migration_uri.patch 
Log Message:
Add xen uri and removal of net->name patches.  Also update spec file
for 0.5.8-2 related changes.



remove_net_name.patch:
 libxkutil/device_parsing.c                |    5 ++---
 libxkutil/device_parsing.h                |    1 -
 libxkutil/xmlgen.c                        |    7 +------
 src/Virt_RASD.c                           |    6 +++---
 src/Virt_VirtualSystemManagementService.c |    5 ++---
 5 files changed, 8 insertions(+), 16 deletions(-)

--- NEW FILE remove_net_name.patch ---
# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1260387726 28800
# Node ID 54c432d2bec6493cbbd3fa7c5a28b2e461014f68
# Parent  3e7b324f52e408cffa7f4fcc35296173f308c921
Revert net->name to net->source

For Xen guests, a network device is turned into a bridge device.  However,
the network resource still belongs to the virtual network pool.  This change
makes sure the bridge name is written to the source field of the net struct so
that look ups in Virt_DevicePool.c work properly.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 3e7b324f52e4 -r 54c432d2bec6 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c	Thu Dec 03 18:20:29 2009 -0800
+++ b/libxkutil/device_parsing.c	Wed Dec 09 11:42:06 2009 -0800
@@ -304,8 +304,8 @@
                         if (ndev->mac == NULL)
                                 goto err;
                 } else if (XSTREQ(child->name, "source")) {
-                        ndev->name = get_attr_value(child, "bridge");
-                        if (ndev->name != NULL)
+                        ndev->source = get_attr_value(child, "bridge");
+                        if (ndev->source != NULL)
                                 continue;
                         ndev->source = get_attr_value(child, "network");
                         if (ndev->source != NULL)
@@ -659,7 +659,6 @@
                 DUP_FIELD(dev, _dev, dev.net.mac);
                 DUP_FIELD(dev, _dev, dev.net.type);
                 DUP_FIELD(dev, _dev, dev.net.source);
-                DUP_FIELD(dev, _dev, dev.net.name);
                 DUP_FIELD(dev, _dev, dev.net.model);
         } else if (dev->type == CIM_RES_TYPE_DISK) {
                 DUP_FIELD(dev, _dev, dev.disk.type);
diff -r 3e7b324f52e4 -r 54c432d2bec6 libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h	Thu Dec 03 18:20:29 2009 -0800
+++ b/libxkutil/device_parsing.h	Wed Dec 09 11:42:06 2009 -0800
@@ -50,7 +50,6 @@
         char *mac;
         char *source;
         char *model;
-        char *name;
 };
 
 struct mem_device {
diff -r 3e7b324f52e4 -r 54c432d2bec6 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c	Thu Dec 03 18:20:29 2009 -0800
+++ b/libxkutil/xmlgen.c	Wed Dec 09 11:42:06 2009 -0800
@@ -165,12 +165,7 @@
 {
         xmlNodePtr tmp;
 
-        if ((STREQC(src_type, "bridge")) && (dev->name != NULL)) {
-                tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL);
-                if (tmp == NULL) 
-                        return XML_ERROR;
-                xmlNewProp(tmp, BAD_CAST src_type, BAD_CAST dev->name);
-        } else if ((STREQC(src_type, "network")) && (dev->source != NULL)) {
+        if (dev->source != NULL) {
                 tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL);
                 if (tmp == NULL) 
                         return XML_ERROR;
diff -r 3e7b324f52e4 -r 54c432d2bec6 src/Virt_RASD.c
--- a/src/Virt_RASD.c	Thu Dec 03 18:20:29 2009 -0800
+++ b/src/Virt_RASD.c	Wed Dec 09 11:42:06 2009 -0800
@@ -435,11 +435,11 @@
                               (CMPIValue *)dev->dev.net.mac,
                               CMPI_chars);
 
-                if ((dev->dev.net.name != NULL) && 
-                     (STREQ(dev->dev.net.type, "bridge")))
+                if ((dev->dev.net.source != NULL) 
+                   && (STREQ(dev->dev.net.type, "bridge")))
                         CMSetProperty(inst,
                                       "NetworkName",
-                                      (CMPIValue *)dev->dev.net.name,
+                                      (CMPIValue *)dev->dev.net.source,
                                       CMPI_chars);
 
                 if (dev->dev.net.model != NULL)
diff -r 3e7b324f52e4 -r 54c432d2bec6 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c	Thu Dec 03 18:20:29 2009 -0800
+++ b/src/Virt_VirtualSystemManagementService.c	Wed Dec 09 11:42:06 2009 -0800
@@ -720,15 +720,15 @@
         dev->id = strdup(dev->dev.net.mac);
 
         free(dev->dev.net.type);
-        free(dev->dev.net.name);
         if (cu_get_str_prop(inst, "NetworkType", &val) != CMPI_RC_OK) 
                 return "No Network Type specified";
 
+        free(dev->dev.net.source);
         if (STREQC(val, BRIDGE_TYPE)) {
                 dev->dev.net.type = strdup(BRIDGE_TYPE);
                 if (cu_get_str_prop(inst, "NetworkName", &val) == CMPI_RC_OK) 
                         if (strlen(val) > 0)
-                                dev->dev.net.name = strdup(val);
+                                dev->dev.net.source = strdup(val);
                         else
                                 return "Bridge name is empty";
                 else 
@@ -741,7 +741,6 @@
                 if (val == NULL)
                         return "No NetworkPool specified no default available";
 
-                free(dev->dev.net.source);
                 network = name_from_pool_id(val);
                 if (network == NULL) {
                         msg = "PoolID specified is not formatted properly";

xen_migration_uri.patch:
 Virt_VSMigrationService.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE xen_migration_uri.patch ---
# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1259882291 28800
# Node ID 3ceede4c5d356eb61b759a09f9a2751793247c1d
# Parent  282660c5e43aba6b284a9909144b9df14dc95f5b
Xen version 3.3.0 doesn't accept system in the migration URI

This change has been tested with Xen version 3.1.0. Also tests against KVM
to check for regressions.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 282660c5e43a -r 3ceede4c5d35 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c	Wed Dec 02 12:48:47 2009 -0800
+++ b/src/Virt_VSMigrationService.c	Thu Dec 03 15:18:11 2009 -0800
@@ -186,7 +186,12 @@
                 goto out;
         }
 
-        rc = asprintf(&uri, "%s+%s://%s/system", prefix, tport, dest);
+        if (STREQC(prefix, "xen"))
+                rc = asprintf(&uri, "%s+%s://%s", prefix, tport, dest);
+        else {
+                rc = asprintf(&uri, "%s+%s://%s/system", prefix, tport, dest);
+        }
+
         if (rc == -1) {
                 uri = NULL;
                 goto out;


Index: libvirt-cim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/devel/libvirt-cim.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- libvirt-cim.spec	7 Dec 2009 17:48:32 -0000	1.31
+++ libvirt-cim.spec	16 Dec 2009 21:08:42 -0000	1.32
@@ -3,18 +3,20 @@
 Summary: A CIM provider for libvirt
 Name: libvirt-cim
 Version: 0.5.8
-Release: 2%{?dist}
+Release: 2%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: libvirt-cim-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 URL: http://libvirt.org/CIM/
+Requires: libxml2 >= 2.6.0
+Requires: libvirt >= 0.3.2
 Requires: unzip
-Requires: tog-pegasus 
+Requires: tog-pegasus
 BuildRequires: libcmpiutil >= 0.4
 BuildRequires: tog-pegasus-devel
 BuildRequires: libvirt-devel >= 0.3.2
-BuildRequires: libuuid-devel 
+BuildRequires: libuuid-devel
 BuildRequires: libxml2-devel
 BuildRequires: libcmpiutil-devel
 BuildConflicts: sblim-cmpi-devel
@@ -89,25 +91,25 @@ rm -fr $RPM_BUILD_ROOT
         -n root/interop \
         -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true
 %{_datadir}/%{name}/provider-register.sh -t pegasus \
-        -n root/PG_InterOp \
-        -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} -v >/dev/null 2>&1 || true
+	-n root/PG_InterOp \
+	-r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} -v >/dev/null 2>&1 || true
 %{_datadir}/%{name}/provider-register.sh -t pegasus \
-        -n root/cimv2\
-        -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
+	-n root/cimv2 \
+	-r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
 
 %preun
 %{_datadir}/%{name}/provider-register.sh -d -t pegasus \
 	-n root/virt \
 	-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
 %{_datadir}/%{name}/provider-register.sh -d -t pegasus \
-        -n root/interop \
-        -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true
+	-n root/interop \
+	-r %{INTEROP_REG} -m %{INTEROP_MOF} >/dev/null 2>&1 || true
 %{_datadir}/%{name}/provider-register.sh -d -t pegasus \
-        -n root/PG_InterOp \
-        -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true
+	-n root/PG_InterOp \
+	-r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true
 %{_datadir}/%{name}/provider-register.sh -d -t pegasus \
-        -n root/cimv2 \
-        -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
+	-n root/cimv2 \
+	-r %{CIMV2_REG} -m %{CIMV2_MOF} >/dev/null 2>&1 || true
 
 %postun -p /sbin/ldconfig
 
@@ -135,6 +137,8 @@ rm -fr $RPM_BUILD_ROOT
 - Remove additional reg call of root/virt from postinstall 
 - Do not use /etc directly.  Use sysconfigdir instead
 - Remove additional DESTDIR definition
+- Fix Xen migration URI to not include 'system'
+- Change net->name to net->source
 
 * Wed Dec 02 2009 Kaitlin Rupert <kaitlin at us.ibm.com> - 0.5.8-1
 - Updated to latest upstream source




More information about the fedora-extras-commits mailing list