Resolve issues in the pcp-testsuite package file permissions

This commit is contained in:
Nathan Scott 2021-04-22 12:30:07 +10:00
parent 28aae6d922
commit a490890fe2
2 changed files with 49 additions and 4 deletions

View File

@ -1,12 +1,14 @@
Name: pcp
Version: 5.3.0
Release: 1%{?dist}
Release: 3%{?dist}
Summary: System-level performance monitoring and performance management
License: GPLv2+ and LGPLv2+ and CC-BY
URL: https://pcp.io
%global bintray https://bintray.com/artifact/download
Source0: %{bintray}/pcp/source/pcp-%{version}.src.tar.gz
%global artifactory https://performancecopilot.jfrog.io/artifactory
Source0: %{artifactory}/pcp-source-release/pcp-%{version}.src.tar.gz
Patch000: redhat-bugzilla-1950263.patch
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
%global __python2 python2
@ -2247,6 +2249,7 @@ updated policy package.
%prep
%setup -q
%patch000 -p1
%build
# fix up build version
@ -2559,6 +2562,9 @@ $1 == "d" {
if (match ($5, "'$PCP_RUN_DIR'")) {
printf ("%%%%ghost ") >> f;
}
if (match ($5, "'$PCP_VAR_DIR'/testsuite")) {
$3 = $4 = "pcpqa";
}
printf ("%%%%dir %%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $5) >> f
}
$1 == "f" && $6 ~ "etc/pcp\\.conf" { printf ("%%%%config ") >> f; }
@ -2571,6 +2577,9 @@ $1 == "f" {
break;
}
}
if (match ($6, "'$PCP_VAR_DIR'/testsuite")) {
$3 = $4 = "pcpqa";
}
if (match ($6, "'$PCP_MAN_DIR'") || match ($6, "'$PCP_DOC_DIR'")) {
printf ("%%%%doc ") >> f;
}
@ -3050,7 +3059,6 @@ PCP_LOG_DIR=%{_logsdir}
%endif
%files testsuite -f pcp-testsuite-files.rpm
%defattr(-,pcpqa,pcpqa)
%if !%{disable_infiniband}
%files pmda-infiniband -f pcp-pmda-infiniband-files.rpm
@ -3303,6 +3311,10 @@ PCP_LOG_DIR=%{_logsdir}
%files zeroconf -f pcp-zeroconf-files.rpm
%changelog
* Thu Apr 22 2021 Nathan Scott <nathans@redhat.com> - 5.3.0-3
- Correct pcp-testsuite file permissions and ownership.
- Update location of upstream sources.
* Fri Apr 16 2021 Nathan Scott <nathans@redhat.com> - 5.3.0-1
- Added conditional lockdown policy access by pmdakvm (BZ 1929259)
- Update to latest PCP sources.

View File

@ -0,0 +1,33 @@
commit 6528e1b09ad948a8bf82e03ad2f10c1a296078af
Author: Nathan Scott <nathans@redhat.com>
Date: Tue Apr 20 11:02:26 2021 +1000
qa: specify PCP libraries only on libpcp_web link lines
Tweaks the changes from commit c9bd0cc4e9b so that testsuite
sources linking with libpcp_web don't pull in 3rd party libs
(which may not be installed) like uv, ssl, crypto.
Resolves Red Hat BZ #1950263
diff --git a/qa/src/GNUlocaldefs b/qa/src/GNUlocaldefs
index 3b5873c25..13fc09831 100644
--- a/qa/src/GNUlocaldefs
+++ b/qa/src/GNUlocaldefs
@@ -538,13 +538,13 @@ check_pmiend_fdleak: check_pmiend_fdleak.c
httpfetch: httpfetch.c
rm -f $@
- $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) $(PCP_WEBLIB)
+ $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) -lpcp_pmda -lpcp_web -lpcp_mmv
json_test: json_test.c
rm -f $@
- $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) $(PCP_WEBLIB)
+ $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) -lpcp_pmda -lpcp_web -lpcp_mmv
sha1int2ext: sha1int2ext.o
rm -f $@
- $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) $(PCP_WEBLIB)
+ $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) -lpcp_pmda -lpcp_web -lpcp_mmv
# --- need libpcp_fault
#