Update to latest community sources

This commit is contained in:
Nathan Scott 2018-02-16 14:29:50 +11:00
parent ac2212b62b
commit 7f6cb37189
2 changed files with 112 additions and 29 deletions

123
pcp.spec
View File

@ -1,6 +1,6 @@
Name: pcp Name: pcp
Version: 3.12.2 Version: 4.0.0
Release: 5%{?dist} Release: 1%{?dist}
Summary: System-level performance monitoring and performance management Summary: System-level performance monitoring and performance management
License: GPLv2+ and LGPLv2.1+ and CC-BY License: GPLv2+ and LGPLv2.1+ and CC-BY
URL: http://www.pcp.io URL: http://www.pcp.io
@ -15,7 +15,7 @@ Source2: %{github}/pcp-webapp-grafana/archive/1.9.1-2/pcp-webapp-grafana-1.9.1-2
Source3: %{github}/pcp-webapp-graphite/archive/0.9.10/pcp-webapp-graphite-0.9.10.tar.gz Source3: %{github}/pcp-webapp-graphite/archive/0.9.10/pcp-webapp-graphite-0.9.10.tar.gz
Source4: %{github}/pcp-webapp-blinkenlights/archive/1.0.0/pcp-webapp-blinkenlights-1.0.0.tar.gz Source4: %{github}/pcp-webapp-blinkenlights/archive/1.0.0/pcp-webapp-blinkenlights-1.0.0.tar.gz
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7 %if 0%{?fedora} >= 26 || 0%{?rhel} > 7
%global __python2 python2 %global __python2 python2
%else %else
%global __python2 python %global __python2 python
@ -47,6 +47,7 @@ Source4: %{github}/pcp-webapp-blinkenlights/archive/1.0.0/pcp-webapp-blinkenligh
%endif %endif
%global disable_microhttpd 0 %global disable_microhttpd 0
%global disable_webapps 0
%global disable_cairo 0 %global disable_cairo 0
%global disable_python2 0 %global disable_python2 0
@ -71,6 +72,17 @@ Source4: %{github}/pcp-webapp-blinkenlights/archive/1.0.0/pcp-webapp-blinkenligh
%global perl_interpreter perl %global perl_interpreter perl
%endif %endif
# support for pmdabcc
%if 0%{?fedora} >= 25 || 0%{?rhel} > 7
%if !%{disable_python3}
%global disable_bcc 0
%else
%global disable_bcc 1
%endif
%else
%global disable_bcc 1
%endif
# support for pmdajson # support for pmdajson
%if 0%{?rhel} == 0 || 0%{?rhel} > 6 %if 0%{?rhel} == 0 || 0%{?rhel} > 6
%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python2} || !%{disable_python3}
@ -279,6 +291,12 @@ Requires: pcp-libs = %{version}-%{release}
%global _with_perfevent --with-perfevent=yes %global _with_perfevent --with-perfevent=yes
%endif %endif
%if %{disable_bcc}
%global _with_bcc --with-pmdabcc=no
%else
%global _with_bcc --with-pmdabcc=yes
%endif
%if %{disable_json} %if %{disable_json}
%global _with_json --with-pmdajson=no %global _with_json --with-pmdajson=no
%else %else
@ -297,8 +315,14 @@ Requires: pcp-libs = %{version}-%{release}
%global _with_snmp --with-pmdasnmp=yes %global _with_snmp --with-pmdasnmp=yes
%endif %endif
%if %{disable_webapps}
%global _with_webapps --with-webapps=no
%else
%global _with_webapps --with-webapps=yes
%endif
%global pmda_remove() %{expand: %global pmda_remove() %{expand:
if [ "%1" -eq 0 ] if [ %1 -eq 0 ]
then then
if [ -f "%{_confdir}/pmcd/pmcd.conf" ] && [ -f "%{_pmdasdir}/%2/domain.h" ] if [ -f "%{_confdir}/pmcd/pmcd.conf" ] && [ -f "%{_pmdasdir}/%2/domain.h" ]
then then
@ -308,28 +332,33 @@ fi
} }
%global selinux_handle_policy() %{expand: %global selinux_handle_policy() %{expand:
if [ "%1" -eq 1 ] if [ -e /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled
then then
if [ %1 -ge 1 ]
then
PCP_SELINUX_DIR=%{_selinuxdir} PCP_SELINUX_DIR=%{_selinuxdir}
if [ -f "$PCP_SELINUX_DIR/%2" ] if [ -f "$PCP_SELINUX_DIR/%2" ]
then then
%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 if semodule -h | grep -q -- "-X" >/dev/null 2>&1
then
(semodule -X 400 -i %{_selinuxdir}/%2) (semodule -X 400 -i %{_selinuxdir}/%2)
%else else
(semodule -i %{_selinuxdir}/%2) (semodule -i %{_selinuxdir}/%2)
%endif #distro version check fi #semodule -X flag check
fi fi
elif [ "%1" -eq 0 ] elif [ %1 -eq 0 ]
then then
if semodule -l | grep %2 >/dev/null 2>&1 if semodule -l | grep %2 >/dev/null 2>&1
then then
%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 if semodule -h | grep -q -- "-X" >/dev/null 2>&1
then
(semodule -X 400 -r %2 >/dev/null) (semodule -X 400 -r %2 >/dev/null)
%else else
(semodule -r %2 >/dev/null) (semodule -r %2 >/dev/null)
%endif #distro version check fi #semodule -X flag check
fi fi
fi fi
fi # check for an active selinux install
} }
%description %description
@ -447,11 +476,12 @@ Co-Pilot (PCP) client API (PMAPI) to RESTful web applications using the
HTTP (PMWEBAPI) protocol. HTTP (PMWEBAPI) protocol.
%endif %endif
%if !%{disable_webapps}
# #
# pcp-webjs and pcp-webapp packages # pcp-webjs and pcp-webapp packages
# #
%package webjs %package webjs
License: ASL2.0 and MIT and CC-BY License: ASL2.0 and MIT and CC-BY and GPLv3
Group: Applications/Internet Group: Applications/Internet
Conflicts: pcp-webjs < 3.11.9 Conflicts: pcp-webjs < 3.11.9
%if !%{disable_noarch} %if !%{disable_noarch}
@ -499,7 +529,7 @@ Grafana can render time series dashboards at the browser via flot.js
server via png (less interactive, faster). server via png (less interactive, faster).
%package webapp-graphite %package webapp-graphite
License: ASL2.0 License: ASL2.0 and GPLv3
Group: Applications/Internet Group: Applications/Internet
Conflicts: pcp-webjs < 3.10.4 Conflicts: pcp-webjs < 3.10.4
%if !%{disable_noarch} %if !%{disable_noarch}
@ -526,6 +556,7 @@ URL: http://pcp.io
%description webapp-blinkenlights %description webapp-blinkenlights
Demo web application showing traffic lights that change colour based Demo web application showing traffic lights that change colour based
on the periodic evaluation of performance metric expressions. on the periodic evaluation of performance metric expressions.
%endif
# #
# perl-PCP-PMDA. This is the PCP agent perl binding. # perl-PCP-PMDA. This is the PCP agent perl binding.
@ -1417,6 +1448,23 @@ collecting metrics about the Device Mapper Cache and Thin Client.
# end pcp-pmda-dm # end pcp-pmda-dm
%if !%{disable_bcc}
#
# pcp-pmda-bcc
#
%package pmda-bcc
License: ASL2.0 and GPLv2+
Group: Applications/System
Summary: Performance Co-Pilot (PCP) metrics from eBPF/BCC modules
URL: http://www.pcp.io
Requires: python3-bcc
Requires: python3-pcp
%description pmda-bcc
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
extracting performance metrics from eBPF/BCC Python modules.
# end pcp-pmda-bcc
%endif
%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python2} || !%{disable_python3}
# #
# pcp-pmda-gluster # pcp-pmda-gluster
@ -1892,6 +1940,9 @@ Requires: pcp-pmda-lustrecomm pcp-pmda-logger pcp-pmda-docker pcp-pmda-bind2
%if !%{disable_nutcracker} %if !%{disable_nutcracker}
Requires: pcp-pmda-nutcracker Requires: pcp-pmda-nutcracker
%endif %endif
%if !%{disable_bcc}
Requires: pcp-pmda-bcc
%endif
%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python2} || !%{disable_python3}
Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic
Requires: pcp-pmda-libvirt pcp-pmda-lio pcp-pmda-prometheus pcp-pmda-haproxy Requires: pcp-pmda-libvirt pcp-pmda-lio pcp-pmda-prometheus pcp-pmda-haproxy
@ -1947,7 +1998,7 @@ automated pmie diagnosis, alerting and self-healing for the localhost.
%if !%{disable_python2} %if !%{disable_python2}
# #
# python-pcp. This is the PCP library bindings for python. # python2-pcp. This is the PCP library bindings for python.
# #
%package -n %{__python2}-pcp %package -n %{__python2}-pcp
License: GPLv2+ License: GPLv2+
@ -1955,6 +2006,10 @@ Group: Development/Libraries
Summary: Performance Co-Pilot (PCP) Python bindings and documentation Summary: Performance Co-Pilot (PCP) Python bindings and documentation
URL: http://www.pcp.io URL: http://www.pcp.io
Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
# on these platforms, python2-pcp replaces python-pcp
Obsoletes: python-pcp
%endif
%if 0%{?rhel} == 5 %if 0%{?rhel} == 5
Requires: python%{default_python} Requires: python%{default_python}
%else %else
@ -2088,7 +2143,7 @@ updated policy package.
%if !%{disable_python2} && 0%{?default_python} != 3 %if !%{disable_python2} && 0%{?default_python} != 3
export PYTHON=python%{?default_python} export PYTHON=python%{?default_python}
%endif %endif
%configure %{?_with_initd} %{?_with_doc} %{?_with_ib} %{?_with_papi} %{?_with_perfevent} %{?_with_json} %{?_with_snmp} %{?_with_nutcracker} %configure %{?_with_initd} %{?_with_doc} %{?_with_ib} %{?_with_papi} %{?_with_perfevent} %{?_with_bcc} %{?_with_json} %{?_with_snmp} %{?_with_nutcracker} %{?_with_webapps}
make %{?_smp_mflags} default_pcp make %{?_smp_mflags} default_pcp
%install %install
@ -2114,11 +2169,13 @@ rm -fr $RPM_BUILD_ROOT/%{_initddir}/pmwebd
rm -fr $RPM_BUILD_ROOT/%{_unitdir}/pmwebd.service rm -fr $RPM_BUILD_ROOT/%{_unitdir}/pmwebd.service
rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd
%endif %endif
%if !%{disable_webapps}
for app in vector grafana graphite blinkenlights; do for app in vector grafana graphite blinkenlights; do
pwd pwd
webapp=`find ../$app -mindepth 1 -maxdepth 1` webapp=`find ../$app -mindepth 1 -maxdepth 1`
mv $webapp $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps/$app mv $webapp $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps/$app
done done
%endif
%if %{disable_infiniband} %if %{disable_infiniband}
# remove pmdainfiniband on platforms lacking IB devel packages. # remove pmdainfiniband on platforms lacking IB devel packages.
@ -2151,9 +2208,12 @@ for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmmgr,pmpro
done done
%if 0%{?fedora} > 26 %if 0%{?fedora} > 26
if [ "$1" -eq 1 ]
then
PCP_SYSCONFIG_DIR=%{_sysconfdir}/sysconfig PCP_SYSCONFIG_DIR=%{_sysconfdir}/sysconfig
sed -i 's/^\#\ PMLOGGER_LOCAL.*/PMLOGGER_LOCAL=1/g' "$RPM_BUILD_ROOT/$PCP_SYSCONFIG_DIR/pmlogger" sed -i 's/^\#\ PMLOGGER_LOCAL.*/PMLOGGER_LOCAL=1/g' "$RPM_BUILD_ROOT/$PCP_SYSCONFIG_DIR/pmlogger"
sed -i 's/^\#\ PMCD_LOCAL.*/PMCD_LOCAL=1/g' "$RPM_BUILD_ROOT/$PCP_SYSCONFIG_DIR/pmcd" sed -i 's/^\#\ PMCD_LOCAL.*/PMCD_LOCAL=1/g' "$RPM_BUILD_ROOT/$PCP_SYSCONFIG_DIR/pmcd"
fi
%endif %endif
# list of PMDAs in the base pkg # list of PMDAs in the base pkg
@ -2216,6 +2276,7 @@ ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\
grep -E -v '^rpm' |\ grep -E -v '^rpm' |\
grep -E -v '^json' |\ grep -E -v '^json' |\
grep -E -v '^mic' |\ grep -E -v '^mic' |\
grep -E -v '^bcc' |\
grep -E -v '^gluster' |\ grep -E -v '^gluster' |\
grep -E -v '^zswap' |\ grep -E -v '^zswap' |\
grep -E -v '^unbound' |\ grep -E -v '^unbound' |\
@ -2515,6 +2576,11 @@ fi
%preun pmda-dm %preun pmda-dm
%{pmda_remove "$1" "dm"} %{pmda_remove "$1" "dm"}
%if !%{disable_bcc}
%preun pmda-bcc
%{pmda_remove "$1" "bcc"}
%endif
%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python2} || !%{disable_python3}
%preun pmda-gluster %preun pmda-gluster
%{pmda_remove "$1" "gluster"} %{pmda_remove "$1" "gluster"}
@ -2789,6 +2855,7 @@ cd
%config(noreplace) %{_sysconfdir}/sysconfig/pmproxy %config(noreplace) %{_sysconfdir}/sysconfig/pmproxy
%config(noreplace) %{_sysconfdir}/sysconfig/pmcd %config(noreplace) %{_sysconfdir}/sysconfig/pmcd
%config %{_sysconfdir}/pcp.env %config %{_sysconfdir}/pcp.env
%dir %{_confdir}/labels
%dir %{_confdir}/pmcd %dir %{_confdir}/pmcd
%config(noreplace) %{_confdir}/pmcd/pmcd.conf %config(noreplace) %{_confdir}/pmcd/pmcd.conf
%config(noreplace) %{_confdir}/pmcd/pmcd.options %config(noreplace) %{_confdir}/pmcd/pmcd.options
@ -2887,13 +2954,14 @@ cd
%attr(0775,pcp,pcp) %{_logsdir}/pmwebd %attr(0775,pcp,pcp) %{_logsdir}/pmwebd
%{_confdir}/pmwebd %{_confdir}/pmwebd
%config(noreplace) %{_confdir}/pmwebd/pmwebd.options %config(noreplace) %{_confdir}/pmwebd/pmwebd.options
# duplicate directories from pcp and pcp-webjs, but rpm copes with that. # duplicate pcp, pcp-webapi and pcp-webjs directories, but rpm copes with that.
%dir %{_datadir}/pcp %dir %{_datadir}/pcp
%dir %{_datadir}/pcp/webapps %dir %{_datadir}/pcp/webapps
%endif %endif
%if !%{disable_webapps}
%files webjs %files webjs
# duplicate directories from pcp and pcp-webapi, but rpm copes with that. # duplicate pcp, pcp-webapi and pcp-webjs directories, but rpm copes with that.
%dir %{_datadir}/pcp %dir %{_datadir}/pcp
%dir %{_datadir}/pcp/webapps %dir %{_datadir}/pcp/webapps
%{_datadir}/pcp/webapps/*.png %{_datadir}/pcp/webapps/*.png
@ -2919,6 +2987,7 @@ cd
%dir %{_datadir}/pcp %dir %{_datadir}/pcp
%dir %{_datadir}/pcp/webapps %dir %{_datadir}/pcp/webapps
%{_datadir}/pcp/webapps/vector %{_datadir}/pcp/webapps/vector
%endif
%files manager %files manager
%{_initddir}/pmmgr %{_initddir}/pmmgr
@ -3071,6 +3140,11 @@ cd
%files pmda-dm %files pmda-dm
%{_pmdasdir}/dm %{_pmdasdir}/dm
%if !%{disable_bcc}
%files pmda-bcc
%{_pmdasdir}/bcc
%endif
%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python2} || !%{disable_python3}
%files pmda-gluster %files pmda-gluster
%{_pmdasdir}/gluster %{_pmdasdir}/gluster
@ -3222,6 +3296,15 @@ cd
%endif %endif
%changelog %changelog
* Fri Feb 16 2018 Nathan Scott <nathans@redhat.com> - 4.0.0-1
- pcp-atopsar: robustness around missing data (BZ 1508028)
- python pmcc method checking for missing metrics (BZ 1508026)
- Fix generic -s and -T option handling in libpcp (BZ 1352461)
- Resolve crash in local context mode in libpcp_pmda (BZ 1451475)
- python api: fix timezone segv from incorrect free (BZ 1352465)
- Remove section 1 and 5 man pages for pmview tool (BZ 1289126)
- Update to latest PCP sources.
* Thu Feb 08 2018 Nathan Scott <nathans@redhat.com> - 3.12.2-5 * Thu Feb 08 2018 Nathan Scott <nathans@redhat.com> - 3.12.2-5
- Update the Vector webapp to latest upstream (v1.2.1). - Update the Vector webapp to latest upstream (v1.2.1).

View File

@ -1,4 +1,4 @@
SHA512 (pcp-3.12.2.src.tar.gz) = 0d3f31cd174ab701a1662175210f0de238973da856600d3545567827221daf4f45ed47b4aaeb75a128d9c036d30b768bf013960bba99010c4db2b08c7c883981 SHA512 (pcp-4.0.0.src.tar.gz) = 66593055f18cdf539094aa2216cfaac9d9bd489ce436425c12cede0d35f10fe71290a484f593fa0fadbba3831959ae38ce17ec7ca11ba8800316e57632646b5d
SHA512 (pcp-webapp-blinkenlights-1.0.0.tar.gz) = 505eafd4b8eb2ab97ec6b0fea3b5510ab0b976fa07559f1d163d240c62a8d7419f062eecc180b28b6b240207b45daed6fcc39d8e2930c6d038790d5ac0c695ab SHA512 (pcp-webapp-blinkenlights-1.0.0.tar.gz) = 505eafd4b8eb2ab97ec6b0fea3b5510ab0b976fa07559f1d163d240c62a8d7419f062eecc180b28b6b240207b45daed6fcc39d8e2930c6d038790d5ac0c695ab
SHA512 (pcp-webapp-grafana-1.9.1-2.tar.gz) = abd0f360b057853d343e506e352a37d16f78bbae6760124ecdfab0e43ffcf3b31404311f1fe5c962e8abdbf2ad8699df3f27e2920f03f1a10bca3c0e01179e21 SHA512 (pcp-webapp-grafana-1.9.1-2.tar.gz) = abd0f360b057853d343e506e352a37d16f78bbae6760124ecdfab0e43ffcf3b31404311f1fe5c962e8abdbf2ad8699df3f27e2920f03f1a10bca3c0e01179e21
SHA512 (pcp-webapp-vector-1.2.1.tar.gz) = c2e29df8551550f3f838a91e5f109edbf8fea4118e3d7a890ed412255824306f8f9fb762ff1edc9d160892a0c89f192307d1cfd8597f30de975e1f4d781b5615 SHA512 (pcp-webapp-vector-1.2.1.tar.gz) = c2e29df8551550f3f838a91e5f109edbf8fea4118e3d7a890ed412255824306f8f9fb762ff1edc9d160892a0c89f192307d1cfd8597f30de975e1f4d781b5615