From 186dfa02b25b79e3bb9035fee0af52161977ddc0 Mon Sep 17 00:00:00 2001 From: vcrhonek Date: Thu, 22 Oct 2009 10:40:38 +0000 Subject: [PATCH] Initial import (#469002). --- .cvsignore | 1 + gather-config.h | 30 +++++++ gather-config.h.prepend | 7 ++ import.log | 1 + sblim-gather.spec | 185 ++++++++++++++++++++++++++++++++++++++++ sources | 1 + 6 files changed, 225 insertions(+) create mode 100644 gather-config.h create mode 100644 gather-config.h.prepend create mode 100644 import.log create mode 100644 sblim-gather.spec diff --git a/.cvsignore b/.cvsignore index e69de29..6934f49 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +sblim-gather-2.1.9.tar.bz2 diff --git a/gather-config.h b/gather-config.h new file mode 100644 index 0000000..59a1f4f --- /dev/null +++ b/gather-config.h @@ -0,0 +1,30 @@ +/* This file is here to prevent a file conflict on multiarch systems. A + * conflict will frequently occur because arch-specific build-time + * configuration options are stored (and used, so they can't just be stripped + * out) in gather-config.h. The original gather-config.h has been renamed. + * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ + +#ifdef gather_config_multilib_redirection_h +#error "Do not define gather_config_multilib_redirection_h!" +#endif +#define gather_config_multilib_redirection_h + +#if defined(__i386__) +#include "sblim-gather-i386.h" +#elif defined(__ia64__) +#include "sblim-gather-ia64.h" +#elif defined(__powerpc64__) +#include "sblim-gather-ppc64.h" +#elif defined(__powerpc__) +#include "sblim-gather-ppc.h" +#elif defined(__s390x__) +#include "sblim-gather-s390x.h" +#elif defined(__s390__) +#include "sblim-gather-s390.h" +#elif defined(__x86_64__) +#include "sblim-gather-x86_64.h" +#else +#error "This sblim-gather-devel package does not work your architecture?" +#endif + +#undef gather_config_multilib_redirection_h diff --git a/gather-config.h.prepend b/gather-config.h.prepend new file mode 100644 index 0000000..99a374c --- /dev/null +++ b/gather-config.h.prepend @@ -0,0 +1,7 @@ +/* Prepended at sblim package build-time. Don't include this file directly, + * use "gather-config.h" instead. */ + +#ifndef gather_config_multilib_redirection_h +#error "Don't include this file directly, use instead!" +#endif + diff --git a/import.log b/import.log new file mode 100644 index 0000000..2102f45 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +sblim-gather-2_1_9-1_fc10:HEAD:sblim-gather-2.1.9-1.fc10.src.rpm:1256208013 diff --git a/sblim-gather.spec b/sblim-gather.spec new file mode 100644 index 0000000..364f306 --- /dev/null +++ b/sblim-gather.spec @@ -0,0 +1,185 @@ +%define sblim_testsuite_version 1.2.4 +%define provider_dir %{_libdir}/cmpi +%define tog_pegasus_version 2:2.6.1-1 + +Name: sblim-gather +Version: 2.1.9 +Release: 1%{?dist} +Summary: SBLIM Gatherer + +Group: Applications/System +License: CPL +URL: http://sourceforge.net/projects/sblim/ +Source0: http://downloads.sourceforge.net/project/sblim/%{name}/%{version}/%{name}-%{version}.tar.bz2 +Source1: gather-config.h.prepend +Source2: gather-config.h +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: sblim-cmpi-devel +BuildRequires: sblim-cmpi-base-devel +BuildRequires: tog-pegasus-devel >= %{tog_pegasus_version} +BuildRequires: libsysfs-devel +Requires: tog-pegasus >= %{tog_pegasus_version} + +%description +Standards Based Linux Instrumentation for Manageability +Performance Data Gatherer Base. +This package contains the agents and control programs for gathering +and providing performance data. + +%package provider +Summary: SBLIM Gatherer Provider +Group: Applications/System +BuildRequires: tog-pegasus-devel >= %{tog_pegasus_version} +Requires: %{name} = %{version}-%{release} +Requires: sblim-cmpi-base +Requires: tog-pegasus + +%description provider +The CIM (Common Information Model) Providers for the +SBLIM (Standards Based Linux Instrumentation for Manageability) +Gatherer. + +%package devel +Summary: SBLIM Gatherer Development Support +Group: Development/Libraries +BuildRequires: tog-pegasus-devel >= %{tog_pegasus_version} +Requires: %{name} = %{version}-%{release} +Requires: tog-pegasus + +%description devel +This package is needed to develop new plugins for the +SBLIM (Standards Based Linux Instrumentation for Manageability) +Gatherer. + +%package test +Summary: SBLIM Gatherer Testcase Files +Group: Applications/System +BuildRequires: tog-pegasus-devel >= %{tog_pegasus_version} +Requires: %{name}-provider = %{version}-%{release} +Requires: sblim-testsuite +Requires: tog-pegasus + +%description test +Gatherer Testcase Files for the +SBLIM (Standards Based Linux Instrumentation for Manageability) +Testsuite + +%prep +%setup -q + +%build +%ifarch s390 s390x ppc ppc64 +export CFLAGS="$RPM_OPT_FLAGS -fsigned-char" +%else +export CFLAGS="$RPM_OPT_FLAGS" +%endif +%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite \ + CIMSERVER=pegasus \ + PROVIDERDIR=%{provider_dir} +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} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +# remove unused libtool files +rm -f $RPM_BUILD_ROOT/%{_libdir}/*a +rm -f $RPM_BUILD_ROOT/%{provider_dir}/*a +rm -f $RPM_BUILD_ROOT/%{_libdir}/gather/*plug/*a +# remove non-devel .so's from libdir +find $RPM_BUILD_ROOT/%{_libdir} -maxdepth 1 -name "*.so" ! -name libgatherutil.so \ + -exec rm {} \; + +# remove non-devel .so's from libdir +# copy extra docs +#mkdir -p $RPM_BUILD_ROOT/%{_datadir}/doc/%{name}-%{version} +#cp -fp README.{OpenPegasus,RedHat} $RPM_BUILD_ROOT/%{_datadir}/doc/%{name}-%{version}/ +# Install a redirection so that the arch-specific autoconf stuff continues to +# work but doesn't create multilib conflicts. +cat %{SOURCE1} \ + $RPM_BUILD_ROOT/%{_includedir}/gather/gather-config.h > \ + $RPM_BUILD_ROOT/%{_includedir}/gather/gather-config-%{_arch}.h +chmod 644 $RPM_BUILD_ROOT/%{_includedir}/gather/gather-config.h +install -m644 %{SOURCE2} $RPM_BUILD_ROOT/%{_includedir}/gather/ + +# shared libraries +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/cmpi" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/*.conf +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf +%docdir %{_datadir}/doc/%{name}-%{version} +%{_bindir}/* +%{_sbindir}/* +%{_datadir}/doc/%{name}-%{version} +%{_localstatedir}/run/gather +%{_libdir}/lib[^O]*.so.* +%dir %{_libdir}/gather +%{_libdir}/gather/mplug +%{_libdir}/gather/rplug + +%files provider +%defattr(-,root,root,-) +%{_libdir}/gather/cplug +%{_libdir}/libOSBase*.so.* +#%{_libdir}/libOSBase_MetricUtil.so +%{_libdir}/cmpi +%{_datadir}/%{name} + +%files devel +%defattr(-,root,root,-) +%{_libdir}/lib[^O]*.so +%{_includedir}/gather + +%files test +%defattr(-,root,root,-) +%{_datadir}/sblim-testsuite/cim/Linux* +%{_datadir}/sblim-testsuite/system/linux/Linux* +%{_datadir}/sblim-testsuite/system/linux/gather-systemname.sh +%{_datadir}/sblim-testsuite/test-gather.sh + +%define 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 +%define 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 + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%pre provider +if [ $1 -gt 1 ] +then + %{_datadir}/%{name}/provider-register.sh -t pegasus -d \ + -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null 2>&1 || :; + # don't let registration failure when server not running fail upgrade! +fi + +%post provider +/sbin/ldconfig +if [ $1 -ge 1 ] +then + %{_datadir}/%{name}/provider-register.sh -t pegasus \ + -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null 2>&1 || :; + # don't let registration failure when server not running fail install! +fi + +%preun provider +# Deregister only if not upgrading +if [ $1 -eq 0 ] +then + %{_datadir}/%{name}/provider-register.sh -t pegasus -d \ + -r %{GATHER_REGISTRATION} -m %{GATHER_SCHEMA} > /dev/null 2>&1 || :; + # don't let registration failure when server not running fail erase! +fi + +%postun provider -p /sbin/ldconfig + +%changelog +* Tue Oct 13 2009 Vitezslav Crhonek - 2.1.9-1 +- Initial support diff --git a/sources b/sources index e69de29..3276ca2 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3f22f288b06fb39457300dee9d726376 sblim-gather-2.1.9.tar.bz2