[sblim-gather/f18] Missing providers
Roman Rakus
rrakus at fedoraproject.org
Mon Mar 4 12:06:34 UTC 2013
commit 494ce3fb342814b8abb6b447f197ca71c412613d
Author: Roman Rakus <rrakus at redhat.com>
Date: Mon Mar 4 13:03:42 2013 +0100
Missing providers
Fixed a typo, addded missing providers and improved providers registration
Signed-off-by: Roman Rakus <rrakus at redhat.com>
Conflicts:
sblim-gather.spec
Signed-off-by: Roman Rakus <rrakus at redhat.com>
.gitignore | 1 +
sblim-gather-2.2.7-missing_providers.patch | 43 +++++++++++++++++++
sblim-gather-2.2.7-typos.patch | 12 +++++
sblim-gather.spec | 61 +++++++++++++++++++++++++---
sources | 1 +
5 files changed, 112 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ef6df3b..a031f7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ sblim-gather-2.2.1.tar.bz2
/sblim-gather-2.2.5.tar.bz2
/sblim-gather-2.2.6.tar.bz2
/sblim-gather-2.2.7.tar.bz2
+/missing-providers.tgz
diff --git a/sblim-gather-2.2.7-missing_providers.patch b/sblim-gather-2.2.7-missing_providers.patch
new file mode 100644
index 0000000..e465927
--- /dev/null
+++ b/sblim-gather-2.2.7-missing_providers.patch
@@ -0,0 +1,43 @@
+diff -up sblim-gather-2.2.7/provider/mof/Linux_Metric.mof.missing_providers sblim-gather-2.2.7/provider/mof/Linux_Metric.mof
+--- sblim-gather-2.2.7/provider/mof/Linux_Metric.mof.missing_providers 2013-02-27 13:59:55.590221724 +0100
++++ sblim-gather-2.2.7/provider/mof/Linux_Metric.mof 2013-02-27 14:03:28.630982849 +0100
+@@ -137,7 +137,8 @@ class Linux_MetricDefForME : CIM_MetricD
+ CIM_BaseMetricDefinition REF Dependent;
+ };
+
+-[ Description ("Plugin Control")
++[ Description ("Plugin Control"),
++ Provider("cmpi:OSBase_MetricPluginProvider")
+ ]
+ class Linux_MetricPlugin : CIM_Setting
+ {
+@@ -149,7 +150,8 @@ class Linux_MetricPlugin : CIM_Setting
+ boolean Enabled;
+ };
+
+-[ Description ("Plugin Control for Repository")
++[ Description ("Plugin Control for Repository"),
++ Provider("cmpi:OSBase_RepositoryPluginProvider")
+ ]
+ class Linux_RepositoryPlugin : CIM_Setting
+ {
+@@ -163,7 +165,8 @@ class Linux_RepositoryPlugin : CIM_Setti
+ boolean Enabled;
+ };
+
+-[ Description ("Definition to Value mapping")
++[ Description ("Definition to Value mapping"),
++ Provider("cmpi:OSBase_MetricValueDefinitionProvider")
+ ]
+ class Linux_MetricValueDefinition : CIM_Setting
+ {
+diff -up sblim-gather-2.2.7/provider/mof/Linux_Metric.registration.missing_providers sblim-gather-2.2.7/provider/mof/Linux_Metric.registration
+--- sblim-gather-2.2.7/provider/mof/Linux_Metric.registration.missing_providers 2013-02-27 13:59:35.288958848 +0100
++++ sblim-gather-2.2.7/provider/mof/Linux_Metric.registration 2013-02-27 13:59:39.822017667 +0100
+@@ -12,3 +12,6 @@ Linux_MetricRepositoryService root/cimv2
+ Linux_MetricIndication root/cimv2 OSBase_MetricIndicationProvider OSBase_MetricIndicationProvider indication
+ CIM_InstModification root/cimv2 OSBase_MetricLifeCycleProvider OSBase_MetricLifeCycleProvider indication
+ Linux_MetricElementConformsToProfile root/cimv2 OSBase_MetricElementConformsToProfileProvider OSBase_MetricElementConformsToProfileProvider instance association
++Linux_MetricPlugin root/cimv2 OSBase_MetricPluginProvider OSBase_MetricPluginProvider instance
++Linux_RepositoryPlugin root/cimv2 OSBase_RepositoryPluginProvider OSBase_RepositoryPluginProvider instance
++Linux_MetricValueDefinition root/cimv2 OSBase_MetricValueDefinitionProvider OSBase_MetricValueDefinitionProvider instance
diff --git a/sblim-gather-2.2.7-typos.patch b/sblim-gather-2.2.7-typos.patch
new file mode 100644
index 0000000..787eaea
--- /dev/null
+++ b/sblim-gather-2.2.7-typos.patch
@@ -0,0 +1,12 @@
+diff -up sblim-gather-2.2.7/provider/provider-register.sh.typos sblim-gather-2.2.7/provider/provider-register.sh
+--- sblim-gather-2.2.7/provider/provider-register.sh.typos 2013-02-28 14:47:57.480692224 +0100
++++ sblim-gather-2.2.7/provider/provider-register.sh 2013-02-28 14:48:08.350826141 +0100
+@@ -280,7 +280,7 @@ pegasus_uninstall()
+ do
+ if test -w $_TEMPDIR
+ then
+- _DELETE_NAME=$TEMPDIR/delete-class.mof
++ _DELETE_NAME=$_TEMPDIR/delete-class.mof
+ break
+ fi
+ done
diff --git a/sblim-gather.spec b/sblim-gather.spec
index a6ce87c..69524e2 100644
--- a/sblim-gather.spec
+++ b/sblim-gather.spec
@@ -4,7 +4,7 @@
Name: sblim-gather
Version: 2.2.7
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: SBLIM Gatherer
Group: Applications/System
@@ -15,12 +15,19 @@ Source1: gather-config.h.prepend
Source2: gather-config.h
Source3: sblim-gather.tmpfiles
+Source4: missing-providers.tgz
+
BuildRequires: sblim-cmpi-devel
BuildRequires: sblim-cmpi-base-devel
BuildRequires: tog-pegasus-devel >= %{tog_pegasus_version}
BuildRequires: libsysfs-devel
BuildRequires: libvirt-devel
BuildRequires: xmlto
+# for missing providers
+BuildRequires: cmake
+Patch1: sblim-gather-2.2.7-missing_providers.patch
+Patch2: sblim-gather-2.2.7-typos.patch
+
Requires: tog-pegasus >= %{tog_pegasus_version}
%description
@@ -69,6 +76,10 @@ Testsuite
%prep
%setup -q
+# for missing providers
+tar xfvz %{SOURCE4}
+%patch1 -p1 -b .missing_providers
+%patch2 -p1 -b .typos
%build
%ifarch s390 s390x ppc ppc64
@@ -83,6 +94,15 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
+# for missing providers
+pushd missing-providers
+ mkdir -p %{_target_platform}
+ pushd %{_target_platform}
+ %{cmake} ..
+ make %{?_smp_mflags}
+ popd
+popd
+
%install
make install DESTDIR=$RPM_BUILD_ROOT
# remove unused libtool files
@@ -105,6 +125,10 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT/%{_includedir}/gather/
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/cmpi" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
+# for missing providers
+make install/fast DESTDIR=$RPM_BUILD_ROOT -C missing-providers/%{_target_platform}
+mkdir -p $RPM_BUILD_ROOT/var/lib/gather
+
%files
%config(noreplace) %{_sysconfdir}/*.conf
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
@@ -129,6 +153,7 @@ echo "%{_libdir}/cmpi" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/%{name}-%{_
%{_libdir}/libOSBase*.so.*
%{_libdir}/cmpi
%{_datadir}/%{name}
+%dir /var/lib/gather
%files devel
%{_libdir}/lib[^O]*.so
@@ -140,8 +165,14 @@ echo "%{_libdir}/cmpi" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/%{name}-%{_
%{_datadir}/sblim-testsuite/system/linux/gather-systemname.sh
%{_datadir}/sblim-testsuite/test-gather.sh
-%global GATHER_SCHEMA %{_datadir}/%{name}/Linux_Metric.mof %{_datadir}/%{name}/Linux_IPProtocolEndpointMetric.mof %{_datadir}/%{name}/Linux_LocalFileSystemMetric.mof %{_datadir}/${name}/Linux_NetworkPortMetric.mof %{_datadir}/%{name}/Linux_OperatingSystemMetric.mof %{_datadir}/%{name}/Linux_ProcessorMetric.mof %{_datadir}/%{name}/Linux_UnixProcessMetric.mof %{_datadir}/%{name}/Linux_XenMetric.mof %{_datadir}/%{name}/Linux_zECKDMetric.mof %{_datadir}/%{name}/Linux_zCECMetric.mof %{_datadir}/%{name}/Linux_zLPARMetric.mof %{_datadir}/%{name}/Linux_zCHMetric.mof
-%global GATHER_REGISTRATION %{_datadir}/%{name}/Linux_IPProtocolEndpointMetric.registration %{_datadir}/%{name}/Linux_LocalFileSystemMetric.registration %{_datadir}/%{name}/Linux_Metric.registration %{_datadir}/%{name}/Linux_NetworkPortMetric.registration %{_datadir}/%{name}/Linux_OperatingSystemMetric.registration %{_datadir}/%{name}/Linux_ProcessorMetric.registration %{_datadir}/%{name}/Linux_UnixProcessMetric.registration %{_datadir}/%{name}/Linux_XenMetric.registration %{_datadir}/%{name}/Linux_zECKDMetric.registration %{_datadir}/%{name}/Linux_zCECMetric.registration %{_datadir}/%{name}/Linux_zLPARMetric.registration %{_datadir}/%{name}/Linux_zCHMetric.registration
+%global GATHER_1ST_SCHEMA %{_datadir}/%{name}/Linux_Metric.mof
+%global GATHER_1ST_REGISTRATION %{_datadir}/%{name}/Linux_Metric.registration
+
+%global G_GLOB_IGNORE */Linux_Metric.*
+
+
+%global GATHER_SCHEMA %{_datadir}/%{name}/*.mof
+%global GATHER_REGISTRATION %{_datadir}/%{name}/*.registration
%post
install -d -m 0755 -o root -g root /var/run/gather
@@ -150,7 +181,17 @@ install -d -m 0755 -o root -g root /var/run/gather
%preun
if [ $1 -eq 0 ]; then
rm -rf /var/run/gather
+ rm -rf /var/lib/gather
fi
+# Stop gatherd and reposd
+# If $1 > 0 also restart
+ for daemon in gatherd reposd; do
+ if ps -C "$daemon" &>/dev/null
+ then
+ killall "$daemon"
+ [ $1 -ge 1 ] && "$daemon"
+ fi
+ done || :
%postun -p /sbin/ldconfig
@@ -158,7 +199,7 @@ fi
if [ $1 -gt 1 ]
then
%{_datadir}/%{name}/provider-register.sh -t pegasus -d \
- -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null 2>&1 || :;
+ -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} &> /dev/null
# don't let registration failure when server not running fail upgrade!
fi
@@ -166,8 +207,11 @@ fi
/sbin/ldconfig
if [ $1 -ge 1 ]
then
+ GLOBIGNORE=%{G_GLOB_IGNORE}
+ %{_datadir}/%{name}/provider-register.sh -t pegasus -r \
+ %{GATHER_1ST_REGISTRATION} -m %{GATHER_1ST_SCHEMA} &>/dev/null || :;
%{_datadir}/%{name}/provider-register.sh -t pegasus \
- -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null 2>&1 || :;
+ -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} &>/dev/null || :;
# don't let registration failure when server not running fail install!
fi
@@ -176,13 +220,18 @@ fi
if [ $1 -eq 0 ]
then
%{_datadir}/%{name}/provider-register.sh -t pegasus -d \
- -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null 2>&1 || :;
+ -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null
# don't let registration failure when server not running fail erase!
fi
%postun provider -p /sbin/ldconfig
%changelog
+* Wed Feb 27 2013 Roman Rakus <rrakus at redhat.com> - 2.2.7-3
+- Fixed a typo
+- Added missing providers
+- improved providers registration
+
* Tue Dec 04 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 2.2.7-1
- Update to sblim-gather-2.2.7
- Add man page BuildRequires, ship man pages
diff --git a/sources b/sources
index f7600a7..b66cd47 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
f2e8ea6a6fc157ced775250ea7a5a509 sblim-gather-2.2.7.tar.bz2
+895eb5351e79a7676b0ad19b37e96f59 missing-providers.tgz
More information about the scm-commits
mailing list