Accepting request 125467 from Base:System

- Remove invalid cpan/PMDA manifest entry. 
- Update to pcp-3.6.4.
  + Fix build on s390x platform (thanks to Dan Horak)
  + Rethink order of PATH setting for pcp start scripts, to ensure
    binaries from other packages with names that conflict with pcp
    binaries are not found ahead of the same-named pcp binary. (forwarded request 125460 from dmdiss)

OBS-URL: https://build.opensuse.org/request/show/125467
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcp?expand=0&rev=25
This commit is contained in:
Stephan Kulow 2012-07-01 13:14:44 +00:00 committed by Git OBS Bridge
commit 597b496b88
9 changed files with 553 additions and 114 deletions

View File

@ -0,0 +1,46 @@
From 8ae41f7080de22383990ef477d28f148dfa403a7 Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@samba.org>
Date: Tue, 5 Jun 2012 17:01:28 +0200
Subject: [PATCH] build: append pcp sub-directory suffix
With the fix to correctly handle a --Xdir= configure arguments, a number
of PCP specific paths need a pcp/ suffix to match default (no --Xdir=)
paths.
---
configure.in | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
index 6b83469..e25a7cc 100644
--- a/configure.in
+++ b/configure.in
@@ -1553,6 +1553,8 @@ then
else
pcp_share_dir=/usr/pcp
fi
+else
+ pcp_share_dir=`eval echo $pcp_share_dir/pcp`
fi
AC_SUBST(pcp_share_dir)
@@ -1598,6 +1600,8 @@ then
else
pcp_var_dir=/usr
fi
+else
+ pcp_var_dir=`eval echo $pcp_var_dir/pcp`
fi
AC_SUBST(pcp_var_dir)
@@ -1852,6 +1856,8 @@ then
else
pcp_inc_dir=/usr/include/pcp
fi
+else
+ pcp_inc_dir=`eval echo $pcp_inc_dir/pcp`
fi
AC_SUBST(pcp_inc_dir)
--
1.7.1

View File

@ -0,0 +1,85 @@
From 70b76abe42aca1c968feb3bfe20b74c61cf05db6 Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Mon, 21 Nov 2011 18:40:36 +0100
Subject: [PATCH] build: fix configure path tests
This commit fixes pcp_(share|binadm|var|lib|man)_dir configure tests:
if test -z "`echo $pcp_share_dir | sed 's;/.*\$;;'`"
Currently all tests evaluate to true when absolute paths are supplied,
as sed replaces from the leading '/', rather than the end which appears
to be the intended purpose.
---
configure.in | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/configure.in b/configure.in
index 46e3f27..6b83469 100644
--- a/configure.in
+++ b/configure.in
@@ -1539,7 +1539,7 @@ AC_SUBST(pcp_etc_dir)
dnl shared PCP files (shareable for diskless)
pcp_share_dir=`eval echo $datadir`
pcp_share_dir=`eval echo $pcp_share_dir`
-if test -z "`echo $pcp_share_dir | sed 's;/.*\$;;'`"
+if test -z "`echo $pcp_share_dir | sed 's;/\s*\$;;'`"
then
if test $target_os = mingw
then
@@ -1559,7 +1559,7 @@ AC_SUBST(pcp_share_dir)
dnl private PCP executables
pcp_binadm_dir=`eval echo $libexecdir`
pcp_binadm_dir=`eval echo $pcp_binadm_dir`
-if test -z "`echo $pcp_binadm_dir | sed 's;/.*\$;;'`"
+if test -z "`echo $pcp_binadm_dir | sed 's;/\s*\$;;'`"
then
if test $target_distro = debian
then
@@ -1581,7 +1581,7 @@ AC_SUBST(pcp_binadm_dir)
dnl non-shared (i.e. system local) PCP files
pcp_var_dir=`eval echo $localstatedir`
pcp_var_dir=`eval echo $pcp_var_dir`
-if test -z "`echo $pcp_var_dir | sed 's;/.*\$;;'`"
+if test -z "`echo $pcp_var_dir | sed 's;/\s*\$;;'`"
then
if test $target_os = mingw
then
@@ -1654,7 +1654,7 @@ then
else
pcp_lib_dir=`eval echo $libdir`
pcp_lib_dir=`eval echo $pcp_lib_dir`
- if test -z "`echo $pcp_lib_dir | sed 's;/.*\$;;'`"
+ if test -z "`echo $pcp_lib_dir | sed 's;/\s*\$;;'`"
then
if test -d /usr/lib
then
@@ -1716,7 +1716,7 @@ need_old_tbl_header=false
man_header=
pcp_man_dir=`eval echo $mandir`
pcp_man_dir=`eval echo $pcp_man_dir`
-if test -z "`echo $pcp_man_dir | sed 's;/.*\$;;'`"
+if test -z "`echo $pcp_man_dir | sed 's;/\s*\$;;'`"
then
dnl some low risk defaults
if test $target_os = mingw
@@ -1827,7 +1827,7 @@ AC_SUBST(need_old_tbl_header)
dnl public binaries
pcp_bin_dir=`eval echo $bindir`
pcp_bin_dir=`eval echo $pcp_bin_dir`
-if test -z "`echo $pcp_bin_dir | sed 's;/.*\$;;'`"
+if test -z "`echo $pcp_bin_dir | sed 's;/\s*\$;;'`"
then
if test $target_os = mingw
then
@@ -1844,7 +1844,7 @@ AC_SUBST(pcp_bin_dir)
dnl include files
pcp_inc_dir=`eval echo $includedir`
pcp_inc_dir=`eval echo $pcp_inc_dir`
-if test -z "`echo $pcp_inc_dir | sed 's;/.*\$;;'`"
+if test -z "`echo $pcp_inc_dir | sed 's;/\s*\$;;'`"
then
if test $target_os = mingw
then
--
1.7.1

View File

@ -0,0 +1,36 @@
Index: pcp-3.6.4/src/cpan/PMDA/MANIFEST
===================================================================
--- pcp-3.6.4.orig/src/cpan/PMDA/MANIFEST
+++ pcp-3.6.4/src/cpan/PMDA/MANIFEST
@@ -9,4 +9,3 @@ local.h
local.c
test.pl
typemap
-META.yml Module meta-data (added by MakeMaker)
Index: pcp-3.6.4/src/cpan/LogImport/MANIFEST
===================================================================
--- pcp-3.6.4.orig/src/cpan/LogImport/MANIFEST
+++ pcp-3.6.4/src/cpan/LogImport/MANIFEST
@@ -5,4 +5,3 @@ MANIFEST
LogImport.pm
LogImport.xs
typemap
-META.yml Module meta-data (added by MakeMaker)
Index: pcp-3.6.4/src/cpan/LogSummary/MANIFEST
===================================================================
--- pcp-3.6.4.orig/src/cpan/LogSummary/MANIFEST
+++ pcp-3.6.4/src/cpan/LogSummary/MANIFEST
@@ -18,4 +18,3 @@ t/db/20081125.0
t/db/20081126.index
t/db/20081126.meta
t/db/20081126.0
-META.yml Module meta-data (added by MakeMaker)
Index: pcp-3.6.4/src/cpan/MMV/MANIFEST
===================================================================
--- pcp-3.6.4.orig/src/cpan/MMV/MANIFEST
+++ pcp-3.6.4/src/cpan/MMV/MANIFEST
@@ -7,4 +7,3 @@ MMV.xs
server.pl
test.pl
typemap
-META.yml Module meta-data (added by MakeMaker)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28808981cd3505da5ac723e1f7a6ad25ce47ae50012ada7624fa6f1eb91061c7
size 2440119

3
pcp-3.6.4-1.src.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac6de94daf87b4b514cc8abd71a758c22ab63a5bf7840bae19cabd6771543b23
size 2409400

View File

@ -1,3 +1,99 @@
-------------------------------------------------------------------
Mon Jun 18 11:01:29 UTC 2012 - ddiss@suse.com
- Remove invalid cpan/PMDA manifest entry.
-------------------------------------------------------------------
Fri Jun 15 14:59:26 UTC 2012 - ddiss@suse.com
- Update to pcp-3.6.4.
+ Fix build on s390x platform (thanks to Dan Horak)
+ Rethink order of PATH setting for pcp start scripts, to ensure
binaries from other packages with names that conflict with pcp
binaries are not found ahead of the same-named pcp binary.
-------------------------------------------------------------------
Wed Jun 6 12:49:13 UTC 2012 - ddiss@suse.com
- Use upstream spec file
- Update to pcp-3.6.3.
+ Revert initial attempt at getting configure --prefix option to
make sense for local developer PCP installations
+ Fix RPM changelog typo in in-tree spec file
+ Further work on Debian/kFreeBSD port (thanks to Robert Millan)
- Update to pcp-3.6.2.
+ Fix Debian builds on FreeBSD (missing header files)
+ Resolve Debian startup script (compat) lintian issue
+ Resolve FreeBSD kernel PMDA build issue with PCP not installed
in the build root already.
- Update to pcp-3.6.1.
+ Resolve final Mac OS X pthreads build issues
+ Debian packaging improvements for split pmlogger/pmcd scripts,
perl module pieces, and other lintian reported issues
+ Update the startup script dependencies for /var use
+ Support --prefix=... and --exec-prefix=... configure options
+ Relaxed the "are you running as root?" test in startup scripts
+ Win32 build updates and improvements
+ Cache /proc/stat file handle in Linux kernel agent to reduce
syscalls on the most commonly fetched metric subtree
- Update to pcp-3.6.0.
+ Thread-safe libpcp, including additional re-entrant and thread-safe
variants for some routines
+ Retire all asynchronous routines from libpcp
+ Retire all V1 protocols and services (archive format, PMAPI and
PMDA_INTERFACE)
+ PMNS moves to ASCII only (no binary PMNS)
+ Rework "init" scripts, splitting pcp into pmcd and pmlogger
+ Update elasticsearch PMDA to 0.19+, new transport and shard metrics
+ Updates to PMDA new event queueing interfaces for agents wishing to
export that class of performance data.
+ First round of Coverity cleanup fixes incorporated.
+ Initial version of the SNMP PMDA, thanks to Hamish Coleman.
+ Updates to postgres PMDA to export additional recovery metrics.
- Update to pcp-3.5.11.
+ Update FSF contact address in copyright notices to keep
rpmlint happy.
+ Fix instance domain checks in elasticsearch PMDA.
+ Make KVM PMDA to run as root once more (permissions issues).
+ Integration of pmlogger_daily with pmlogrewrite.
+ Fix pmlogger_merge corner case for empty archives.
- Update to pcp-3.5.10.
+ Support new 0.18+ elasticsearch metrics.
+ Fix handling of elasticsearch version metric cluster.
+ Fix trace PMDA build issues.
+ Fix some Win32 build issues.
+ Run with reduced privileges for more of the perl PMDAs.
+ Name Solaris load average metric consistently.
+ Small metric documentation tweaks for Solaris PMDA.
- Update to pcp-3.5.9.
+ Add rc script support for condrestart, and condrestart the pcp,
pmie and pmproxy services after an RPM install or upgrade.
+ Fix a bug where hinv.ndisk is incorrect if CLUSTER_PARTITIONS
hasn't yet been refreshed immediately following a restart.
+ Implementation of client event queueing logic for all PMDAs to
share (all PMDAs wishing to support event metrics, that is).
+ New manual pages for new PMDA event queueing interfaces.
+ PostgreSQL PMDA, supporting versions 9.0 and 9.1 (at least).
+ Reserved ID 111 for Samba Clustered Trivial Database PMDA.
+ Add perl interface to allow PMDAs to drop priveleges
+ Add an elasticsearch version metric.
+ Correct perl module type detection logic for 32/64-bit systems.
+ Small pmlogconf source and man page fixes.
+ Rework flex usage to resolve build warnings.
+ Make Darwin CPU metrics 64 bit.
+ Add (long) opaque key support to libpcp_pmda.
+ Add pmdaCacheStoreInst() routine to libpcp_pmda.
+ Added mssql PMDA for SQL server Dynamic Management View stats.
+ Add pmlogrewrite(1) to rewrite archives (fix inconsistencies).
+ Fix a cgroup option parsing error on consecutive fetch calls.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 13 10:51:49 UTC 2012 - coolo@suse.com Mon Feb 13 10:51:49 UTC 2012 - coolo@suse.com

327
pcp.spec
View File

@ -16,32 +16,64 @@
# #
Name: pcp
Version: 3.5.8
Release: 0
%define pcp_release 1
Summary: System-level performance monitoring and performance management Summary: System-level performance monitoring and performance management
License: GPL-2.0
Group: System/Monitoring Name: pcp
Version: 3.6.4
Release: 1
%define buildversion 1
%if "%{_vendor}" == "suse"
%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+
%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
License: %{license_gplv2}
Url: http://oss.sgi.com/projects/pcp Url: http://oss.sgi.com/projects/pcp
Source: %{name}-%{version}-%{pcp_release}.src.tar.gz Group: %{pcp_gr}
Requires: libpcp3 = %{version} Source0: ftp://oss.sgi.com/projects/pcp/download/pcp-%{version}-%{buildversion}.src.tar.gz
Requires: bash gawk sed grep fileutils findutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf bison flex ncurses-devel procps 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: fix_cpan_pmda_manifest.patch
%if "%{_vendor}" == "suse" %if "%{_vendor}" == "suse"
Requires: sysconfig cpp Requires: sysconfig cpp
%else %else
Requires: initscripts Requires: initscripts
BuildRequires: initscripts
%if (0%{?fedora} > 0)
AutoReq: no
%endif %endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build %endif
BuildRequires: autoconf Requires: bash gawk sed grep fileutils findutils
BuildRequires: bison Requires: %{lib_pkg} = %{version}
BuildRequires: flex
BuildRequires: ncurses-devel
BuildRequires: procps
BuildRequires: readline-devel
BuildRequires: perl(ExtUtils::MakeMaker)
Patch6: pcp-xenbuild.patch
Patch9: static_lib_perms.diff
%define _pmdasdir %{_localstatedir}/lib/pcp/pmdas %define _pmdasdir %{_localstatedir}/lib/pcp/pmdas
@ -54,41 +86,49 @@ the interesting performance data in a system, and allows client
applications to easily retrieve and process any subset of that data. applications to easily retrieve and process any subset of that data.
# #
# libpcp # pcp-libs
# #
%package -n libpcp3
%package -n %{lib_pkg}
License: %{license_lgplv2}
Group: %{lib_gr}
Summary: Performance Co-Pilot run-time libraries Summary: Performance Co-Pilot run-time libraries
License: LGPL-2.1+
Group: System/Libraries
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Obsoletes: pcp < 3.0 Conflicts: %{lib_pkg_conflict}
AutoReq: no AutoReq: no
%description -n libpcp3 %description -n %{lib_pkg}
Performance Co-Pilot (PCP) run-time libraries Performance Co-Pilot (PCP) run-time libraries
# #
# libpcp-devel # pcp-libs-devel
# #
%package -n libpcp-devel %package -n %{lib_devel_pkg}
License: %{license_gplv2}
Group: %{lib_devel_gr}
Summary: Performance Co-Pilot (PCP) development headers and documentation Summary: Performance Co-Pilot (PCP) development headers and documentation
License: GPL-2.0
Group: Development/Libraries/Other
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: libpcp3 = %{version} Requires: %{lib_pkg} = %{version}
Conflicts: %{lib_devel_pkg_conflict}
%if (0%{?fedora} > 0)
AutoReq: no
%endif
%description -n libpcp-devel %description -n %{lib_devel_pkg}
Performance Co-Pilot (PCP) headers, documentation and tools for development. Performance Co-Pilot (PCP) headers, documentation and tools for development.
# #
# perl-PCP-PMDA. This is the PCP agent perl binding. # perl-PCP-PMDA. This is the PCP agent perl binding.
# #
%package -n perl-PCP-PMDA %package -n perl-PCP-PMDA
License: %{license_gplv2}
Group: %{pcp_gr}
Summary: Performance Co-Pilot (PCP) Perl bindings and documentation Summary: Performance Co-Pilot (PCP) Perl bindings and documentation
License: GPL-2.0
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: pcp >= %{version} perl-base Requires: pcp >= %{version}
%if "%{_vendor}" == "suse"
Requires: perl-base
%endif
%description -n perl-PCP-PMDA %description -n perl-PCP-PMDA
The PCP::PMDA Perl module contains the language bindings for The PCP::PMDA Perl module contains the language bindings for
@ -101,11 +141,14 @@ an application, etc.
# perl-PCP-MMV # perl-PCP-MMV
# #
%package -n perl-PCP-MMV %package -n perl-PCP-MMV
License: %{license_gplv2}
Group: %{pcp_gr}
Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values
License: GPL-2.0
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: pcp >= %{version} perl-base Requires: pcp >= %{version}
%if "%{_vendor}" == "suse"
Requires: perl-base
%endif
%description -n perl-PCP-MMV %description -n perl-PCP-MMV
The PCP::MMV module contains the Perl language bindings for The PCP::MMV module contains the Perl language bindings for
@ -119,26 +162,32 @@ and analysis with pmchart, pmie, pmlogger and other PCP tools.
# perl-PCP-LogImport # perl-PCP-LogImport
# #
%package -n perl-PCP-LogImport %package -n perl-PCP-LogImport
Summary: Performance Co-Pilot Perl bindings for importing external data License: %{license_gplv2}
License: GPL-2.0 Group: %{pcp_gr}
Group: System/Monitoring Summary: Performance Co-Pilot Perl bindings for importing external archive data
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: pcp >= %{version} perl-base Requires: pcp >= %{version}
%if "%{_vendor}" == "suse"
Requires: perl-base
%endif
%description -n perl-PCP-LogImport %description -n perl-PCP-LogImport
The PCP::LogImport module contains the Perl language bindings for The PCP::LogImport module contains the Perl language bindings for
importing data in various 3rd party formats into PCP archives so importing data in various 3rd party formats into PCP archives so
they can be replayed with standard PCP monitoring tools. they can be replayed with standard PCP monitoring tools.
# #
# perl-PCP-LogSummary # perl-PCP-LogSummary
# #
%package -n perl-PCP-LogSummary %package -n perl-PCP-LogSummary
License: %{license_gplv2}
Group: %{pcp_gr}
Summary: Performance Co-Pilot Perl bindings for processing pmlogsummary output Summary: Performance Co-Pilot Perl bindings for processing pmlogsummary output
License: GPL-2.0
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: pcp >= %{version} perl-base Requires: pcp >= %{version}
%if "%{_vendor}" == "suse"
Requires: perl-base
%endif
%description -n perl-PCP-LogSummary %description -n perl-PCP-LogSummary
The PCP::LogSummary module provides a Perl module for using the The PCP::LogSummary module provides a Perl module for using the
@ -152,11 +201,11 @@ exporting this data into third-party tools (e.g. spreadsheets).
# pcp-import-sar2pcp # pcp-import-sar2pcp
# #
%package import-sar2pcp %package import-sar2pcp
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs
License: LGPL-2.1+
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: libpcp3 >= %{version} perl-PCP-LogImport >= %{version} sysstat Requires: %{lib_pkg} >= %{version} perl-PCP-LogImport >= %{version} sysstat
%description import-sar2pcp %description import-sar2pcp
Performance Co-Pilot (PCP) front-end tools for importing sar data Performance Co-Pilot (PCP) front-end tools for importing sar data
@ -166,11 +215,11 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
# pcp-import-iostat2pcp # pcp-import-iostat2pcp
# #
%package import-iostat2pcp %package import-iostat2pcp
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs
License: LGPL-2.1+
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: libpcp3 >= %{version} perl-PCP-LogImport >= %{version} sysstat Requires: %{lib_pkg} >= %{version} perl-PCP-LogImport >= %{version} sysstat
%description import-iostat2pcp %description import-iostat2pcp
Performance Co-Pilot (PCP) front-end tools for importing iostat data Performance Co-Pilot (PCP) front-end tools for importing iostat data
@ -180,11 +229,11 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
# pcp-import-sheet2pcp # pcp-import-sheet2pcp
# #
%package import-sheet2pcp %package import-sheet2pcp
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs
License: LGPL-2.1+
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: libpcp3 >= %{version} perl-PCP-LogImport >= %{version} sysstat Requires: %{lib_pkg} >= %{version} perl-PCP-LogImport >= %{version} sysstat
%description import-sheet2pcp %description import-sheet2pcp
Performance Co-Pilot (PCP) front-end tools for importing spreadsheet data Performance Co-Pilot (PCP) front-end tools for importing spreadsheet data
@ -194,11 +243,11 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
# pcp-import-mrtg2pcp # pcp-import-mrtg2pcp
# #
%package import-mrtg2pcp %package import-mrtg2pcp
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs
License: LGPL-2.1+
Group: System/Monitoring
Url: http://oss.sgi.com/projects/pcp/ Url: http://oss.sgi.com/projects/pcp/
Requires: libpcp3 >= %{version} perl-PCP-LogImport >= %{version} Requires: %{lib_pkg} >= %{version} perl-PCP-LogImport >= %{version}
%description import-mrtg2pcp %description import-mrtg2pcp
Performance Co-Pilot (PCP) front-end tools for importing MTRG data Performance Co-Pilot (PCP) front-end tools for importing MTRG data
@ -208,72 +257,132 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
%setup -q %setup -q
%patch6 %patch6
%patch9 %patch9
%patch10
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
autoconf autoconf
./configure --bindir=%{_bindir} \ %configure --localstatedir=/var/lib
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} && touch config.done
%clean %clean
[ ! -z "$DIST_ROOT" ] && rm -rf $DIST_ROOT
rm -Rf $RPM_BUILD_ROOT rm -Rf $RPM_BUILD_ROOT
%build %build
make default_pcp make default_pcp
%install %install
BACKDIR=`pwd`; rm -Rf $RPM_BUILD_ROOT
DIST_ROOT=$RPM_BUILD_ROOT export DIST_ROOT=$RPM_BUILD_ROOT
export DIST_ROOT
make install_pcp make install_pcp
# Fix stuff we do/don't want to ship # Fix stuff we do/don't want to ship
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/pcp
%if "%{_vendor}" == "suse"
# 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 # list of PMDAs in the base pkg
ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} | grep -vE 'simple|sample|trivial|txmon' |\ ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} | egrep -v 'simple|sample|trivial|txmon' |\
sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list
# bin and man1 files except those split out into sub packages # 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' |\ ls -1 $RPM_BUILD_ROOT/%{_bindir} | grep -v '2pcp' |\
sed -e 's#^#'%{_bindir}'\/#' >base_binfiles.list sed -e 's#^#'%{_bindir}'\/#' >base_binfiles.list
ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 | grep -v '2pcp' |\ ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 | grep -v '2pcp' |\
sed -e 's#^#'%{_mandir}'\/man1\/#' >base_man1files.list sed -e 's#^#'%{_mandir}'\/man1\/#' |\
sed -e 's#$#*#' >base_man1files.list
cat base_pmdas.list base_binfiles.list base_man1files.list > base_specialfiles.list cat base_pmdas.list base_binfiles.list base_man1files.list > base_specialfiles.list
# add /etc/init.d/X symlinks at /usr/sbin/rcX %if "%{_vendor}" == "suse"
%__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}"
done
%post
/sbin/ldconfig
%preun %preun
%{?stop_on_removal:%{stop_on_removal pcp pmproxy pmie}} %{?stop_on_removal:%{stop_on_removal pmlogger pmie pmproxy pmcd}}
%postun %postun
/sbin/ldconfig /sbin/ldconfig
%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}} %{?restart_on_update:%{restart_on_update pcp pmproxy pmie}}
%{?insserv_cleanup:%{insserv_cleanup}} %{?insserv_cleanup:%{insserv_cleanup}}
%post -n libpcp3 -p /sbin/ldconfig %post
/sbin/ldconfig
%postun -n libpcp3 -p /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 %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) %defattr(-,root,root)
# pcp_doc_dir should be derived from a configure option, currently it's not
%{_datadir}/doc/packages/pcp-%{version}
%if "%{_vendor}" == "suse"
%{_sbindir}/rc*
%endif
%ghost %dir %{_localstatedir}/run/pcp
%dir %{_pmdasdir} %dir %{_pmdasdir}
%dir %{_datadir}/pcp %dir %{_datadir}/pcp
%dir %{_localstatedir}/lib/pcp %dir %{_localstatedir}/lib/pcp
%dir %{_localstatedir}/lib/pcp/config %dir %{_localstatedir}/lib/pcp/config
%doc %{_datadir}/doc/packages/pcp-%{version}
%{_libexecdir}/pcp %{_libexecdir}/pcp
%{_datadir}/pcp/lib %{_datadir}/pcp/lib
%{_localstatedir}/log/pcp %{_localstatedir}/log/pcp
%{_localstatedir}/lib/pcp/pmns %{_localstatedir}/lib/pcp/pmns
%{_initrddir}/pcp %{_initrddir}/pcp
%{_initrddir}/pmcd
%{_initrddir}/pmlogger
%{_initrddir}/pmie %{_initrddir}/pmie
%{_initrddir}/pmproxy %{_initrddir}/pmproxy
%{_mandir}/man4/* %{_mandir}/man4/*
@ -290,12 +399,10 @@ done
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/crontab %config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/crontab
%config(noreplace) %{_localstatedir}/lib/pcp/config/pmproxy/pmproxy.options %config(noreplace) %{_localstatedir}/lib/pcp/config/pmproxy/pmproxy.options
%{_localstatedir}/lib/pcp/config/* %{_localstatedir}/lib/pcp/config/*
/usr/sbin/rcpcp
/usr/sbin/rcpmie
/usr/sbin/rcpmproxy
%files -n libpcp3 %files -n %{lib_pkg}
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/pcp %dir %{_includedir}/pcp
%{_includedir}/pcp/builddefs %{_includedir}/pcp/builddefs
%{_includedir}/pcp/buildrules %{_includedir}/pcp/buildrules
@ -307,8 +414,9 @@ done
%{_libdir}/libpcp_trace.so.2 %{_libdir}/libpcp_trace.so.2
%{_libdir}/libpcp_import.so.1 %{_libdir}/libpcp_import.so.1
%files -n libpcp-devel %files -n %{lib_devel_pkg}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libpcp.so %{_libdir}/libpcp.so
%{_libdir}/libpcp.so.2 %{_libdir}/libpcp.so.2
%{_libdir}/libpcp_gui.so %{_libdir}/libpcp_gui.so
@ -322,6 +430,9 @@ done
%{_mandir}/man3/*.3.gz %{_mandir}/man3/*.3.gz
%{_datadir}/pcp/demos %{_datadir}/pcp/demos
%{_datadir}/pcp/examples %{_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/simple
%{_localstatedir}/lib/pcp/pmdas/sample %{_localstatedir}/lib/pcp/pmdas/sample
%{_localstatedir}/lib/pcp/pmdas/trivial %{_localstatedir}/lib/pcp/pmdas/trivial
@ -347,40 +458,34 @@ done
%{_bindir}/mrtg2pcp %{_bindir}/mrtg2pcp
%{_mandir}/man1/mrtg2pcp.1.gz %{_mandir}/man1/mrtg2pcp.1.gz
%files -n perl-PCP-PMDA %files -n perl-PCP-PMDA -f perl-pcp-pmda.list
%defattr(-,root,root) %defattr(-,root,root)
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP %if "%{_vendor}" == "suse"
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/PMDA %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP/PMDA.pm %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/PMDA
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/PMDA/PMDA.so %endif
/usr/share/man/man3/PCP::PMDA.3pm.gz
%files -n perl-PCP-MMV %files -n perl-PCP-MMV -f perl-pcp-mmv.list
%defattr(-,root,root) %defattr(-,root,root)
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP %if "%{_vendor}" == "suse"
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/MMV %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP/MMV.pm %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/MMV
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP/server.pl %endif
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/MMV/MMV.so
/usr/share/man/man3/PCP::MMV.3pm.gz
%files -n perl-PCP-LogImport %files -n perl-PCP-LogImport -f perl-pcp-logimport.list
%defattr(-,root,root) %defattr(-,root,root)
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP %if "%{_vendor}" == "suse"
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
%dir /usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/LogImport %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP/LogImport.pm %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/LogImport
/usr/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/LogImport/LogImport.so %endif
/usr/share/man/man3/PCP::LogImport.3pm.gz
%files -n perl-PCP-LogSummary %files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list
%defattr(-,root,root) %defattr(-,root,root)
%dir /usr/lib/perl5/vendor_perl/*/PCP %if "%{_vendor}" == "suse"
/usr/lib/perl5/vendor_perl/*/PCP/LogSummary.pm %dir %{_prefix}/lib/perl5/vendor_perl/*/PCP
/usr/lib/perl5/vendor_perl/*/PCP/exceldemo.pl %endif
/usr/lib/perl5/vendor_perl/*/PCP/extract.pl
/usr/share/man/man3/PCP::LogSummary.3pm.gz
%changelog %changelog

32
pcp_legacy_init_lsb.patch Normal file
View File

@ -0,0 +1,32 @@
Index: src/pmcd/rc_pcp
===================================================================
--- src/pmcd/rc_pcp.orig
+++ src/pmcd/rc_pcp
@@ -31,12 +31,12 @@
# e.g. SuSE, where chkconfig is a perl script.
### BEGIN INIT INFO
# Provides: pcp
-# Required-Start:
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start:
-# Default-Stop:
+# Required-Start: $local_fs
+# Should-Start: $network $remote_fs $syslog $time
+# Required-Stop: $local_fs
+# Should-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
# Short-Description: Legacy control for PCP daemons
# Description: Legacy init script wrapper for the Performance Co-Pilot (PCP) daemons
### END INIT INFO
@@ -53,6 +53,8 @@ _usage()
echo "Usage: $pmprog [-v] {start|restart|condrestart|stop|status|reload|force-reload}"
}
+echo "The pcp init script is depricated, pmcd and pmlogger should be used instead"
+
case "$1" in
'start'|'restart'|'condrestart'|'reload'|'force-reload')

39
remove_cpan_rpaths.patch Normal file
View File

@ -0,0 +1,39 @@
Index: pcp-3.6.3/src/cpan/PMDA/Makefile.PL
===================================================================
--- pcp-3.6.3.orig/src/cpan/PMDA/Makefile.PL
+++ pcp-3.6.3/src/cpan/PMDA/Makefile.PL
@@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") {
else {
$ldfrom = "local.o PMDA.o";
$inc = "-I$ENV{PCP_TOPDIR}/src/include/pcp -I/usr/include/pcp";
- $libs = ["-L$ENV{PCP_TOPDIR}/src/libpcp_pmda/src -L$ENV{PCP_TOPDIR}/src/libpcp/src -lpcp_pmda -lpcp"];
+ $libs = ["-lpcp_pmda -lpcp"];
}
if ($ENV{TARGET_OS} eq "darwin") {
# standard ones, minus -arch ppc
Index: pcp-3.6.3/src/cpan/LogImport/Makefile.PL
===================================================================
--- pcp-3.6.3.orig/src/cpan/LogImport/Makefile.PL
+++ pcp-3.6.3/src/cpan/LogImport/Makefile.PL
@@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") {
else {
$ldfrom = "LogImport.o",
$inc = "-I$ENV{PCP_TOPDIR}/src/include/pcp -I/usr/include/pcp";
- $libs = ["-L$ENV{PCP_TOPDIR}/src/libpcp/src -L$ENV{PCP_TOPDIR}/src/libpcp_import/src -lpcp_import -lpcp"];
+ $libs = ["-lpcp_import -lpcp"];
}
if ($ENV{TARGET_OS} eq "darwin") {
# standard ones, minus -arch ppc
Index: pcp-3.6.3/src/cpan/MMV/Makefile.PL
===================================================================
--- pcp-3.6.3.orig/src/cpan/MMV/Makefile.PL
+++ pcp-3.6.3/src/cpan/MMV/Makefile.PL
@@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") {
else {
$ldfrom = "MMV.o";
$inc = "-I$ENV{PCP_TOPDIR}/src/include/pcp -I/usr/include/pcp";
- $libs = ["-L$ENV{PCP_TOPDIR}/src/libpcp_mmv/src -L$ENV{PCP_TOPDIR}/src/libpcp/src -lpcp_mmv -lpcp"];
+ $libs = ["-lpcp_mmv -lpcp"];
}
if ($ENV{TARGET_OS} eq "darwin") {
# standard ones, minus -arch ppc