Update for rawhide python2 packaging changes
This commit is contained in:
parent
b97582072e
commit
f4fd4716d6
105
pcp.spec
105
pcp.spec
@ -1,6 +1,6 @@
|
||||
Name: pcp
|
||||
Version: 3.12.2
|
||||
Release: 2%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: System-level performance monitoring and performance management
|
||||
License: GPLv2+ and LGPLv2.1+ and CC-BY
|
||||
URL: http://www.pcp.io
|
||||
@ -15,6 +15,12 @@ Source2: %{github}/pcp-webapp-grafana/archive/1.9.1/pcp-webapp-grafana-1.9.1.tar
|
||||
Source3: %{github}/pcp-webapp-graphite/archive/0.9.10/pcp-webapp-graphite-0.9.10.tar.gz
|
||||
Source4: %{github}/pcp-webapp-blinkenlights/archive/1.0.0/pcp-webapp-blinkenlights-1.0.0.tar.gz
|
||||
|
||||
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7
|
||||
%global __python2 python2
|
||||
%else
|
||||
%global __python2 python
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 5
|
||||
%global disable_selinux 0
|
||||
%else
|
||||
@ -162,7 +168,7 @@ BuildRequires: zlib-devel
|
||||
%if 0%{?default_python} != 3
|
||||
BuildRequires: python%{?default_python}-devel
|
||||
%else
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: %{__python2}-devel
|
||||
%endif
|
||||
%endif
|
||||
%if !%{disable_python3}
|
||||
@ -212,14 +218,16 @@ Requires: pcp-libs = %{version}-%{release}
|
||||
%if !%{disable_selinux}
|
||||
Requires: pcp-selinux = %{version}-%{release}
|
||||
%endif
|
||||
%if 0%{?fedora} < 27
|
||||
# F27 re-introduced split-out debuginfo packages
|
||||
Obsoletes: pcp-gui-debuginfo
|
||||
%endif
|
||||
Obsoletes: pcp-pmda-nvidia
|
||||
|
||||
# Obsoletes for distros that already have single install pmda's with compat package
|
||||
Obsoletes: pcp-compat
|
||||
|
||||
Requires: pcp-libs = %{version}-%{release}
|
||||
Obsoletes: pcp-gui-debuginfo
|
||||
|
||||
%global tapsetdir %{_datadir}/systemtap/tapset
|
||||
|
||||
@ -697,9 +705,9 @@ Requires: python3-pcp = %{version}-%{release}
|
||||
Requires: python3-elasticsearch
|
||||
BuildRequires: python3-elasticsearch
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: python-elasticsearch
|
||||
BuildRequires: python-elasticsearch
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-elasticsearch
|
||||
BuildRequires: %{__python2}-elasticsearch
|
||||
%endif
|
||||
|
||||
%description export-pcp2elasticsearch
|
||||
@ -719,7 +727,7 @@ Requires: pcp-libs >= %{version}-%{release}
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description export-pcp2graphite
|
||||
@ -738,8 +746,8 @@ Requires: pcp-libs >= %{version}-%{release}
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
Requires: python3-requests
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: python-requests
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-requests
|
||||
%endif
|
||||
|
||||
%description export-pcp2influxdb
|
||||
@ -758,7 +766,7 @@ Requires: pcp-libs >= %{version}-%{release}
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description export-pcp2json
|
||||
@ -778,7 +786,7 @@ Requires: pcp-libs >= %{version}-%{release}
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description export-pcp2xlsx
|
||||
@ -797,7 +805,7 @@ Requires: pcp-libs >= %{version}-%{release}
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description export-pcp2xml
|
||||
@ -816,7 +824,7 @@ Requires: pcp-libs >= %{version}-%{release}
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
%else
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description export-pcp2zabbix
|
||||
@ -1422,7 +1430,7 @@ URL: http://www.pcp.io
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: %{__python2}-pcp
|
||||
%endif
|
||||
%description pmda-gluster
|
||||
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
||||
@ -1440,7 +1448,7 @@ URL: http://www.pcp.io
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: %{__python2}-pcp
|
||||
%endif
|
||||
%description pmda-zswap
|
||||
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
||||
@ -1458,7 +1466,7 @@ URL: http://www.pcp.io
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: %{__python2}-pcp
|
||||
%endif
|
||||
%description pmda-unbound
|
||||
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
||||
@ -1476,7 +1484,7 @@ URL: http://www.pcp.io
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: %{__python2}-pcp
|
||||
%endif
|
||||
%description pmda-mic
|
||||
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
||||
@ -1494,7 +1502,7 @@ URL: http://www.pcp.io
|
||||
%if !%{disable_python3}
|
||||
Requires: python3-pcp
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: %{__python2}-pcp
|
||||
%endif
|
||||
%description pmda-haproxy
|
||||
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
|
||||
@ -1514,10 +1522,10 @@ Requires: python3-pcp
|
||||
Requires: libvirt-python3 python3-lxml
|
||||
BuildRequires: libvirt-python3 python3-lxml
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: libvirt-python python-lxml
|
||||
Requires: %{__python2}-pcp
|
||||
Requires: libvirt-python %{__python2}-lxml
|
||||
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
|
||||
BuildRequires: libvirt-python python-lxml
|
||||
BuildRequires: libvirt-python %{__python2}-lxml
|
||||
%endif
|
||||
%endif
|
||||
%description pmda-libvirt
|
||||
@ -1539,9 +1547,9 @@ Requires: python3-pcp
|
||||
Requires: python3-rtslib
|
||||
BuildRequires: python3-rtslib
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: python-rtslib
|
||||
BuildRequires: python-rtslib
|
||||
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
|
||||
@ -1565,9 +1573,9 @@ Requires: python3-pcp
|
||||
Requires: python3-requests
|
||||
BuildRequires: python3-requests
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: python-requests
|
||||
BuildRequires: python-requests
|
||||
Requires: %{__python2}-pcp
|
||||
Requires: %{__python2}-requests
|
||||
BuildRequires: %{__python2}-requests
|
||||
%endif
|
||||
|
||||
%description pmda-prometheus
|
||||
@ -1591,9 +1599,9 @@ Requires: python3-pcp
|
||||
Requires: python3-jsonpointer python3-six
|
||||
BuildRequires: python3-jsonpointer python3-six
|
||||
%else
|
||||
Requires: python-pcp
|
||||
Requires: python-jsonpointer python-six
|
||||
BuildRequires: python-jsonpointer python-six
|
||||
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
|
||||
@ -1942,7 +1950,7 @@ automated pmie diagnosis, alerting and self-healing for the localhost.
|
||||
#
|
||||
# python-pcp. This is the PCP library bindings for python.
|
||||
#
|
||||
%package -n python-pcp
|
||||
%package -n %{__python2}-pcp
|
||||
License: GPLv2+
|
||||
Group: Development/Libraries
|
||||
Summary: Performance Co-Pilot (PCP) Python bindings and documentation
|
||||
@ -1954,7 +1962,7 @@ Requires: python%{default_python}
|
||||
Requires: python
|
||||
%endif
|
||||
|
||||
%description -n python-pcp
|
||||
%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.
|
||||
@ -1991,7 +1999,7 @@ URL: http://www.pcp.io
|
||||
Requires: python3-pcp = %{version}-%{release}
|
||||
%endif
|
||||
%if !%{disable_python2}
|
||||
Requires: python-pcp = %{version}-%{release}
|
||||
Requires: %{__python2}-pcp = %{version}-%{release}
|
||||
%endif
|
||||
Requires: pcp-libs = %{version}-%{release}
|
||||
|
||||
@ -2691,30 +2699,6 @@ PCP_PMNS_DIR=%{_pmnsdir}
|
||||
test -s "$PCP_LOG_DIR/configs.sh" && source "$PCP_LOG_DIR/configs.sh"
|
||||
rm -f $PCP_LOG_DIR/configs.sh
|
||||
|
||||
# migrate old to new temp dir locations (within the same filesystem)
|
||||
migrate_tempdirs()
|
||||
{
|
||||
_sub="$1"
|
||||
_new_tmp_dir=%{_tempsdir}
|
||||
_old_tmp_dir=%{_localstatedir}/tmp
|
||||
|
||||
for d in "$_old_tmp_dir/$_sub" ; do
|
||||
test -d "$d" -a -k "$d" || continue
|
||||
cd "$d" || continue
|
||||
for f in * ; do
|
||||
[ "$f" != "*" ] || continue
|
||||
source="$d/$f"
|
||||
target="$_new_tmp_dir/$_sub/$f"
|
||||
[ "$source" != "$target" ] || continue
|
||||
[ -f "$target" ] || mv -fu "$source" "$target"
|
||||
done
|
||||
cd && rmdir "$d" 2>/dev/null
|
||||
done
|
||||
}
|
||||
for daemon in mmv pmdabash pmie pmlogger
|
||||
do
|
||||
migrate_tempdirs $daemon
|
||||
done
|
||||
chown -R pcp:pcp %{_logsdir}/pmcd 2>/dev/null
|
||||
chown -R pcp:pcp %{_logsdir}/pmlogger 2>/dev/null
|
||||
chown -R pcp:pcp %{_logsdir}/pmie 2>/dev/null
|
||||
@ -3211,7 +3195,7 @@ cd
|
||||
%files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list
|
||||
|
||||
%if !%{disable_python2}
|
||||
%files -n python-pcp -f python-pcp.list.rpm
|
||||
%files -n %{__python2}-pcp -f python-pcp.list.rpm
|
||||
%endif
|
||||
|
||||
%if !%{disable_python3}
|
||||
@ -3242,6 +3226,11 @@ cd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jan 10 2018 Lukas Berk <lberk@redhat.com> - 3.12.2-4
|
||||
- Remove Obsoletes line for pcp-gui-debuginfo
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.12.2-2
|
||||
- Remove old crufty coreutils requires
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user