From 6352ca0f204ced9968446f60efdbdd22a1b3b835 Mon Sep 17 00:00:00 2001 From: Kaitlin Rupert Date: Apr 22 2009 01:05:54 +0000 Subject: Updated tarball and spec for release 0.5.5. Also removed outdated patches. --- diff --git a/.cvsignore b/.cvsignore index f78f0d5..e9dd36c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ libvirt-cim-0.5.3.tar.gz libvirt-cim-0.5.4.tar.gz +libvirt-cim-0.5.5.tar.gz diff --git a/emu_1_sdc.patch b/emu_1_sdc.patch deleted file mode 100644 index 26aaabb..0000000 --- a/emu_1_sdc.patch +++ /dev/null @@ -1,108 +0,0 @@ -# HG changeset patch -# User Kaitlin Rupert -# Date 1232129948 28800 -# Node ID c87e67c92f7ceaf556e8be90547de324026f315b -# Parent 13150c7e28270567aad061e9ad521b0e8dd44ef6 -Add support for EmulatedType 1 to SDC. - -Also fix a bug with the if statement in set_disk_props() and a spacing bug. - -Signed-off-by: Kaitlin Rupert - -diff -r 13150c7e2827 -r c87e67c92f7c src/Virt_SettingsDefineCapabilities.c ---- a/src/Virt_SettingsDefineCapabilities.c Thu Jan 22 11:29:29 2009 -0800 -+++ b/src/Virt_SettingsDefineCapabilities.c Fri Jan 16 10:19:08 2009 -0800 -@@ -611,13 +611,13 @@ - const CMPIObjectPath *ref, - const char *id, - uint64_t disk_size, -+ uint16_t emu_type, - struct inst_list *list) - { - const char *addr; - const char *dev; - CMPIInstance *inst; - CMPIStatus s = {CMPI_RC_OK, NULL}; -- uint16_t emu_type = 0; - - if (type == DOMAIN_LXC) { - addr = "/tmp"; -@@ -646,7 +646,7 @@ - dev = "xvda"; - CMSetProperty(inst, "Caption", - (CMPIValue *)"PV disk", CMPI_chars); -- } else if (type, DOMAIN_XENFV) { -+ } else if (type == DOMAIN_XENFV) { - CMSetProperty(inst, "Caption", - (CMPIValue *)"FV disk", CMPI_chars); - } -@@ -671,6 +671,7 @@ - char *pfx; - const char *id; - uint64_t disk_size; -+ uint16_t emu_type = 0; - CMPIStatus s = {CMPI_RC_OK, NULL}; - - switch(template_type) { -@@ -702,16 +703,54 @@ - pfx = class_prefix_name(CLASSNAME(ref)); - - if (STREQ(pfx, "Xen")) { -- s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list); -- -+ int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; -+ int i = 0; -+ -+ for (; i < 2; i++) { -+ emu_type = 0; -+ s = set_disk_props(xen_type[i], -+ ref, -+ id, -+ disk_size, -+ emu_type, -+ list); -+ if (s.rc != CMPI_RC_OK) -+ goto out; -+ -+ emu_type = 1; -+ s = set_disk_props(xen_type[i], -+ ref, -+ id, -+ disk_size, -+ emu_type, -+ list); -+ if (s.rc != CMPI_RC_OK) -+ goto out; -+ } -+ } else if (STREQ(pfx, "KVM")) { -+ s = set_disk_props(DOMAIN_KVM, -+ ref, -+ id, -+ disk_size, -+ emu_type, -+ list); - if (s.rc != CMPI_RC_OK) -- goto out; -+ goto out; - -- s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list); -- } else if (STREQ(pfx, "KVM")) { -- s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list); -+ emu_type = 1; -+ s = set_disk_props(DOMAIN_KVM, -+ ref, -+ id, -+ disk_size, -+ emu_type, -+ list); - } else if (STREQ(pfx, "LXC")) { -- s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list); -+ s = set_disk_props(DOMAIN_LXC, -+ ref, -+ id, -+ disk_size, -+ emu_type, -+ list); - } else { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, diff --git a/host_enum_sys.patch b/host_enum_sys.patch deleted file mode 100644 index ddb3e75..0000000 --- a/host_enum_sys.patch +++ /dev/null @@ -1,73 +0,0 @@ -# HG changeset patch -# User Kaitlin Rupert -# Date 1232562000 28800 -# Node ID 189cc68a2f5a3251be1204bdaddfd90bb8740789 -# Parent eb2df7761596b0fdb38c02aa741c00592e8ddf08 -Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem - -This is a work around to deal with the way the SBLIM provider determines the -FQDN of a host system. The value the SBLIM provider returns can depend on -how the /etc/hosts file is formatted, as well as other factors (running -dnsdomainname caused the provider to print two different values on my system). - -Signed-off-by: Kaitlin Rupert - -diff -r eb2df7761596 -r 189cc68a2f5a src/Virt_HostSystem.c ---- a/src/Virt_HostSystem.c Fri Jan 23 11:48:46 2009 -0800 -+++ b/src/Virt_HostSystem.c Wed Jan 21 10:20:00 2009 -0800 -@@ -144,16 +144,10 @@ - CMPIInstance **inst) - { - CMPIObjectPath *path; -+ CMPIEnumeration *en = NULL; -+ CMPIData data; - CMPIStatus s; - const char *cn = "Linux_ComputerSystem"; -- char name[256]; -- -- if (get_fqdn(name, sizeof(name)) != 0) { -- cu_statusf(broker, &s, -- CMPI_RC_ERR_FAILED, -- "Unable to get hostname: %m"); -- return s; -- } - - path = CMNewObjectPath(broker, "root/cimv2", cn, &s); - if ((path == NULL) || (s.rc != CMPI_RC_OK)) { -@@ -163,11 +157,33 @@ - return s; - } - -- CMAddKey(path, "CreationClassName", cn, CMPI_chars); -- CMAddKey(path, "Name", name, CMPI_chars); -+ /* FIXME: This approach may return the wrong instance if more than -+ one SBLIM Linux_ComputerSystem instance exists on the system. -+ This isn't likely to happen in most cases, but a better approach -+ should be used here. -+ */ -+ en = CBEnumInstances(broker, context, path, NULL, &s); -+ if (en == NULL) { -+ cu_statusf(broker, &s, -+ CMPI_RC_ERR_FAILED, -+ "Upcall EnumInstances of %s class failed", -+ cn); -+ goto out; -+ } - -- *inst = CBGetInstance(broker, context, path, NULL, &s); -+ if (CMHasNext(en, &s)) { -+ data = CMGetNext(en, &s); -+ if (CMIsNullObject(data.value.inst)) { -+ cu_statusf(broker, &s, -+ CMPI_RC_ERR_FAILED, -+ "Failed to retrieve enumeration entry"); -+ goto out; -+ } - -+ *inst = data.value.inst; -+ } -+ -+ out: - if (s.rc != CMPI_RC_OK) { - CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg)); - } else { diff --git a/libvirt-cim.spec b/libvirt-cim.spec index e398693..e8b9147 100644 --- a/libvirt-cim.spec +++ b/libvirt-cim.spec @@ -2,8 +2,8 @@ Summary: A CIM provider for libvirt Name: libvirt-cim -Version: 0.5.4 -Release: 2%{?dist} +Version: 0.5.5 +Release: 1%{?dist} License: LGPLv2+ Group: Development/Libraries Source: libvirt-cim-%{version}.tar.gz @@ -58,13 +58,7 @@ rm -fr $RPM_BUILD_ROOT %define SCHEMA %{_datadir}/%{name}/*.mof %define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration -%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof - -%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration -%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof - -%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration -%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof +%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile,AllocationCapabilities}.mof %define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration %define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof @@ -100,6 +94,12 @@ rm -fr $RPM_BUILD_ROOT %{_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 -t pegasus \ + -n root/interop \ + -r %{INTEROP_REG} -m %{INTEROP_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 %postun -p /sbin/ldconfig @@ -108,10 +108,9 @@ rm -fr $RPM_BUILD_ROOT /etc/libvirt/cim %doc README COPYING doc/CodingStyle doc/SubmittingPatches -#%doc base_schema/README.DMTF +%doc base_schema/README.DMTF %doc doc/*.html %{_libdir}/lib*.so* -# CIM providers are .so modules, thus they belong in the main package %{_libdir}/cmpi/lib*.so* %{_datadir}/libvirt-cim/*.sh %{_datadir}/libvirt-cim/*.mof @@ -123,6 +122,9 @@ rm -fr $RPM_BUILD_ROOT /etc/ld.so.conf.d/libvirt-cim.conf %changelog +* Tue Apr 21 2009 Kaitlin Rupert - 0.5.5-1 +- Updated to latest upstream source + * Wed Feb 25 2009 Fedora Release Engineering - 0.5.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index e245339..07b5272 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 69ad4eb18622482e6cd99c4c20ed01b0 libvirt-cim-0.5.3.tar.gz 26cec2226701a063325fac8f6e8cb75b libvirt-cim-0.5.4.tar.gz +dec0c3647ea3aa713022b31576e0b202 libvirt-cim-0.5.5.tar.gz