[pcp/el5] Resolve python-pcp dependency.

Dave Brolley brolley at fedoraproject.org
Wed Feb 4 20:31:01 UTC 2015


commit aa4daafe99485125f9a3afafeaaff5943c4a47bf
Author: Dave Brolley <brolley at redhat.com>
Date:   Wed Feb 4 15:29:36 2015 -0500

    Resolve python-pcp dependency.

 pcp.3.10.2.el5.python-1.patch |  169 +++++++++++++++++++++++++++++++++++++++++
 pcp.3.10.2.el5.python-2.patch |   35 +++++++++
 pcp.spec                      |   17 ++++-
 3 files changed, 218 insertions(+), 3 deletions(-)
---
diff --git a/pcp.3.10.2.el5.python-1.patch b/pcp.3.10.2.el5.python-1.patch
new file mode 100644
index 0000000..34e6cbe
--- /dev/null
+++ b/pcp.3.10.2.el5.python-1.patch
@@ -0,0 +1,169 @@
+diff --git a/qa/GNUmakefile b/qa/GNUmakefile
+index 1751d69..0c7dbf1 100644
+--- a/qa/GNUmakefile
++++ b/qa/GNUmakefile
+@@ -1,5 +1,6 @@
+ #!gmake
+ #
++# Copyright (c) 2015 Red Hat.
+ # Copyright (c) 1997-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ #
+ # NB: this GNUmakefile is only for use from within the PCP build tree.  It governs
+@@ -13,8 +14,11 @@ include $(TOPDIR)/src/include/builddefs
+ TESTDIR = $(PCP_VAR_DIR)/testsuite
+ TESTS	= $(shell sed -n -e '/^[0-9]/s/:retired//' -e '/^[0-9]/s/:reserved//' -e '/^[0-9]/s/[        ].*//' -e '/^[0-9]/p' <group)
+ 
+-SUBDIRS = src pmdas cisco gluster pconf sadist collectl secure nfsclient \
++SUBDIRS = src pmdas cisco gluster pconf sadist collectl nfsclient \
+ 	  archives views qt linux perfevent unbound cifs
++ifeq "$(ENABLE_PYTHON)" "true"
++SUBDIRS += secure
++endif
+ LCONFIG = localconfig
+ 
+ # No implicit rules here, thank you
+@@ -49,8 +53,11 @@ COMMON_SCRIPTS = common.install.cisco common.pcpweb
+ COMMON = common.check common.config common.filter \
+ 	 common.product common.rc common.setup \
+ 	 common.secure common.gfs2 common.rpm \
+-	 common.python common.sh common.qt common.avahi \
++	 common.sh common.qt common.avahi \
+ 	 common.discovery common.compress common.webapi
++ifeq "$(ENABLE_PYTHON)" "true"
++COMMON += common.python 
++endif
+ 
+ OTHERS = GNUmakefile.install group qa_hosts.master README \
+ 	 valgrind-suppress sanity.coverage
+diff --git a/qa/pmdas/GNUmakefile b/qa/pmdas/GNUmakefile
+index 9d1e915..bfbb510 100644
+--- a/qa/pmdas/GNUmakefile
++++ b/qa/pmdas/GNUmakefile
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2012-2014 Red Hat.
++# Copyright (c) 2012-2015 Red Hat.
+ # Copyright (c) 2010 Aconex.  All Rights Reserved.
+ #
+ 
+@@ -7,9 +7,13 @@ TOPDIR = ../..
+ include $(TOPDIR)/src/include/builddefs
+ 
+ TESTDIR = $(PCP_VAR_DIR)/testsuite/pmdas
+-SUBDIRS = broken bigun dynamic slow slow_python memory_python test_perl \
++SUBDIRS = broken bigun dynamic slow test_perl \
+ 	  schizo
+ 
++ifeq "$(ENABLE_PYTHON)" "true"
++SUBDIRS += slow_python memory_python
++endif
++
+ default default_pcp: $(SUBDIRS)
+ 	$(SUBDIRS_MAKERULE)
+ 
+diff --git a/qa/src/GNUlocaldefs b/qa/src/GNUlocaldefs
+index 897ed8e..d489cf9 100644
+--- a/qa/src/GNUlocaldefs
++++ b/qa/src/GNUlocaldefs
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2012-2014 Red Hat.
++# Copyright (c) 2012-2015 Red Hat.
+ # Copyright (c) 2009 Aconex.  All Rights Reserved.
+ # Copyright (c) 1997-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ #
+@@ -158,6 +158,7 @@ PERLFILES = \
+ # not installed:
+ PLFILES = $(shell echo $(PERLFILES) | sed -e 's/\.perl/.pl/g')
+ 
++ifeq "$(ENABLE_PYTHON)" "true"
+ PYTHONFILES = \
+ 	test_pcp.python test_pmcc.python \
+ 	test_pmi.python check_import.python \
+@@ -166,6 +167,10 @@ PYTHONFILES = \
+ 	test_pcp_time.python
+ # not installed:
+ PYFILES = $(shell echo $(PYTHONFILES) | sed -e 's/\.python/.py/g')
++else
++PYTHONFILES =
++PYFILES =
++endif
+ 
+ ifneq "$(TARGET_OS)" "mingw"
+ CFILES += $(POSIXFILES) $(TRACEFILES)
+diff --git a/src/GNUmakefile b/src/GNUmakefile
+index a161d62..bd4205f 100644
+--- a/src/GNUmakefile
++++ b/src/GNUmakefile
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2012-2014 Red Hat.
++# Copyright (c) 2012-2015 Red Hat.
+ # Copyright (c) 2000,2004,2012 Silicon Graphics, Inc.  All Rights Reserved.
+ # 
+ # This program is free software; you can redistribute it and/or modify it
+@@ -90,7 +90,6 @@ OTHER_SUBDIRS = \
+ 	pmval \
+ 	pmwebapi \
+ 	perl \
+-	python \
+ 	procmemstat \
+ 	autofsd-probe \
+ 	telnet-probe \
+@@ -103,6 +102,10 @@ OTHER_SUBDIRS = \
+ 	pcp2graphite \
+ 	#
+ 
++ifeq "$(ENABLE_PYTHON)" "true"
++OTHER_SUBDIRS += python
++endif
++
+ SUBDIRS = \
+ 	$(INCLUDE_SUBDIR) \
+ 	$(LIBPCP_SUBDIR) \
+diff --git a/src/pmdas/GNUmakefile b/src/pmdas/GNUmakefile
+index 6820ace..a12c0a3 100644
+--- a/src/pmdas/GNUmakefile
++++ b/src/pmdas/GNUmakefile
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2013-2014 Red Hat.
++# Copyright (c) 2013-2015 Red Hat.
+ # Copyright (c) 2000,2003,2004 Silicon Graphics, Inc.  All Rights Reserved.
+ #
+ # This program is free software; you can redistribute it and/or modify it
+@@ -32,7 +32,11 @@ PLPMDAS = bonding netfilter zimbra postgresql \
+ 	rsyslog elasticsearch snmp nginx nfsclient \
+ 	ds389 ds389log activemq
+ 
++ifeq "$(ENABLE_PYTHON)" "true"
+ PYPMDAS = gluster zswap dmcache unbound
++else
++PYPMDAS =
++endif
+ 
+ SUBDIRS = $(CPMDAS) $(PLPMDAS) $(PYPMDAS)
+ LDIRT = pmcd.conf
+diff --git a/src/pmdas/simple/GNUmakefile b/src/pmdas/simple/GNUmakefile
+index a0c50bb..eb071ad 100644
+--- a/src/pmdas/simple/GNUmakefile
++++ b/src/pmdas/simple/GNUmakefile
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2012-2013 Red Hat.
++# Copyright (c) 2012-2015 Red Hat.
+ # Copyright (c) 2000,2003,2004 Silicon Graphics, Inc.  All Rights Reserved.
+ # 
+ # This program is free software; you can redistribute it and/or modify it
+@@ -21,7 +21,10 @@ CMDTARGET = pmdasimple$(EXECSUFFIX)
+ LLDLIBS = $(PCP_PMDALIB)
+ LCFLAGS = -I.
+ DFILES	= README help
+-SCRIPTS = pmdasimple.perl pmdasimple.python
++SCRIPTS = pmdasimple.perl
++ifeq "$(ENABLE_PYTHON)" "true"
++SCRIPTS += pmdasimple.python
++endif
+ LSRCFILES = Install Remove pmns root $(DFILES) $(SCRIPTS) \
+ 	simple.conf GNUmakefile.install
+ 
diff --git a/pcp.3.10.2.el5.python-2.patch b/pcp.3.10.2.el5.python-2.patch
new file mode 100644
index 0000000..a4f99bf
--- /dev/null
+++ b/pcp.3.10.2.el5.python-2.patch
@@ -0,0 +1,35 @@
+diff --git a/qa/common.python b/qa/common.python
+index e9d4dcc..d8e917b 100755
+--- a/qa/common.python
++++ b/qa/common.python
+@@ -10,6 +10,7 @@
+ 
+ # allow alternate versions of python to be used
+ python=${PYTHON:-/usr/bin/python}
++eval $python -c exit 2>/dev/null || _notrun "$python unavailable"
+ 
+ # verify output from unittest indicates successful testing
+ _check_unittest()
+diff --git a/src/GNUmakefile b/src/GNUmakefile
+index bd4205f..98682d0 100644
+--- a/src/GNUmakefile
++++ b/src/GNUmakefile
+@@ -90,6 +90,7 @@ OTHER_SUBDIRS = \
+ 	pmval \
+ 	pmwebapi \
+ 	perl \
++	python \
+ 	procmemstat \
+ 	autofsd-probe \
+ 	telnet-probe \
+@@ -102,10 +103,6 @@ OTHER_SUBDIRS = \
+ 	pcp2graphite \
+ 	#
+ 
+-ifeq "$(ENABLE_PYTHON)" "true"
+-OTHER_SUBDIRS += python
+-endif
+-
+ SUBDIRS = \
+ 	$(INCLUDE_SUBDIR) \
+ 	$(LIBPCP_SUBDIR) \
diff --git a/pcp.spec b/pcp.spec
index 5b3c6bc..915fd1b 100644
--- a/pcp.spec
+++ b/pcp.spec
@@ -1,7 +1,7 @@
 Summary: System-level performance monitoring and performance management
 Name: pcp
 Version: 3.10.2
-%define buildversion 1
+%define buildversion 2
 
 Release: %{buildversion}%{?dist}
 License: GPLv2+ and LGPLv2.1+ and CC-BY
@@ -9,6 +9,8 @@ URL: http://www.pcp.io
 Group: Applications/System
 Source0: ftp://oss.sgi.com/projects/pcp/download/%{name}-%{version}.src.tar.gz
 Source1: ftp://oss.sgi.com/projects/pcp/download/pcp-webjs.src.tar.gz
+patch0: pcp.3.10.2.el5.python-1.patch
+patch1: pcp.3.10.2.el5.python-2.patch
 
 # There are no papi/libpfm devel packages for s390 nor for some rhels, disable
 %ifarch s390 s390x
@@ -28,7 +30,7 @@ Source1: ftp://oss.sgi.com/projects/pcp/download/pcp-webjs.src.tar.gz
 %endif
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=1169226
-%if 0%{?rhel} == 0 || 0%{?rhel} > 5
+%if 0%{?rhel} == 0 || 0%{?rhel} >= 5
 %define disable_microhttpd 0
 %else
 %define disable_microhttpd 1
@@ -102,13 +104,17 @@ BuildRequires: qt4-devel >= 4.4
 %endif
 
 Requires: bash gawk sed grep fileutils findutils initscripts perl which
-Requires: python
+%if !%{disable_python2}
 %if 0%{?rhel} <= 5
 Requires: python-ctypes
 %endif
+Requires: python
+%endif
 
 Requires: pcp-libs = %{version}-%{release}
+%if !%{disable_python2}
 Requires: python-pcp = %{version}-%{release}
+%endif
 Requires: perl-PCP-PMDA = %{version}-%{release}
 Obsoletes: pcp-gui-debuginfo
 Obsoletes: pcp-pmda-nvidia
@@ -539,6 +545,8 @@ and other detailed documentation about the internals of core
 PCP utilities and daemons, and the PCP graphical tools.
 
 %prep
+%patch0 -p1
+%patch1 -p1
 %setup -q
 %setup -q -T -D -a 1
 
@@ -1077,6 +1085,9 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
 %defattr(-,root,root,-)
 
 %changelog
+* Wed Feb 04 2015 Dave Brolley <brolley at redhat.com> - 3.10.2-2
+- Resolve python-pcp dependency
+
 * Fri Jan 23 2015 Dave Brolley <brolley at redhat.com> - 3.10.2-1
 - Update to latest PCP sources.
 - Improve pmdaInit diagnostics for DSO helptext (BZ 1182949)


More information about the scm-commits mailing list