Merge commits from 8.5 into 9.0-beta branch.
Resolves: rhbz#1957575
This commit is contained in:
parent
d209baa18a
commit
7b5689ea38
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,10 +1,2 @@
|
|||||||
pcp-*.src.rpm
|
pcp-*.src.rpm
|
||||||
pcp-*.tar.gz
|
pcp-*.tar.gz
|
||||||
pcp-webapp-*.tar.gz
|
|
||||||
pcp-webjs-*
|
|
||||||
vector-*
|
|
||||||
/pcp-revert-pmlogger_daily-daystart.patch
|
|
||||||
/pmcd-pmlogger-local-context.patch
|
|
||||||
/selinux-policy-updates.patch
|
|
||||||
/fix-pmdastatsd-build-error.patch
|
|
||||||
/pcp-selinux-drop-name_connect-udp.patch
|
|
||||||
|
65
pcp.spec
65
pcp.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pcp
|
Name: pcp
|
||||||
Version: 5.3.0
|
Version: 5.3.1
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: System-level performance monitoring and performance management
|
Summary: System-level performance monitoring and performance management
|
||||||
License: GPLv2+ and LGPLv2+ and CC-BY
|
License: GPLv2+ and LGPLv2+ and CC-BY
|
||||||
URL: https://pcp.io
|
URL: https://pcp.io
|
||||||
@ -8,12 +8,6 @@ URL: https://pcp.io
|
|||||||
%global artifactory https://performancecopilot.jfrog.io/artifactory
|
%global artifactory https://performancecopilot.jfrog.io/artifactory
|
||||||
Source0: %{artifactory}/pcp-source-release/pcp-%{version}.src.tar.gz
|
Source0: %{artifactory}/pcp-source-release/pcp-%{version}.src.tar.gz
|
||||||
|
|
||||||
Patch000: redhat-bugzilla-1940971.patch
|
|
||||||
Patch001: redhat-bugzilla-1615742.patch
|
|
||||||
Patch002: redhat-bugzilla-1615718.patch
|
|
||||||
Patch003: redhat-bugzilla-1956608.patch
|
|
||||||
Patch004: redhat-bugzilla-1950263.patch
|
|
||||||
|
|
||||||
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
|
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
|
||||||
%global __python2 python2
|
%global __python2 python2
|
||||||
%else
|
%else
|
||||||
@ -136,13 +130,6 @@ Patch004: redhat-bugzilla-1950263.patch
|
|||||||
%global disable_nutcracker 1
|
%global disable_nutcracker 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# support for pmdarpm
|
|
||||||
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
|
|
||||||
%global disable_rpm 0
|
|
||||||
%else
|
|
||||||
%global disable_rpm 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Qt development and runtime environment missing components before el6
|
# Qt development and runtime environment missing components before el6
|
||||||
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
|
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
|
||||||
%global disable_qt 0
|
%global disable_qt 0
|
||||||
@ -200,6 +187,10 @@ Conflicts: librapi < 0.16
|
|||||||
Obsoletes: pcp-pmda-kvm < 4.1.1
|
Obsoletes: pcp-pmda-kvm < 4.1.1
|
||||||
Provides: pcp-pmda-kvm = %{version}-%{release}
|
Provides: pcp-pmda-kvm = %{version}-%{release}
|
||||||
|
|
||||||
|
# RPM PMDA retired completely
|
||||||
|
Obsoletes: pcp-pmda-rpm < 5.3.2
|
||||||
|
Obsoletes: pcp-pmda-rpm-debuginfo < 5.3.2
|
||||||
|
|
||||||
# PCP REST APIs are now provided by pmproxy
|
# PCP REST APIs are now provided by pmproxy
|
||||||
Obsoletes: pcp-webapi-debuginfo < 5.0.0
|
Obsoletes: pcp-webapi-debuginfo < 5.0.0
|
||||||
Obsoletes: pcp-webapi < 5.0.0
|
Obsoletes: pcp-webapi < 5.0.0
|
||||||
@ -224,7 +215,6 @@ BuildRequires: make
|
|||||||
BuildRequires: gcc gcc-c++
|
BuildRequires: gcc gcc-c++
|
||||||
BuildRequires: procps autoconf bison flex
|
BuildRequires: procps autoconf bison flex
|
||||||
BuildRequires: nss-devel
|
BuildRequires: nss-devel
|
||||||
BuildRequires: rpm-devel
|
|
||||||
BuildRequires: avahi-devel
|
BuildRequires: avahi-devel
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
@ -546,9 +536,6 @@ Requires: pcp-pmda-snmp
|
|||||||
%if !%{disable_json}
|
%if !%{disable_json}
|
||||||
Requires: pcp-pmda-json
|
Requires: pcp-pmda-json
|
||||||
%endif
|
%endif
|
||||||
%if !%{disable_rpm}
|
|
||||||
Requires: pcp-pmda-rpm
|
|
||||||
%endif
|
|
||||||
Requires: pcp-pmda-summary pcp-pmda-trace pcp-pmda-weblog
|
Requires: pcp-pmda-summary pcp-pmda-trace pcp-pmda-weblog
|
||||||
%if !%{disable_python2} || !%{disable_python3}
|
%if !%{disable_python2} || !%{disable_python3}
|
||||||
Requires: pcp-system-tools
|
Requires: pcp-system-tools
|
||||||
@ -1951,21 +1938,6 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
|||||||
collecting metrics about the room temperature.
|
collecting metrics about the room temperature.
|
||||||
# end pcp-pmda-roomtemp
|
# end pcp-pmda-roomtemp
|
||||||
|
|
||||||
%if !%{disable_rpm}
|
|
||||||
#
|
|
||||||
# pcp-pmda-rpm
|
|
||||||
#
|
|
||||||
%package pmda-rpm
|
|
||||||
License: GPLv2+
|
|
||||||
Summary: Performance Co-Pilot (PCP) metrics for the RPM package manager
|
|
||||||
URL: https://pcp.io
|
|
||||||
Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
|
|
||||||
%description pmda-rpm
|
|
||||||
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
|
||||||
collecting metrics about the installed RPM packages.
|
|
||||||
%endif
|
|
||||||
# end pcp-pmda-rpm
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# pcp-pmda-sendmail
|
# pcp-pmda-sendmail
|
||||||
#
|
#
|
||||||
@ -2244,11 +2216,6 @@ updated policy package.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch000 -p1
|
|
||||||
%patch001 -p1
|
|
||||||
%patch002 -p1
|
|
||||||
%patch003 -p1
|
|
||||||
%patch004 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# fix up build version
|
# fix up build version
|
||||||
@ -2290,9 +2257,11 @@ sed -i -e '/platformsz.h/d' $DIST_MANIFEST
|
|||||||
|
|
||||||
%if %{disable_mssql}
|
%if %{disable_mssql}
|
||||||
# remove pmdamssql on platforms lacking MSODBC driver packages.
|
# remove pmdamssql on platforms lacking MSODBC driver packages.
|
||||||
|
rm -fr $RPM_BUILD_ROOT/%{_confdir}/mssql
|
||||||
|
rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmieconf/mssql
|
||||||
|
rm -fr $RPM_BUILD_ROOT/%{_ieconfdir}/mssql
|
||||||
rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/mssql
|
rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/mssql
|
||||||
rm -fr $RPM_BUILD_ROOT/%{_pmdasexecdir}/mssql
|
rm -fr $RPM_BUILD_ROOT/%{_pmdasexecdir}/mssql
|
||||||
rm -fr $RPM_BUILD_ROOT/%{_confdir}/mssql
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{disable_qt}
|
%if !%{disable_qt}
|
||||||
@ -2360,8 +2329,10 @@ grep -E 'pcp\/(examples|demos)|(etc/pcp|pcp/pmdas)\/(sample|simple|trivial|txmon
|
|||||||
# Note: /etc/pcp.{conf,env,sh} are %%config but not noreplace
|
# Note: /etc/pcp.{conf,env,sh} are %%config but not noreplace
|
||||||
# and are treated specially below.
|
# and are treated specially below.
|
||||||
cat >confpath.list <<EOF
|
cat >confpath.list <<EOF
|
||||||
|
etc/zabbix/zabbix_agentd.d/
|
||||||
etc/sysconfig/
|
etc/sysconfig/
|
||||||
etc/cron.d/
|
etc/cron.d/
|
||||||
|
etc/sasl2/
|
||||||
etc/pcp/
|
etc/pcp/
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -2662,11 +2633,6 @@ getent passwd pcp >/dev/null || \
|
|||||||
useradd -c "Performance Co-Pilot" -g pcp -d %{_localstatedir}/lib/pcp -M -r -s /sbin/nologin pcp
|
useradd -c "Performance Co-Pilot" -g pcp -d %{_localstatedir}/lib/pcp -M -r -s /sbin/nologin pcp
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%if !%{disable_rpm}
|
|
||||||
%preun pmda-rpm
|
|
||||||
%{pmda_remove "$1" "rpm"}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if !%{disable_systemd}
|
%if !%{disable_systemd}
|
||||||
%preun pmda-systemd
|
%preun pmda-systemd
|
||||||
%{pmda_remove "$1" "systemd"}
|
%{pmda_remove "$1" "systemd"}
|
||||||
@ -3247,9 +3213,6 @@ PCP_LOG_DIR=%{_logsdir}
|
|||||||
|
|
||||||
%files pmda-roomtemp -f pcp-pmda-roomtemp-files.rpm
|
%files pmda-roomtemp -f pcp-pmda-roomtemp-files.rpm
|
||||||
|
|
||||||
%if !%{disable_rpm}
|
|
||||||
%files pmda-rpm -f pcp-pmda-rpm-files.rpm
|
|
||||||
%endif
|
|
||||||
%files pmda-sendmail -f pcp-pmda-sendmail-files.rpm
|
%files pmda-sendmail -f pcp-pmda-sendmail-files.rpm
|
||||||
|
|
||||||
%files pmda-shping -f pcp-pmda-shping-files.rpm
|
%files pmda-shping -f pcp-pmda-shping-files.rpm
|
||||||
@ -3310,6 +3273,10 @@ PCP_LOG_DIR=%{_logsdir}
|
|||||||
%files zeroconf -f pcp-zeroconf-files.rpm
|
%files zeroconf -f pcp-zeroconf-files.rpm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 09 2021 Nathan Scott <nathans@redhat.com> - 5.3.1-1
|
||||||
|
- Add selinux rules for pmdabcc bpf access (BZ 1952374)
|
||||||
|
- Update to latest PCP sources (BZ 1957575)
|
||||||
|
|
||||||
* Tue May 18 2021 Nathan Scott <nathans@redhat.com> - 5.3.0-2
|
* Tue May 18 2021 Nathan Scott <nathans@redhat.com> - 5.3.0-2
|
||||||
- Improve pmchart duplicate archive diagnostics (BZ 1615718)
|
- Improve pmchart duplicate archive diagnostics (BZ 1615718)
|
||||||
- Save pmchart users prefered archive locations (BZ 1615742)
|
- Save pmchart users prefered archive locations (BZ 1615742)
|
||||||
@ -3320,7 +3287,7 @@ PCP_LOG_DIR=%{_logsdir}
|
|||||||
* Thu May 06 2021 Nathan Scott <nathans@redhat.com> - 5.3.0-1
|
* Thu May 06 2021 Nathan Scott <nathans@redhat.com> - 5.3.0-1
|
||||||
- Added conditional lockdown policy access by pmdakvm (BZ 1940971)
|
- Added conditional lockdown policy access by pmdakvm (BZ 1940971)
|
||||||
- Added spec file dependency on cyrus-sasl-scram (BZ 1942879)
|
- Added spec file dependency on cyrus-sasl-scram (BZ 1942879)
|
||||||
- Update to latest PCP sources (BZ 1957575).
|
- Update to latest PCP sources (BZ 1957575)
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.2.5-5
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.2.5-5
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
@ -1,127 +0,0 @@
|
|||||||
commit 0b62b6e2fef99a143b993bed273ce83e5a5563c3
|
|
||||||
Author: Nathan Scott <nathans@redhat.com>
|
|
||||||
Date: Fri May 14 11:46:29 2021 +1000
|
|
||||||
|
|
||||||
pmchart: use libpcp_qmc diagnostic for archives from same host
|
|
||||||
|
|
||||||
Instead of providing a cryptic higher-level error message when
|
|
||||||
the user attempts to open archives from the same host, use the
|
|
||||||
message libpcp_qmc has constructed previously - all we need to
|
|
||||||
do is to pmflush(3) it.
|
|
||||||
|
|
||||||
Resolves Red Hat BZ #1615718
|
|
||||||
|
|
||||||
diff --git a/src/pmchart/chartdialog.cpp b/src/pmchart/chartdialog.cpp
|
|
||||||
index 78ca0041b..5c3da5641 100644
|
|
||||||
--- a/src/pmchart/chartdialog.cpp
|
|
||||||
+++ b/src/pmchart/chartdialog.cpp
|
|
||||||
@@ -388,12 +388,7 @@ void ChartDialog::archiveButtonClicked()
|
|
||||||
for (QStringList::Iterator it = al.begin(); it != al.end(); ++it) {
|
|
||||||
QString archive = *it;
|
|
||||||
if ((sts = archiveGroup->use(PM_CONTEXT_ARCHIVE, archive)) < 0) {
|
|
||||||
- archive.prepend(tr("Cannot open PCP archive: "));
|
|
||||||
- archive.append(tr("\n"));
|
|
||||||
- archive.append(tr(pmErrStr(sts)));
|
|
||||||
- QMessageBox::warning(this, pmGetProgname(), archive,
|
|
||||||
- QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
|
|
||||||
- Qt::NoButton, Qt::NoButton);
|
|
||||||
+ pmflush();
|
|
||||||
} else {
|
|
||||||
setupAvailableMetricsTree(true);
|
|
||||||
archiveGroup->updateBounds();
|
|
||||||
@@ -419,12 +414,7 @@ void ChartDialog::hostButtonClicked()
|
|
||||||
QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
|
|
||||||
Qt::NoButton, Qt::NoButton);
|
|
||||||
} else if ((sts = liveGroup->use(PM_CONTEXT_HOST, hostspec, flags)) < 0) {
|
|
||||||
- hostspec.prepend(tr("Cannot connect to host: "));
|
|
||||||
- hostspec.append(tr("\n"));
|
|
||||||
- hostspec.append(tr(pmErrStr(sts)));
|
|
||||||
- QMessageBox::warning(this, pmGetProgname(), hostspec,
|
|
||||||
- QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
|
|
||||||
- Qt::NoButton, Qt::NoButton);
|
|
||||||
+ pmflush();
|
|
||||||
} else {
|
|
||||||
console->post(PmChart::DebugUi,
|
|
||||||
"ChartDialog::newHost: %s (flags=0x%x)",
|
|
||||||
diff --git a/src/pmchart/openviewdialog.cpp b/src/pmchart/openviewdialog.cpp
|
|
||||||
index ed5a9f943..0f48b2f88 100644
|
|
||||||
--- a/src/pmchart/openviewdialog.cpp
|
|
||||||
+++ b/src/pmchart/openviewdialog.cpp
|
|
||||||
@@ -219,7 +219,6 @@ void OpenViewDialog::archiveAdd()
|
|
||||||
{
|
|
||||||
QFileDialog *af = new QFileDialog(this);
|
|
||||||
QStringList al;
|
|
||||||
- int sts;
|
|
||||||
|
|
||||||
af->setFileMode(QFileDialog::ExistingFiles);
|
|
||||||
af->setAcceptMode(QFileDialog::AcceptOpen);
|
|
||||||
@@ -238,13 +237,8 @@ void OpenViewDialog::archiveAdd()
|
|
||||||
|
|
||||||
for (QStringList::Iterator it = al.begin(); it != al.end(); ++it) {
|
|
||||||
QString archive = *it;
|
|
||||||
- if ((sts = archiveGroup->use(PM_CONTEXT_ARCHIVE, archive)) < 0) {
|
|
||||||
- archive.prepend(tr("Cannot open PCP archive: "));
|
|
||||||
- archive.append(tr("\n"));
|
|
||||||
- archive.append(tr(pmErrStr(sts)));
|
|
||||||
- QMessageBox::warning(this, pmGetProgname(), archive,
|
|
||||||
- QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
|
|
||||||
- QMessageBox::NoButton, QMessageBox::NoButton);
|
|
||||||
+ if (archiveGroup->use(PM_CONTEXT_ARCHIVE, archive) < 0) {
|
|
||||||
+ pmflush();
|
|
||||||
} else {
|
|
||||||
setupComboBoxes(true);
|
|
||||||
archiveGroup->updateBounds();
|
|
||||||
@@ -262,20 +256,15 @@ void OpenViewDialog::hostAdd()
|
|
||||||
|
|
||||||
if (host->exec() == QDialog::Accepted) {
|
|
||||||
QString hostspec = host->getHostSpecification();
|
|
||||||
- int sts, flags = host->getContextFlags();
|
|
||||||
+ int flags = host->getContextFlags();
|
|
||||||
|
|
||||||
if (hostspec.isNull() || hostspec.length() == 0) {
|
|
||||||
hostspec.append(tr("Hostname not specified\n"));
|
|
||||||
QMessageBox::warning(this, pmGetProgname(), hostspec,
|
|
||||||
QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
|
|
||||||
Qt::NoButton, Qt::NoButton);
|
|
||||||
- } else if ((sts = liveGroup->use(PM_CONTEXT_HOST, hostspec, flags)) < 0) {
|
|
||||||
- hostspec.prepend(tr("Cannot connect to host: "));
|
|
||||||
- hostspec.append(tr("\n"));
|
|
||||||
- hostspec.append(tr(pmErrStr(sts)));
|
|
||||||
- QMessageBox::warning(this, pmGetProgname(), hostspec,
|
|
||||||
- QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
|
|
||||||
- Qt::NoButton, Qt::NoButton);
|
|
||||||
+ } else if (liveGroup->use(PM_CONTEXT_HOST, hostspec, flags) < 0) {
|
|
||||||
+ pmflush();
|
|
||||||
} else {
|
|
||||||
console->post(PmChart::DebugUi,
|
|
||||||
"OpenViewDialog::newHost: %s (flags=0x%x)",
|
|
||||||
@@ -320,11 +309,7 @@ bool OpenViewDialog::useLiveContext(int index)
|
|
||||||
int sts;
|
|
||||||
|
|
||||||
if ((sts = liveGroup->use(PM_CONTEXT_HOST, source.source())) < 0) {
|
|
||||||
- QString msg = QString("Failed to connect to pmcd on \"%1\".\n%2.\n\n")
|
|
||||||
- .arg(sourceName).arg(pmErrStr(sts));
|
|
||||||
- QMessageBox::warning(NULL, pmGetProgname(), msg,
|
|
||||||
- QMessageBox::Ok | QMessageBox::Default | QMessageBox::Escape,
|
|
||||||
- QMessageBox::NoButton, QMessageBox::NoButton);
|
|
||||||
+ pmflush();
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
free(sourceName);
|
|
||||||
@@ -345,14 +330,9 @@ bool OpenViewDialog::useArchiveContext(int index)
|
|
||||||
QmcSource source = archiveGroup->context(index)->source();
|
|
||||||
char *sourceName = source.sourceAscii();
|
|
||||||
bool result = true;
|
|
||||||
- int sts;
|
|
||||||
|
|
||||||
- if ((sts = archiveGroup->use(PM_CONTEXT_ARCHIVE, source.source())) < 0) {
|
|
||||||
- QString msg = QString("Failed to open archive \"%1\".\n%2.\n\n")
|
|
||||||
- .arg(sourceName).arg(pmErrStr(sts));
|
|
||||||
- QMessageBox::warning(NULL, pmGetProgname(), msg,
|
|
||||||
- QMessageBox::Ok | QMessageBox::Default | QMessageBox::Escape,
|
|
||||||
- QMessageBox::NoButton, QMessageBox::NoButton);
|
|
||||||
+ if (archiveGroup->use(PM_CONTEXT_ARCHIVE, source.source()) < 0) {
|
|
||||||
+ pmflush();
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
free(sourceName);
|
|
@ -1,494 +0,0 @@
|
|||||||
commit f15e34b06bd25dce5fafa68eeee04f2b5a27e9a0
|
|
||||||
Author: Nathan Scott <nathans@redhat.com>
|
|
||||||
Date: Fri May 14 11:10:56 2021 +1000
|
|
||||||
|
|
||||||
pmchart: save changes to users prefered archive location
|
|
||||||
|
|
||||||
Use the users QSettings configuration file to hold any new
|
|
||||||
preference given for archive locations, and restore this at
|
|
||||||
pmchart startup time.
|
|
||||||
|
|
||||||
Similarly save and restore locations for exported images.
|
|
||||||
|
|
||||||
While in here, some janitorial work has been done in terms
|
|
||||||
of dropping paths to configuration files not used in many,
|
|
||||||
many years now.
|
|
||||||
|
|
||||||
Resolves Red Hat BZ #1615742
|
|
||||||
|
|
||||||
diff --git a/src/pmchart/chartdialog.cpp b/src/pmchart/chartdialog.cpp
|
|
||||||
index 3873abe9c..78ca0041b 100644
|
|
||||||
--- a/src/pmchart/chartdialog.cpp
|
|
||||||
+++ b/src/pmchart/chartdialog.cpp
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2013-2015, Red Hat.
|
|
||||||
+ * Copyright (c) 2013-2015,2021 Red Hat.
|
|
||||||
* Copyright (c) 2007-2008, Aconex. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
@@ -374,10 +374,17 @@ void ChartDialog::archiveButtonClicked()
|
|
||||||
af->setAcceptMode(QFileDialog::AcceptOpen);
|
|
||||||
af->setIconProvider(fileIconProvider);
|
|
||||||
af->setWindowTitle(tr("Add Archive"));
|
|
||||||
- af->setDirectory(QDir::toNativeSeparators(QDir::homePath()));
|
|
||||||
+ af->setDirectory(globalSettings.lastArchivePath);
|
|
||||||
|
|
||||||
- if (af->exec() == QDialog::Accepted)
|
|
||||||
+ if (af->exec() == QDialog::Accepted) {
|
|
||||||
al = af->selectedFiles();
|
|
||||||
+ QString path = QFileInfo(al.at(0)).dir().absolutePath();
|
|
||||||
+ if (globalSettings.lastArchivePath != path) {
|
|
||||||
+ globalSettings.lastArchivePath = path;
|
|
||||||
+ globalSettings.lastArchivePathModified = true;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
for (QStringList::Iterator it = al.begin(); it != al.end(); ++it) {
|
|
||||||
QString archive = *it;
|
|
||||||
if ((sts = archiveGroup->use(PM_CONTEXT_ARCHIVE, archive)) < 0) {
|
|
||||||
diff --git a/src/pmchart/exportdialog.cpp b/src/pmchart/exportdialog.cpp
|
|
||||||
index fe926ebfa..db38d16db 100644
|
|
||||||
--- a/src/pmchart/exportdialog.cpp
|
|
||||||
+++ b/src/pmchart/exportdialog.cpp
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2007, Aconex. All Rights Reserved.
|
|
||||||
- * Copyright (c) 2013, Red Hat, Inc.
|
|
||||||
+ * Copyright (c) 2013,2021 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the
|
|
||||||
@@ -48,7 +48,7 @@ void ExportDialog::languageChange()
|
|
||||||
void ExportDialog::init()
|
|
||||||
{
|
|
||||||
QChar sep(pmPathSeparator());
|
|
||||||
- QString imgfile = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
+ QString imgfile = globalSettings.lastExportPath;
|
|
||||||
|
|
||||||
my.quality = 0;
|
|
||||||
my.format = strdup("png");
|
|
||||||
@@ -122,10 +122,17 @@ void ExportDialog::displayQualitySlider()
|
|
||||||
void ExportDialog::filePushButton_clicked()
|
|
||||||
{
|
|
||||||
ExportFileDialog file(this);
|
|
||||||
-
|
|
||||||
- file.setDirectory(QDir::toNativeSeparators(QDir::homePath()));
|
|
||||||
- if (file.exec() == QDialog::Accepted)
|
|
||||||
- fileLineEdit->setText(file.selectedFiles().at(0));
|
|
||||||
+ file.setDirectory(globalSettings.lastExportPath);
|
|
||||||
+
|
|
||||||
+ if (file.exec() == QDialog::Accepted) {
|
|
||||||
+ QString selection = file.selectedFiles().at(0);
|
|
||||||
+ QString path = QFileInfo(selection).dir().absolutePath();
|
|
||||||
+ if (globalSettings.lastExportPath != path) {
|
|
||||||
+ globalSettings.lastExportPath = path;
|
|
||||||
+ globalSettings.lastExportPathModified = true;
|
|
||||||
+ }
|
|
||||||
+ fileLineEdit->setText(selection);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void ExportDialog::formatComboBox_currentIndexChanged(QString suffix)
|
|
||||||
diff --git a/src/pmchart/main.cpp b/src/pmchart/main.cpp
|
|
||||||
index 08de404d3..ef07fa012 100644
|
|
||||||
--- a/src/pmchart/main.cpp
|
|
||||||
+++ b/src/pmchart/main.cpp
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2014,2016, Red Hat.
|
|
||||||
+ * Copyright (c) 2014,2016,2021 Red Hat.
|
|
||||||
* Copyright (c) 2006, Ken McDonell. All Rights Reserved.
|
|
||||||
* Copyright (c) 2007-2009, Aconex. All Rights Reserved.
|
|
||||||
*
|
|
||||||
@@ -234,6 +234,14 @@ void writeSettings(void)
|
|
||||||
else
|
|
||||||
userSettings.remove("savedHosts");
|
|
||||||
}
|
|
||||||
+ if (globalSettings.lastArchivePathModified) {
|
|
||||||
+ globalSettings.lastArchivePathModified = false;
|
|
||||||
+ userSettings.setValue("lastArchivePath", globalSettings.lastArchivePath);
|
|
||||||
+ }
|
|
||||||
+ if (globalSettings.lastExportPathModified) {
|
|
||||||
+ globalSettings.lastExportPathModified = false;
|
|
||||||
+ userSettings.setValue("lastExportPath", globalSettings.lastExportPath);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
userSettings.endGroup();
|
|
||||||
}
|
|
||||||
@@ -373,6 +381,21 @@ static void readSettings(void)
|
|
||||||
globalSettings.savedHosts =
|
|
||||||
userSettings.value("savedHosts").toStringList();
|
|
||||||
|
|
||||||
+ //
|
|
||||||
+ // Saved filesystem search paths
|
|
||||||
+ //
|
|
||||||
+ globalSettings.lastArchivePathModified = false;
|
|
||||||
+ QChar sep(pmPathSeparator());
|
|
||||||
+ QString pmlogger = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
+ pmlogger.append(sep).append(".pcp").append(sep).append("pmlogger");
|
|
||||||
+ globalSettings.lastArchivePath =
|
|
||||||
+ userSettings.value("lastArchivePath", pmlogger).toString();
|
|
||||||
+ globalSettings.lastExportPathModified = false;
|
|
||||||
+ QString pictures = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
+ pictures.append(sep).append("Pictures");
|
|
||||||
+ globalSettings.lastExportPath =
|
|
||||||
+ userSettings.value("lastExportPath", pictures).toString();
|
|
||||||
+
|
|
||||||
userSettings.endGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -475,6 +498,7 @@ main(int argc, char ** argv)
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
setupEnvironment();
|
|
||||||
readSettings();
|
|
||||||
+ atexit(writeSettings);
|
|
||||||
|
|
||||||
opts.flags = PM_OPTFLAG_MULTI | PM_OPTFLAG_MIXED;
|
|
||||||
opts.short_options = "A:a:Cc:D:f:F:g:h:H:Ln:o:O:p:s:S:T:t:Vv:WzZ:?";
|
|
||||||
diff --git a/src/pmchart/main.h b/src/pmchart/main.h
|
|
||||||
index ec79ec9a4..4be939186 100644
|
|
||||||
--- a/src/pmchart/main.h
|
|
||||||
+++ b/src/pmchart/main.h
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2014, Red Hat.
|
|
||||||
+ * Copyright (c) 2014,2021 Red Hat.
|
|
||||||
* Copyright (c) 2007, Aconex. All Rights Reserved.
|
|
||||||
* Copyright (c) 2006, Ken McDonell. All Rights Reserved.
|
|
||||||
*
|
|
||||||
@@ -71,6 +71,12 @@ typedef struct {
|
|
||||||
// Saved Hosts
|
|
||||||
QStringList savedHosts;
|
|
||||||
bool savedHostsModified;
|
|
||||||
+
|
|
||||||
+ // Filesysten Paths
|
|
||||||
+ QString lastArchivePath;
|
|
||||||
+ bool lastArchivePathModified;
|
|
||||||
+ QString lastExportPath;
|
|
||||||
+ bool lastExportPathModified;
|
|
||||||
} Settings;
|
|
||||||
|
|
||||||
extern Settings globalSettings;
|
|
||||||
diff --git a/src/pmchart/openviewdialog.cpp b/src/pmchart/openviewdialog.cpp
|
|
||||||
index d2eefa028..ed5a9f943 100644
|
|
||||||
--- a/src/pmchart/openviewdialog.cpp
|
|
||||||
+++ b/src/pmchart/openviewdialog.cpp
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2013, Red Hat.
|
|
||||||
- * Copyright (c) 2007-2009, Aconex. All Rights Reserved.
|
|
||||||
+ * Copyright (c) 2013,2021 Red Hat.
|
|
||||||
+ * Copyright (c) 2007-2009 Aconex. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the
|
|
||||||
@@ -36,36 +36,16 @@ OpenViewDialog::OpenViewDialog(QWidget *parent) : QDialog(parent)
|
|
||||||
|
|
||||||
QDir dir;
|
|
||||||
QChar sep(pmPathSeparator());
|
|
||||||
- QString sys = my.systemDir = pmGetConfig("PCP_VAR_DIR");
|
|
||||||
- my.systemDir.append(sep);
|
|
||||||
- my.systemDir.append("config");
|
|
||||||
- my.systemDir.append(sep);
|
|
||||||
- my.systemDir.append("kmchart");
|
|
||||||
- if (dir.exists(my.systemDir))
|
|
||||||
- pathComboBox->addItem(fileIconProvider->icon(QFileIconProvider::Folder),
|
|
||||||
- my.systemDir);
|
|
||||||
- my.systemDir = sys;
|
|
||||||
- my.systemDir.append(sep);
|
|
||||||
- my.systemDir.append("config");
|
|
||||||
- my.systemDir.append(sep);
|
|
||||||
- my.systemDir.append("pmchart");
|
|
||||||
+ my.systemDir = pmGetConfig("PCP_VAR_DIR");
|
|
||||||
+ my.systemDir.append(sep).append("config");
|
|
||||||
+ my.systemDir.append(sep).append("pmchart");
|
|
||||||
if (dir.exists(my.systemDir))
|
|
||||||
pathComboBox->addItem(fileIconProvider->icon(QFileIconProvider::Folder),
|
|
||||||
my.systemDir);
|
|
||||||
|
|
||||||
- QString home = my.userDir = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append(".pcp");
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append("kmchart");
|
|
||||||
- if (dir.exists(my.userDir))
|
|
||||||
- pathComboBox->addItem(fileIconProvider->icon(QFileIconProvider::Folder),
|
|
||||||
- my.userDir);
|
|
||||||
- my.userDir = home;
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append(".pcp");
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append("pmchart");
|
|
||||||
+ QString home = my.userDir = QDir::homePath();
|
|
||||||
+ my.userDir.append(sep).append(".pcp");
|
|
||||||
+ my.userDir.append(sep).append("pmchart");
|
|
||||||
if (dir.exists(my.userDir))
|
|
||||||
pathComboBox->addItem(fileIconProvider->icon(QFileIconProvider::Folder),
|
|
||||||
my.userDir);
|
|
||||||
@@ -245,10 +225,17 @@ void OpenViewDialog::archiveAdd()
|
|
||||||
af->setAcceptMode(QFileDialog::AcceptOpen);
|
|
||||||
af->setWindowTitle(tr("Add Archive"));
|
|
||||||
af->setIconProvider(fileIconProvider);
|
|
||||||
- af->setDirectory(QDir::toNativeSeparators(QDir::homePath()));
|
|
||||||
+ af->setDirectory(globalSettings.lastArchivePath);
|
|
||||||
|
|
||||||
- if (af->exec() == QDialog::Accepted)
|
|
||||||
+ if (af->exec() == QDialog::Accepted) {
|
|
||||||
al = af->selectedFiles();
|
|
||||||
+ QString path = QFileInfo(al.at(0)).dir().absolutePath();
|
|
||||||
+ if (globalSettings.lastArchivePath != path) {
|
|
||||||
+ globalSettings.lastArchivePath = path;
|
|
||||||
+ globalSettings.lastArchivePathModified = true;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
for (QStringList::Iterator it = al.begin(); it != al.end(); ++it) {
|
|
||||||
QString archive = *it;
|
|
||||||
if ((sts = archiveGroup->use(PM_CONTEXT_ARCHIVE, archive)) < 0) {
|
|
||||||
diff --git a/src/pmchart/recorddialog.cpp b/src/pmchart/recorddialog.cpp
|
|
||||||
index 35242078a..69a8a89c8 100644
|
|
||||||
--- a/src/pmchart/recorddialog.cpp
|
|
||||||
+++ b/src/pmchart/recorddialog.cpp
|
|
||||||
@@ -33,26 +33,7 @@ void RecordDialog::languageChange()
|
|
||||||
|
|
||||||
void RecordDialog::init(Tab *tab)
|
|
||||||
{
|
|
||||||
- QChar sep(pmPathSeparator());
|
|
||||||
- QString pmlogger = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
- QString view, folio, archive;
|
|
||||||
-
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append(".pcp");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append("pmlogger");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- view = folio = archive = pmlogger;
|
|
||||||
-
|
|
||||||
- view.append("[date].view");
|
|
||||||
- viewLineEdit->setText(view);
|
|
||||||
- folio.append("[date].folio");
|
|
||||||
- folioLineEdit->setText(folio);
|
|
||||||
- archive.append("[host]");
|
|
||||||
- archive.append(sep);
|
|
||||||
- archive.append("[date]");
|
|
||||||
- archiveLineEdit->setText(archive);
|
|
||||||
-
|
|
||||||
+ initText();
|
|
||||||
my.tab = tab;
|
|
||||||
my.units = QmcTime::Seconds;
|
|
||||||
deltaLineEdit->setText(
|
|
||||||
@@ -62,6 +43,23 @@ void RecordDialog::init(Tab *tab)
|
|
||||||
allGadgetsRadioButton->setChecked(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void RecordDialog::initText()
|
|
||||||
+{
|
|
||||||
+ QChar sep(pmPathSeparator());
|
|
||||||
+
|
|
||||||
+ my.viewText = globalSettings.lastArchivePath;
|
|
||||||
+ my.viewText.append(sep).append("[date].view");
|
|
||||||
+ viewLineEdit->setText(my.viewText);
|
|
||||||
+
|
|
||||||
+ my.folioText = globalSettings.lastArchivePath;
|
|
||||||
+ my.folioText.append(sep).append("[date].folio");
|
|
||||||
+ folioLineEdit->setText(my.folioText);
|
|
||||||
+
|
|
||||||
+ my.archiveText = globalSettings.lastArchivePath;
|
|
||||||
+ my.archiveText.append(sep).append("[host]").append(sep).append("[date]");
|
|
||||||
+ archiveLineEdit->setText(my.archiveText);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void RecordDialog::selectedRadioButton_clicked()
|
|
||||||
{
|
|
||||||
selectedRadioButton->setChecked(true);
|
|
||||||
@@ -83,53 +81,41 @@ void RecordDialog::deltaUnitsComboBox_activated(int value)
|
|
||||||
|
|
||||||
void RecordDialog::viewPushButton_clicked()
|
|
||||||
{
|
|
||||||
- RecordFileDialog view(this);
|
|
||||||
+ initText();
|
|
||||||
|
|
||||||
- QChar sep(pmPathSeparator());
|
|
||||||
- QString pmlogger = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append(".pcp");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append("pmlogger");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
+ RecordFileDialog view(this);
|
|
||||||
+ view.setDirectory(my.viewText);
|
|
||||||
|
|
||||||
- view.setDirectory(pmlogger);
|
|
||||||
- if (view.exec() == QDialog::Accepted)
|
|
||||||
- viewLineEdit->setText(view.selectedFiles().at(0));
|
|
||||||
+ if (view.exec() == QDialog::Accepted) {
|
|
||||||
+ QString selection = view.selectedFiles().at(0);
|
|
||||||
+ viewLineEdit->setText(selection);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void RecordDialog::folioPushButton_clicked()
|
|
||||||
{
|
|
||||||
- RecordFileDialog folio(this);
|
|
||||||
+ initText();
|
|
||||||
|
|
||||||
- QChar sep(pmPathSeparator());
|
|
||||||
- QString pmlogger = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append(".pcp");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append("pmlogger");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
+ RecordFileDialog folio(this);
|
|
||||||
+ folio.setDirectory(my.folioText);
|
|
||||||
|
|
||||||
- folio.setDirectory(pmlogger);
|
|
||||||
- if (folio.exec() == QDialog::Accepted)
|
|
||||||
- folioLineEdit->setText(folio.selectedFiles().at(0));
|
|
||||||
+ if (folio.exec() == QDialog::Accepted) {
|
|
||||||
+ QString selection = folio.selectedFiles().at(0);
|
|
||||||
+ folioLineEdit->setText(selection);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void RecordDialog::archivePushButton_clicked()
|
|
||||||
{
|
|
||||||
- RecordFileDialog archive(this);
|
|
||||||
+ initText();
|
|
||||||
|
|
||||||
- QChar sep(pmPathSeparator());
|
|
||||||
- QString pmlogger = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append(".pcp");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
- pmlogger.append("pmlogger");
|
|
||||||
- pmlogger.append(sep);
|
|
||||||
+ RecordFileDialog archive(this);
|
|
||||||
+ archive.setDirectory(my.archiveText);
|
|
||||||
|
|
||||||
- archive.setDirectory(pmlogger);
|
|
||||||
- if (archive.exec() == QDialog::Accepted)
|
|
||||||
- archiveLineEdit->setText(archive.selectedFiles().at(0));
|
|
||||||
+ if (archive.exec() == QDialog::Accepted) {
|
|
||||||
+ QString selection = archive.selectedFiles().at(0);
|
|
||||||
+ archiveLineEdit->setText(selection);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
// substitute "local:" or "localhost" with actual hostname
|
|
||||||
diff --git a/src/pmchart/recorddialog.h b/src/pmchart/recorddialog.h
|
|
||||||
index 784530353..67011b934 100644
|
|
||||||
--- a/src/pmchart/recorddialog.h
|
|
||||||
+++ b/src/pmchart/recorddialog.h
|
|
||||||
@@ -47,11 +47,17 @@ protected slots:
|
|
||||||
virtual void languageChange();
|
|
||||||
|
|
||||||
private:
|
|
||||||
+ void initText(void);
|
|
||||||
+
|
|
||||||
struct {
|
|
||||||
Tab *tab;
|
|
||||||
QString delta;
|
|
||||||
QmcTime::DeltaUnits units;
|
|
||||||
|
|
||||||
+ QString viewText;
|
|
||||||
+ QString folioText;
|
|
||||||
+ QString archiveText;
|
|
||||||
+
|
|
||||||
QString view;
|
|
||||||
QString folio;
|
|
||||||
QStringList hosts;
|
|
||||||
diff --git a/src/pmchart/saveviewdialog.cpp b/src/pmchart/saveviewdialog.cpp
|
|
||||||
index b0363a19f..1a8b094f4 100644
|
|
||||||
--- a/src/pmchart/saveviewdialog.cpp
|
|
||||||
+++ b/src/pmchart/saveviewdialog.cpp
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2014 Red Hat.
|
|
||||||
+ * Copyright (c) 2014,2021 Red Hat.
|
|
||||||
* Copyright (c) 2007-2009, Aconex. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
@@ -33,22 +33,14 @@ SaveViewDialog::SaveViewDialog(QWidget* parent) : QDialog(parent)
|
|
||||||
SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
|
|
||||||
this, SLOT(dirListView_selectionChanged()));
|
|
||||||
|
|
||||||
+ my.hostDynamic = true;
|
|
||||||
+ my.sizeDynamic = true;
|
|
||||||
+
|
|
||||||
QDir dir;
|
|
||||||
QChar sep(pmPathSeparator());
|
|
||||||
QString home = my.userDir = QDir::toNativeSeparators(QDir::homePath());
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append(".pcp");
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append("kmchart");
|
|
||||||
- if (!dir.exists(my.userDir)) {
|
|
||||||
- my.userDir = home;
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append(".pcp");
|
|
||||||
- my.userDir.append(sep);
|
|
||||||
- my.userDir.append("pmchart");
|
|
||||||
- }
|
|
||||||
- my.hostDynamic = true;
|
|
||||||
- my.sizeDynamic = true;
|
|
||||||
+ my.userDir.append(sep).append(".pcp");
|
|
||||||
+ my.userDir.append(sep).append("pmchart");
|
|
||||||
|
|
||||||
pathComboBox->addItem(fileIconProvider->icon(QFileIconProvider::Folder),
|
|
||||||
my.userDir);
|
|
||||||
diff --git a/src/pmchart/view.cpp b/src/pmchart/view.cpp
|
|
||||||
index 16633243f..4fc79fd09 100644
|
|
||||||
--- a/src/pmchart/view.cpp
|
|
||||||
+++ b/src/pmchart/view.cpp
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2006, Ken McDonell. All Rights Reserved.
|
|
||||||
- * Copyright (c) 2013, Red Hat Inc.
|
|
||||||
+ * Copyright (c) 2013,2021 Red Hat.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the
|
|
||||||
@@ -281,37 +281,17 @@ bool OpenViewDialog::openView(const char *path)
|
|
||||||
|
|
||||||
strcpy(_fname, path);
|
|
||||||
if ((f = fopen(_fname, "r")) == NULL) {
|
|
||||||
- // not found, start the great hunt
|
|
||||||
- // try user's pmchart dir ...
|
|
||||||
+ // not found, try users pmchart dir
|
|
||||||
pmsprintf(_fname, sizeof(_fname),
|
|
||||||
"%s%c" ".pcp%c" "pmchart%c" "%s",
|
|
||||||
(const char *)homepath.toLatin1(), sep, sep, sep, path);
|
|
||||||
if ((f = fopen(_fname, "r")) == NULL) {
|
|
||||||
- // try system pmchart dir
|
|
||||||
+ // not found, try system pmchart dir
|
|
||||||
pmsprintf(_fname, sizeof(_fname),
|
|
||||||
"%s%c" "config%c" "pmchart%c" "%s",
|
|
||||||
pmGetConfig("PCP_VAR_DIR"), sep, sep, sep, path);
|
|
||||||
- if ((f = fopen(_fname, "r")) == NULL) {
|
|
||||||
- // try user's kmchart dir
|
|
||||||
- pmsprintf(_fname, sizeof(_fname),
|
|
||||||
- "%s%c" ".pcp%c" "kmchart%c" "%s",
|
|
||||||
- (const char *)homepath.toLatin1(),
|
|
||||||
- sep, sep, sep, path);
|
|
||||||
- if ((f = fopen(_fname, "r")) == NULL) {
|
|
||||||
- // try system kmchart dir
|
|
||||||
- pmsprintf(_fname, sizeof(_fname),
|
|
||||||
- "%s%c" "config%c" "kmchart%c" "%s",
|
|
||||||
- pmGetConfig("PCP_VAR_DIR"),
|
|
||||||
- sep, sep, sep, path);
|
|
||||||
- if ((f = fopen(_fname, "r")) == NULL) {
|
|
||||||
- pmsprintf(_fname, sizeof(_fname),
|
|
||||||
- "%s%c" "config%c" "pmchart%c" "%s",
|
|
||||||
- pmGetConfig("PCP_VAR_DIR"),
|
|
||||||
- sep, sep, sep, path);
|
|
||||||
- goto noview;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ if ((f = fopen(_fname, "r")) == NULL)
|
|
||||||
+ goto noview;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// check for executable and __pmProcessPipe() as needed
|
|
@ -1,96 +0,0 @@
|
|||||||
commit e4523aa66ad9e3381086f2ba8c0e07cfa3661e51
|
|
||||||
Author: Nathan Scott <nathans@redhat.com>
|
|
||||||
Date: Fri Apr 30 11:25:56 2021 +1000
|
|
||||||
|
|
||||||
selinux: fix detection of lockdown policy class
|
|
||||||
|
|
||||||
Resolves Fedora BZ #1929259
|
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index 12fe8cde5..e6885234a 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -732,6 +732,7 @@ pcp_selinux_chkpwd_exec
|
|
||||||
pcp_selinux_security
|
|
||||||
pcp_selinux_sudo_exec
|
|
||||||
pcp_selinux_initrc_tmp
|
|
||||||
+pcp_selinux_lockdown_class
|
|
||||||
pcp_selinux_icmp_socket_class
|
|
||||||
pcp_selinux_cap2_syslog
|
|
||||||
pcp_selinux_sbd_exec
|
|
||||||
@@ -11970,6 +11971,10 @@ if test "x$enable_selinux" != "xfalse"; then :
|
|
||||||
| egrep '^[ ][ ]*(class |)icmp_socket$' >/dev/null \
|
|
||||||
&& pcp_selinux_icmp_socket_class=true
|
|
||||||
|
|
||||||
+ seinfo -x --class=lockdown $seinfo_common_flag 2>/dev/null \
|
|
||||||
+ | egrep '^[ ][ ]*(class |)lockdown$' >/dev/null \
|
|
||||||
+ && pcp_selinux_lockdown_class=true
|
|
||||||
+
|
|
||||||
|
|
||||||
seinfo -x --class=netlink_selinux_socket $seinfo_common_flag 2>/dev/null \
|
|
||||||
| egrep '^[ ][ ]*(class |)netlink_selinux_socket$' >/dev/null \
|
|
||||||
@@ -11987,10 +11992,6 @@ if test "x$enable_selinux" != "xfalse"; then :
|
|
||||||
| egrep '^[ ][ ]*(class |)security$' >/dev/null \
|
|
||||||
&& pcp_selinux_security_class=true
|
|
||||||
|
|
||||||
- seinfo -x --class=lockdown $seinfo_common_flag 2>/dev/null \
|
|
||||||
- | egrep '^[ ][ ]*(class |)lockdown$' >/dev/null \
|
|
||||||
- && pcp_selinux_lockdown_class=true
|
|
||||||
-
|
|
||||||
seinfo -x --class=dir $seinfo_common_flag 2>/dev/null \
|
|
||||||
| egrep '^[ ][ ]*(class |)dir$' >/dev/null \
|
|
||||||
&& pcp_selinux_dir_class=true
|
|
||||||
@@ -12046,6 +12047,7 @@ fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+
|
|
||||||
|
|
||||||
|
|
||||||
pcp_selinux_files_mmap_all_files=false
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index aa08ea18f..dcd60b67d 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -2132,6 +2132,10 @@ AS_IF([test "x$enable_selinux" != "xfalse"], [
|
|
||||||
| egrep '^[[ ]][[ ]]*(class |)icmp_socket$' >/dev/null \
|
|
||||||
&& pcp_selinux_icmp_socket_class=true
|
|
||||||
|
|
||||||
+ seinfo -x --class=lockdown $seinfo_common_flag 2>/dev/null \
|
|
||||||
+ | egrep '^[[ ]][[ ]]*(class |)lockdown$' >/dev/null \
|
|
||||||
+ && pcp_selinux_lockdown_class=true
|
|
||||||
+
|
|
||||||
dnl these ones are for pcpqa.te
|
|
||||||
|
|
||||||
seinfo -x --class=netlink_selinux_socket $seinfo_common_flag 2>/dev/null \
|
|
||||||
@@ -2150,10 +2154,6 @@ AS_IF([test "x$enable_selinux" != "xfalse"], [
|
|
||||||
| egrep '^[[ ]][[ ]]*(class |)security$' >/dev/null \
|
|
||||||
&& pcp_selinux_security_class=true
|
|
||||||
|
|
||||||
- seinfo -x --class=lockdown $seinfo_common_flag 2>/dev/null \
|
|
||||||
- | egrep '^[[ ]][[ ]]*(class |)lockdown$' >/dev/null \
|
|
||||||
- && pcp_selinux_lockdown_class=true
|
|
||||||
-
|
|
||||||
dnl pcp_selinux_dir already used for something else, so name to
|
|
||||||
dnl set is pcp_selinux_dir_class
|
|
||||||
seinfo -x --class=dir $seinfo_common_flag 2>/dev/null \
|
|
||||||
@@ -2192,6 +2192,7 @@ AC_SUBST(pcp_selinux_proc_security)
|
|
||||||
AC_SUBST(pcp_selinux_sbd_exec)
|
|
||||||
AC_SUBST(pcp_selinux_cap2_syslog)
|
|
||||||
AC_SUBST(pcp_selinux_icmp_socket_class)
|
|
||||||
+AC_SUBST(pcp_selinux_lockdown_class)
|
|
||||||
|
|
||||||
dnl for pcpqa.te
|
|
||||||
AC_SUBST(pcp_selinux_initrc_tmp)
|
|
||||||
diff --git a/src/include/builddefs.in b/src/include/builddefs.in
|
|
||||||
index 93038f446..126fab4d3 100644
|
|
||||||
--- a/src/include/builddefs.in
|
|
||||||
+++ b/src/include/builddefs.in
|
|
||||||
@@ -282,7 +282,6 @@ PCP_SELINUX_SBD_EXEC = @pcp_selinux_sbd_exec@
|
|
||||||
PCP_SELINUX_FILES_MMAP_ALL_FILES = @pcp_selinux_files_mmap_all_files@
|
|
||||||
PCP_SELINUX_CAP2_SYSLOG = @pcp_selinux_cap2_syslog@
|
|
||||||
PCP_SELINUX_ICMP_SOCKET_CLASS = @pcp_selinux_icmp_socket_class@
|
|
||||||
-PCP_SELINUX_LOCKDOWN = @pcp_selinux_lockdown@
|
|
||||||
PCP_SELINUX_LOCKDOWN_CLASS = @pcp_selinux_lockdown_class@
|
|
||||||
# pcpqa.te
|
|
||||||
PCP_SELINUX_INITRC_TMP = @pcp_selinux_initrc_tmp@
|
|
@ -1,33 +0,0 @@
|
|||||||
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
|
|
||||||
#
|
|
File diff suppressed because it is too large
Load Diff
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pcp-5.3.0.src.tar.gz) = d3f61315adb7d112357736537941690f4ceb11cd6158accb8973af542ca673bdc5ed7281d93b0bf88f6af01cc85d2e075261123576dae370c036ff8d493d8b1c
|
SHA512 (pcp-5.3.1.src.tar.gz) = c669d08cff66bba0cd747d2e0ca37f967497945cf1913358e7523c5f9877d68d0ffa810d960a42c168f3f75d52ec08b71ed350f23bad64b181223c6c8874c697
|
||||||
|
Loading…
Reference in New Issue
Block a user