Bug fix and feature rebase to upstream pcp-6.0.0-1
Resolves: rhbz#2117074 Resolves: rhbz#2095445 Resolves: rhbz#2027430 Resolves: rhbz#2020988
This commit is contained in:
parent
0db4b30a66
commit
dbb4639431
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
pcp-*.src.rpm
|
||||
pcp-*.tar.gz
|
||||
/pcp-testsuite.sysusers
|
||||
/pcp.sysusers
|
||||
|
68
pcp.spec
68
pcp.spec
@ -1,16 +1,15 @@
|
||||
Name: pcp
|
||||
Version: 5.3.7
|
||||
Release: 7%{?dist}
|
||||
Version: 6.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: System-level performance monitoring and performance management
|
||||
License: GPLv2+ and LGPLv2+ and CC-BY
|
||||
URL: https://pcp.io
|
||||
|
||||
%global artifactory https://performancecopilot.jfrog.io/artifactory
|
||||
%global pcp_git_url https://github.com/performancecopilot/pcp/blob
|
||||
Source0: %{artifactory}/pcp-source-release/pcp-%{version}.src.tar.gz
|
||||
Patch0: redhat-bugzilla-1981886-pmdasockets-backporting.patch
|
||||
Patch1: redhat-bugzilla-2059461-pmie-systemd-fixup.patch
|
||||
Patch2: redhat-bugzilla-2081262-pmdaproc-cgroups-fix.patch
|
||||
Patch3: redhat-bugzilla-2059463-pmdapostfix-harden.patch
|
||||
Source1: %{pcp_git_url}/main/debian/pcp-testsuite.sysusers
|
||||
Source2: %{pcp_git_url}/main/debian/pcp.sysusers
|
||||
|
||||
# The additional linker flags break out-of-tree PMDAs.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2043092
|
||||
@ -98,7 +97,7 @@ Patch3: redhat-bugzilla-2059463-pmdapostfix-harden.patch
|
||||
%global disable_bcc 1
|
||||
%endif
|
||||
|
||||
# support for pmdabpf, check bpf.spec for supported architectures of bpf
|
||||
# support for pmdabpf, check bcc.spec for supported architectures of libbpf-tools
|
||||
%if 0%{?fedora} >= 33 || 0%{?rhel} > 8
|
||||
%ifarch x86_64 ppc64 ppc64le aarch64
|
||||
%global disable_bpf 0
|
||||
@ -233,7 +232,6 @@ Obsoletes: pcp-pmda-nvidia < 3.10.5
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc gcc-c++
|
||||
BuildRequires: procps autoconf bison flex
|
||||
BuildRequires: nss-devel
|
||||
BuildRequires: avahi-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
@ -292,9 +290,6 @@ BuildRequires: qt5-qtsvg-devel
|
||||
%endif
|
||||
|
||||
Requires: bash xz gawk sed grep findutils which %{_hostname_executable}
|
||||
%if 0%{?rhel} > 8
|
||||
Requires: cyrus-sasl-scram
|
||||
%endif
|
||||
Requires: pcp-libs = %{version}-%{release}
|
||||
%if !%{disable_selinux}
|
||||
|
||||
@ -319,7 +314,7 @@ Requires: pcp-selinux = %{version}-%{release}
|
||||
%global _testsdir %{_localstatedir}/lib/pcp/testsuite
|
||||
%global _selinuxdir %{_localstatedir}/lib/pcp/selinux
|
||||
%global _selinuxexecdir %{_libexecdir}/pcp/selinux
|
||||
%global _logconfdir %{_localstatedir}/lib/pcp/config/pmlogconf
|
||||
%global _ieconfigdir %{_localstatedir}/lib/pcp/config/pmie
|
||||
%global _ieconfdir %{_localstatedir}/lib/pcp/config/pmieconf
|
||||
%global _tapsetdir %{_datadir}/systemtap/tapset
|
||||
%global _bashcompdir %{_datadir}/bash-completion/completions
|
||||
@ -446,6 +441,15 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
%global run_pmieconf() %{expand:
|
||||
if [ -w "%1" ]
|
||||
then
|
||||
pmieconf -c enable "%2"
|
||||
else
|
||||
echo "WARNING: Cannot write to %1, skipping pmieconf enable of %2." >&2
|
||||
fi
|
||||
}
|
||||
|
||||
%global selinux_handle_policy() %{expand:
|
||||
if [ %1 -ge 1 ]
|
||||
then
|
||||
@ -487,6 +491,9 @@ Summary: Performance Co-Pilot run-time libraries
|
||||
URL: https://pcp.io
|
||||
Requires: pcp-conf = %{version}-%{release}
|
||||
|
||||
# prevent conflicting library (libpcp.so.N) installation
|
||||
Conflicts: postgresql-pgpool-II
|
||||
|
||||
%description libs
|
||||
Performance Co-Pilot (PCP) run-time libraries
|
||||
|
||||
@ -499,6 +506,9 @@ Summary: Performance Co-Pilot (PCP) development headers
|
||||
URL: https://pcp.io
|
||||
Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
|
||||
|
||||
# prevent conflicting library (libpcp.so) installation
|
||||
Conflicts: postgresql-pgpool-II-devel
|
||||
|
||||
%description libs-devel
|
||||
Performance Co-Pilot (PCP) headers for development.
|
||||
|
||||
@ -1818,11 +1828,13 @@ Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
|
||||
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
|
||||
@ -2292,13 +2304,9 @@ updated policy package.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
# the buildsubdir macro gets defined in %setup and is apparently only available in the next step (i.e. the %build step)
|
||||
# the buildsubdir macro gets defined in %%setup and is apparently only available in the next step (i.e. the %%build step)
|
||||
%global __strip %{_builddir}/%{?buildsubdir}/build/rpm/custom-strip
|
||||
|
||||
# fix up build version
|
||||
@ -2431,7 +2439,7 @@ total_manifest() {
|
||||
awk '{print $NF}' $DIST_MANIFEST
|
||||
}
|
||||
basic_manifest() {
|
||||
total_manifest | cull '/pcp-doc/|/testsuite/|/man/|/examples/'
|
||||
total_manifest | cull '/pcp-doc/|/testsuite/|/man/|pcp/examples/'
|
||||
}
|
||||
|
||||
#
|
||||
@ -2440,7 +2448,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|etc/systemd/system|libpcp_fault|pcp/fault.h' >pcp-testsuite-files
|
||||
total_manifest | keep 'testsuite|pcpqa|etc/systemd/system|libpcp_fault|pcp/fault.h' >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|GNUselinuxdefs' >pcp-selinux-files
|
||||
@ -2514,7 +2522,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)/openvswitch(/|$)' >pcp-pmda-openvswitch-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
|
||||
basic_manifest | keep '(etc/pcp|pmdas)/perfevent(/|$)' >pcp-pmda-perfevent-files
|
||||
@ -2687,10 +2695,14 @@ done
|
||||
%endif
|
||||
|
||||
%pre testsuite
|
||||
test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir}
|
||||
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
|
||||
%sysusers_create_compat %{SOURCE1}
|
||||
%else
|
||||
getent group pcpqa >/dev/null || groupadd -r pcpqa
|
||||
getent passwd pcpqa >/dev/null || \
|
||||
useradd -c "PCP Quality Assurance" -g pcpqa -d %{_testsdir} -M -r -s /bin/bash pcpqa 2>/dev/null
|
||||
%endif
|
||||
test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir}
|
||||
chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null
|
||||
exit 0
|
||||
|
||||
@ -2700,6 +2712,7 @@ chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null
|
||||
%if !%{disable_systemd}
|
||||
systemctl restart pmcd pmlogger >/dev/null 2>&1
|
||||
systemctl enable pmcd pmlogger >/dev/null 2>&1
|
||||
systemctl enable pmlogger_daily_report.timer >/dev/null 2>&1
|
||||
%else
|
||||
/sbin/chkconfig --add pmcd >/dev/null 2>&1
|
||||
/sbin/chkconfig --add pmlogger >/dev/null 2>&1
|
||||
@ -2710,9 +2723,13 @@ chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null
|
||||
exit 0
|
||||
|
||||
%pre
|
||||
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
|
||||
%sysusers_create_compat %{SOURCE2}
|
||||
%else
|
||||
getent group pcp >/dev/null || groupadd -r pcp
|
||||
getent passwd pcp >/dev/null || \
|
||||
useradd -c "Performance Co-Pilot" -g pcp -d %{_localstatedir}/lib/pcp -M -r -s /sbin/nologin pcp
|
||||
%endif
|
||||
exit 0
|
||||
|
||||
%if !%{disable_systemd}
|
||||
@ -2995,6 +3012,7 @@ fi
|
||||
PCP_PMDAS_DIR=%{_pmdasdir}
|
||||
PCP_SYSCONFIG_DIR=%{_sysconfdir}/sysconfig
|
||||
PCP_PMCDCONF_PATH=%{_confdir}/pmcd/pmcd.conf
|
||||
PCP_PMIECONFIG_DIR=%{_ieconfigdir}
|
||||
# auto-install important PMDAs for RH Support (if not present already)
|
||||
for PMDA in dm nfsclient openmetrics ; do
|
||||
if ! grep -q "$PMDA/pmda$PMDA" "$PCP_PMCDCONF_PATH"
|
||||
@ -3003,7 +3021,7 @@ for PMDA in dm nfsclient openmetrics ; do
|
||||
fi
|
||||
done
|
||||
# auto-enable these usually optional pmie rules
|
||||
pmieconf -c enable dmthin
|
||||
${run_pmieconf "$PCP_PMIECONFIG_DIR" dmthin}
|
||||
%if 0%{?rhel}
|
||||
%if !%{disable_systemd}
|
||||
systemctl restart pmcd pmlogger pmie >/dev/null 2>&1
|
||||
@ -3353,6 +3371,12 @@ PCP_LOG_DIR=%{_logsdir}
|
||||
%files zeroconf -f pcp-zeroconf-files.rpm
|
||||
|
||||
%changelog
|
||||
* Mon Sep 26 2022 Nathan Scott <nathans@redhat.com> - 6.0.0-1
|
||||
- Support --top* options in the pcp-dstat(1) utility (BZ 2020988)
|
||||
- Performance improvements, fixes in pmseries --load (BZ 2027430)
|
||||
- Switch from static pcp useradd to systemd-sysusers (BZ 2095445)
|
||||
- Rebase to latest stable version of PCP (BZ 2117074)
|
||||
|
||||
* Mon May 09 2022 Nathan Scott <nathans@redhat.com> - 5.3.7-7
|
||||
- Additional selinux policy rules for pmdasockets (BZ 1981886)
|
||||
|
||||
|
4
sources
4
sources
@ -1 +1,3 @@
|
||||
SHA512 (pcp-5.3.7.src.tar.gz) = 04f494a7f161dea414fca14433ffa883272a9b68fb32c2954632f6e9a94d9a292714264db6860e1c670743023b90831eb787e757a29e3affeb196aa6a8918086
|
||||
SHA512 (pcp-6.0.0.src.tar.gz) = 339eb0d3244aa170934ce208c978abd723faf4076848bcf0ed7c5fda99a353d7b8f11a326a1a8c6429bd8460541d0a2a6e2fac9c4bc7ebbce632aeeab0f6deee
|
||||
SHA512 (pcp-testsuite.sysusers) = ee1eec784356eb5e3b6c49645fcf4f49d4d73cabbe6d4fb6745af2979809c25762248daf4d82bb3b11a9442e87bf50afa277116a90cfd50ea83c5bb4f29a25ab
|
||||
SHA512 (pcp.sysusers) = c944a80d7ec00635a1e582cce0eeb20f38641179c6539e481f4822fae30caefa4d9462fd61f517364ea1cd37d36bf1828b6540a8a2a948e70151be022321c10d
|
||||
|
Loading…
Reference in New Issue
Block a user