Hello community,
here is the log from the commit of package libvirt-cim for openSUSE:Factory
checked in at Tue Sep 22 23:24:17 CEST 2009.
--------
--- libvirt-cim/libvirt-cim.changes 2009-09-01 10:11:03.000000000 +0200
+++ libvirt-cim/libvirt-cim.changes 2009-09-22 20:45:15.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Sep 22 12:41:35 MDT 2009 - jfehlig@novell.com
+
+- Fix memory leak and general cleanup of _get_rasds() function
+ 9xx-get-rasd-cleanup.patch
+ bnc#540497
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
versions.patch
New:
----
948-versions.patch
9xx-get-rasd-cleanup.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libvirt-cim.spec ++++++
--- /var/tmp/diff_new_pack.FrF2Ym/_old 2009-09-22 23:23:39.000000000 +0200
+++ /var/tmp/diff_new_pack.FrF2Ym/_new 2009-09-22 23:23:39.000000000 +0200
@@ -26,14 +26,14 @@
Group: System/Management
AutoReqProv: yes
Version: 0.5.6
-Release: 2
+Release: 3
Summary: CMPI-based CIM provider implementing DMTF SVPC model
Source: %{name}-%{version}.tar.bz2
Source1: libvirt-cim-rpmlintrc
Patch0: provider-reg.patch
-Patch1: versions.patch
+Patch1: 948-versions.patch
Patch2: automake.patch
-#Patch3: eth-device.patch
+Patch3: 9xx-get-rasd-cleanup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: cim-server
Requires: libxml2 >= 2.6.0
@@ -72,7 +72,7 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
-#%patch3 -p1
+%patch3 -p1
chmod -x src/* libxkutil/* schema/* README doc/* base_schema/README*
chmod +X src/* libxkutil/* schema/*
++++++ 948-versions.patch ++++++
Index: libvirt-cim-0.5.6/schema/VirtualSystemManagementService.mof
===================================================================
--- libvirt-cim-0.5.6.orig/schema/VirtualSystemManagementService.mof
+++ libvirt-cim-0.5.6/schema/VirtualSystemManagementService.mof
@@ -11,6 +11,9 @@ class Xen_VirtualSystemManagementService
[Description("Package Version")]
string Release;
+
+ [Description("libvirt Version")]
+ string LibvirtVersion;
};
[Provider("cmpi::Virt_VirtualSystemManagementService")]
@@ -24,6 +27,9 @@ class KVM_VirtualSystemManagementService
[Description("Package Version")]
string Release;
+
+ [Description("libvirt Version")]
+ string LibvirtVersion;
};
[Provider("cmpi::Virt_VirtualSystemManagementService")]
@@ -37,4 +43,7 @@ class LXC_VirtualSystemManagementService
[Description("Package Version")]
string Release;
+
+ [Description("libvirt Version")]
+ string LibvirtVersion;
};
Index: libvirt-cim-0.5.6/src/Virt_VirtualSystemManagementService.c
===================================================================
--- libvirt-cim-0.5.6.orig/src/Virt_VirtualSystemManagementService.c
+++ libvirt-cim-0.5.6/src/Virt_VirtualSystemManagementService.c
@@ -2306,8 +2306,10 @@ CMPIStatus get_vsms(const CMPIObjectPath
const char *ccname = NULL;
virConnectPtr conn = NULL;
unsigned long hv_version = 0;
+ unsigned long lv_version = 0;
const char * hv_type = NULL;
char *caption = NULL;
+ char *lv_version_string = NULL;
CMPIArray *array;
uint16_t op_status;
@@ -2386,6 +2388,25 @@ CMPIStatus get_vsms(const CMPIObjectPath
CMSetProperty(inst, "Revision",
(CMPIValue *)LIBVIRT_CIM_RV, CMPI_chars);
+ if (virGetVersion(&lv_version, hv_type, &hv_version) < 0) {
+ CU_DEBUG("Unable to get libvirt version");
+ lv_version= 0;
+ hv_version= 0;
+ }
+
+ if (asprintf(&lv_version_string, "%lu.%lu.%lu",
+ lv_version / 1000000,
+ (lv_version % 1000000) / 1000,
+ (lv_version % 1000000) % 1000) == -1)
+ lv_version_string = NULL;
+
+ if (lv_version_string != NULL)
+ CMSetProperty(inst, "LibvirtVersion",
+ (CMPIValue *)lv_version_string, CMPI_chars);
+ else
+ CMSetProperty(inst, "LibvirtVersion",
+ (CMPIValue *)"Unknown libvirt", CMPI_chars);
+
CMSetProperty(inst, "Release",
(CMPIValue *)PACKAGE_VERSION, CMPI_chars);
@@ -2410,6 +2431,7 @@ CMPIStatus get_vsms(const CMPIObjectPath
"");
out:
free(caption);
+ free(lv_version_string);
virConnectClose(conn);
*_inst = inst;
++++++ 9xx-get-rasd-cleanup.patch ++++++
# HG changeset patch
# User Jim Fehlig