cbb52a4c44
+ Fixes for security advisory CVE-2012-3418; (bnc#775009). + Workaround for security advisory CVE-2012-3419; (bnc#775010). + Fixes for security advisory CVE-2012-3420; (bnc#775011). + Fixes for security advisory CVE-2012-3421; (bnc#775013). OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=22
512 lines
15 KiB
RPMSpec
512 lines
15 KiB
RPMSpec
#
|
|
# spec file for package pcp
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Summary: System-level performance monitoring and performance management
|
|
License: GPL-2.0
|
|
Group: System/Monitoring
|
|
|
|
Name: pcp
|
|
Version: 3.6.5
|
|
Release: 0
|
|
%define buildversion 1
|
|
|
|
%if (0%{?suse_version} > 0)
|
|
%define pcp_gr System/Monitoring
|
|
%define lib_pkg libpcp3
|
|
%define lib_pkg_conflict pcp-libs
|
|
%define lib_gr System/Libraries
|
|
%define lib_devel_pkg libpcp-devel
|
|
%define lib_devel_pkg_conflict pcp-libs-devel
|
|
%define lib_devel_gr Development/Libraries/Other
|
|
%define license_gplv2 GPL-2.0
|
|
%define license_lgplv2 LGPL-2.0
|
|
%define license_lgplv2plus LGPL-2.1+
|
|
%define perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!")
|
|
%else
|
|
%define pcp_gr Applications/System
|
|
%define lib_pkg pcp-libs
|
|
%define lib_pkg_conflict libpcp3
|
|
%define lib_gr Applications/System
|
|
%define lib_devel_pkg pcp-libs-devel
|
|
%define lib_devel_pkg_conflict libpcp-devel
|
|
%define lib_devel_gr Applications/System
|
|
%define license_gplv2 GPLv2
|
|
%define license_lgplv2 LGPLv2
|
|
%define license_lgplv2plus LGPLv2+
|
|
%endif
|
|
|
|
Url: http://oss.sgi.com/projects/pcp
|
|
Source0: ftp://oss.sgi.com/projects/pcp/download/pcp-%{version}-%{buildversion}.src.tar.gz
|
|
Source1: pcp-rpmlintrc
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: autoconf
|
|
BuildRequires: bison
|
|
BuildRequires: flex
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: procps
|
|
BuildRequires: readline-devel
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
Patch6: pcp-xenbuild.patch
|
|
Patch9: static_lib_perms.diff
|
|
Patch10: pcp_legacy_init_lsb.patch
|
|
Patch11: fix_configure_path_tests.patch
|
|
Patch12: configure_append_pcp_subdir.patch
|
|
Patch13: remove_cpan_rpaths.patch
|
|
Patch14: rm_init_script_runlevel_4.patch
|
|
|
|
%if (0%{?suse_version} > 0)
|
|
Requires: cpp
|
|
Requires: sysconfig
|
|
%else
|
|
Requires: initscripts
|
|
BuildRequires: initscripts
|
|
%if (0%{?fedora} > 0)
|
|
AutoReq: no
|
|
%endif
|
|
%endif
|
|
Requires: %{lib_pkg} = %{version}
|
|
Requires: bash
|
|
Requires: fileutils
|
|
Requires: findutils
|
|
Requires: gawk
|
|
Requires: grep
|
|
Requires: sed
|
|
|
|
%define _pmdasdir %{_localstatedir}/lib/pcp/pmdas
|
|
|
|
%description
|
|
Performance Co-Pilot (PCP) provides a framework and services to support
|
|
system-level performance monitoring and performance management.
|
|
|
|
The PCP open source release provides a unifying abstraction for all of
|
|
the interesting performance data in a system, and allows client
|
|
applications to easily retrieve and process any subset of that data.
|
|
|
|
#
|
|
# pcp-libs
|
|
#
|
|
|
|
%package -n %{lib_pkg}
|
|
Summary: Performance Co-Pilot run-time libraries
|
|
License: %{license_lgplv2}
|
|
Group: %{lib_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Conflicts: %{lib_pkg_conflict}
|
|
AutoReq: no
|
|
|
|
%description -n %{lib_pkg}
|
|
Performance Co-Pilot (PCP) run-time libraries
|
|
|
|
#
|
|
# pcp-libs-devel
|
|
#
|
|
%package -n %{lib_devel_pkg}
|
|
Summary: Performance Co-Pilot (PCP) development headers and documentation
|
|
License: %{license_gplv2}
|
|
Group: %{lib_devel_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: %{lib_pkg} = %{version}
|
|
Conflicts: %{lib_devel_pkg_conflict}
|
|
%if (0%{?fedora} > 0)
|
|
AutoReq: no
|
|
%endif
|
|
|
|
%description -n %{lib_devel_pkg}
|
|
Performance Co-Pilot (PCP) headers, documentation and tools for development.
|
|
|
|
#
|
|
# perl-PCP-PMDA. This is the PCP agent perl binding.
|
|
#
|
|
%package -n perl-PCP-PMDA
|
|
Summary: Performance Co-Pilot (PCP) Perl bindings and documentation
|
|
License: %{license_gplv2}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: pcp >= %{version}
|
|
%if (0%{?suse_version} > 0)
|
|
Requires: perl = %{perl_version}
|
|
%endif
|
|
|
|
%description -n perl-PCP-PMDA
|
|
The PCP::PMDA Perl module contains the language bindings for
|
|
building Performance Metric Domain Agents (PMDAs) using Perl.
|
|
Each PMDA exports performance data for one specific domain, for
|
|
example the operating system kernel, Cisco routers, a database,
|
|
an application, etc.
|
|
|
|
#
|
|
# perl-PCP-MMV
|
|
#
|
|
%package -n perl-PCP-MMV
|
|
Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values
|
|
License: %{license_gplv2}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: pcp >= %{version}
|
|
%if (0%{?suse_version} > 0)
|
|
Requires: perl = %{perl_version}
|
|
%endif
|
|
|
|
%description -n perl-PCP-MMV
|
|
The PCP::MMV module contains the Perl language bindings for
|
|
building scripts instrumented with the Performance Co-Pilot
|
|
(PCP) Memory Mapped Value (MMV) mechanism.
|
|
This mechanism allows arbitrary values to be exported from an
|
|
instrumented script into the PCP infrastructure for monitoring
|
|
and analysis with pmchart, pmie, pmlogger and other PCP tools.
|
|
|
|
#
|
|
# perl-PCP-LogImport
|
|
#
|
|
%package -n perl-PCP-LogImport
|
|
Summary: Performance Co-Pilot Perl bindings for importing external archive data
|
|
License: %{license_gplv2}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: pcp >= %{version}
|
|
%if (0%{?suse_version} > 0)
|
|
Requires: perl = %{perl_version}
|
|
%endif
|
|
|
|
%description -n perl-PCP-LogImport
|
|
The PCP::LogImport module contains the Perl language bindings for
|
|
importing data in various 3rd party formats into PCP archives so
|
|
they can be replayed with standard PCP monitoring tools.
|
|
|
|
#
|
|
# perl-PCP-LogSummary
|
|
#
|
|
%package -n perl-PCP-LogSummary
|
|
Summary: Performance Co-Pilot Perl bindings for processing pmlogsummary output
|
|
License: %{license_gplv2}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: pcp >= %{version}
|
|
%if (0%{?suse_version} > 0)
|
|
Requires: perl = %{perl_version}
|
|
%endif
|
|
|
|
%description -n perl-PCP-LogSummary
|
|
The PCP::LogSummary module provides a Perl module for using the
|
|
statistical summary data produced by the Performance Co-Pilot
|
|
pmlogsummary utility. This utility produces various averages,
|
|
minima, maxima, and other calculations based on the performance
|
|
data stored in a PCP archive. The Perl interface is ideal for
|
|
exporting this data into third-party tools (e.g. spreadsheets).
|
|
|
|
#
|
|
# pcp-import-sar2pcp
|
|
#
|
|
%package import-sar2pcp
|
|
Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs
|
|
License: %{license_lgplv2plus}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: %{lib_pkg} >= %{version}
|
|
Requires: perl-PCP-LogImport >= %{version}
|
|
Requires: sysstat
|
|
|
|
%description import-sar2pcp
|
|
Performance Co-Pilot (PCP) front-end tools for importing sar data
|
|
into standard PCP archive logs for replay with any PCP monitoring tool.
|
|
|
|
#
|
|
# pcp-import-iostat2pcp
|
|
#
|
|
%package import-iostat2pcp
|
|
Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs
|
|
License: %{license_lgplv2plus}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: %{lib_pkg} >= %{version}
|
|
Requires: perl-PCP-LogImport >= %{version}
|
|
Requires: sysstat
|
|
|
|
%description import-iostat2pcp
|
|
Performance Co-Pilot (PCP) front-end tools for importing iostat data
|
|
into standard PCP archive logs for replay with any PCP monitoring tool.
|
|
|
|
#
|
|
# pcp-import-sheet2pcp
|
|
#
|
|
%package import-sheet2pcp
|
|
Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs
|
|
License: %{license_lgplv2plus}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: %{lib_pkg} >= %{version}
|
|
Requires: perl-PCP-LogImport >= %{version}
|
|
Requires: sysstat
|
|
|
|
%description import-sheet2pcp
|
|
Performance Co-Pilot (PCP) front-end tools for importing spreadsheet data
|
|
into standard PCP archive logs for replay with any PCP monitoring tool.
|
|
|
|
#
|
|
# pcp-import-mrtg2pcp
|
|
#
|
|
%package import-mrtg2pcp
|
|
Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs
|
|
License: %{license_lgplv2plus}
|
|
Group: %{pcp_gr}
|
|
Url: http://oss.sgi.com/projects/pcp/
|
|
Requires: %{lib_pkg} >= %{version}
|
|
Requires: perl-PCP-LogImport >= %{version}
|
|
|
|
%description import-mrtg2pcp
|
|
Performance Co-Pilot (PCP) front-end tools for importing MTRG data
|
|
into standard PCP archive logs for replay with any PCP monitoring tool.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch6
|
|
%patch9
|
|
%patch10
|
|
%patch11 -p1
|
|
%patch12 -p1
|
|
%patch13 -p1
|
|
%patch14 -p1
|
|
autoconf
|
|
%configure --localstatedir=/var/lib
|
|
|
|
%clean
|
|
rm -Rf $RPM_BUILD_ROOT
|
|
|
|
%build
|
|
make default_pcp
|
|
|
|
%install
|
|
export DIST_ROOT=$RPM_BUILD_ROOT
|
|
make install_pcp
|
|
|
|
# Fix stuff we do/don't want to ship
|
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
|
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/pcp
|
|
|
|
%if (0%{?suse_version} > 0)
|
|
# add /etc/init.d/X symlinks at /usr/sbin/rcX
|
|
%__install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sbindir}
|
|
for script in pcp pmie pmproxy pmlogger pmcd; do
|
|
ln -s "%{_sysconfdir}/init.d/${script}" "${RPM_BUILD_ROOT}/%{_sbindir}/rc${script}"
|
|
done
|
|
%else
|
|
# default chkconfig off for Fedora and RHEL
|
|
for f in $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/{pcp,pmie,pmproxy}; do
|
|
sed -i -e '/^# chkconfig/s/:.*$/: - 95 05/' -e '/^# Default-Start:/s/:.*$/:/' $f
|
|
done
|
|
%endif
|
|
|
|
# list of PMDAs in the base pkg
|
|
ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} | egrep -v 'simple|sample|trivial|txmon' |\
|
|
sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list
|
|
|
|
# bin and man1 files except those split out into sub packages
|
|
# man pages are transparently compressed so append a '*' suffix
|
|
ls -1 $RPM_BUILD_ROOT/%{_bindir} | grep -v '2pcp' |\
|
|
sed -e 's#^#'%{_bindir}'\/#' >base_binfiles.list
|
|
ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 | grep -v '2pcp' |\
|
|
sed -e 's#^#'%{_mandir}'\/man1\/#' |\
|
|
sed -e 's#$#*#' >base_man1files.list
|
|
|
|
cat base_pmdas.list base_binfiles.list base_man1files.list > base_specialfiles.list
|
|
|
|
%if (0%{?suse_version} > 0)
|
|
|
|
%preun
|
|
%{?stop_on_removal:%{stop_on_removal pmlogger pmie pmproxy pmcd}}
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}}
|
|
%{?insserv_cleanup:%{insserv_cleanup}}
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
|
|
%else
|
|
|
|
%preun
|
|
if [ "$1" -eq 0 ]
|
|
then
|
|
#
|
|
# Stop daemons before erasing the package
|
|
#
|
|
/sbin/service pmlogger stop >/dev/null 2>&1
|
|
/sbin/service pmie stop >/dev/null 2>&1
|
|
/sbin/service pmproxy stop >/dev/null 2>&1
|
|
/sbin/service pcp stop >/dev/null 2>&1
|
|
/sbin/service pmcd stop >/dev/null 2>&1
|
|
|
|
/sbin/chkconfig --del pcp >/dev/null 2>&1
|
|
/sbin/chkconfig --del pmcd >/dev/null 2>&1
|
|
/sbin/chkconfig --del pmlogger >/dev/null 2>&1
|
|
/sbin/chkconfig --del pmie >/dev/null 2>&1
|
|
/sbin/chkconfig --del pmproxy >/dev/null 2>&1
|
|
fi
|
|
|
|
%post
|
|
/sbin/chkconfig --add pmcd >/dev/null 2>&1
|
|
/sbin/service pmcd condrestart
|
|
/sbin/chkconfig --add pmlogger >/dev/null 2>&1
|
|
/sbin/service pmlogger condrestart
|
|
/sbin/chkconfig --add pmie >/dev/null 2>&1
|
|
/sbin/service pmie condrestart
|
|
/sbin/chkconfig --add pmproxy >/dev/null 2>&1
|
|
/sbin/service pmproxy condrestart
|
|
|
|
%endif
|
|
|
|
%post -n %{lib_pkg} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lib_pkg} -p /sbin/ldconfig
|
|
|
|
%files -f base_specialfiles.list
|
|
#
|
|
# Note: there are some headers (e.g. domain.h) and in a few cases some
|
|
# C source files that rpmlint complains about. These are not devel files,
|
|
# but rather they are (slightly obscure) PMDA config files.
|
|
#
|
|
%defattr(-,root,root)
|
|
# pcp_doc_dir should be derived from a configure option, currently it's not
|
|
%{_datadir}/doc/packages/pcp-%{version}
|
|
%if (0%{?suse_version} > 0)
|
|
%{_sbindir}/rc*
|
|
%endif
|
|
|
|
%ghost %dir %{_localstatedir}/run/pcp
|
|
%dir %{_pmdasdir}
|
|
%dir %{_datadir}/pcp
|
|
%dir %{_localstatedir}/lib/pcp
|
|
%dir %{_localstatedir}/lib/pcp/config
|
|
|
|
%{_libexecdir}/pcp
|
|
%{_datadir}/pcp/lib
|
|
%{_localstatedir}/log/pcp
|
|
%{_localstatedir}/lib/pcp/pmns
|
|
%{_initrddir}/pcp
|
|
%{_initrddir}/pmcd
|
|
%{_initrddir}/pmlogger
|
|
%{_initrddir}/pmie
|
|
%{_initrddir}/pmproxy
|
|
%{_mandir}/man4/*
|
|
%config %{_sysconfdir}/bash_completion.d/pcp
|
|
%config %{_sysconfdir}/pcp.env
|
|
%config %{_sysconfdir}/pcp.sh
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmcd/pmcd.conf
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmcd/pmcd.options
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmcd/rc.local
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmie/config.default
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmie/control
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmie/crontab
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/config.default
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/control
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/crontab
|
|
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmproxy/pmproxy.options
|
|
%{_localstatedir}/lib/pcp/config/*
|
|
|
|
%files -n %{lib_pkg}
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_includedir}/pcp
|
|
%{_includedir}/pcp/builddefs
|
|
%{_includedir}/pcp/buildrules
|
|
%config %{_sysconfdir}/pcp.conf
|
|
%{_libdir}/libpcp.so.3
|
|
%{_libdir}/libpcp_gui.so.2
|
|
%{_libdir}/libpcp_mmv.so.1
|
|
%{_libdir}/libpcp_pmda.so.3
|
|
%{_libdir}/libpcp_trace.so.2
|
|
%{_libdir}/libpcp_import.so.1
|
|
|
|
%files -n %{lib_devel_pkg}
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libpcp.so
|
|
%{_libdir}/libpcp.so.2
|
|
%{_libdir}/libpcp_gui.so
|
|
%{_libdir}/libpcp_gui.so.1
|
|
%{_libdir}/libpcp_mmv.so
|
|
%{_libdir}/libpcp_pmda.so
|
|
%{_libdir}/libpcp_pmda.so.2
|
|
%{_libdir}/libpcp_trace.so
|
|
%{_libdir}/libpcp_import.so
|
|
%{_includedir}/pcp/*.h
|
|
%{_mandir}/man3/*.3.gz
|
|
%{_datadir}/pcp/demos
|
|
%{_datadir}/pcp/examples
|
|
|
|
# PMDAs that ship src and are not for production use
|
|
# straight out-of-the-box, for devel or QA use only.
|
|
%{_localstatedir}/lib/pcp/pmdas/simple
|
|
%{_localstatedir}/lib/pcp/pmdas/sample
|
|
%{_localstatedir}/lib/pcp/pmdas/trivial
|
|
%{_localstatedir}/lib/pcp/pmdas/txmon
|
|
|
|
%files import-sar2pcp
|
|
%defattr(-,root,root)
|
|
%{_bindir}/sar2pcp
|
|
%{_mandir}/man1/sar2pcp.1.gz
|
|
|
|
%files import-iostat2pcp
|
|
%defattr(-,root,root)
|
|
%{_bindir}/iostat2pcp
|
|
%{_mandir}/man1/iostat2pcp.1.gz
|
|
|
|
%files import-sheet2pcp
|
|
%defattr(-,root,root)
|
|
%{_bindir}/sheet2pcp
|
|
%{_mandir}/man1/sheet2pcp.1.gz
|
|
|
|
%files import-mrtg2pcp
|
|
%defattr(-,root,root)
|
|
%{_bindir}/mrtg2pcp
|
|
%{_mandir}/man1/mrtg2pcp.1.gz
|
|
|
|
%files -n perl-PCP-PMDA -f perl-pcp-pmda.list
|
|
%defattr(-,root,root)
|
|
%if (0%{?suse_version} > 0)
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/PMDA
|
|
%endif
|
|
|
|
%files -n perl-PCP-MMV -f perl-pcp-mmv.list
|
|
%defattr(-,root,root)
|
|
%if (0%{?suse_version} > 0)
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/MMV
|
|
%endif
|
|
|
|
%files -n perl-PCP-LogImport -f perl-pcp-logimport.list
|
|
%defattr(-,root,root)
|
|
%if (0%{?suse_version} > 0)
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/LogImport
|
|
%endif
|
|
|
|
%files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list
|
|
%defattr(-,root,root)
|
|
%if (0%{?suse_version} > 0)
|
|
%dir %{_prefix}/lib/perl5/vendor_perl/*/PCP
|
|
%endif
|
|
|
|
%changelog
|