diff --git a/fix-out-of-range-mpstat.patch b/fix-out-of-range-mpstat.patch new file mode 100644 index 0000000000000000000000000000000000000000..d2426ad8e92a2cd2a9b83df10f7bc3a646e439f8 --- /dev/null +++ b/fix-out-of-range-mpstat.patch @@ -0,0 +1,26 @@ +From 9e7d6b2796f669a5e41f5e4fb5ea349a39d8795b Mon Sep 17 00:00:00 2001 +From: caodongxia <315816521@qq.com> +Date: Thu, 14 Jul 2022 15:16:42 +0800 +Subject: [PATCH] fix out of range + +--- + src/pcp/mpstat/pcp-mpstat.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/pcp/mpstat/pcp-mpstat.py b/src/pcp/mpstat/pcp-mpstat.py +index fefb6aa..17da944 100755 +--- a/src/pcp/mpstat/pcp-mpstat.py ++++ b/src/pcp/mpstat/pcp-mpstat.py +@@ -602,6 +602,9 @@ class MpstatReport(pmcc.MetricGroupPrinter): + # need two fetches to report rate converted counter metrics + return + ++ if not group['hinv.ncpu'].netValues or not group['kernel.uname.sysname'].netValues: ++ return ++ + if self.Machine_info_count == 0: + self.print_machine_info(group, manager) + self.Machine_info_count = 1 +-- +2.23.0 + diff --git a/pcp.spec b/pcp.spec index a0eceba4d848fafbd673dd9312351667b9b43c75..4647ed57caae3215dab2e373e7eecf0832d9405a 100644 --- a/pcp.spec +++ b/pcp.spec @@ -9,8 +9,8 @@ Name: pcp Version: 4.1.3 Summary: System-level performance monitoring and performance management -Release: 13 -License: GPLv2+ and LGPLv2.1+ and CC-BY +Release: 14 +License: GPL-2.0-or-later and LGPL-2.0-or-later and CC-BY-SA-3.0 URL: https://pcp.io Source0: https://dl.bintray.com/pcp/source/pcp-4.1.3.tar.gz Source1: https://github.com/performancecopilot/pcp-webapp-vector/archive/1.3.1-1/pcp-webapp-vector-1.3.1-1.tar.gz @@ -21,6 +21,8 @@ Patch6000: CVE-2019-3695-CVE-2019-3696.patch Patch0001: Fix-some-options-and-syntax-errors.patch Patch0002: fix-pcp-pidstat-bug.patch Patch0003: Add-pcp_domain-selinux-policy.patch +#Refer: https://github.com/performancecopilot/pcp/pull/822 +Patch0004: fix-out-of-range-mpstat.patch BuildRequires: gcc gcc-c++ procps autoconf bison flex nss-devel rpm-devel avahi-devel xz-devel zlib-devel @@ -868,6 +870,7 @@ This package installs selinux support files for PCP. %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 +%patch0004 -p1 %build @@ -2221,6 +2224,9 @@ fi %config(noreplace) /etc/pcp/pmrep/* %changelog +* Thu Jul 14 2022 caodongxia - 4.1.3-14 +- Fix out of range in pcp-mpstat + * Tue Jun 8 2021 lingsheng - 4.1.3-13 - Add pcp_domain selinux policy