sblim-gather/sblim-gather.spec

391 lines
12 KiB
RPMSpec
Raw Normal View History

2011-03-24 12:30:51 +00:00
%global sblim_testsuite_version 1.2.4
%global provider_dir %{_libdir}/cmpi
2009-10-22 10:40:38 +00:00
Name: sblim-gather
Version: 2.2.9
Release: 6%{?dist}
2009-10-22 10:40:38 +00:00
Summary: SBLIM Gatherer
Group: Applications/System
2011-02-07 15:19:19 +00:00
License: EPL
2009-10-22 10:40:38 +00:00
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
2011-03-24 12:30:51 +00:00
Source3: sblim-gather.tmpfiles
Source4: missing-providers.tgz
Source5: gatherer.service
Source6: reposd.service
2011-03-24 12:30:51 +00:00
BuildRequires: sblim-cmpi-devel
BuildRequires: sblim-cmpi-base-devel
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
2013-08-28 11:14:11 +00:00
# Patch3: removes version from docdir
Patch3: sblim-gather-2.2.8-docdir.patch
# Patch4: fixes multilib conflicts
Patch4: sblim-gather-2.2.8-multilib.patch
# Patch5: use Pegasus root/interop instead of root/PG_Interop
Patch5: sblim-gather-2.2.9-pegasus-interop.patch
# Patch6: call systemctl in provider registration
Patch6: sblim-gather-2.2.9-prov-reg-sfcb-systemd.patch
# Patch7: remove conflicting assoc class Linux_MetricElementConformsToProfile
# from Linux_MetricProfile.mof (already included in Linux_Metric.mof)
Patch7: sblim-gather-2.2.9-remove-assoc-conflict.patch
2013-08-28 11:14:11 +00:00
Requires: cim-server
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2009-10-22 10:40:38 +00:00
%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
Requires: %{name} = %{version}-%{release}
Requires: sblim-cmpi-base
Requires: cim-server
2009-10-22 10:40:38 +00:00
%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
Requires: %{name} = %{version}-%{release}
Requires: cim-server
2009-10-22 10:40:38 +00:00
%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
Requires: %{name}-provider = %{version}-%{release}
Requires: sblim-testsuite
Requires: cim-server
2009-10-22 10:40:38 +00:00
%description test
Gatherer Testcase Files for the
SBLIM (Standards Based Linux Instrumentation for Manageability)
Testsuite
%prep
%setup -q
# for missing providers
tar xfvz %{SOURCE4}
%patch1 -p1 -b .missing_providers
%patch2 -p1 -b .typos
2013-08-28 11:14:11 +00:00
%patch3 -p1 -b .docdir
%patch4 -p1 -b .multilib
%patch5 -p1 -b .pegasus-interop
%patch6 -p1 -b .prov-reg-sfcb-systemd
%patch7 -p1 -b .remove-assoc-conflict
2009-10-22 10:40:38 +00:00
%build
%ifarch s390 s390x ppc ppc64
export CFLAGS="$RPM_OPT_FLAGS -fsigned-char -fno-strict-aliasing"
2009-10-22 10:40:38 +00:00
%else
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
2009-10-22 10:40:38 +00:00
%endif
%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite \
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}
# for missing providers
pushd missing-providers
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} ..
make %{?_smp_mflags}
popd
popd
2009-10-22 10:40:38 +00:00
%install
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
# 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/
2015-01-15 13:21:51 +00:00
mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir}
install -p -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_tmpfilesdir}/sblim-gather.conf
2011-03-24 12:30:51 +00:00
2009-10-22 10:40:38 +00:00
# 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
# for missing providers
make install/fast DESTDIR=$RPM_BUILD_ROOT -C missing-providers/%{_target_platform}
mkdir -p $RPM_BUILD_ROOT/var/lib/gather
# remove init script, install service files
rm $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/gatherer
mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}
install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_unitdir}/gatherer.service
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/reposd.service
2009-10-22 10:40:38 +00:00
%files
%config(noreplace) %{_sysconfdir}/*.conf
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%{_unitdir}/gatherer.service
%{_unitdir}/reposd.service
2013-08-28 11:14:11 +00:00
%docdir %{_datadir}/doc/%{name}
2009-10-22 10:40:38 +00:00
%{_bindir}/*
%{_sbindir}/*
2013-08-28 11:14:11 +00:00
%{_datadir}/doc/%{name}
2015-01-15 13:21:51 +00:00
%{_tmpfilesdir}/sblim-gather.conf
2011-03-24 12:30:51 +00:00
%ghost /var/run/gather
2009-10-22 10:40:38 +00:00
%{_libdir}/lib[^O]*.so.*
%dir %{_libdir}/gather
%{_libdir}/gather/mplug
%{_libdir}/gather/rplug
%{_mandir}/*/*
2009-10-22 10:40:38 +00:00
%files provider
%{_libdir}/gather/cplug
%{_libdir}/libOSBase_MetricUtil.so
2012-08-15 09:18:36 +00:00
%{_libdir}/libOSBase*.so.*
2009-10-22 10:40:38 +00:00
%{_libdir}/cmpi
%{_datadir}/%{name}
%dir /var/lib/gather
2009-10-22 10:40:38 +00:00
%files devel
%{_libdir}/lib[^O]*.so
%{_includedir}/gather
%files test
%{_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
%global GATHER_1ST_SCHEMA %{_datadir}/%{name}/Linux_Metric.mof %{_datadir}/%{name}/Linux_MetricProfile.mof
%global GATHER_1ST_REGISTRATION %{_datadir}/%{name}/Linux_Metric.registration %{_datadir}/%{name}/Linux_MetricProfile.registration
%global G_GLOB_IGNORE */Linux_Metric.*
%global SCHEMA %{_datadir}/%{name}/*.mof
%global REGISTRATION %{_datadir}/%{name}/*.registration
2009-10-22 10:40:38 +00:00
2011-03-24 12:30:51 +00:00
%post
install -d -m 0755 -o root -g root /var/run/gather
/sbin/ldconfig
%systemd_post gatherer.service
%systemd_post reposd.service
2011-03-24 12:30:51 +00:00
%preun
%systemd_preun gatherer.service
%systemd_preun reposd.service
2011-03-24 12:30:51 +00:00
if [ $1 -eq 0 ]; then
rm -rf /var/run/gather
rm -rf /var/lib/gather
2011-03-24 12:30:51 +00:00
fi
%postun
/sbin/ldconfig
%systemd_postun_with_restart gatherer.service
%systemd_postun_with_restart reposd.service
2009-10-22 10:40:38 +00:00
%pre provider
function unregister()
{
2009-10-22 10:40:38 +00:00
# don't let registration failure when server not running fail upgrade!
GLOBIGNORE=%{G_GLOB_IGNORE}
%{_datadir}/%{name}/provider-register.sh -v -d $1 -m %{SCHEMA} -r %{REGISTRATION} #> /dev/null 2>&1 || :;
%{_datadir}/%{name}/provider-register.sh -v -d $1 -m %{GATHER_1ST_SCHEMA} -r %{GATHER_1ST_REGISTRATION} #> /dev/null 2>&1 || :;
}
# if upgrading, deregister old version
if [ $1 -gt 1 ]; then
unregistered=no
if [ -e /usr/sbin/cimserver ]; then
unregister "-t pegasus";
unregistered=yes
fi
if [ -e /usr/sbin/sfcbd ]; then
unregister "-t sfcb";
unregistered=yes
fi
if [ "$unregistered" != yes ]; then
unregister
fi
2009-10-22 10:40:38 +00:00
fi
%post provider
function register()
{
2009-10-22 10:40:38 +00:00
# don't let registration failure when server not running fail install!
%{_datadir}/%{name}/provider-register.sh -v $1 -m %{GATHER_1ST_SCHEMA} -r %{GATHER_1ST_REGISTRATION} #> /dev/null 2>&1 || :;
GLOBIGNORE=%{G_GLOB_IGNORE}
%{_datadir}/%{name}/provider-register.sh -v $1 -m %{SCHEMA} -r %{REGISTRATION} #> /dev/null 2>&1 || :;
}
/sbin/ldconfig
if [ $1 -ge 1 ]; then
registered=no
if [ -e /usr/sbin/cimserver ]; then
register "-t pegasus";
registered=yes
fi
if [ -e /usr/sbin/sfcbd ]; then
register "-t sfcb";
registered=yes
fi
if [ "$registered" != yes ]; then
register
fi
2009-10-22 10:40:38 +00:00
fi
%preun provider
function unregister()
{
# don't let registration failure when server not running fail upgrade!
GLOBIGNORE=%{G_GLOB_IGNORE}
%{_datadir}/%{name}/provider-register.sh -v -d $1 -m %{SCHEMA} -r %{REGISTRATION} #> /dev/null 2>&1 || :;
%{_datadir}/%{name}/provider-register.sh -v -d $1 -m %{GATHER_1ST_SCHEMA} -r %{GATHER_1ST_REGISTRATION} #> /dev/null 2>&1 || :;
}
if [ $1 -eq 0 ]; then
unregistered=no
if [ -e /usr/sbin/cimserver ]; then
unregister "-t pegasus";
unregistered=yes
fi
if [ -e /usr/sbin/sfcbd ]; then
unregister "-t sfcb";
unregistered=yes
fi
if [ "$unregistered" != yes ]; then
unregister
fi
2009-10-22 10:40:38 +00:00
fi
%postun provider -p /sbin/ldconfig
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Mar 05 2015 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.9-3
- Update provider registration script to use systemctl to stop/start sfcb
- Fix registration/deregistration
- Require cim-server instead of tog-pegasus, don't BuildRequire tog-pegasus-devel
2015-01-15 13:21:51 +00:00
* Thu Jan 15 2015 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.9-2
- Fix packaging of tmpfiles
* Mon Oct 13 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.9-1
- Update to sblim-gather-2.2.9
- Use Pegasus root/interop instead of root/PG_Interop
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Mar 24 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.8-7
- Fix failing scriptlets when CIMOM is not running
2014-03-17 13:09:11 +00:00
* Mon Mar 17 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.8-6
- Fix multilib conflicts
* Tue Feb 04 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.8-5
- Fix sblim-gather FTBFS if "-Werror=format-security" flag is used
Resolves: #1037318
2013-08-28 11:14:11 +00:00
* Wed Aug 28 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.8-4
- Fix for unversioned docdir change
Resolves: #994086
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon May 06 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.8-2
- Add -fno-strict-aliasing
- Do not ship old init script, add systemd support
2013-03-18 15:13:24 +00:00
* Mon Mar 18 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.8-1
- Update to sblim-gather-2.2.8
* Wed Feb 27 2013 Roman Rakus <rrakus@redhat.com> - 2.2.7-3
- Fixed a typo
- Added missing providers
- improved providers registration
- Fixed owning of filesystem's directories (man)
* 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
* Tue Dec 04 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.7-1
- Update to sblim-gather-2.2.7
- Add man page BuildRequires, ship man pages
* Thu Sep 06 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.6-2
- Fix issues found by fedora-review utility in the spec file
2012-08-15 09:18:36 +00:00
* Wed Aug 15 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.6-1
- Update to sblim-gather-2.2.6
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-04-30 14:23:09 +00:00
* Mon Apr 30 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.5-1
- Update to sblim-gather-2.2.5
2012-01-04 09:15:41 +00:00
* Wed Jan 04 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.4-1
- Update to sblim-gather-2.2.4
2011-05-18 13:01:36 +00:00
* Wed May 18 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.3-1
- Update to sblim-gather-2.2.3
2011-03-24 12:30:51 +00:00
* Thu Mar 24 2011 Vitezlsav Crhonek <vcrhonek@redhat.com> - 2.2.2-3
- Use %%ghost for /var/run/gather
Resolves: #656686
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-02-07 15:19:19 +00:00
* Mon Feb 7 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.2-1
- Update to sblim-gather-2.2.2
* Mon Jun 7 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.1-2
- Fix broken dependency because of missing libOSBase_MetricUtil.so
2010-06-02 15:06:09 +00:00
* Wed Jun 2 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.1-1
- Update to sblim-gather-2.2.1
2009-10-22 10:40:38 +00:00
* Tue Oct 13 2009 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.1.9-1
- Initial support