From ea93fbbf25a03d1d7c89eed17f9462c1c760f224 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 10 Apr 2024 16:13:01 +1000 Subject: [PATCH] Rebase to pcp-6.2.1-1 with latest upstream fixes and features Resolves: RHEL-30198 Resolves: RHEL-30720 Resolves: RHEL-25497 --- pcp.spec | 76 +++++++++++++++---- ...ues-RHEL-25543-python-year-day-range.patch | 35 --------- sources | 2 +- 3 files changed, 62 insertions(+), 51 deletions(-) delete mode 100644 redhat-issues-RHEL-25543-python-year-day-range.patch diff --git a/pcp.spec b/pcp.spec index 11c3721..a2101ba 100644 --- a/pcp.spec +++ b/pcp.spec @@ -1,14 +1,14 @@ Name: pcp -Version: 6.2.0 -Release: 2%{?dist} +Version: 6.2.1 +Release: 1%{?dist} Summary: System-level performance monitoring and performance management License: GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0 URL: https://pcp.io Source0: https://github.com/performancecopilot/pcp/releases/pcp-%{version}.src.tar.gz +# Keep xx-default-archive-version.patch for the life of RHEL9 Patch1: redhat-issues-RHEL-2317-default-archive-version.patch -Patch2: redhat-issues-RHEL-25543-python-year-day-range.patch %if 0%{?fedora} >= 40 || 0%{?rhel} >= 10 ExcludeArch: %{ix86} @@ -107,7 +107,7 @@ ExcludeArch: %{ix86} # support for pmdabpf, check bcc.spec for supported architectures of libbpf-tools %if 0%{?fedora} >= 37 || 0%{?rhel} > 8 -%ifarch x86_64 %{power64} aarch64 +%ifarch x86_64 %{power64} aarch64 s390x %global disable_bpf 0 %else %global disable_bpf 1 @@ -207,13 +207,9 @@ ExcludeArch: %{ix86} %global disable_noarch 1 %endif -# build pcp2arrow whenever possible (no RHEL or 32 bit x86 Fedora python3-arrow) -%if 0%{?fedora} >= 36 -%ifarch %{ix86} x86_64 -%global disable_arrow 1 -%else +# build pcp2arrow (no python3-arrow on RHEL or 32-bit Fedora) +%if 0%{?fedora} >= 40 %global disable_arrow 0 -%endif %else %global disable_arrow 1 %endif @@ -578,7 +574,7 @@ Requires: pcp-pmda-bpftrace %if !%{disable_python2} || !%{disable_python3} Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic Requires: pcp-pmda-libvirt pcp-pmda-lio pcp-pmda-openmetrics pcp-pmda-haproxy -Requires: pcp-pmda-lmsensors pcp-pmda-netcheck pcp-pmda-rabbitmq +Requires: pcp-pmda-lmsensors pcp-pmda-netcheck pcp-pmda-rabbitmq pcp-pmda-uwsgi Requires: pcp-pmda-openvswitch %endif %if !%{disable_mongodb} @@ -866,6 +862,24 @@ Requires: %{__python2}-pcp = %{version}-%{release} Performance Co-Pilot (PCP) front-end tools for exporting metric values in JSON format. +# +# pcp-export-pcp2openmetrics +# +%package export-pcp2openmetrics +License: GPL-2.0-or-later +Summary: Performance Co-Pilot tools for exporting PCP metrics in OpenMetrics format +URL: https://pcp.io +Requires: pcp-libs >= %{version}-%{release} +%if !%{disable_python3} +Requires: python3-pcp = %{version}-%{release} +%else +Requires: %{__python2}-pcp = %{version}-%{release} +%endif + +%description export-pcp2openmetrics +Performance Co-Pilot (PCP) front-end tools for exporting metric values +in OpenMetrics (https://openmetrics.io/) format. + # # pcp-export-pcp2spark # @@ -1781,6 +1795,24 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about RabbitMQ message queues. #end pcp-pmda-rabbitmq +# +# pcp-pmda-uwsgi +# +%package pmda-uwsgi +License: GPL-2.0-or-later +Summary: Performance Co-Pilot (PCP) metrics from uWSGI servers +URL: https://pcp.io +Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: %{__python2}-pcp +%endif +%description pmda-uwsgi +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics from uWSGI servers. +#end pcp-pmda-uwsgi + # # pcp-pmda-lio # @@ -2489,7 +2521,7 @@ sed -i '/.a$/d' pcp-devel-files sed -i '/\/man\//d' pcp-devel-files sed -i '/\/include\//d' pcp-devel-files -%ifarch x86_64 ppc64 ppc64le aarch64 s390x +%ifarch x86_64 ppc64 ppc64le aarch64 s390x riscv64 sed -i -e 's/usr\/lib\//usr\/lib64\//' pcp-libs-files sed -i -e 's/usr\/lib\//usr\/lib64\//' pcp-devel-files sed -i -e 's/usr\/lib\//usr\/lib64\//' pcp-libs-devel-files @@ -2538,7 +2570,7 @@ basic_manifest() { # Likewise, for the pcp-pmda and pcp-testsuite subpackages. # total_manifest | keep 'tutorials|/html/|pcp-doc|man.*\.[1-9].*' | cull 'out' >pcp-doc-files -total_manifest | keep 'testsuite|pcpqa|etc/systemd/system|libpcp_fault|pcp/fault.h' >pcp-testsuite-files +total_manifest | keep 'testsuite|pcpqa|etc/systemd/system|libpcp_fault|pcp/fault.h|pmcheck/pmda-sample' >pcp-testsuite-files basic_manifest | keep "$PCP_GUI|pcp-gui|applications|pixmaps|hicolor" | cull 'pmtime.h' >pcp-gui-files basic_manifest | keep 'selinux' | cull 'tmp|testsuite' >pcp-selinux-files @@ -2562,6 +2594,7 @@ basic_manifest | keep 'pcp2influxdb' >pcp-export-pcp2influxdb-files basic_manifest | keep 'pcp2xlsx' >pcp-export-pcp2xlsx-files basic_manifest | keep 'pcp2graphite' >pcp-export-pcp2graphite-files basic_manifest | keep 'pcp2json' >pcp-export-pcp2json-files +basic_manifest | keep 'pcp2openmetrics' >pcp-export-pcp2openmetrics-files basic_manifest | keep 'pcp2spark' >pcp-export-pcp2spark-files basic_manifest | keep 'pcp2xml' >pcp-export-pcp2xml-files basic_manifest | keep 'pcp2zabbix' >pcp-export-pcp2zabbix-files @@ -2639,6 +2672,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/summary(/|$)' >pcp-pmda-summary-files basic_manifest | keep '(etc/pcp|pmdas)/systemd(/|$)' >pcp-pmda-systemd-files basic_manifest | keep '(etc/pcp|pmdas)/trace(/|$)' >pcp-pmda-trace-files basic_manifest | keep '(etc/pcp|pmdas)/unbound(/|$)' >pcp-pmda-unbound-files +basic_manifest | keep '(etc/pcp|pmdas)/uwsgi(/|$)' >pcp-pmda-uwsgi-files basic_manifest | keep '(etc/pcp|pmdas)/weblog(/|$)' >pcp-pmda-weblog-files basic_manifest | keep '(etc/pcp|pmdas)/zimbra(/|$)' >pcp-pmda-zimbra-files basic_manifest | keep '(etc/pcp|pmdas)/zswap(/|$)' >pcp-pmda-zswap-files @@ -2664,7 +2698,7 @@ for pmda_package in \ rabbitmq redis resctrl roomtemp rpm rsyslog \ samba sendmail shping slurm smart snmp \ sockets statsd summary systemd \ - unbound \ + unbound uwsgi \ trace \ weblog \ zimbra zswap ; \ @@ -2680,7 +2714,7 @@ done for export_package in \ pcp2arrow pcp2elasticsearch pcp2graphite pcp2influxdb pcp2json \ - pcp2spark pcp2xlsx pcp2xml pcp2zabbix zabbix-agent ; \ + pcp2openmetrics pcp2spark pcp2xlsx pcp2xml pcp2zabbix zabbix-agent ; \ do \ export_packages="$export_packages pcp-export-$export_package"; \ done @@ -2893,6 +2927,9 @@ exit 0 %preun pmda-rabbitmq %{pmda_remove "$1" "rabbitmq"} +%preun pmda-uwsgi +%{pmda_remove "$1" "uwsgi"} + %if !%{disable_snmp} %preun pmda-snmp %{pmda_remove "$1" "snmp"} @@ -3368,10 +3405,14 @@ fi %files pmda-rabbitmq -f pcp-pmda-rabbitmq-files.rpm +%files pmda-uwsgi -f pcp-pmda-uwsgi-files.rpm + %files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm %files export-pcp2json -f pcp-export-pcp2json-files.rpm +%files export-pcp2openmetrics -f pcp-export-pcp2openmetrics-files.rpm + %files export-pcp2spark -f pcp-export-pcp2spark-files.rpm %files export-pcp2xml -f pcp-export-pcp2xml-files.rpm @@ -3493,6 +3534,11 @@ fi %files zeroconf -f pcp-zeroconf-files.rpm %changelog +* Wed Apr 10 2024 Nathan Scott - 6.2.1-1 +- Rebase to latest stable version of PCP (RHEL-30198) +- Disable pmproxy(1) RESP proxying by default (RHEL-30720) +- Add pmcheck(1) utility to check installation (RHEL-25497) + * Wed Mar 20 2024 Nathan Scott - 6.2.0-2 - Fix python sub-package year day range issue (RHEL-25543) diff --git a/redhat-issues-RHEL-25543-python-year-day-range.patch b/redhat-issues-RHEL-25543-python-year-day-range.patch deleted file mode 100644 index b43b5ab..0000000 --- a/redhat-issues-RHEL-25543-python-year-day-range.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit ce6112399ebf0ff39069a34bc9286242c875555e -Author: adam kaminski -Date: Fri Feb 9 12:49:34 2024 -0500 - - pmapi.py : fix for struct_time() and day of year out of range on yyyy-01-01 - - Fix for `day of year out of range` on 2024-01-01, due to self.tm_yday - 1, which returns `[2024, 1, 1, 2, 3, 0, 0, -1, 0]`. The range for tm_yday should be [1, 366]. - - # timedatectl set-ntp false - # timedatectl set-time "2024-01-01 00:00:00" - # /usr/libexec/pcp/bin/pcp-mpstat -P ALL -t 1 -s 2 - Traceback (most recent call last): - File "/usr/libexec/pcp/bin/pcp-mpstat", line 653, in - sts = manager.run() - File "/usr/lib64/python3.6/site-packages/pcp/pmcc.py", line 687, in run - self._printer.report(self) - File "/usr/libexec/pcp/bin/pcp-mpstat", line 606, in report - self.print_machine_info(group, manager) - File "/usr/libexec/pcp/bin/pcp-mpstat", line 585, in print_machine_info - time_string = time.strftime("%x", timestamp.struct_time()) - ValueError: day of year out of range - -diff --git a/src/python/pcp/pmapi.py b/src/python/pcp/pmapi.py -index fd8d40e32c..05c8afb079 100644 ---- a/src/python/pcp/pmapi.py -+++ b/src/python/pcp/pmapi.py -@@ -330,7 +330,7 @@ class tm(Structure): - pywday = 6 - stlist = [self.tm_year + 1900, self.tm_mon + 1, self.tm_mday, - self.tm_hour, self.tm_min, self.tm_sec, -- pywday, self.tm_yday - 1, self.tm_isdst] -+ pywday, self.tm_yday + 1, self.tm_isdst] - return time.struct_time(stlist) - - def __str__(self): diff --git a/sources b/sources index 0c480b7..50dbe18 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pcp-6.2.0.src.tar.gz) = 249ceebf9b87d03fd024d2c75c1f32362cad3d315b68bf3bc305705cbec564d0c162d695988332183f1a595bc88f80929e7d111435ae09ce3c240e0df9b47a1b +SHA512 (pcp-6.2.1.src.tar.gz) = 80b7ada7850b8950a5f8047b2ecf69911c7901fcf3ec211f79497674bcb4ded4c4b5e55febb7236fa5fabe1b3ebb4bd2525216c9c36e19609ff19181bc0458ca