2007-01-16 00:29:21 +01:00
|
|
|
#
|
2011-08-15 15:03:00 +02:00
|
|
|
# spec file for package pcp
|
2007-01-16 00:29:21 +01:00
|
|
|
#
|
2011-08-15 15:03:00 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:29:21 +01:00
|
|
|
#
|
2008-08-29 03:00:23 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-01-16 00:29:21 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
Name: pcp
|
|
|
|
Version: 3.5.8
|
|
|
|
%define pcp_release 1
|
|
|
|
Release: %{pcp_release}
|
|
|
|
Summary: System-level performance monitoring and performance management
|
|
|
|
License: GPLv2
|
|
|
|
URL: http://oss.sgi.com/projects/pcp
|
|
|
|
Group: System/Monitoring
|
|
|
|
Source: %{name}-%{version}-%{pcp_release}.src.tar.gz
|
|
|
|
Distribution: suse
|
|
|
|
Requires: pcp-libs = %{version}
|
|
|
|
Requires: bash gawk sed grep fileutils findutils
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
Requires: sysconfig cpp
|
|
|
|
%else
|
|
|
|
Requires: initscripts
|
|
|
|
%endif
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
|
|
|
|
BuildRequires: procps autoconf bison flex ncurses-devel readline-devel
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
|
|
Patch6: pcp-xenbuild.patch
|
|
|
|
Patch9: static_lib_perms.diff
|
|
|
|
|
|
|
|
|
2008-08-29 03:00:23 +02:00
|
|
|
|
2007-01-16 00:29:21 +01:00
|
|
|
|
|
|
|
%description
|
2011-08-15 15:03:00 +02:00
|
|
|
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.
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
#
|
|
|
|
# pcp-libs
|
|
|
|
#
|
|
|
|
%package libs
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Libraries
|
|
|
|
Summary: Performance Co-Pilot run-time libraries
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Obsoletes: pcp < 3.0
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
%description libs
|
|
|
|
Performance Co-Pilot (PCP) run-time libraries
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
#
|
|
|
|
# pcp-libs-dvel
|
|
|
|
#
|
|
|
|
%package libs-devel
|
|
|
|
License: GPLv2
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Summary: Performance Co-Pilot (PCP) development headers and documentation
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp-libs = %{version}
|
2007-07-13 18:56:33 +02:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
%description libs-devel
|
|
|
|
Performance Co-Pilot (PCP) headers, documentation and tools for development.
|
2007-07-13 18:56:33 +02:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
#
|
|
|
|
# perl-PCP-PMDA. This is the PCP agent perl binding.
|
|
|
|
#
|
|
|
|
%package -n perl-PCP-PMDA
|
|
|
|
License: GPLv2
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot (PCP) Perl bindings and documentation
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp >= %{version} perl-base
|
2007-07-13 18:56:33 +02:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
%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.
|
2007-07-13 18:56:33 +02:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
#
|
|
|
|
# perl-PCP-MMV
|
|
|
|
#
|
|
|
|
%package -n perl-PCP-MMV
|
|
|
|
License: GPLv2
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp >= %{version} perl-base
|
|
|
|
|
|
|
|
%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
|
|
|
|
License: GPLv2
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot Perl bindings for importing external data
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp >= %{version} perl-base
|
|
|
|
|
|
|
|
%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
|
|
|
|
License: GPLv2
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot Perl bindings for processing pmlogsummary output
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp >= %{version} perl-base
|
2007-07-13 18:56:33 +02:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
%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
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp-libs >= %{version} perl-PCP-LogImport >= %{version} 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
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp-libs >= %{version} perl-PCP-LogImport >= %{version} 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
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp-libs >= %{version} perl-PCP-LogImport >= %{version} 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
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Monitoring
|
|
|
|
Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs
|
|
|
|
URL: http://oss.sgi.com/projects/pcp/
|
|
|
|
Requires: pcp-libs >= %{version} 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.
|
2007-01-16 00:29:21 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2008-11-06 18:27:12 +01:00
|
|
|
%patch6
|
2011-08-15 15:03:00 +02:00
|
|
|
%patch9
|
|
|
|
autoconf
|
|
|
|
./configure --bindir=%{_bindir} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--libexecdir=%{_libexecdir} && touch config.done
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ ! -z "$DIST_ROOT" ] && rm -rf $DIST_ROOT
|
|
|
|
rm -Rf $RPM_BUILD_ROOT
|
2007-01-16 00:29:21 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
/usr/bin/gmake default_pcp
|
|
|
|
|
|
|
|
%install
|
2011-08-15 15:03:00 +02:00
|
|
|
BACKDIR=`pwd`;
|
2007-01-16 00:29:21 +01:00
|
|
|
DIST_ROOT=$RPM_BUILD_ROOT
|
|
|
|
DIST_MANIFEST=`pwd`/install.manifest
|
|
|
|
export DIST_ROOT DIST_MANIFEST
|
|
|
|
rm -f $DIST_MANIFEST
|
|
|
|
/usr/bin/gmake install_pcp
|
2011-08-15 15:03:00 +02:00
|
|
|
|
2007-01-16 00:29:21 +01:00
|
|
|
set +x
|
2011-08-15 15:03:00 +02:00
|
|
|
PCP_CONF=$BACKDIR/src/include/pcp.conf
|
2007-01-16 00:29:21 +01:00
|
|
|
export PCP_CONF
|
2011-08-15 15:03:00 +02:00
|
|
|
. $BACKDIR/src/include/pcp.env
|
|
|
|
LIBFILELIST=`ls -1 $BACKDIR/debian/*.{install,dirs} | fgrep -v -- -dev. | fgrep -v -- -import`
|
|
|
|
DEVFILELIST=`ls -1 $BACKDIR/debian/*-dev.{install,dirs}`
|
|
|
|
|
|
|
|
#
|
|
|
|
# Package split: pcp, pcp-libs, pcp-libs-devel, pcp-import-*
|
|
|
|
# -libs gets first pick, then libs-devel, then pcp-import-*
|
|
|
|
# The base package catches-all remaining.
|
|
|
|
#
|
|
|
|
sed -e 's/^/\//' $LIBFILELIST >libs_files
|
|
|
|
sed -e 's/^/\//' $DEVFILELIST >devel_files
|
|
|
|
%ifarch ia64 x86_64 ppc64
|
|
|
|
sed -i -e 's/usr\/lib\//usr\/lib64\//' libs_files
|
|
|
|
sed -i -e 's/usr\/lib\//usr\/lib64\//' devel_files
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# some special cases for devel
|
|
|
|
awk '{print $NF}' $DIST_MANIFEST |\
|
|
|
|
egrep 'pcp\/(examples|demos)|pmdas\/(sample|simple|trivial|txmon)' >>devel_files
|
|
|
|
|
|
|
|
#
|
|
|
|
# Patterns for files to be marked \%config(noreplace).
|
|
|
|
# Note: /etc/pcp.conf is \%config, but not noreplace
|
|
|
|
# and is treated specially below.
|
|
|
|
cat >conf_files <<EOFEOF
|
|
|
|
etc/pcp.env
|
|
|
|
pmcd/pmcd.conf
|
|
|
|
pmcd/pmcd.options
|
|
|
|
pmcd/rc.local
|
|
|
|
pmie/config.default
|
|
|
|
pmie/control
|
|
|
|
pmie/crontab
|
|
|
|
pmlogger/config.default
|
|
|
|
pmlogger/control
|
|
|
|
pmlogger/crontab
|
|
|
|
pmproxy/pmproxy.options
|
|
|
|
bash_completion.d/pcp
|
|
|
|
EOFEOF
|
|
|
|
|
|
|
|
#
|
|
|
|
# Files for the pcp-import subpackages. We use these sub-packages
|
|
|
|
# to isolate the (somwhat exotic) dependencies for these tools
|
|
|
|
awk '{print $NF}' $DIST_MANIFEST | egrep 'sar2pcp' >import_sar2pcp_files
|
|
|
|
awk '{print $NF}' $DIST_MANIFEST | egrep 'iostat2pcp' >import_iostat2pcp_files
|
|
|
|
awk '{print $NF}' $DIST_MANIFEST | egrep 'sheet2pcp' >import_sheet2pcp_files
|
|
|
|
awk '{print $NF}' $DIST_MANIFEST | egrep 'mrtg2pcp' >import_mrtg2pcp_files
|
|
|
|
|
|
|
|
rm -f devel_files.rpm libs_files.rpm base_files.rpm import_*_files.rpm
|
|
|
|
sort -u $DIST_MANIFEST | $PCP_AWK_PROG '
|
|
|
|
BEGIN {
|
|
|
|
while( getline < "libs_files") lib[$0]=1;
|
|
|
|
while( getline < "devel_files") dev[$0]=1;
|
|
|
|
while( getline < "import_sar2pcp_files") import_sar2pcp[$0]=1;
|
|
|
|
while( getline < "import_iostat2pcp_files") import_iostat2pcp[$0]=1;
|
|
|
|
while( getline < "import_sheet2pcp_files") import_sheet2pcp[$0]=1;
|
|
|
|
while( getline < "import_mrtg2pcp_files") import_mrtg2pcp[$0]=1;
|
|
|
|
while( getline < "conf_files") conf[nconf++]=$0;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
if (lib[$NF]) f="libs_files.rpm";
|
|
|
|
else if (dev[$NF]) f="devel_files.rpm";
|
|
|
|
else if (import_sar2pcp[$NF]) f="import_sar2pcp_files.rpm";
|
|
|
|
else if (import_iostat2pcp[$NF]) f="import_iostat2pcp_files.rpm";
|
|
|
|
else if (import_sheet2pcp[$NF]) f="import_sheet2pcp_files.rpm";
|
|
|
|
else if (import_mrtg2pcp[$NF]) f="import_mrtg2pcp_files.rpm";
|
|
|
|
else f="base_files.rpm"
|
|
|
|
}
|
|
|
|
$1 == "d" { printf ("%%%%dir %%%%attr(%s,root,root) %s\n", $2, $5) >> f }
|
|
|
|
|
|
|
|
$1 == "f" && $6 ~ "etc/pcp.conf" { printf ("%%%%config ") >> f; }
|
|
|
|
$1 == "f" {
|
|
|
|
for (i=0; i < nconf; i++) {
|
|
|
|
if ($6 ~ conf[i]) {
|
|
|
|
printf ("%%%%config(noreplace) ") >> f;
|
|
|
|
break;
|
|
|
|
}
|
2007-01-16 00:29:21 +01:00
|
|
|
}
|
|
|
|
if (match ($6, "'$PCP_MAN_DIR'") || match ($6, "'$PCP_DOC_DIR'")) {
|
2011-08-15 15:03:00 +02:00
|
|
|
printf ("%%%%doc ") >> f;
|
2007-01-16 00:29:21 +01:00
|
|
|
}
|
2011-08-15 15:03:00 +02:00
|
|
|
printf ("%%%%attr(%s,root,root) %s\n", $2, $6) >> f }
|
|
|
|
$1 == "l" { print "%attr(0777,root,root)", $3 >> f }'
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
# add /etc/init.d/X symlinks at /usr/sbin/rcX
|
|
|
|
%__install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sbindir}
|
|
|
|
for script in pcp pmie pmproxy; do
|
|
|
|
ln -s "%{_sysconfdir}/init.d/${script}" "${RPM_BUILD_ROOT}/%{_sbindir}/rc${script}"
|
|
|
|
echo "%{_sbindir}/rc${script}" >> base_files.rpm
|
|
|
|
done
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
set -x
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2007-07-13 18:56:33 +02:00
|
|
|
|
2007-01-16 00:29:21 +01:00
|
|
|
%preun
|
2011-08-15 15:03:00 +02:00
|
|
|
%{?stop_on_removal:%{stop_on_removal pcp pmproxy pmie}}
|
2007-01-16 00:29:21 +01:00
|
|
|
|
|
|
|
%postun
|
2011-08-15 15:03:00 +02:00
|
|
|
/sbin/ldconfig
|
|
|
|
%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}}
|
|
|
|
%{?insserv_cleanup:%{insserv_cleanup}}
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2011-08-15 15:03:00 +02:00
|
|
|
%post libs -p /sbin/ldconfig
|
|
|
|
%postun libs -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -f base_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/lib*/pcp
|
|
|
|
%dir /var/lib/pcp/config/pmlogconf
|
|
|
|
|
|
|
|
%files libs -f libs_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files libs-devel -f devel_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files import-sar2pcp -f import_sar2pcp_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files import-iostat2pcp -f import_iostat2pcp_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files import-sheet2pcp -f import_sheet2pcp_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files import-mrtg2pcp -f import_mrtg2pcp_files.rpm
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files -n perl-PCP-PMDA -f perl-pcp-pmda.list
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/PCP
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/auto/PCP
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/auto/PCP/PMDA
|
|
|
|
|
|
|
|
%files -n perl-PCP-MMV -f perl-pcp-mmv.list
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/PCP
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/auto/PCP
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/auto/PCP/MMV
|
|
|
|
|
|
|
|
%files -n perl-PCP-LogImport -f perl-pcp-logimport.list
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/PCP
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/auto/PCP
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi/auto/PCP/LogImport
|
|
|
|
|
|
|
|
%files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/lib/perl5/vendor_perl/*/PCP
|
2007-01-16 00:29:21 +01:00
|
|
|
|
2007-03-30 02:09:35 +02:00
|
|
|
%changelog
|