Update to latest community sources

This commit is contained in:
Nathan Scott 2014-09-05 14:40:42 +10:00
parent 641ffe7321
commit f4a642fbe9
3 changed files with 119 additions and 26 deletions

1
.gitignore vendored
View File

@ -33,3 +33,4 @@ pcp-3.3.3-1.src.tar.gz
/pcp-3.9.5.src.tar.gz
/pcp-3.9.7.src.tar.gz
/pcp-3.9.9.src.tar.gz
/pcp-3.9.10.src.tar.gz

142
pcp.spec
View File

@ -1,6 +1,6 @@
Summary: System-level performance monitoring and performance management
Name: pcp
Version: 3.9.9
Version: 3.9.10
%define buildversion 1
Release: %{buildversion}%{?dist}
@ -9,6 +9,7 @@ URL: http://www.performancecopilot.org
Group: Applications/System
Source0: pcp-%{version}.src.tar.gz
%define disable_papi 0
%define disable_microhttpd 0
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
%define disable_qt 0
@ -25,6 +26,9 @@ BuildRequires: python-devel
BuildRequires: ncurses-devel
BuildRequires: readline-devel
BuildRequires: cyrus-sasl-devel
%if !%{disable_papi}
BuildRequires: papi-devel
%endif
%if !%{disable_microhttpd}
BuildRequires: libmicrohttpd-devel
%endif
@ -72,6 +76,12 @@ Obsoletes: pcp-pmda-nvidia
%if 0%{?fedora} >= 20
%define _with_doc --with-docdir=%{_docdir}/%{name}
%endif
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%define _with_initd --with-rcdir=%{_initddir}
%define disable_systemd 0
%else
%define disable_systemd 1
%endif
# we never want Infiniband on s390 platforms
%ifarch s390 s390x
@ -91,6 +101,10 @@ Obsoletes: pcp-pmda-nvidia
%define _with_ib --with-infiniband=no
%endif
%if !%{disable_papi}
%define _with_papi --with-papi=yes
%endif
%if %{disable_qt}
%define _with_ib --with-qt=no
%endif
@ -254,7 +268,7 @@ 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
@ -333,6 +347,24 @@ Requires: pcp-libs = %{version}-%{release}
Performance Co-Pilot (PCP) front-end tools for importing collectl data
into standard PCP archive logs for replay with any PCP monitoring tool.
%if !%{disable_papi}
#
# pcp-pmda-papi
#
%package pmda-papi
License: GPLv2+
Group: Applications/System
Summary: Performance Co-Pilot (PCP) metrics for Performance API and hardware counters
URL: http://www.performancecopilot.org
Requires: pcp-libs = %{version}-%{release}
Requires: papi-devel
BuildRequires: papi-devel
%description pmda-papi
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting hardware counters statistics through PAPI (Performance API).
%endif
%if !%{disable_infiniband}
#
# pcp-pmda-infiniband
@ -413,7 +445,7 @@ PCP utilities and daemons, and the PCP graphical tools.
rm -Rf $RPM_BUILD_ROOT
%build
%configure --with-rcdir=%{_initddir} %{?_with_doc} %{?_with_ib} %{?_with_qt}
%configure %{?_with_initd} %{?_with_doc} %{?_with_ib} %{?_with_papi} %{?_with_qt}
make default_pcp
%install
@ -454,16 +486,19 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/pcp-gui
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop
%endif
%if %{disable_systemd}
# default chkconfig off for Fedora and RHEL
for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmmgr,pmproxy}; do
test -f "$f" || continue
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' |\
egrep -v '^ib$|infiniband' |\
egrep -v 'papi' |\
sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list
# all base pcp package files except those split out into sub packages
@ -559,33 +594,54 @@ exit 0
%preun webapi
if [ "$1" -eq 0 ]
then
%if !%{disable_systemd}
systemctl --no-reload disable pmwebd.service >/dev/null 2>&1
systemctl stop pmwebd.service >/dev/null 2>&1
%else
/sbin/service pmwebd stop >/dev/null 2>&1
/sbin/chkconfig --del pmwebd >/dev/null 2>&1
%endif
fi
%endif
%preun manager
if [ "$1" -eq 0 ]
then
%if !%{disable_systemd}
systemctl --no-reload disable pmmgr.service >/dev/null 2>&1
systemctl stop pmmgr.service >/dev/null 2>&1
%else
/sbin/service pmmgr stop >/dev/null 2>&1
/sbin/chkconfig --del pmmgr >/dev/null 2>&1
%endif
fi
%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 pmcd stop >/dev/null 2>&1
%if !%{disable_systemd}
systemctl --no-reload disable pmlogger.service >/dev/null 2>&1
systemctl --no-reload disable pmie.service >/dev/null 2>&1
systemctl --no-reload disable pmproxy.service >/dev/null 2>&1
systemctl --no-reload disable pmcd.service >/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
systemctl stop pmlogger.service >/dev/null 2>&1
systemctl stop pmie.service >/dev/null 2>&1
systemctl stop pmproxy.service >/dev/null 2>&1
systemctl stop pmcd.service >/dev/null 2>&1
%else
/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 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
%endif
# cleanup namespace state/flag, may still exist
PCP_PMNS_DIR=%{_pmnsdir}
rm -f "$PCP_PMNS_DIR/.NeedRebuild" >/dev/null 2>&1
@ -594,14 +650,22 @@ fi
%if !%{disable_microhttpd}
%post webapi
chown -R pcp:pcp %{_logsdir}/pmwebd 2>/dev/null
/sbin/chkconfig --add pmwebd >/dev/null 2>&1
/sbin/service pmwebd condrestart
%if !%{disable_systemd}
systemctl condrestart pmwebd.service >/dev/null 2>&1
%else
/sbin/chkconfig --add pmwebd >/dev/null 2>&1
/sbin/service pmwebd condrestart
%endif
%endif
%post manager
chown -R pcp:pcp %{_logsdir}/pmmgr 2>/dev/null
/sbin/chkconfig --add pmmgr >/dev/null 2>&1
/sbin/service pmmgr condrestart
%if !%{disable_systemd}
systemctl condrestart pmmgr.service >/dev/null 2>&1
%else
/sbin/chkconfig --add pmmgr >/dev/null 2>&1
/sbin/service pmmgr condrestart
%endif
%post
PCP_LOG_DIR=%{_logsdir}
@ -640,14 +704,21 @@ chown -R pcp:pcp %{_logsdir}/pmie 2>/dev/null
chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null
touch "$PCP_PMNS_DIR/.NeedRebuild"
chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
/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
%if !%{disable_systemd}
systemctl condrestart pmcd.service >/dev/null 2>&1
systemctl condrestart pmlogger.service >/dev/null 2>&1
systemctl condrestart pmie.service >/dev/null 2>&1
systemctl condrestart pmproxy.service >/dev/null 2>&1
%else
/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 libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
@ -678,18 +749,20 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%attr(0775,pcp,pcp) %{_logsdir}/pmie
%attr(0775,pcp,pcp) %{_logsdir}/pmproxy
%{_localstatedir}/lib/pcp/pmns
%if %{disable_systemd}
%{_initddir}/pcp
%{_initddir}/pmcd
%{_initddir}/pmlogger
%{_initddir}/pmie
%{_initddir}/pmproxy
%endif
%{_mandir}/man5/*
%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmie
%config %{_sysconfdir}/bash_completion.d/pcp
%config %{_sysconfdir}/pcp.env
%{_sysconfdir}/pcp.sh
%config %{_sysconfdir}/pcp.sh
%dir %{_confdir}/pmcd
%config(noreplace) %{_confdir}/pmcd/pmcd.conf
%config(noreplace) %{_confdir}/pmcd/pmcd.options
@ -759,7 +832,9 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%if !%{disable_microhttpd}
%files webapi
%defattr(-,root,root)
%if %{disable_systemd}
%{_initddir}/pmwebd
%endif
%{_libexecdir}/pcp/bin/pmwebd
%attr(0775,pcp,pcp) %{_logsdir}/pmwebd
%{_confdir}/pmwebd
@ -770,7 +845,9 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%files manager
%defattr(-,root,root)
%if %{disable_systemd}
%{_initddir}/pmmgr
%endif
%{_libexecdir}/pcp/bin/pmmgr
%attr(0775,pcp,pcp) %{_logsdir}/pmmgr
%{_confdir}/pmmgr
@ -797,6 +874,13 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%{_bindir}/collectl2pcp
%{_mandir}/man1/collectl2pcp.1.gz
%if !%{disable_papi}
%files pmda-papi
%defattr(-,root,root)
%{_pmdasdir}/papi
%{_mandir}/man1/pmdapapi.1.gz
%endif
%if !%{disable_infiniband}
%files pmda-infiniband
%defattr(-,root,root)
@ -838,6 +922,14 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%defattr(-,root,root,-)
%changelog
* Fri Sep 05 2014 Nathan Scott <nathans@redhat.com> - 3.9.10-1
- Convert PCP init scripts to systemd services (BZ 996438)
- Fix pmlogsummary -S/-T time window reporting (BZ 1132476)
- Resolve pmdumptext segfault with invalid host (BZ 1131779)
- Fix signedness in some service discovery codes (BZ 1136166)
- New conditionally-built pcp-pmda-papi sub-package.
- Update to latest PCP sources.
* Wed Aug 13 2014 Nathan Scott <nathans@redhat.com> - 3.9.9-1
- Update to latest PCP sources.

View File

@ -1 +1 @@
fb248008cb7a18d10edd4210190ff12f pcp-3.9.9.src.tar.gz
9b4d81c2b18dadebaa224fc0b2ee1f4a pcp-3.9.10.src.tar.gz