diff --git a/fix-pmdabpf-noarch-man-page-build-failure.patch b/fix-pmdabpf-noarch-man-page-build-failure.patch deleted file mode 100644 index 87dde64..0000000 --- a/fix-pmdabpf-noarch-man-page-build-failure.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -Naurp pcp-6.3.7.orig/src/pmdas/bpf/GNUmakefile pcp-6.3.7/src/pmdas/bpf/GNUmakefile ---- pcp-6.3.7.orig/src/pmdas/bpf/GNUmakefile 2025-03-27 17:01:59.000000000 +1100 -+++ pcp-6.3.7/src/pmdas/bpf/GNUmakefile 2025-03-31 14:48:17.152726333 +1100 -@@ -1,7 +1,6 @@ - TOPDIR = ../../.. - include $(TOPDIR)/src/include/builddefs - --ifeq "$(PMDA_BPF)" "true" - CFILES = bpf.c - CMDTARGET = pmdabpf$(EXECSUFFIX) - LIBTARGET = pmda_bpf.$(DSOSUFFIX) -@@ -27,12 +26,15 @@ MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTI - - LDIRT = domain.h *.o $(IAM).log pmda$(IAM) pmda_$(IAM).$(DSOSUFFIX) - --default_pcp default: $(CMDTARGET) $(LIBTARGET) $(SUBDIRS) -- $(SUBDIRS_MAKERULE) -+default: build-me - - include $(BUILDRULES) - --install_pcp install: default $(SUBDIRS) -+ifeq "$(PMDA_BPF)" "true" -+build-me: $(CMDTARGET) $(LIBTARGET) $(SUBDIRS) -+ $(SUBDIRS_MAKERULE) -+ -+install: default $(SUBDIRS) - $(INSTALL) -m 755 -d $(PMDAADMDIR) - $(INSTALL) -m 755 -d $(PMDATMPDIR) - $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(CMDTARGET) $(LIBTARGET) $(SCRIPTS) $(PMDAADMDIR) -@@ -43,6 +45,15 @@ install_pcp install: default $(SUBDIRS) - $(INSTALL) -m 644 -t $(PMDATMPDIR)/$(CONFIG) $(CONFIG) $(PMDACONFIG)/$(CONFIG) - @$(INSTALL_MAN) - $(SUBDIRS_MAKERULE) -+else -+build-me: -+install: -+ @$(INSTALL_MAN) -+endif -+ -+default_pcp : default -+ -+install_pcp : install - - $(OBJECTS): domain.h - -@@ -51,12 +62,6 @@ domain.h: ../../pmns/stdpmid - - pmns: - $(LN_S) -f root_bpf pmns --else --default_pcp default: -- --install_pcp install: -- @$(INSTALL_MAN) --endif - - check:: $(MAN_PAGES) - $(MANLINT) $^ -@@ -64,5 +69,6 @@ check:: $(MAN_PAGES) - clean:: - $(MAKE) -C modules/ clean - rm -f $(LDIRT) -+ - debug: - @echo PMDA_BPF=$(PMDA_BPF) -diff -Naurp pcp-6.3.7.orig/src/pmdas/bpf/modules/GNUmakefile pcp-6.3.7/src/pmdas/bpf/modules/GNUmakefile ---- pcp-6.3.7.orig/src/pmdas/bpf/modules/GNUmakefile 2024-03-14 09:37:59.000000000 +1100 -+++ pcp-6.3.7/src/pmdas/bpf/modules/GNUmakefile 2025-03-31 14:48:17.157726345 +1100 -@@ -70,15 +70,21 @@ APPS_BPF = \ - APPS_BPF_2 = \ - netatop.bpf.c - --default_pcp default: $(PMDABPF_MODULES) -+default: build-me - - include $(BUILDRULES) - -+ifeq "$(PMDA_BPF)" "true" -+build-me: $(PMDABPF_MODULES) -+ - install_pcp install: default - $(INSTALL) -m 755 -d $(MODULEDIR) - $(INSTALL) -m 755 -d $(MODULETMP) - $(INSTALL) -m 644 -t $(MODULETMP) $(PMDABPF_MODULES) $(MODULEDIR) -- -+else -+build-me: -+install: -+endif - - # Use the clang pipeline to emit LLVM to LLD and emit BPF straight to an ELF .o. - # The GCC pipeline has parts of this but not completely, and in any case, likely diff --git a/pcp.spec b/pcp.spec index 86f806c..200cd85 100644 --- a/pcp.spec +++ b/pcp.spec @@ -1,21 +1,11 @@ Name: pcp -Version: 6.3.7 -Release: 5%{?dist} +Version: 7.0.3 +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 - -Patch0: selinux-proc_psi_t.patch -Patch1: selinux-pcp_pmie_t.patch -Patch2: pmwebapi-filter-exact.patch -Patch3: pmda-openmetrics-rollup.patch -Patch4: pmapi-header-multilib-fix.patch -Patch5: python-pmda-wrapper-list-fix.patch -Patch6: systemd-tmpfiles.d-directories.patch -Patch7: fix-pmdabpf-noarch-man-page-build-failure.patch - %if 0%{?fedora} >= 40 || 0%{?rhel} >= 10 ExcludeArch: %{ix86} %endif @@ -24,12 +14,6 @@ ExcludeArch: %{ix86} # https://bugzilla.redhat.com/show_bug.cgi?id=2043092 %undefine _package_note_flags -%if 0%{?fedora} >= 26 || 0%{?rhel} > 7 -%global __python2 python2 -%else -%global __python2 python -%endif - # UsrMerge was completed in EL 7, however the latest 'hostname' package in EL 7 contains "Provides: /bin/hostname". Likewise for /bin/ps from procps[-ng] packages. %if 0%{?rhel} >= 8 || 0%{?fedora} >= 17 %global _hostname_executable /usr/bin/hostname @@ -81,17 +65,6 @@ ExcludeArch: %{ix86} %global disable_gfs2 0 %endif -%if 0%{?fedora} >= 30 || 0%{?rhel} > 7 -%global _with_python2 --with-python=no -%global disable_python2 1 -%else -%global disable_python2 0 -%endif - -# Default for epel5 is python24, so use the (optional) python26 packages -%if 0%{?rhel} == 5 -%global default_python 26 -%endif # No python3 development environment before el8 %if 0%{?rhel} == 0 || 0%{?rhel} > 7 %global disable_python3 0 @@ -142,19 +115,8 @@ ExcludeArch: %{ix86} %global disable_bpftrace 1 %endif -# support for pmdajson -%if 0%{?rhel} == 0 || 0%{?rhel} > 6 -%if !%{disable_python2} || !%{disable_python3} -%global disable_json 0 -%else -%global disable_json 1 -%endif -%else -%global disable_json 1 -%endif - # support for pmdamongodb -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %global disable_mongodb 0 %else %global disable_mongodb 1 @@ -162,7 +124,7 @@ ExcludeArch: %{ix86} # No mssql ODBC driver on non-x86 platforms %ifarch x86_64 -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %global disable_mssql 0 %else %global disable_mssql 1 @@ -206,17 +168,6 @@ ExcludeArch: %{ix86} %global disable_systemd 1 %endif -# static probes, missing before el6 and on some architectures -%if 0%{?rhel} == 0 || 0%{?rhel} > 5 -%global disable_sdt 0 -%else -%ifnarch ppc ppc64 -%global disable_sdt 0 -%else -%global disable_sdt 1 -%endif -%endif - # libuv async event library %if 0%{?fedora} >= 28 || 0%{?rhel} > 7 %global disable_libuv 0 @@ -289,13 +240,6 @@ BuildRequires: procps autoconf bison flex BuildRequires: avahi-devel BuildRequires: xz-devel BuildRequires: zlib-devel -%if !%{disable_python2} -%if 0%{?default_python} != 3 -BuildRequires: python%{?default_python}-devel -%else -BuildRequires: %{__python2}-devel -%endif -%endif %if !%{disable_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -313,9 +257,6 @@ BuildRequires: chan-devel HdrHistogram_c-devel %if !%{disable_perfevent} BuildRequires: libpfm-devel >= 4 %endif -%if !%{disable_sdt} -BuildRequires: systemtap-sdt-devel -%endif %if !%{disable_libuv} BuildRequires: libuv-devel >= 1.0 %endif @@ -346,7 +287,7 @@ BuildRequires: qt5-qtsvg-devel %endif # Utilities used indirectly e.g. by scripts we install -Requires: bash xz gawk sed grep coreutils diffutils findutils +Requires: bash xz zstd gawk sed grep coreutils diffutils findutils Requires: which %{_hostname_executable} %{_ps_executable} Requires: pcp-libs = %{version}-%{release} @@ -371,6 +312,7 @@ Requires: pcp-selinux = %{version}-%{release} %global _selinuxdir %{_datadir}/selinux/packages/targeted %global _with_multilib --enable-multilib=true +%global _with_nondebug --with-non-debug=yes %if 0%{?fedora} >= 20 || 0%{?rhel} >= 8 %global _with_doc --with-docdir=%{_docdir}/%{name} @@ -443,12 +385,6 @@ Requires: pcp-selinux = %{version}-%{release} %global _with_bpftrace --with-pmdabpftrace=yes %endif -%if %{disable_json} -%global _with_json --with-pmdajson=no -%else -%global _with_json --with-pmdajson=yes -%endif - %if %{disable_mongodb} %global _with_mongodb --with-pmdamongodb=no %else @@ -580,81 +516,12 @@ Requires: pcp = %{version}-%{release} Requires: pcp-libs = %{version}-%{release} Requires: pcp-libs-devel = %{version}-%{release} Requires: pcp-devel = %{version}-%{release} -Obsoletes: pcp-gui-testsuite < 3.9.5 -# The following are inherited from pcp-collector and pcp-monitor, -# both of which are now obsoleted by the base pcp package -Requires: pcp-pmda-activemq pcp-pmda-bonding pcp-pmda-dbping pcp-pmda-ds389 pcp-pmda-ds389log -Requires: pcp-pmda-elasticsearch pcp-pmda-gpfs pcp-pmda-gpsd pcp-pmda-lustre -Requires: pcp-pmda-memcache pcp-pmda-named pcp-pmda-netfilter pcp-pmda-news -Requires: pcp-pmda-nginx pcp-pmda-nfsclient pcp-pmda-pdns pcp-pmda-postfix pcp-pmda-postgresql pcp-pmda-oracle -Requires: pcp-pmda-samba pcp-pmda-slurm pcp-pmda-zimbra -Requires: pcp-pmda-dm pcp-pmda-apache -Requires: pcp-pmda-bash pcp-pmda-cisco pcp-pmda-mailq pcp-pmda-mounts -Requires: pcp-pmda-nvidia-gpu pcp-pmda-roomtemp pcp-pmda-sendmail pcp-pmda-shping pcp-pmda-smart pcp-pmda-farm -Requires: pcp-pmda-hacluster pcp-pmda-lustrecomm pcp-pmda-logger pcp-pmda-denki pcp-pmda-docker pcp-pmda-bind2 -Requires: pcp-pmda-sockets pcp-pmda-podman -%if !%{disable_gfs2} -Requires: pcp-pmda-gfs2 -%endif -%if !%{disable_statsd} -Requires: pcp-pmda-statsd -%endif -%if !%{disable_nutcracker} -Requires: pcp-pmda-nutcracker -%endif -%if !%{disable_bcc} -Requires: pcp-pmda-bcc -%endif -%if !%{disable_bpf} -Requires: pcp-pmda-bpf -%endif -%if !%{disable_bpftrace} -Requires: pcp-pmda-bpftrace -%endif -%if !%{disable_python2} || !%{disable_python3} -Requires: pcp-geolocate pcp-export-pcp2openmetrics pcp-export-pcp2json -Requires: pcp-export-pcp2spark pcp-export-pcp2xml pcp-export-pcp2zabbix -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 pcp-pmda-uwsgi -Requires: pcp-pmda-openvswitch -%endif -%if !%{disable_mongodb} -Requires: pcp-pmda-mongodb -%endif -%if !%{disable_mssql} -Requires: pcp-pmda-mssql -%endif -%if !%{disable_mysql} -Requires: pcp-pmda-mysql -%endif -%if !%{disable_snmp} -Requires: pcp-pmda-snmp -%endif -%if !%{disable_json} -Requires: pcp-pmda-json -%endif -%if !%{disable_resctrl} -Requires: pcp-pmda-resctrl -%endif -Requires: pcp-pmda-summary pcp-pmda-trace pcp-pmda-weblog -%if !%{disable_amdgpu} -Requires: pcp-pmda-amdgpu -%endif -Requires: pcp-system-tools -%if !%{disable_qt} -Requires: pcp-gui -%endif Requires: bc gcc gzip bzip2 Requires: redhat-rpm-config %if !%{disable_selinux} Requires: selinux-policy-devel Requires: selinux-policy-targeted -%if 0%{?rhel} == 5 Requires: setools -%else -Requires: setools-console -%endif %endif %description testsuite @@ -781,6 +648,7 @@ Summary: Performance Co-Pilot tools for importing ganglia data into PCP archive URL: https://pcp.io Requires: pcp-libs = %{version}-%{release} Requires: perl-PCP-LogImport = %{version}-%{release} +BuildRequires: rrdtool-perl %description import-ganglia2pcp Performance Co-Pilot (PCP) front-end tools for importing ganglia data @@ -812,7 +680,37 @@ Requires: pcp-libs = %{version}-%{release} Performance Co-Pilot (PCP) module for exporting metrics from PCP to Zabbix via the Zabbix agent - see zbxpcp(3) for further details. -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} +# +# pcp-import-benchmarks +# +%package import-benchmarks +License: LGPL-2.1-or-later +Summary: Performance Co-Pilot tools importing benchmark results into PCP archive logs +URL: https://pcp.io +Requires: pcp-libs = %{version}-%{release} +Requires: python3-pcp = %{version}-%{release} +Obsoletes: pcp-import-guidellm2pcp <= 7.0.2 +Provides: pcp-import-guidellm2pcp = %{version}-%{release} + +%description import-benchmarks +Performance Co-Pilot (PCP) front-end tools for importing JSON benchmark +results files into PCP archives for replay with PCP analysis tools. + +# +# pcp-import-pmseries +# +%package import-pmseries +License: LGPL-2.1-or-later +Summary: Performance Co-Pilot tools importing PCP archives for pmseries queries +URL: https://pcp.io +Requires: pcp-libs >= %{version}-%{release} +Requires: python3-pcp = %{version}-%{release} + +%description import-pmseries +Performance Co-Pilot (PCP) tools for importing PCP archives into Valkey +or Redis for fast, scalable time series access via pmseries(1) queries. + # # pcp-geolocate # @@ -821,11 +719,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot geographical location metric labels 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 geolocate Performance Co-Pilot (PCP) tools that automatically apply metric labels @@ -840,15 +734,9 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to ElasticSearch URL: https://pcp.io Requires: pcp-libs >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} Requires: python3-requests BuildRequires: python3-requests -%else -Requires: %{__python2}-pcp = %{version}-%{release} -Requires: %{__python2}-requests -BuildRequires: %{__python2}-requests -%endif %description export-pcp2elasticsearch Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -863,11 +751,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to Graphite 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-pcp2graphite Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -880,13 +764,8 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to InfluxDB URL: https://pcp.io Requires: pcp-libs >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} Requires: python3-requests -%else -Requires: %{__python2}-pcp = %{version}-%{release} -Requires: %{__python2}-requests -%endif %description export-pcp2influxdb Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -900,11 +779,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics in JSON 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-pcp2json Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -918,16 +793,27 @@ 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-pcp2opentelemetry +# +%package export-pcp2opentelemetry +License: GPL-2.0-or-later +Summary: Performance Co-Pilot tools for exporting PCP metrics in OpenTelemetry format +URL: https://pcp.io +Requires: pcp-libs >= %{version}-%{release} +%if !%{disable_python3} +Requires: python3-pcp = %{version}-%{release} + +%description export-pcp2opentelemetry +Performance Co-Pilot (PCP) front-end tools for exporting metric values +in OpenTelemetry (https://opentelemetry.io/) format. + # # pcp-export-pcp2spark # @@ -936,11 +822,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to Apache Spark 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-pcp2spark Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -956,15 +838,9 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to Apache Arrow URL: https://pcp.io Requires: pcp-libs >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} Requires: python3-pyarrow BuildRequires: python3-pyarrow -%else -Requires: %{__python2}-pcp = %{version}-%{release} -Requires: %{__python2}-pyarrow -BuildRequires: %{__python2}-pyarrow -%endif %description export-pcp2arrow Performance Co-Pilot (PCP) front-end tool for exporting metric values @@ -980,15 +856,9 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to Excel URL: https://pcp.io Requires: pcp-libs >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} Requires: python3-openpyxl BuildRequires: python3-openpyxl -%else -Requires: %{__python2}-pcp = %{version}-%{release} -Requires: %{__python2}-openpyxl -BuildRequires: %{__python2}-openpyxl -%endif %description export-pcp2xlsx Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1003,11 +873,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics in XML 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-pcp2xml Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1021,11 +887,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot tools for exporting PCP metrics to Zabbix 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-pcp2zabbix Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1630,7 +1492,24 @@ extracting performance metrics from bpftrace scripts. # end pcp-pmda-bpftrace %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} +# +# pcp-pmda-hdb +# +%package pmda-hdb +License: GPL-3.0-or-later +Summary: Performance Co-Pilot (PCP) metrics for SAP HANA databases +URL: https://pcp.io +Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +Requires: python3-pcp +%if 0%{?rhel} > 8 || 0%{?fedora} > 0 +Requires: python3-packaging +%endif +%description pmda-hdb +This package provides a PMDA to export metric values about a SAP HANA +database (https://www.sap.com/products/data-cloud/hana.html). +#end pcp-pmda-hdb + # # pcp-pmda-gluster # @@ -1639,11 +1518,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for the Gluster filesystem 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-gluster This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the gluster filesystem. @@ -1657,11 +1532,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for NFS Clients 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-nfsclient This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics for NFS Clients. @@ -1675,15 +1546,9 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for PostgreSQL URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp Requires: python3-psycopg2 BuildRequires: python3-psycopg2 -%else -Requires: %{__python2}-pcp -Requires: %{__python2}-psycopg2 -BuildRequires: %{__python2}-psycopg2 -%endif %description pmda-postgresql This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the PostgreSQL database. @@ -1697,11 +1562,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for compressed swap 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-zswap This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about compressed swap. @@ -1715,11 +1576,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for the Unbound DNS Resolver 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-unbound This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the Unbound DNS Resolver. @@ -1733,11 +1590,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for Intel MIC cards 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-mic This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about Intel MIC cards. @@ -1751,11 +1604,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for HAProxy 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-haproxy This package contains the PCP Performance Metrics Domain Agent (PMDA) for extracting performance metrics from HAProxy over the HAProxy stats socket. @@ -1769,22 +1618,9 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics from virtual machines URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp Requires: libvirt-python3 python3-lxml BuildRequires: libvirt-python3 python3-lxml -%else -%if 0%{?rhel} == 0 || 0%{?fedora} >= 27 -Requires: %{__python2}-pcp -Requires: %{__python2}-libvirt %{__python2}-lxml -BuildRequires: %{__python2}-libvirt %{__python2}-lxml -%endif -%if 0%{?rhel} > 5 -Requires: %{__python2}-pcp -Requires: libvirt-%{__python2} %{__python2}-lxml -BuildRequires: libvirt-%{__python2} %{__python2}-lxml -%endif -%endif %description pmda-libvirt This package contains the PCP Performance Metrics Domain Agent (PMDA) for extracting virtualisation statistics from libvirt about behaviour of guest @@ -1799,11 +1635,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for Elasticsearch 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-elasticsearch This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about Elasticsearch. @@ -1817,11 +1649,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for Open vSwitch 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-openvswitch This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from Open vSwitch. @@ -1835,11 +1663,7 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for RabbitMQ queues 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-rabbitmq This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about RabbitMQ message queues. @@ -1853,11 +1677,7 @@ 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. @@ -1871,15 +1691,9 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for the LIO subsystem URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp Requires: python3-rtslib BuildRequires: python3-rtslib -%else -Requires: %{__python2}-pcp -Requires: %{__python2}-rtslib -BuildRequires: %{__python2}-rtslib -%endif %description pmda-lio This package provides a PMDA to gather performance metrics from the kernels iSCSI target interface (LIO). The metrics are stored by LIO within the Linux @@ -1896,24 +1710,31 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics from OpenMetrics endpoints URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp Requires: python3-requests BuildRequires: python3-requests -%else -Requires: %{__python2}-pcp -Requires: %{__python2}-requests -BuildRequires: %{__python2}-requests -%endif -Obsoletes: pcp-pmda-prometheus < 5.0.0 -Provides: pcp-pmda-prometheus < 5.0.0 -Obsoletes: pcp-pmda-vmware < 5.3.5 - %description pmda-openmetrics This package contains the PCP Performance Metrics Domain Agent (PMDA) for extracting metrics from OpenMetrics (https://openmetrics.io/) endpoints. #end pcp-pmda-openmetrics +# +# pcp-pmda-opentelemetry +# +%package pmda-opentelemetry +License: GPL-2.0-or-later +Summary: Performance Co-Pilot (PCP) metrics from OpenTelemetry endpoints +URL: https://pcp.io +Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +Requires: python3-pcp +Requires: python3-requests +BuildRequires: python3-requests +Obsoletes: pcp-pmda-json <= 7.0.0 +%description pmda-opentelemetry +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +extracting metrics from OpenTelemetry (https://opentelemetry.io/) endpoints. +#end pcp-pmda-opentelemetry + # # pcp-pmda-lmsensors # @@ -1923,11 +1744,7 @@ Summary: Performance Co-Pilot (PCP) metrics for hardware sensors URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} Requires: lm_sensors -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif # rewritten in python, so there is no longer a debuginfo package Obsoletes: pcp-pmda-lmsensors-debuginfo < 4.2.0 %description pmda-lmsensors @@ -1943,15 +1760,25 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for simple network checks 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-netcheck This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from simple network checks. # end pcp-pmda-netcheck + +# +# pcp-pmda-rocestat +# +%package pmda-rocestat +License: GPL-2.0-or-later +Summary: Performance Co-Pilot (PCP) metrics for nVidia RoCE devices +URL: https://pcp.io +Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +Requires: python3-pcp +%description pmda-rocestat +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices. +# end pcp-pmda-rocestat %endif %if !%{disable_mongodb} @@ -1963,19 +1790,11 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for MongoDB URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp %if 0%{?rhel} == 0 Requires: python3-pymongo BuildRequires: python3-pymongo %endif -%else -Requires: %{__python2}-pcp -%if 0%{?rhel} == 0 -Requires: %{__python2}-pymongo -BuildRequires: %{__python2}-pymongo -%endif -%endif %description pmda-mongodb This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from MongoDB. @@ -1991,49 +1810,17 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) metrics for Microsoft SQL Server URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp %if 0%{?rhel} == 0 || 0%{?rhel} >= 9 Requires: python3-pyodbc BuildRequires: python3-pyodbc %endif -%else -Requires: %{__python2}-pcp -%if 0%{?rhel} == 0 -Requires: %{__python2}-pyodbc -BuildRequires: %{__python2}-pyodbc -%endif -%endif %description pmda-mssql This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from Microsoft SQL Server. # end pcp-pmda-mssql %endif -%if !%{disable_json} -# -# pcp-pmda-json -# -%package pmda-json -License: GPL-2.0-or-later -Summary: Performance Co-Pilot (PCP) metrics for JSON data -URL: https://pcp.io -Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python3} -Requires: python3-pcp -Requires: python3-jsonpointer python3-six -BuildRequires: python3-jsonpointer python3-six -%else -Requires: %{__python2}-pcp -Requires: %{__python2}-jsonpointer %{__python2}-six -BuildRequires: %{__python2}-jsonpointer %{__python2}-six -%endif -%description pmda-json -This package contains the PCP Performance Metrics Domain Agent (PMDA) for -collecting metrics output in JSON. -# end pcp-pmda-json -%endif - # # C pmdas # pcp-pmda-apache @@ -2348,40 +2135,22 @@ Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} Requires: pcp-system-tools = %{version}-%{release} Requires: pcp-doc = %{version}-%{release} Requires: pcp-pmda-dm = %{version}-%{release} -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_bpf} +Requires: pcp-pmda-bpf = %{version}-%{release} +%endif +%if !%{disable_bpftrace} +Requires: pcp-pmda-bpftrace = %{version}-%{release} +%endif +%if !%{disable_python3} Requires: pcp-pmda-nfsclient = %{version}-%{release} Requires: pcp-pmda-openmetrics = %{version}-%{release} +Requires: pcp-pmda-opentelemetry = %{version}-%{release} %endif %description zeroconf This package contains configuration tweaks and files to increase metrics gathering frequency, several extended pmlogger configurations, as well as automated pmie diagnosis, alerting and self-healing for the localhost. -%if !%{disable_python2} -# -# python2-pcp. This is the PCP library bindings for python. -# -%package -n %{__python2}-pcp -License: GPL-2.0-or-later -Summary: Performance Co-Pilot (PCP) Python bindings and documentation -URL: https://pcp.io -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 < %{version} -%endif -%if 0%{?rhel} == 5 -Requires: python%{default_python} -%else -Requires: %{__python2} -%endif - -%description -n %{__python2}-pcp -This python PCP module contains the language bindings for -Performance Metric API (PMAPI) monitor tools and Performance -Metric Domain Agent (PMDA) collector tools written in Python. -%endif - %if !%{disable_python3} # # python3-pcp. This is the PCP library bindings for python3. @@ -2407,12 +2176,8 @@ License: GPL-2.0-or-later Summary: Performance Co-Pilot (PCP) System and Monitoring Tools URL: https://pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} -%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%else -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %if !%{disable_dstat} # https://fedoraproject.org/wiki/Packaging:Guidelines "Renaming/Replacing Existing Packages" Provides: dstat = %{version}-%{release} @@ -2504,10 +2269,7 @@ updated policy package. _build=`echo %{release} | sed -e 's/\..*$//'` sed -i "/PACKAGE_BUILD/s/=[0-9]*/=$_build/" VERSION.pcp -%if !%{disable_python2} && 0%{?default_python} != 3 -export PYTHON=python%{?default_python} -%endif -%configure %{?_with_multilib} %{?_with_initd} %{?_with_doc} %{?_with_dstat} %{?_with_ib} %{?_with_gfs2} %{?_with_statsd} %{?_with_perfevent} %{?_with_bcc} %{?_with_bpf} %{?_with_bpftrace} %{?_with_json} %{?_with_mongodb} %{?_with_mysql} %{?_with_snmp} %{?_with_nutcracker} %{?_with_python2} +%configure %{?_with_multilib} %{?_with_nondebug} %{?_with_initd} %{?_with_doc} %{?_with_dstat} %{?_with_ib} %{?_with_gfs2} %{?_with_statsd} %{?_with_perfevent} %{?_with_bcc} %{?_with_bpf} %{?_with_bpftrace} %{?_with_mongodb} %{?_with_mysql} %{?_with_snmp} %{?_with_nutcracker} make %{?_smp_mflags} default_pcp %install @@ -2551,8 +2313,11 @@ desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop %endif %if 0%{?rhel} || 0%{?fedora} -# Fedora and RHEL default local only access for pmcd and pmlogger -sed -i -e '/^# .*_LOCAL=1/s/^# //' $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/{pmcd,pmlogger} +# Fedora and RHEL default local only access for pmcd, pmproxy and pmlogger +if [ "$1" -eq 1 ] +then + sed -i -e '/^# .*_LOCAL=1/s/^# //' $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/{pmcd,pmproxy,pmlogger} +fi %endif # default chkconfig off (all RPM platforms) @@ -2651,12 +2416,15 @@ basic_manifest | grep -E -e 'pmiostat|pmrep|dstat|htop|pcp2csv' \ -e 'pcp-tapestat|pcp-uptime|pcp-verify|pcp-xsos' | \ cull 'selinux|pmlogconf|pmieconf|pmrepconf' >pcp-system-tools-files basic_manifest | keep 'geolocate' >pcp-geolocate-files +basic_manifest | keep 'pmseries_import' >pcp-import-pmseries-files basic_manifest | keep 'sar2pcp' >pcp-import-sar2pcp-files basic_manifest | keep 'iostat2pcp' >pcp-import-iostat2pcp-files basic_manifest | keep 'sheet2pcp' >pcp-import-sheet2pcp-files basic_manifest | keep 'mrtg2pcp' >pcp-import-mrtg2pcp-files basic_manifest | keep 'ganglia2pcp' >pcp-import-ganglia2pcp-files basic_manifest | keep 'collectl2pcp' >pcp-import-collectl2pcp-files +basic_manifest | keep 'guidellm2pcp' >pcp-import-benchmarks-files +basic_manifest | keep 'vllmbench2pcp' >pcp-import-benchmarks-files basic_manifest | keep 'pcp2arrow' >pcp-export-pcp2arrow-files basic_manifest | keep 'pcp2elasticsearch' >pcp-export-pcp2elasticsearch-files basic_manifest | keep 'pcp2influxdb' >pcp-export-pcp2influxdb-files @@ -2664,6 +2432,7 @@ 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 'pcp2opentelemetry' >pcp-export-pcp2opentelemetry-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 @@ -2693,8 +2462,8 @@ basic_manifest | keep '(etc/pcp|pmdas)/gpfs(/|$)' >pcp-pmda-gpfs-files basic_manifest | keep '(etc/pcp|pmdas)/gpsd(/|$)' >pcp-pmda-gpsd-files basic_manifest | keep '(etc/pcp|pmdas)/hacluster(/|$)' >pcp-pmda-hacluster-files basic_manifest | keep '(etc/pcp|pmdas)/haproxy(/|$)' >pcp-pmda-haproxy-files +basic_manifest | keep '(etc/pcp|pmdas)/hdb(/|$)' >pcp-pmda-hdb-files basic_manifest | keep '(etc/pcp|pmdas)/infiniband(/|$)' >pcp-pmda-infiniband-files -basic_manifest | keep '(etc/pcp|pmdas)/json(/|$)' >pcp-pmda-json-files basic_manifest | keep '(etc/pcp|pmdas)/libvirt(/|$)' >pcp-pmda-libvirt-files basic_manifest | keep '(etc/pcp|pmdas)/lio(/|$)' >pcp-pmda-lio-files basic_manifest | keep '(etc/pcp|pmdas)/lmsensors(/|$)' >pcp-pmda-lmsensors-files @@ -2717,6 +2486,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/nginx(/|$)' >pcp-pmda-nginx-files basic_manifest | keep '(etc/pcp|pmdas)/nutcracker(/|$)' >pcp-pmda-nutcracker-files basic_manifest | keep '(etc/pcp|pmdas)/nvidia(/|$)' >pcp-pmda-nvidia-files basic_manifest | keep '(etc/pcp|pmdas)/openmetrics(/|$)' >pcp-pmda-openmetrics-files +basic_manifest | keep '(etc/pcp|pmdas)/opentelemetry(/|$)' >pcp-pmda-opentelemetry-files basic_manifest | keep '(etc/pcp|pmdas|pmieconf)/openvswitch(/|$)' >pcp-pmda-openvswitch-files basic_manifest | keep '(etc/pcp|pmdas)/oracle(/|$)' >pcp-pmda-oracle-files basic_manifest | keep '(etc/pcp|pmdas)/pdns(/|$)' >pcp-pmda-pdns-files @@ -2727,6 +2497,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/postgresql(/|$)' >pcp-pmda-postgresql-fil basic_manifest | keep '(etc/pcp|pmdas)/rabbitmq(/|$)' >pcp-pmda-rabbitmq-files basic_manifest | keep '(etc/pcp|pmdas)/redis(/|$)' >pcp-pmda-redis-files basic_manifest | keep '(etc/pcp|pmdas)/resctrl(/|$)|sys-fs-resctrl' >pcp-pmda-resctrl-files +basic_manifest | keep '(etc/pcp|pmdas)/rocestat(/|$)' >pcp-pmda-rocestat-files basic_manifest | keep '(etc/pcp|pmdas)/roomtemp(/|$)' >pcp-pmda-roomtemp-files basic_manifest | keep '(etc/pcp|pmdas)/rpm(/|$)' >pcp-pmda-rpm-files basic_manifest | keep '(etc/pcp|pmdas)/rsyslog(/|$)' >pcp-pmda-rsyslog-files @@ -2756,16 +2527,15 @@ for pmda_package in \ elasticsearch \ farm \ gfs2 gluster gpfs gpsd \ - hacluster haproxy \ + hacluster haproxy hdb \ infiniband \ - json \ libvirt lio lmsensors logger lustre lustrecomm \ mailq memcache mic mounts mongodb mssql mysql \ named netcheck netfilter news nfsclient nginx \ nutcracker nvidia \ - openmetrics openvswitch oracle \ + openmetrics opentelemetry openvswitch oracle \ pdns perfevent podman postfix postgresql \ - rabbitmq redis resctrl roomtemp rpm rsyslog \ + rabbitmq redis resctrl rocestat roomtemp rpm rsyslog \ samba sendmail shping slurm smart snmp \ sockets statsd summary systemd \ unbound uwsgi \ @@ -2777,6 +2547,7 @@ do \ done for import_package in \ + pmseries benchmarks \ collectl2pcp iostat2pcp ganglia2pcp mrtg2pcp sar2pcp sheet2pcp ; \ do \ import_packages="$import_packages pcp-import-$import_package"; \ @@ -2784,7 +2555,8 @@ done for export_package in \ pcp2arrow pcp2elasticsearch pcp2graphite pcp2influxdb pcp2json \ - pcp2openmetrics pcp2spark pcp2xlsx pcp2xml pcp2zabbix zabbix-agent ; \ + pcp2openmetrics pcp2spark pcp2xlsx pcp2xml pcp2opentelemetry \ + pcp2zabbix zabbix-agent ; \ do \ export_packages="$export_packages pcp-export-$export_package"; \ done @@ -2910,6 +2682,8 @@ chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null exit 0 %post testsuite +PCP_PMDAS_DIR=%{_pmdasdir} +PCP_PMCDCONF_PATH=%{_confdir}/pmcd/pmcd.conf %if !%{disable_selinux} PCP_SELINUX_DIR=%{_selinuxdir} semodule -r pcpqa >/dev/null 2>&1 || true @@ -2917,6 +2691,14 @@ semodule -r pcpqa >/dev/null 2>&1 || true %selinux_relabel_post -s targeted %endif chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null +# auto-install important PMDAs for testing (if not present already) +needinstall='sample simple' +for PMDA in $needinstall ; do + if ! grep -q "$PMDA/pmda$PMDA" "$PCP_PMCDCONF_PATH" + then + %{install_file "$PCP_PMDAS_DIR/$PMDA" .NeedInstall} + fi +done %if 0%{?rhel} %if !%{disable_systemd} systemctl restart pcp-reboot-init pmcd pmlogger >/dev/null 2>&1 @@ -2973,11 +2755,6 @@ exit 0 %{pmda_remove "$1" "statsd"} %endif -%if !%{disable_json} -%preun pmda-json -%{pmda_remove "$1" "json"} -%endif - %preun pmda-nginx %{pmda_remove "$1" "nginx"} @@ -3048,6 +2825,9 @@ exit 0 %preun pmda-openmetrics %{pmda_remove "$1" "openmetrics"} +%preun pmda-opentelemetry +%{pmda_remove "$1" "opentelemetry"} + %preun pmda-lustre %{pmda_remove "$1" "lustre"} @@ -3107,7 +2887,10 @@ exit 0 %{pmda_remove "$1" "bpftrace"} %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} +%preun pmda-hdb +%{pmda_remove "$1" "hdb"} + %preun pmda-gluster %{pmda_remove "$1" "gluster"} @@ -3142,6 +2925,9 @@ exit 0 %preun pmda-netcheck %{pmda_remove "$1" "netcheck"} +%preun pmda-rocestat +%{pmda_remove "$1" "rocestat"} + %endif %preun pmda-apache @@ -3243,7 +3029,11 @@ PCP_PMDAS_DIR=%{_pmdasdir} PCP_SYSCONFIG_DIR=%{_sysconfdir}/sysconfig PCP_PMCDCONF_PATH=%{_confdir}/pmcd/pmcd.conf # auto-install important PMDAs for RH Support (if not present already) -for PMDA in dm nfsclient openmetrics ; do +needinstall='dm' +%if !%{disable_python3} +needinstall="$needinstall nfsclient openmetrics opentelemetry" +%endif +for PMDA in $needinstall ; do if ! grep -q "$PMDA/pmda$PMDA" "$PCP_PMCDCONF_PATH" then %{install_file "$PCP_PMDAS_DIR/$PMDA" .NeedInstall} @@ -3252,7 +3042,7 @@ done # managed via /usr/lib/systemd/system-preset/90-default.preset nowadays: %if 0%{?fedora} > 40 || 0%{?rhel} > 9 for s in pmcd pmlogger pmie; do - systemctl --quiet is-enabled $s && systemctl restart $s >/dev/null 2>&1 + systemctl --quiet is-enabled $s && systemctl --quiet restart $s || true done %else # old-school methods follow %if !%{disable_systemd} @@ -3377,7 +3167,7 @@ fi %files pmda-nutcracker -f pcp-pmda-nutcracker-files.rpm %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files pmda-elasticsearch -f pcp-pmda-elasticsearch-files.rpm %endif @@ -3433,7 +3223,7 @@ fi %files pmda-postfix -f pcp-pmda-postfix-files.rpm %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files pmda-postgresql -f pcp-pmda-postgresql-files.rpm %endif @@ -3459,7 +3249,7 @@ fi %files pmda-bpftrace -f pcp-pmda-bpftrace-files.rpm %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files geolocate -f pcp-geolocate-files.rpm %files pmda-gluster -f pcp-pmda-gluster-files.rpm @@ -3490,6 +3280,8 @@ fi %files pmda-rabbitmq -f pcp-pmda-rabbitmq-files.rpm +%files pmda-rocestat -f pcp-pmda-rocestat-files.rpm + %files pmda-uwsgi -f pcp-pmda-uwsgi-files.rpm %files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm @@ -3498,6 +3290,8 @@ fi %files export-pcp2openmetrics -f pcp-export-pcp2openmetrics-files.rpm +%files export-pcp2opentelemetry -f pcp-export-pcp2opentelemetry-files.rpm + %files export-pcp2spark -f pcp-export-pcp2spark-files.rpm %files export-pcp2xml -f pcp-export-pcp2xml-files.rpm @@ -3505,11 +3299,11 @@ fi %files export-pcp2zabbix -f pcp-export-pcp2zabbix-files.rpm %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files export-pcp2elasticsearch -f pcp-export-pcp2elasticsearch-files.rpm %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files export-pcp2influxdb -f pcp-export-pcp2influxdb-files.rpm %endif @@ -3523,11 +3317,9 @@ fi %files export-zabbix-agent -f pcp-export-zabbix-agent-files.rpm -%if !%{disable_json} -%files pmda-json -f pcp-pmda-json-files.rpm -%endif +%if !%{disable_python3} +%files pmda-hdb -f pcp-pmda-hdb-files.rpm -%if !%{disable_python2} || !%{disable_python3} %files pmda-libvirt -f pcp-pmda-libvirt-files.rpm %files pmda-lio -f pcp-pmda-lio-files.rpm @@ -3535,6 +3327,9 @@ fi %files pmda-openmetrics -f pcp-pmda-openmetrics-files.rpm %endif +%files pmda-opentelemetry -f pcp-pmda-opentelemetry-files.rpm +%endif + %if !%{disable_amdgpu} %files pmda-amdgpu -f pcp-pmda-amdgpu-files.rpm %endif @@ -3587,6 +3382,12 @@ fi %files pmda-weblog -f pcp-pmda-weblog-files.rpm +%if !%{disable_python3} +%files import-pmseries -f pcp-import-pmseries-files.rpm + +%files import-benchmarks -f pcp-import-benchmarks-files.rpm +%endif + %if !%{disable_perl} %files import-sar2pcp -f pcp-import-sar2pcp-files.rpm @@ -3612,10 +3413,6 @@ fi %files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list %endif -%if !%{disable_python2} -%files -n %{__python2}-pcp -f python-pcp.list.rpm -%endif - %if !%{disable_python3} %files -n python3-pcp -f python3-pcp.list.rpm %endif @@ -3625,6 +3422,9 @@ fi %files zeroconf -f pcp-zeroconf-files.rpm %changelog +* Wed Nov 12 2025 William Cohen - 7.0.3-1 +- Update to latest stable version of PCP (RHEL-124897) + * Fri Jun 27 2025 Nathan Scott - 6.3.7-5 - Make pcp-zeroconf start enabled services once again (RHEL-93182) - Fix python PMDA wrapper handling of list objects diff --git a/pmapi-header-multilib-fix.patch b/pmapi-header-multilib-fix.patch deleted file mode 100644 index b26db21..0000000 --- a/pmapi-header-multilib-fix.patch +++ /dev/null @@ -1,202 +0,0 @@ -diff -Naurp pcp-6.3.7.orig/configure pcp-6.3.7/configure ---- pcp-6.3.7.orig/configure 2025-03-31 12:41:26.000000000 +1100 -+++ pcp-6.3.7/configure 2025-06-26 19:38:57.864414825 +1000 -@@ -932,6 +932,7 @@ sed - SED - awk - AWK -+enable_multilib - enable_shared - cxx - ac_ct_CXX -@@ -1055,6 +1056,7 @@ enable_ssp - enable_pie - enable_visibility - enable_shared -+enable_multilib - with_perl_installdirs - with_perl_install_base - with_python_prefix -@@ -1748,7 +1750,8 @@ Optional Features: - --disable-ssp disable gcc stack-protector - --disable-pie disable position-independent-executable - --disable-visibility disable gcc symbol visibility -- --disable-shared disable core shared libary generation -+ --disable-shared disable core shared library generation -+ --enable-multilib enable multilib installations - - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -@@ -5696,6 +5699,21 @@ else case e in #( - esac - fi - -+ -+ -+# Check whether --enable-multilib was given. -+if test ${enable_multilib+y} -+then : -+ enableval=$enable_multilib; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --enable-multilib=$withval" -+ -+printf "%s\n" "#define HAVE_MULTILIB 1" >>confdefs.h -+ -+ enable_multilib=true -+else case e in #( -+ e) enable_multilib=false ;; -+esac -+fi -+ - - - -diff -Naurp pcp-6.3.7.orig/configure.ac pcp-6.3.7/configure.ac ---- pcp-6.3.7.orig/configure.ac 2025-03-31 12:41:26.000000000 +1100 -+++ pcp-6.3.7/configure.ac 2025-06-26 19:38:57.867577540 +1000 -@@ -655,11 +655,20 @@ AC_LANG_POP([C++]) - - dnl Prevent shared libraries from being built for libpcp and other core libraries - AC_ARG_ENABLE([shared], -- [AS_HELP_STRING([--disable-shared], [disable core shared libary generation])], -+ [AS_HELP_STRING([--disable-shared], [disable core shared library generation])], - [PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --disable-shared=$withval"], - [enable_shared=false]) - AC_SUBST(enable_shared) - -+dnl Support installing both devel package variants on either 32/64 bit platform -+AC_ARG_ENABLE([multilib], -+ [AS_HELP_STRING([--enable-multilib], [enable multilib installations])], -+ [PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --enable-multilib=$withval" -+ AC_DEFINE(HAVE_MULTILIB, [1], [multilib defined]) -+ enable_multilib=true], -+ [enable_multilib=false]) -+AC_SUBST(enable_multilib) -+ - dnl check if user wants to use any of their own commands; - dnl ordering is important: some tests use earlier results - -diff -Naurp pcp-6.3.7.orig/src/include/builddefs.in pcp-6.3.7/src/include/builddefs.in ---- pcp-6.3.7.orig/src/include/builddefs.in 2025-03-27 17:01:59.000000000 +1100 -+++ pcp-6.3.7/src/include/builddefs.in 2025-06-26 19:38:57.869743878 +1000 -@@ -259,6 +259,7 @@ QT_VERSION = @qt_version@ - CLANG_MAJOR_VERSION = @CLANG_MAJOR_VERSION@ - - # configuration state affecting the entire build -+ENABLE_MULTILIB = @enable_multilib@ - ENABLE_SHARED = @enable_shared@ - ENABLE_SECURE = @enable_secure@ - ENABLE_PROBES = @enable_probes@ -diff -Naurp pcp-6.3.7.orig/src/include/pcp/config32.h pcp-6.3.7/src/include/pcp/config32.h ---- pcp-6.3.7.orig/src/include/pcp/config32.h 2024-07-30 16:43:55.000000000 +1000 -+++ pcp-6.3.7/src/include/pcp/config32.h 2025-06-26 19:38:57.871096964 +1000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2014,2016 Red Hat. -+ * Copyright (c) 2014,2016,2025 Red Hat. - * Headers for "multilib" support (32-bit and 64-bit packages co-existing) - * - * This library is free software; you can redistribute it and/or modify it -@@ -19,5 +19,7 @@ - #define HAVE_32BIT_LONG 1 - #define HAVE_32BIT_PTR 1 - /* #undef HAVE_64BIT_PTR */ -+#define PM_PAD_RESULT 4 -+#define PM_PAD_TIMESPEC 4 - - #endif /* PCP_CONFIG32_H */ -diff -Naurp pcp-6.3.7.orig/src/include/pcp/config64.h pcp-6.3.7/src/include/pcp/config64.h ---- pcp-6.3.7.orig/src/include/pcp/config64.h 2024-07-30 16:43:55.000000000 +1000 -+++ pcp-6.3.7/src/include/pcp/config64.h 2025-06-26 19:38:57.871276548 +1000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2014,2016 Red Hat. -+ * Copyright (c) 2014,2016,2025 Red Hat. - * Headers for "multilib" support (32-bit and 64-bit packages co-existing) - * - * This library is free software; you can redistribute it and/or modify it -@@ -19,5 +19,7 @@ - /* #undef HAVE_32BIT_LONG */ - /* #undef HAVE_32BIT_PTR */ - #define HAVE_64BIT_PTR 1 -+/* #undef PM_PAD_RESULT */ -+/* #undef PM_PAD_TIMESPEC */ - - #endif /* PCP_CONFIG64_H */ -diff -Naurp pcp-6.3.7.orig/src/include/pcp/config.h.in pcp-6.3.7/src/include/pcp/config.h.in ---- pcp-6.3.7.orig/src/include/pcp/config.h.in 2025-03-14 14:41:06.000000000 +1100 -+++ pcp-6.3.7/src/include/pcp/config.h.in 2025-06-26 19:38:57.871702924 +1000 -@@ -792,6 +792,9 @@ - #undef HAVE__ETEXT - #undef HAVE_ETEXT - -+/* multilib headers */ -+#undef HAVE_MULTILIB -+ - /* sizeof suseconds_t ... only ever going to exist on linux-like systems */ - #undef PM_SIZEOF_SUSECONDS_T - -@@ -801,9 +804,3 @@ - #ifndef PM_SIZEOF_TIME_T - #error Unknown time_t size - #endif -- --/* __pmResult padding */ --#undef PM_PAD_RESULT -- --/* timespec padding */ --#undef PM_PAD_TIMESPEC -diff -Naurp pcp-6.3.7.orig/src/include/pcp/configsz.h.in pcp-6.3.7/src/include/pcp/configsz.h.in ---- pcp-6.3.7.orig/src/include/pcp/configsz.h.in 2024-07-30 16:43:55.000000000 +1000 -+++ pcp-6.3.7/src/include/pcp/configsz.h.in 2025-06-26 19:38:57.872742426 +1000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2014-2017 Red Hat. -+ * Copyright (c) 2014-2017,2025 Red Hat. - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -26,4 +26,10 @@ - /* pointer size */ - #undef HAVE_64BIT_PTR - -+/* __pmResult padding */ -+#undef PM_PAD_RESULT -+ -+/* timespec padding */ -+#undef PM_PAD_TIMESPEC -+ - #endif /* PCP_CONFIGSZ_H */ -diff -Naurp pcp-6.3.7.orig/src/include/pcp/GNUmakefile pcp-6.3.7/src/include/pcp/GNUmakefile ---- pcp-6.3.7.orig/src/include/pcp/GNUmakefile 2024-07-30 16:43:55.000000000 +1000 -+++ pcp-6.3.7/src/include/pcp/GNUmakefile 2025-06-26 19:38:57.873157593 +1000 -@@ -22,11 +22,16 @@ SDSH_HFILES = sds.h sdsalloc.h - EXTERNAL_HFILES = dict.h - HFILES = pmapi.h impl.h pmda.h pmtime.h pmdaroot.h pmafm.h \ - trace.h trace_dev.h mmv_stats.h mmv_dev.h import.h \ -- config32.h config64.h platform32.h platform64.h \ - pmjson.h pmhttp.h pmdbg.h pmwebapi.h deprecated.h \ - ini.h sds.h dict.h archive.h --INFILES = config.h.in configsz.h.in platform_defs.h.in platformsz.h.in --CONFFILES = config.h configsz.h platform_defs.h platformsz.h -+INFILES = config.h.in platform_defs.h.in -+CONFFILES = config.h platform_defs.h -+ifeq "$(ENABLE_MULTILIB)" "true" -+HFILES += config32.h config64.h platform32.h platform64.h -+else -+INFILES += configsz.h.in platformsz.h.in -+CONFFILES += configsz.h platformsz.h -+endif - GENERATED_HFILES = $(CONFFILES) - NOSHIP_HFILES = libpcp.h sdsalloc.h - -diff -Naurp pcp-6.3.7.orig/src/include/pcp/platform_defs.h.in pcp-6.3.7/src/include/pcp/platform_defs.h.in ---- pcp-6.3.7.orig/src/include/pcp/platform_defs.h.in 2025-03-31 12:41:26.000000000 +1100 -+++ pcp-6.3.7/src/include/pcp/platform_defs.h.in 2025-06-26 19:38:57.873423552 +1000 -@@ -36,7 +36,7 @@ extern "C" { - #define FMT_PID "@fmt_pid@" - #define FMT_PTHREAD "@fmt_pthread@" - --#ifdef HAVE_BITS_WORDSIZE_H -+#if defined(HAVE_MULTILIB) && defined(HAVE_BITS_WORDSIZE_H) - #include - #if __WORDSIZE == 32 - #include "config32.h" diff --git a/pmda-openmetrics-rollup.patch b/pmda-openmetrics-rollup.patch deleted file mode 100644 index e63f800..0000000 --- a/pmda-openmetrics-rollup.patch +++ /dev/null @@ -1,465 +0,0 @@ -diff -Naurp pcp-6.3.7.orig/qa/1976 pcp-6.3.7/qa/1976 ---- pcp-6.3.7.orig/qa/1976 1970-01-01 10:00:00.000000000 +1000 -+++ pcp-6.3.7/qa/1976 2025-06-26 18:02:39.313416612 +1000 -@@ -0,0 +1,85 @@ -+#!/bin/sh -+# PCP QA Test No. 1976 -+# Test pmdaopenmetrics metric removal -+# -+# Copyright (c) 2017, 2025 Red Hat. All Rights Reserved. -+# -+seq=`basename $0` -+echo "QA output created by $seq" -+ -+# get standard environment, filters and checks -+. ./common.openmetrics -+ -+_pmdaopenmetrics_check || _notrun "openmetrics pmda not installed" -+ -+status=1 # failure is the default! -+ -+_cleanup() -+{ -+ cd $here -+ _pmdaopenmetrics_cleanup -+ $sudo rm -rf $tmp $tmp.* -+} -+ -+_prepare_pmda openmetrics -+trap "_cleanup; exit \$status" 0 1 2 3 15 -+_stop_auto_restart pmcd -+ -+_pmdaopenmetrics_save_config -+ -+# add all the sample text files as urls. -+# need to be a place the user $PCP_USER (pmcd) can read -+# -+( cd $here/openmetrics/samples; ls -1 *.txt ) | sort | while read file -+do -+ cp $here/openmetrics/samples/$file $tmp.$file -+ urlbase=`basename "$file" .txt | tr .- _` -+ echo 'file://'$tmp.$file >$tmp.tmp -+ $sudo cp $tmp.tmp $PCP_PMDAS_DIR/openmetrics/config.d/$urlbase.url -+done -+ls -l $PCP_PMDAS_DIR/openmetrics/config.d >>$seq_full -+ -+# add all the sample scripts -+cp -a $here/openmetrics/scripts/* $PCP_PMDAS_DIR/openmetrics/config.d -+find $PCP_PMDAS_DIR/openmetrics/config.d -name GNU\* -exec rm -f {} ";" -+ -+_pmdaopenmetrics_install -+ -+if ! _pmdaopenmetrics_wait_for_metric openmetrics.thermostat -+then -+ status=1 -+ exit -+fi -+ -+echo "-- metric removal of new source/metric --" -+$sudo rm $PCP_PMDAS_DIR/openmetrics/config.d/simple_metric.url -+pminfo openmetrics.simple_metric -+echo -+ -+echo "-- source re-addition --" -+# same access controls logic as above, user $PCP_USER needs to be -+# able to read the file at the end of the URL -+# -+cp $here/openmetrics/samples/simple_metric.txt $tmp.simple_metric.txt -+echo 'file:///'$tmp.simple_metric.txt >$PCP_PMDAS_DIR/openmetrics/config.d/simple_metric.url -+pminfo openmetrics.simple_metric -+echo -+ -+echo "-- metric removal of recognized source/metric --" -+$sudo rm $PCP_PMDAS_DIR/openmetrics/config.d/simple_metric.url -+pminfo openmetrics.simple_metric -+echo -+ -+echo "-- source re-addition with epoch timestamp --" -+txtpath=$here/openmetrics/samples/simple_metric.txt -+urlfile=$PCP_PMDAS_DIR/openmetrics/config.d/simple_metric.url -+echo 'file:///'$txtpath > $urlfile -+$sudo touch -t 197001010000 $urlfile -+pminfo openmetrics.simple_metric -+echo -+ -+_pmdaopenmetrics_remove >/dev/null 2>&1 -+ -+# success, all done -+status=0 -+exit -diff -Naurp pcp-6.3.7.orig/qa/1976.out pcp-6.3.7/qa/1976.out ---- pcp-6.3.7.orig/qa/1976.out 1970-01-01 10:00:00.000000000 +1000 -+++ pcp-6.3.7/qa/1976.out 2025-06-26 18:02:01.879861640 +1000 -@@ -0,0 +1,17 @@ -+QA output created by 1976 -+ -+=== openmetrics agent installation === -+-- metric removal of new source/metric -- -+Error: openmetrics.simple_metric: Unknown metric name -+ -+-- source re-addition -- -+openmetrics.simple_metric.metric2 -+openmetrics.simple_metric.metric1 -+ -+-- metric removal of recognized source/metric -- -+Error: openmetrics.simple_metric: Unknown metric name -+ -+-- source re-addition with epoch timestamp -- -+openmetrics.simple_metric.metric2 -+openmetrics.simple_metric.metric1 -+ -diff -Naurp pcp-6.3.7.orig/qa/group pcp-6.3.7/qa/group ---- pcp-6.3.7.orig/qa/group 2025-06-26 17:55:37.790462638 +1000 -+++ pcp-6.3.7/qa/group 2025-06-26 17:58:18.996389423 +1000 -@@ -2205,6 +2205,7 @@ pmcd.pdu - 1963 pmda.linux local - 1970 pmda.bpf local - 1973 pcp zoneinfo python local -+1976 pmdaopenmetrics python local - 1978 atop local pmlogrewrite - 1984 pmlogconf pmda.redis local - 1985 pmfind local valgrind -diff -Naurp pcp-6.3.7.orig/qa/openmetrics/scripts/curl/script.sh pcp-6.3.7/qa/openmetrics/scripts/curl/script.sh ---- pcp-6.3.7.orig/qa/openmetrics/scripts/curl/script.sh 2023-11-16 17:51:39.000000000 +1100 -+++ pcp-6.3.7/qa/openmetrics/scripts/curl/script.sh 2025-06-26 18:02:50.155355973 +1000 -@@ -1,4 +1,4 @@ - #! /bin/sh - - . /etc/pcp.conf --curl -Gq file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt -+curl -Gqs file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt -diff -Naurp pcp-6.3.7.orig/qa/openmetrics/scripts/curl_filtered.sh pcp-6.3.7/qa/openmetrics/scripts/curl_filtered.sh ---- pcp-6.3.7.orig/qa/openmetrics/scripts/curl_filtered.sh 2023-11-16 17:51:39.000000000 +1100 -+++ pcp-6.3.7/qa/openmetrics/scripts/curl_filtered.sh 2025-06-26 18:02:50.155694515 +1000 -@@ -7,6 +7,6 @@ - - . /etc/pcp.conf - --( curl -Gq file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt ; \ --curl -Gq file://$PCP_PMDAS_DIR/openmetrics/config.d/some_other_metric.txt) \ -+( curl -Gqs file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt ; \ -+curl -Gqs file://$PCP_PMDAS_DIR/openmetrics/config.d/some_other_metric.txt) \ - | sed -e '/metric2/d' -diff -Naurp pcp-6.3.7.orig/qa/openmetrics/scripts/curl_hostname_label.sh pcp-6.3.7/qa/openmetrics/scripts/curl_hostname_label.sh ---- pcp-6.3.7.orig/qa/openmetrics/scripts/curl_hostname_label.sh 2023-11-16 17:51:39.000000000 +1100 -+++ pcp-6.3.7/qa/openmetrics/scripts/curl_hostname_label.sh 2025-06-26 18:02:50.155942641 +1000 -@@ -12,5 +12,5 @@ - - # here for QA purposes we're fetching from a local file - # and just pretending it came from a remote host. --curl -q -G file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt 2>/dev/null | \ -+curl -Gqs file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt 2>/dev/null | \ - sed -e 's/[a-z0-9]*=/hostname="remotehost",&/' -diff -Naurp pcp-6.3.7.orig/qa/openmetrics/scripts/curl_scripted.sh pcp-6.3.7/qa/openmetrics/scripts/curl_scripted.sh ---- pcp-6.3.7.orig/qa/openmetrics/scripts/curl_scripted.sh 2023-11-16 17:51:39.000000000 +1100 -+++ pcp-6.3.7/qa/openmetrics/scripts/curl_scripted.sh 2025-06-26 18:02:50.156229975 +1000 -@@ -1,5 +1,5 @@ - #! /bin/sh - - . /etc/pcp.conf --curl -Gq file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt --curl -Gq file://$PCP_PMDAS_DIR/openmetrics/config.d/some_other_metric.txt -+curl -Gqs file://$PCP_PMDAS_DIR/openmetrics/config.d/some_metric.txt -+curl -Gqs file://$PCP_PMDAS_DIR/openmetrics/config.d/some_other_metric.txt -diff -Naurp pcp-6.3.7.orig/src/pmdas/openmetrics/pmdaopenmetrics.python pcp-6.3.7/src/pmdas/openmetrics/pmdaopenmetrics.python ---- pcp-6.3.7.orig/src/pmdas/openmetrics/pmdaopenmetrics.python 2025-06-26 17:55:37.790973098 +1000 -+++ pcp-6.3.7/src/pmdas/openmetrics/pmdaopenmetrics.python 2025-06-26 18:02:26.571388227 +1000 -@@ -32,7 +32,8 @@ import subprocess - import sys - from ctypes import c_int - from socket import gethostname --from stat import ST_MODE, S_IXUSR, ST_CTIME -+from urllib.parse import urlparse -+from stat import ST_MODE, S_IXUSR - import requests - - from pcp.pmapi import pmUnits, pmContext -@@ -127,15 +128,9 @@ class Metric(object): - (name, pmContext.pmIDStr(self.pmid), self.mtype, self.msem, self.singular, self.mindom, self.labels)) - - self.obj = pmdaMetric(self.pmid, self.mtype, self.mindom, self.msem, self.munits) -+ self.source.pmda.all_metrics[self.mname] = self.obj - -- if helpline: # it could be None! -- unescaped = helpline.replace('\\\\', '\\').replace('\\n', '\n') -- split = unescaped.split('\n') -- help_oneline = split[0] # must have at least one entry -- help_text = '\n'.join(split[1:]) # may have other entries -- else: -- help_oneline = '' -- help_text = '' -+ help_text, help_oneline = self.source.helptext(helpline) - - try: - self.source.pmda.add_metric(self.mname, self.obj, help_oneline, help_text) -@@ -565,7 +560,7 @@ class Source(object): - self.path = path # pathname to .url or executable file - self.url = None - self.parse_error = False -- self.parse_url_time = 0 # timestamp of config file when it was last parsed -+ self.parse_time = None # last time config file was parsed - self.is_scripted = is_scripted - self.pmda = thispmda # the shared pmda - self.requests = None -@@ -588,6 +583,16 @@ class Source(object): - self.metrics_by_name = {} # name -> Metric - self.metrics_by_num = {} # number (last component of pmid) -> Metric - -+ def helptext(self, helpline): -+ if helpline: # it could be None! -+ unescaped = helpline.replace('\\\\', '\\').replace('\\n', '\n') -+ split = unescaped.split('\n') -+ help_oneline = split[0] # must have at least one entry -+ help_text = '\n'.join(split[1:]) # may have other entries -+ else: -+ help_oneline = '' -+ help_text = '' -+ return help_text, help_oneline - - def old_enough_for_refresh(self): - '''But what is "old"? If it is empty (no metrics), then it -@@ -685,6 +690,23 @@ class Source(object): - self.pmda.debug("included_labels '%s'" % (included_labels)) if self.pmda.dbg else None - self.pmda.debug("optional_labels '%s'" % (optional_labels)) if self.pmda.dbg else None - if sp.name in self.metrics_by_name: -+ if ("openmetrics.%s.%s" % (self.name, sp.name)) not in self.pmda.all_metrics and self.name in self.pmda.re_add_list: -+ # re-add metric to namespace -+ if pcpline: -+ split = pcpline.split(" ") -+ fullname = "openmetrics.%s.%s" % (self.name, split[1]) -+ else: -+ fullname = "openmetrics.%s.%s" % (self.name, sp.name.replace(":", ".")) -+ help_oneline, help_text = self.helptext(helpline) -+ try: -+ obj = self.pmda.removed_metrics[fullname] -+ self.pmda.add_metric(fullname, obj, help_oneline, help_text) -+ self.pmda.debug("re-adding metric: %s to namespace" % fullname) if self.pmda.dbg else None -+ self.pmda.all_metrics[fullname] = obj -+ del self.pmda.removed_metrics[fullname] -+ self.pmda.set_need_refresh() -+ except Exception as e: -+ self.pmda.debug("Can't re-add metric: %s, see error: %s" % (fullname, e)) if self.pmda.dbg else None - m = self.metrics_by_name[sp.name] - assert self.metrics_by_num[m.metricnum] == m - if m.singular: -@@ -693,6 +715,7 @@ class Source(object): - else: - m.store_inst(naming_labels, sp.value) - self.pmda.debug("naming_labels '%s'" % (naming_labels)) if self.pmda.dbg else None -+ # new metric case - else: - # check metric is not excluded by filters - fullname = "openmetrics.%s.%s" % (self.name, sp.name) -@@ -800,9 +823,9 @@ class Source(object): - - return num_metrics - -- def parse_url_config(self, filepath): -+ def parse_config(self, filepath): - ''' -- Parse a URL config file. The first line is always the URL. -+ Parse a configuration file. The first line is always the URL. - Remaining lines are prefixed with a keyword. Supported keywords - include '#' for a comment, 'HEADER:' to add to the header passed - to the headers dict parameter to the get() call. Note the ':' are -@@ -900,12 +923,12 @@ class Source(object): - if not s[ST_MODE] & S_IXUSR: - self.pmda.err("cannot execute script '%s'" % self.path) - return -- elif self.parse_url_time < s[ST_CTIME]: -+ elif self.parse_time is None or self.parse_time < s.st_mtime_ns: - # (re)parse the URL from given file -- self.parse_url_config(self.path) -- self.parse_url_time = s[ST_CTIME] -+ self.parse_config(self.path) -+ self.parse_time = s.st_mtime_ns - except Exception as e: -- self.pmda.err("cannot read %s: %s" % (self.path, e)) -+ self.pmda.err("cannot stat %s: %s" % (self.path, e)) - return - - # fetch the document -@@ -1001,7 +1024,7 @@ class OpenMetricsPMDA(PMDA): - # now everything else may take time - self.pmda_name = pmda_name - self.config_dir = os.path.normpath(config) -- self.config_dir_ctime = None -+ self.config_dir_mtime = 0.0 - self.timeout = timeout - - # a single central Session that all our sources can concurrently reuse -@@ -1014,6 +1037,11 @@ class OpenMetricsPMDA(PMDA): - reserved_cluster = self.cluster_table.intern_lookup_value("control") - assert reserved_cluster == 0 - self.source_by_cluster = {} -+ # all metrics added, to be used for removal -+ self.all_metrics = {} -+ # keep track of removed metrics, in case of re-addition -+ self.removed_metrics = {} -+ self.controls = {0:0} - - # compiled regex cache - self.regex_cache = {} -@@ -1106,26 +1134,53 @@ class OpenMetricsPMDA(PMDA): - assert s == self.source_by_name[s.name] - - -- def traverse(self, directory, ctime): -+ def traverse(self, directory, mtime): - ''' Return list of files below dir, recursively ''' - ret = [] -- m = os.path.getctime(directory) -- if ctime is None or m > ctime: -- ctime = m -+ m = os.path.getmtime(directory) -+ if mtime is None or m > mtime: -+ mtime = m - - for path, subdirs, files in os.walk(directory): - for f in files: - if not f.startswith("."): - fname = os.path.join(path, f) -- m = os.path.getctime(fname) -- if ctime is None or m > ctime: -- ctime = m -+ m = os.path.getmtime(fname) -+ if mtime is None or m > mtime: -+ mtime = m - ret.append(fname) -+ fname = os.path.join(path, f) -+ with open(fname, 'r') as name: -+ f_path = name.readline().strip() -+ if f_path.startswith("file:///"): -+ parsed = urlparse(f_path) -+ m = os.path.getmtime(parsed.path) -+ if mtime is None or m > mtime: -+ mtime = m - for d in subdirs: -- m, _ = self.traverse(os.path.join(path, d), ctime) -- if ctime is None or m > ctime: -- ctime = m -- return ctime, ret -+ m, _ = self.traverse(os.path.join(path, d), mtime) -+ if mtime is None or m > mtime: -+ mtime = m -+ return mtime, ret -+ -+ def initialize_controls(self, cluster): -+ # initialize statistics -+ self.stats_fetch_calls[cluster] = 0 -+ self.stats_fetch_time[cluster] = 0 -+ self.stats_parse_time[cluster] = 0 -+ self.stats_status[cluster] = "unknown" -+ self.stats_status_code[cluster] = 0 -+ -+ self.controls[cluster] = 1 -+ -+ def delete_controls(self, cluster): -+ del self.stats_fetch_calls[cluster] -+ del self.stats_fetch_time[cluster] -+ del self.stats_parse_time[cluster] -+ del self.stats_status[cluster] -+ del self.stats_status_code[cluster] -+ -+ self.controls[cluster] = 0 - - def rescan_confdir(self): - '''Scan the configuration directories for any new .url files -@@ -1138,19 +1193,56 @@ class OpenMetricsPMDA(PMDA): - ''' - - traverse_time = time.time() -- dir_ctime, conf_filelist = self.traverse(self.config_dir, self.config_dir_ctime) -+ dir_mtime, conf_filelist = self.traverse(self.config_dir, self.config_dir_mtime) - traverse_time = time.time() - traverse_time - -- if self.config_dir_ctime is None or self.config_dir_ctime < dir_ctime: -- self.config_dir_ctime = dir_ctime -+ if self.config_dir_mtime < dir_mtime: -+ self.config_dir_mtime = dir_mtime - else: # no new or changed conf files, don't rescan directory - return - - self.log("Config change detected, traversed %d config entries in %.04fs, rescanning ..." % (len(conf_filelist), traverse_time)) - nickname_regexp = self.lookup_regex(r"^[A-Za-z][A-Za-z0-9_.]*$") -+ self.re_add_list = [] -+ -+ # calculate config entry nicknames -+ nicknames = [] -+ for file in conf_filelist: -+ file_split = os.path.splitext(file) -+ name = file_split[0].replace(self.config_dir + "/", "").replace("/", ".") -+ nicknames.append(name) -+ -+ # check if config change adds a previously removed source -+ for key in self.removed_metrics: -+ split_name = key.split(".") -+ if split_name[1] in nicknames: -+ self.re_add_list.append(split_name[1]) -+ -+ # if source is not in config directory, remove the metric -+ for key, value in self.all_metrics.items(): -+ split_name = key.split(".") -+ if split_name[1] in nicknames: -+ continue -+ try: -+ remove_name = key -+ remove_obj = value -+ cluster = self.cluster_table.intern_lookup_value(split_name[1]) -+ if self.controls[cluster] == 1: -+ self.delete_controls(cluster) -+ self.remove_metric(remove_name, remove_obj) -+ self.removed_metrics[remove_name] = remove_obj -+ self.debug("removed metric name: %s" % remove_name) if self.dbg else None -+ self.set_need_refresh() -+ except Exception as e: -+ self.debug("can't remove metric: %s, see error: %s" % (key, e)) if self.dbg else None -+ -+ for key in self.removed_metrics: -+ if key in self.all_metrics: -+ del self.all_metrics[key] - -- # TODO: maybe nuke sources related to removed files - save_cluster_table = False -+ cluster_for_refresh_names = [] -+ cluster_for_refresh = [] - if sort_conf_list: - # sorted for indom cluster consistency - conf_filelist = sorted(conf_filelist) -@@ -1177,6 +1269,13 @@ class OpenMetricsPMDA(PMDA): - if name in self.source_by_name: - # this source is already known - self.assert_source_invariants(name=name) -+ s = self.source_by_name[name] -+ for key, value in self.source_by_cluster.items(): -+ if value == s: -+ cluster_for_refresh.append(key) -+ cluster_for_refresh_names.append(name) -+ if name in self.re_add_list: -+ self.initialize_controls(key) - else: - try: - path = file -@@ -1185,17 +1284,16 @@ class OpenMetricsPMDA(PMDA): - self.source_by_name[source.name] = source - self.source_by_cluster[source.cluster] = source - -- # initialize statistics -- self.stats_fetch_calls[cluster] = 0 -- self.stats_fetch_time[cluster] = 0 -- self.stats_parse_time[cluster] = 0 -- self.stats_status[cluster] = "unknown" -- self.stats_status_code[cluster] = 0 -+ self.initialize_controls(cluster) - - save_cluster_table = True - self.log("Found source %s cluster %d" % (name, cluster)) - except Exception as e: - self.err("Error allocating new cluster/source %s (%s)" % (name, e)) -+ -+ self.debug("refreshing cluster list: %s" % cluster_for_refresh_names) if self.dbg else None -+ self.refresh_some_clusters_for_fetch(cluster_for_refresh) -+ - if save_cluster_table: - self.cluster_table.save() - self.set_notify_change() diff --git a/pmwebapi-filter-exact.patch b/pmwebapi-filter-exact.patch deleted file mode 100644 index 3d8c467..0000000 --- a/pmwebapi-filter-exact.patch +++ /dev/null @@ -1,39 +0,0 @@ -commit f7476aaaede432f851562d0e8b7f6c4e2f618e66 -Author: William Cohen -Date: Wed Apr 2 16:56:04 2025 -0400 - - libpcp_web, qa: Fix the selection and testing of exact match filtering - - Testing showed that globbing matching was being used for the exact - match filtering. Corrected the code to use exact matching when - selected and updated qa/1543 to have the correct output when using - exact match for filtering. - -diff --git a/qa/1543.out b/qa/1543.out -index fcaa3f4e4..9ff2f82c7 100644 ---- a/qa/1543.out -+++ b/qa/1543.out -@@ -1041,6 +1041,10 @@ sample_long_one{role="testing",agent="sample",hostname="HOSTNAME",cluster="zero" - # HELP sample_long_one 1 as a 32-bit integer - # TYPE sample_long_one gauge - sample_long_one{role="testing",agent="sample",hostname="HOSTNAME",cluster="zero",domainname="DOMAINNAME",machineid="MACHINEID"} 1 -+# PCP5 sample.long.ten 29.0.11 32 PM_INDOM_NULL instant none -+# HELP sample_long_ten 10 as a 32-bit integer -+# TYPE sample_long_ten gauge -+sample_long_ten{role="testing",agent="sample",hostname="HOSTNAME",cluster="zero",domainname="DOMAINNAME",machineid="MACHINEID"} 10 - == good filter regex == - # PCP5 sample.long.one 29.0.10 32 PM_INDOM_NULL instant none - # HELP sample_long_one 1 as a 32-bit integer -diff --git a/src/libpcp_web/src/webgroup.c b/src/libpcp_web/src/webgroup.c -index e0b16d1c5..8f5e8a4ea 100644 ---- a/src/libpcp_web/src/webgroup.c -+++ b/src/libpcp_web/src/webgroup.c -@@ -2021,7 +2021,7 @@ pmWebGroupScrape(pmWebGroupSettings *settings, sds id, dict *params, void *arg) - if (strcmp(match, "regex") == 0) { - scrape.match = MATCH_REGEX; - } else if (strcmp(match, "exact") == 0) -- scrape.match = MATCH_GLOB; -+ scrape.match = MATCH_EXACT; - else if (strcmp(match, "glob") != 0) { - infofmt(msg, "%s - invalid 'match' parameter value", match); - sts = -EINVAL; diff --git a/python-pmda-wrapper-list-fix.patch b/python-pmda-wrapper-list-fix.patch deleted file mode 100644 index b26daa7..0000000 --- a/python-pmda-wrapper-list-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naurp pcp-6.3.7.orig/src/python/pmda.c pcp-6.3.7/src/python/pmda.c ---- pcp-6.3.7.orig/src/python/pmda.c 2025-06-26 19:39:47.002695985 +1000 -+++ pcp-6.3.7/src/python/pmda.c 2025-06-26 19:40:16.426718001 +1000 -@@ -417,11 +417,11 @@ refresh_all_clusters(int numclusters, in - PyList_SET_ITEM(list, i, num); - } - -- arglist = Py_BuildValue("(N)", list); -+ arglist = Py_BuildValue("(O)", list); -+ Py_DECREF(list); - if (arglist == NULL) - return -ENOMEM; - result = PyObject_Call(refresh_all_func, arglist, NULL); -- Py_DECREF(list); - Py_DECREF(arglist); - if (result == NULL) - return callback_error("refresh_all_clusters"); diff --git a/rpminspect.yaml b/rpminspect.yaml deleted file mode 100644 index 1d9ab5b..0000000 --- a/rpminspect.yaml +++ /dev/null @@ -1,16 +0,0 @@ -debuginfo: - ignore: - # Debug symbols are present in BPF modules as it is inherited - # from the BPF it self - - /usr/libexec/pcp/pmdas/bpf/modules/*.so - # Ignore debug symbols related to testsuite on i686 - - /usr/lib/debug/var/lib/pcp/testsuite/{*,*/{*,*/{*,*/*}}}debug -annocheck: - ignore: - # Ignore hardening of pcp testsuite files - - /usr/lib*/libpcp_fault.so* - - /var/lib/pcp/testsuite/{*,*/{*,*/{*,*/*}}} -javabytecode: - ignore: - # Ignote java classes from the PCP testsuite - these are broken by a purpose - - /var/lib/pcp/testsuite/java/* diff --git a/selinux-pcp_pmie_t.patch b/selinux-pcp_pmie_t.patch deleted file mode 100644 index 383094f..0000000 --- a/selinux-pcp_pmie_t.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit 081aa84d3809b64f3e7765abf13a9a90f1072ec8 -Author: Nathan Scott -Date: Tue May 6 11:46:14 2025 +1000 - - selinux: additional policy needed for pcp_pmie_t using ps(1) - - Resolves Fedora BZ 2363903. - -diff --git a/src/selinux/pcp.te b/src/selinux/pcp.te -index a30144950..9cbd59bd2 100644 ---- a/src/selinux/pcp.te -+++ b/src/selinux/pcp.te -@@ -247,7 +247,7 @@ optional_policy(` - # - # pcp_pmie local policy - # --allow pcp_pmie_t self:capability { chown fsetid sys_ptrace }; -+allow pcp_pmie_t self:capability { chown fsetid sys_admin sys_ptrace }; - allow pcp_pmie_t self:cap_userns sys_ptrace; - allow pcp_pmie_t self:netlink_route_socket { create_socket_perms nlmsg_read }; - allow pcp_pmie_t self:unix_dgram_socket { create_socket_perms sendto }; diff --git a/selinux-proc_psi_t.patch b/selinux-proc_psi_t.patch deleted file mode 100644 index 003ec28..0000000 --- a/selinux-proc_psi_t.patch +++ /dev/null @@ -1,52 +0,0 @@ -commit 7047f77ccaa84e9af356b9918395a4057af23933 -Author: Nathan Scott -Date: Mon Apr 14 11:58:41 2025 +1000 - - selinux: add permissions allowing proc_psi_t access - - Access to /proc/pressure recently became selinux policy - protected so we need to allow pcp_pmcd_t to access that - as it contains important system level metrics. - - Resolves Red Hat bugzilla #2358326. - -diff --git a/src/selinux/pcp.if b/src/selinux/pcp.if -index 3ce68c2039..0297185c61 100644 ---- a/src/selinux/pcp.if -+++ b/src/selinux/pcp.if -@@ -535,3 +535,23 @@ ifndef(`userdom_manage_tmp_files',` - ') - ') - ') -+ -+######################################## -+## -+## Dummy kernel_read_psi(). -+## Allow caller to set up pressure stall information (PSI), -+## but if you don't have actual kernel_read_psi() interface -+## nothing needs to be done. -+## -+## -+## Domain allowed access. -+## -+## -+# -+ifndef(`kernel_read_psi',` -+ interface(`kernel_read_psi',` -+ gen_require(` -+ type $1; -+ ') -+ ') -+') -diff --git a/src/selinux/pcp.te b/src/selinux/pcp.te -index 9ad27c5c91..a301449500 100644 ---- a/src/selinux/pcp.te -+++ b/src/selinux/pcp.te -@@ -123,6 +123,7 @@ kernel_read_vm_sysctls(pcp_pmcd_t) - kernel_read_rpc_sysctls(pcp_pmcd_t) - kernel_search_network_sysctl(pcp_pmcd_t) - kernel_read_net_sysctls(pcp_pmcd_t) -+kernel_read_psi(pcp_pmcd_t) - - corecmd_exec_bin(pcp_pmcd_t) - corecmd_exec_shell(pcp_pmcd_t) diff --git a/sources b/sources index 241d379..683cf97 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pcp-6.3.7.src.tar.gz) = ba45f19c45b9153072cee2075c68997599e3f1fe6a7fd9e550c0c78a38677d901679fbe082bcec629477384b7964be9d0fc41f1a4da866ce7f74279e5b375f4e +SHA512 (pcp-7.0.3.src.tar.gz) = 335dc74c5afbb6a703d53c30b6ab871ce60f0bce4c2e10e0004b308acd8d30763b05714efcd2d49c7e7ee0e83fbf6c5389ca211270c5b6852a10fe2ce86c2d94 diff --git a/systemd-tmpfiles.d-directories.patch b/systemd-tmpfiles.d-directories.patch deleted file mode 100644 index 6accc0a..0000000 --- a/systemd-tmpfiles.d-directories.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naurp pcp-6.3.7.orig/GNUmakefile pcp-6.3.7/GNUmakefile ---- pcp-6.3.7.orig/GNUmakefile 2025-03-27 17:01:59.000000000 +1100 -+++ pcp-6.3.7/GNUmakefile 2025-06-26 19:23:24.874469186 +1000 -@@ -135,6 +135,8 @@ pcp.lsm src/include/builddefs src/includ - - tmpfiles.init.setup: tmpfiles.init.setup.in - sed < $< > $@ \ -+ -e "s@PCP_VAR_DIR@$(PCP_VAR_DIR)@" \ -+ -e "s@PCP_TMP_DIR@$(PCP_TMP_DIR)@" \ - -e "s@PCP_RUN_DIR@$(PCP_RUN_DIR)@" \ - -e "s@PCP_LOG_DIR@$(PCP_LOG_DIR)@" \ - -e "s/PCP_GROUP/$(PCP_GROUP)/" \ -diff -Naurp pcp-6.3.7.orig/tmpfiles.init.setup.in pcp-6.3.7/tmpfiles.init.setup.in ---- pcp-6.3.7.orig/tmpfiles.init.setup.in 2024-07-30 16:43:55.000000000 +1000 -+++ pcp-6.3.7/tmpfiles.init.setup.in 2025-06-26 19:23:24.875070062 +1000 -@@ -1,10 +1,16 @@ - # tmpfiles.d(5) config for Performance Co-Pilot startup components - # --# Type Path Mode User Group Age Argument --D PCP_RUN_DIR 0775 PCP_USER PCP_GROUP - - --d PCP_LOG_DIR 0775 PCP_USER PCP_GROUP - - --d PCP_LOG_DIR/pmcd 0755 root root - - --d PCP_LOG_DIR/pmfind 0775 PCP_USER PCP_GROUP - - --d PCP_LOG_DIR/pmie 0775 PCP_USER PCP_GROUP - - --d PCP_LOG_DIR/pmlogger 0775 PCP_USER PCP_GROUP - - --d PCP_LOG_DIR/pmproxy 0775 PCP_USER PCP_GROUP - - -+# Path Mode User Group Age Argument -+D PCP_RUN_DIR 0775 PCP_USER PCP_GROUP - - -+d PCP_VAR_DIR 0755 root root - - -+d PCP_VAR_DIR/config 0755 root root - - -+d PCP_VAR_DIR/config/pmda 0775 PCP_USER PCP_GROUP - - -+d PCP_VAR_DIR/config/pmie 0775 PCP_USER PCP_GROUP - - -+d PCP_VAR_DIR/config/pmlogger 0775 PCP_USER PCP_GROUP - - -+d PCP_TMP_DIR 0775 PCP_USER PCP_GROUP - - -+d PCP_LOG_DIR 0775 PCP_USER PCP_GROUP - - -+d PCP_LOG_DIR/pmcd 0755 root root - - -+d PCP_LOG_DIR/pmfind 0775 PCP_USER PCP_GROUP - - -+d PCP_LOG_DIR/pmie 0775 PCP_USER PCP_GROUP - - -+d PCP_LOG_DIR/pmlogger 0775 PCP_USER PCP_GROUP - - -+d PCP_LOG_DIR/pmproxy 0775 PCP_USER PCP_GROUP - -