Missing providers

Fixed a typo, addded missing providers and improved providers registration

Signed-off-by: Roman Rakus <rrakus@redhat.com>
This commit is contained in:
Roman Rakus 2013-03-04 13:03:42 +01:00
parent 1516c045fd
commit 0bed202402
5 changed files with 112 additions and 6 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -4,7 +4,7 @@
Name: sblim-gather
Version: 2.2.7
Release: 2%{?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@redhat.com> - 2.2.7-3
- Fixed a typo
- Added missing providers
- improved providers registration
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1 +1,2 @@
f2e8ea6a6fc157ced775250ea7a5a509 sblim-gather-2.2.7.tar.bz2
895eb5351e79a7676b0ad19b37e96f59 missing-providers.tgz