rpms/libvirt-cim/F-9 infostore_trunc.patch, NONE, 1.1 vsss_logic.patch, NONE, 1.1 vsss_paramname.patch, NONE, 1.1 libvirt-cim.spec, 1.17, 1.18

Dan Smith (danms) fedora-extras-commits at redhat.com
Thu Aug 7 16:53:05 UTC 2008


Author: danms

Update of /cvs/pkgs/rpms/libvirt-cim/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25050

Modified Files:
	libvirt-cim.spec 
Added Files:
	infostore_trunc.patch vsss_logic.patch vsss_paramname.patch 
Log Message:
Added a few patches from upstream and fixed creation of infostore directory


infostore_trunc.patch:

--- NEW FILE infostore_trunc.patch ---
# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1217613773 25200
# Node ID ca56c48f31038a8dc718e09ef8bf68a8917408fa
# Parent  9f2f9b117797907bfa2b89a499b4eb5bb62cd458
(#2) When saving out the infostore, clear any previous data.

Updates:

  -Replace additional open call with ftruncate()

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

diff -r 9f2f9b117797 -r ca56c48f3103 libxkutil/infostore.c
--- a/libxkutil/infostore.c	Mon Aug 04 11:57:27 2008 -0700
+++ b/libxkutil/infostore.c	Fri Aug 01 11:02:53 2008 -0700
@@ -150,6 +150,9 @@
         long size = 0;
 
         lseek(ctx->fd, 0, SEEK_SET);
+
+        if (ftruncate(ctx->fd, 0) != 0)
+                CU_DEBUG("Unable to truncate infostore");
 
         save = xmlSaveToFd(ctx->fd, NULL, 0);
         if (save == NULL) {

vsss_logic.patch:

--- NEW FILE vsss_logic.patch ---
# HG changeset patch
# User Jim Fehlig <jfehlig at novell.com>
# Date 1218080112 21600
# Node ID f1a672f33772c5a6314f1d5a5fd0f701b1564673
# Parent  9118e2bc677263105b82148c8d69a820ef900107
Fix logic that determines memory only or memory terminal snapshot

According to comments in Virt_VirtualSystemSnapshotService.h and
VirtualSystemSnapshotService.mof, it seems logic that determines
whether to do a restore uses wrong definition.

     Signed-off-by: Jim Fehlig <jfehlig at novell.com>

diff -r 9118e2bc6772 -r f1a672f33772 src/Virt_VirtualSystemSnapshotService.c
--- a/src/Virt_VirtualSystemSnapshotService.c	Wed Aug 06 21:44:27 2008 -0600
+++ b/src/Virt_VirtualSystemSnapshotService.c	Wed Aug 06 21:35:12 2008 -0600
@@ -397,7 +397,7 @@
         }
 
         ctx->save = (type != 0);
-        ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEM);
+        ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEMT);
 
         s = create_job(context, ref, ctx, &job);
 

vsss_paramname.patch:

--- NEW FILE vsss_paramname.patch ---
# HG changeset patch
# User Jim Fehlig <jfehlig at novell.com>
# Date 1218080667 21600
# Node ID 9118e2bc677263105b82148c8d69a820ef900107
# Parent  ca56c48f31038a8dc718e09ef8bf68a8917408fa
Fix name of Snaphot parameter to ApplySnapshot

The ApplySnapshot extrinsic takes 1 input parameter named Snapshot.
Change parameter name from AffectedSnapshot to Snapshot.

     Signed-off-by: Jim Fehlig <jfehlig at novell.com>

diff -r ca56c48f3103 -r 9118e2bc6772 src/Virt_VirtualSystemSnapshotService.c
--- a/src/Virt_VirtualSystemSnapshotService.c	Fri Aug 01 11:02:53 2008 -0700
+++ b/src/Virt_VirtualSystemSnapshotService.c	Wed Aug 06 21:44:27 2008 -0600
@@ -542,7 +542,7 @@
         char *name = NULL;
         uint32_t retcode = CIM_RETURN_FAILED;
 
-        if (cu_get_ref_arg(argsin, "AffectedSnapshot", &snap) != CMPI_RC_OK) {
+        if (cu_get_ref_arg(argsin, "Snapshot", &snap) != CMPI_RC_OK) {
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_INVALID_PARAMETER,
                            "Missing Snapshot");
@@ -587,7 +587,7 @@
 static struct method_handler ApplySnapshot = {
         .name = "ApplySnapshot",
         .handler = apply_snapshot,
-        .args = {{"AffectedSnapshot", CMPI_ref, false},
+        .args = {{"Snapshot", CMPI_ref, false},
                  ARG_END}
 };
 


Index: libvirt-cim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/F-9/libvirt-cim.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- libvirt-cim.spec	5 Aug 2008 14:33:25 -0000	1.17
+++ libvirt-cim.spec	7 Aug 2008 16:52:35 -0000	1.18
@@ -3,7 +3,7 @@
 Summary: A CIM provider for libvirt
 Name: libvirt-cim
 Version: 0.5.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPLv2+
 Group: Development/Libraries
 Source: libvirt-cim-%{version}.tar.gz
@@ -20,6 +20,9 @@
 Patch0: parse.patch
 Patch1: uuidbuflen.patch
 Patch2: uuidcompare.patch
+Patch3: infostore_trunc.patch
+Patch4: vsss_paramname.patch
+Patch5: vsss_logic.patch
 
 %description
 Libvirt-cim is a CMPI CIM provider that implements the DMTF SVPC
@@ -34,6 +37,9 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %configure --disable-werror
@@ -53,6 +59,7 @@
 rm -f $RPM_BUILD_ROOT%{_libdir}/libxkutil.so
 mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
 echo %{_libdir}/cmpi > $RPM_BUILD_ROOT/etc/ld.so.conf.d/libvirt-cim.conf
+mkdir -p $RPM_BUILD_ROOT/etc/libvirt/cim
 
 %clean
 rm -fr $RPM_BUILD_ROOT
@@ -97,6 +104,7 @@
 
 %files 
 %defattr(-, root, root)
+/etc/libvirt/cim
 
 %doc README COPYING doc/CodingStyle doc/SubmittingPatches
 #%doc base_schema/README.DMTF
@@ -113,6 +121,12 @@
 /etc/ld.so.conf.d/libvirt-cim.conf
 
 %changelog
+* Thu Aug 07 2008 Dan Smith <danms at us.ibm.com> - 0.5.1-3
+- Added infostore_trunc patch to fix infostore corruption
+- Added vsss_paramname patch to fix VSSS parameter name
+- Added vsss_logic patch to fix terminal memory snapshot logic
+- Added /etc/libvirt/cim directory for infostore
+
 * Thu Jul 31 2008 Dan Smith <danms at us.ibm.com> - 0.5.1-1
 - Updated to latest upstream source
 




More information about the fedora-extras-commits mailing list