From 4e5f192445f4af7378b7b4a7b8fe97b04423e9a271e3b91d6ea33c88d259273a Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Mon, 23 Feb 2015 16:38:12 +0000 Subject: [PATCH 1/5] Accepting request 287365 from home:bmanojlovic:branches:openSUSE:Factory:Rings:1-MinimalX - fix gcc5 C99 reserved issue problems with patch pcp-3.6.10-gcc5-reservedword.patch OBS-URL: https://build.opensuse.org/request/show/287365 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=36 --- pcp-3.6.10-gcc5-reservedword.patch | 26 ++++++++++++++++++++++++++ pcp.changes | 6 ++++++ pcp.spec | 5 ++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pcp-3.6.10-gcc5-reservedword.patch diff --git a/pcp-3.6.10-gcc5-reservedword.patch b/pcp-3.6.10-gcc5-reservedword.patch new file mode 100644 index 0000000..ceb7685 --- /dev/null +++ b/pcp-3.6.10-gcc5-reservedword.patch @@ -0,0 +1,26 @@ +Index: src/pmdas/bash/event.c +=================================================================== +--- src/pmdas/bash/event.c.orig 2012-10-14 00:50:38.000000000 +0200 ++++ src/pmdas/bash/event.c 2015-02-23 16:08:13.039795393 +0100 +@@ -168,7 +168,7 @@ process_alloc(const char *bashname, bash + bashful->queueid = queueid; + bashful->exited = 0; + bashful->finished = 0; +- bashful->restrict = 0; ++ bashful->restricted = 0; + bashful->version = init->version; + bashful->padding = 0; + +Index: src/pmdas/bash/event.h +=================================================================== +--- src/pmdas/bash/event.h.orig 2012-10-08 07:16:37.000000000 +0200 ++++ src/pmdas/bash/event.h 2015-02-23 16:08:03.822057504 +0100 +@@ -29,7 +29,7 @@ typedef struct bash_process { + + int exited : 1; /* flag: process running? */ + int finished: 1; /* flag: exit event sent? */ +- int restrict: 1; /* flag: store-to-access? */ ++ int restricted: 1; /* flag: store-to-access? */ + int version : 8; /* pmda <-> bash xtrace version */ + int padding : 21; /* filler */ + diff --git a/pcp.changes b/pcp.changes index 3bf508f..328835f 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 23 16:28:50 UTC 2015 - boris@steki.net + +- fix gcc5 C99 reserved issue problems with patch + pcp-3.6.10-gcc5-reservedword.patch + ------------------------------------------------------------------- Mon Nov 10 01:14:00 UTC 2014 - Led diff --git a/pcp.spec b/pcp.spec index 59c2964..52de2cd 100644 --- a/pcp.spec +++ b/pcp.spec @@ -1,7 +1,7 @@ # # spec file for package pcp # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -73,6 +73,7 @@ Patch13: remove_cpan_rpaths.patch Patch14: rm_init_script_runlevel_4.patch Patch15: create-pmlogger-and-pmie-logdirs-during-install.patch Patch16: fix_pmie_pmlogger_startup_races.patch +Patch17: pcp-3.6.10-gcc5-reservedword.patch %if (0%{?suse_version} > 0) Requires: cpp @@ -291,6 +292,8 @@ into standard PCP archive logs for replay with any PCP monitoring tool. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 + autoconf %clean From c6102bc9d9b258cab01d3b3a3f0328574b83b8ecfa455720f3adca215cfe9454 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Tue, 24 Feb 2015 09:27:55 +0000 Subject: [PATCH 2/5] Accepting request 287414 from home:kwk:branches:Base:System - Update to 3.10.2 See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD for details - new patches 0007-Honor-CFLAGS-in-qmake.patch 0008-SUSE-fy-pmsnap-control-path.patch 0009-pmsnap-control-var-www-srv-www.patch - renamed patches create-pmlogger-and-pmie-logdirs-during-install.patch to 0006-create-pmlogger-and-pmie-logdirs-during-install.patch - Update to 3.10.1 See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD for details - new sub-packages * pcp-doc * pcp-gui * python3-pcp * python-pcp * pmda-infiniband * pmda-perfevent * pmda-papi * import-collectl2pcp - drop fix_pmie_pmlogger_startup_races.patch, upstream drop pcp-3.6.10-gcc5-reservedword.patch, obsolete OBS-URL: https://build.opensuse.org/request/show/287414 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=37 --- 0001-Fix-XEN-build.patch | 24 + ...ll-libraries-without-exec-permission.patch | 206 ++- ...sb.patch => 0003-pcp-legacy-init-lsb.patch | 20 +- ...ths.patch => 0004-Remove-CPAN-rpaths.patch | 56 +- ...-Remove-runlevel-4-from-init-scripts.patch | 64 +- ...gger-and-pmie-logdirs-during-install.patch | 39 + 0007-Honor-CFLAGS-in-qmake.patch | 83 + 0008-SUSE-fy-pmsnap-control-path.patch | 34 + 0009-pmsnap-control-var-www-srv-www.patch | 24 + ...gger-and-pmie-logdirs-during-install.patch | 37 - fix_pmie_pmlogger_startup_races.patch | 325 ---- pcp-3.10.2.src.tar.gz | 3 + pcp-3.6.10-gcc5-reservedword.patch | 26 - pcp-3.6.10.src.tar.gz | 3 - pcp-webjs.src.tar.gz | 3 + pcp-xenbuild.patch | 12 - pcp.changes | 33 + pcp.spec | 1397 ++++++++++++++--- 18 files changed, 1606 insertions(+), 783 deletions(-) create mode 100644 0001-Fix-XEN-build.patch rename static_lib_perms.diff => 0002-Install-libraries-without-exec-permission.patch (64%) rename pcp_legacy_init_lsb.patch => 0003-pcp-legacy-init-lsb.patch (67%) rename remove_cpan_rpaths.patch => 0004-Remove-CPAN-rpaths.patch (55%) rename rm_init_script_runlevel_4.patch => 0005-Remove-runlevel-4-from-init-scripts.patch (61%) create mode 100644 0006-create-pmlogger-and-pmie-logdirs-during-install.patch create mode 100644 0007-Honor-CFLAGS-in-qmake.patch create mode 100644 0008-SUSE-fy-pmsnap-control-path.patch create mode 100644 0009-pmsnap-control-var-www-srv-www.patch delete mode 100644 create-pmlogger-and-pmie-logdirs-during-install.patch delete mode 100644 fix_pmie_pmlogger_startup_races.patch create mode 100644 pcp-3.10.2.src.tar.gz delete mode 100644 pcp-3.6.10-gcc5-reservedword.patch delete mode 100644 pcp-3.6.10.src.tar.gz create mode 100644 pcp-webjs.src.tar.gz delete mode 100644 pcp-xenbuild.patch diff --git a/0001-Fix-XEN-build.patch b/0001-Fix-XEN-build.patch new file mode 100644 index 0000000..aa69c52 --- /dev/null +++ b/0001-Fix-XEN-build.patch @@ -0,0 +1,24 @@ +From 58127dca98f11270491383946d2714fd9d983d76 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Fri, 12 Dec 2014 15:42:25 +0100 +Subject: [PATCH 1/6] Fix XEN build + +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 98d325e2bfdc..648c511dcd72 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1079,6 +1079,7 @@ NR == 1 { if ($1 != "UID" && $1 != "USER") exit + # Unix variants + $2 == 1 && / init/ { print "OK"; exit } + $2 == 1 && / \/etc\/init/ { print "OK"; exit } ++$2 == 1 && / \/bin\/bash/ { print "OK"; exit } + # Fedora 9 + $2 == 1 && / \/sbin\/init/ { print "OK"; exit } + # Fedora 15 +-- +2.1.2 + diff --git a/static_lib_perms.diff b/0002-Install-libraries-without-exec-permission.patch similarity index 64% rename from static_lib_perms.diff rename to 0002-Install-libraries-without-exec-permission.patch index b049f46..13d0bf9 100644 --- a/static_lib_perms.diff +++ b/0002-Install-libraries-without-exec-permission.patch @@ -1,31 +1,29 @@ -From bcd50d9e0a84c54c2e5d909f2567312c9af0335e Mon Sep 17 00:00:00 2001 -From: David Disseldorp -Date: Mon, 19 Nov 2012 17:15:07 +0100 -Subject: [PATCH] Install libraries without exec permission +From 865c920542f1cc499500c97217bfb36b70541765 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Fri, 12 Dec 2014 15:43:00 +0100 +Subject: [PATCH 2/6] Install libraries without exec permission --- - src/genpmda/genpmda | 4 ++-- - src/libpcp/src/GNUmakefile | 4 ++-- - src/libpcp_gui/src/GNUmakefile | 4 ++-- - src/libpcp_import/src/GNUmakefile | 4 ++-- - src/libpcp_mmv/src/GNUmakefile | 4 ++-- - src/libpcp_pmda/src/GNUmakefile | 4 ++-- - src/libpcp_trace/src/GNUmakefile | 4 ++-- - src/pmdas/aix/GNUmakefile | 3 ++- - src/pmdas/darwin/GNUmakefile | 3 ++- - src/pmdas/freebsd/GNUmakefile | 3 ++- - src/pmdas/linux/GNUmakefile | 3 ++- - src/pmdas/linux_proc/GNUmakefile | 3 ++- - src/pmdas/lustrecomm/GNUmakefile | 2 +- - src/pmdas/mmv/GNUmakefile | 3 ++- - src/pmdas/pmcd/src/GNUmakefile | 2 +- - src/pmdas/sample/src/GNUmakefile | 3 ++- - src/pmdas/sendmail/GNUmakefile | 2 +- - src/pmdas/solaris/GNUmakefile | 3 ++- - 18 files changed, 33 insertions(+), 25 deletions(-) + src/genpmda/genpmda | 4 ++-- + src/libpcp/src/GNUmakefile | 4 ++-- + src/libpcp_gui/src/GNUmakefile | 4 ++-- + src/libpcp_import/src/GNUmakefile | 4 ++-- + src/libpcp_mmv/src/GNUmakefile | 4 ++-- + src/libpcp_pmda/src/GNUmakefile | 4 ++-- + src/libpcp_trace/src/GNUmakefile | 4 ++-- + src/pmdas/aix/GNUmakefile | 3 ++- + src/pmdas/darwin/GNUmakefile | 3 ++- + src/pmdas/freebsd/GNUmakefile | 3 ++- + src/pmdas/linux/GNUmakefile | 3 ++- + src/pmdas/linux_proc/GNUmakefile | 3 ++- + src/pmdas/lustrecomm/GNUmakefile | 2 +- + src/pmdas/pmcd/src/GNUmakefile | 2 +- + src/pmdas/sendmail/GNUmakefile | 2 +- + src/pmdas/solaris/GNUmakefile | 3 ++- + 16 files changed, 29 insertions(+), 23 deletions(-) diff --git a/src/genpmda/genpmda b/src/genpmda/genpmda -index 4650315..1bd2cba 100755 +index 46503150c1a5..1bd2cbae3497 100755 --- a/src/genpmda/genpmda +++ b/src/genpmda/genpmda @@ -909,7 +909,7 @@ install: default @@ -47,140 +45,140 @@ index 4650315..1bd2cba 100755 \$(INSTALL) -m 755 -f $oflag/Remove \$(PMDADIR)/Remove \$(INSTALL) -m 644 -f $oflag/Makefile.install \$(PMDADIR)/Makefile diff --git a/src/libpcp/src/GNUmakefile b/src/libpcp/src/GNUmakefile -index 18adb88..6a7627d 100644 +index 5e9cc76c6027..4c5ced38813c 100644 --- a/src/libpcp/src/GNUmakefile +++ b/src/libpcp/src/GNUmakefile -@@ -103,7 +103,7 @@ endif +@@ -128,7 +128,7 @@ endif install : default - ifneq "$(LIBTARGET)" "" + ifneq ($(LIBTARGET),) - $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) endif - ifneq "$(SYMTARGET)" "" + ifneq ($(SYMTARGET),) for tt in $(SYMTARGET); do \ -@@ -111,7 +111,7 @@ ifneq "$(SYMTARGET)" "" +@@ -136,7 +136,7 @@ ifneq ($(SYMTARGET),) done endif - ifneq "$(STATICLIBTARGET)" "" + ifneq ($(STATICLIBTARGET),) - $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) endif default_pcp : default diff --git a/src/libpcp_gui/src/GNUmakefile b/src/libpcp_gui/src/GNUmakefile -index 6d636e0..d8fe1e7 100644 +index 91589f7448b2..ea44eaec99d1 100644 --- a/src/libpcp_gui/src/GNUmakefile +++ b/src/libpcp_gui/src/GNUmakefile -@@ -53,7 +53,7 @@ include $(BUILDRULES) +@@ -57,7 +57,7 @@ include $(BUILDRULES) install: default - ifneq "$(LIBTARGET)" "" + ifneq ($(LIBTARGET),) - $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) endif - ifneq "$(SYMTARGET)" "" + ifneq ($(SYMTARGET),) for tt in $(SYMTARGET); do \ -@@ -61,7 +61,7 @@ ifneq "$(SYMTARGET)" "" +@@ -65,7 +65,7 @@ ifneq ($(SYMTARGET),) done endif - ifneq "$(STATICLIBTARGET)" "" + ifneq ($(STATICLIBTARGET),) - $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) endif default_pcp: default diff --git a/src/libpcp_import/src/GNUmakefile b/src/libpcp_import/src/GNUmakefile -index 1cdf529..f1c7d1d 100644 +index 6c3c2aa75489..178eb8197059 100644 --- a/src/libpcp_import/src/GNUmakefile +++ b/src/libpcp_import/src/GNUmakefile -@@ -50,7 +50,7 @@ include $(BUILDRULES) +@@ -53,7 +53,7 @@ include $(BUILDRULES) install: default - ifneq "$(LIBTARGET)" "" + ifneq ($(LIBTARGET),) - $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) endif - ifneq "$(SYMTARGET)" "" + ifneq ($(SYMTARGET),) for tt in $(SYMTARGET); do \ -@@ -58,7 +58,7 @@ ifneq "$(SYMTARGET)" "" +@@ -61,7 +61,7 @@ ifneq ($(SYMTARGET),) done endif - ifneq "$(STATICLIBTARGET)" "" + ifneq ($(STATICLIBTARGET),) - $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) endif default_pcp: default diff --git a/src/libpcp_mmv/src/GNUmakefile b/src/libpcp_mmv/src/GNUmakefile -index e2395f3..9619df5 100644 +index a60029c09ece..a7cf0647ba9d 100644 --- a/src/libpcp_mmv/src/GNUmakefile +++ b/src/libpcp_mmv/src/GNUmakefile -@@ -45,7 +45,7 @@ include $(BUILDRULES) +@@ -48,7 +48,7 @@ include $(BUILDRULES) install: default - ifneq "$(LIBTARGET)" "" + ifneq ($(LIBTARGET),) - $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) endif - ifneq "$(SYMTARGET)" "" + ifneq ($(SYMTARGET),) for tt in $(SYMTARGET); do \ -@@ -53,7 +53,7 @@ ifneq "$(SYMTARGET)" "" +@@ -56,7 +56,7 @@ ifneq ($(SYMTARGET),) done endif - ifneq "$(STATICLIBTARGET)" "" + ifneq ($(STATICLIBTARGET),) - $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) endif default_pcp: default diff --git a/src/libpcp_pmda/src/GNUmakefile b/src/libpcp_pmda/src/GNUmakefile -index 23a1b10..182d68d 100644 +index 583be8109ddd..cc577eaf2023 100644 --- a/src/libpcp_pmda/src/GNUmakefile +++ b/src/libpcp_pmda/src/GNUmakefile -@@ -79,7 +79,7 @@ include $(BUILDRULES) +@@ -81,7 +81,7 @@ include $(BUILDRULES) install : default - ifneq "$(LIBTARGET)" "" + ifneq ($(LIBTARGET),) - $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) endif - ifneq "$(LIBTARGET_V1)" "" + ifneq ($(LIBTARGET_V1),) $(INSTALL) -S $(LIBTARGET_V3) $(PCP_LIB_DIR)/$(LIBTARGET_V1) -@@ -88,7 +88,7 @@ ifneq "$(LIBTARGET_V2)" "" +@@ -90,7 +90,7 @@ ifneq ($(LIBTARGET_V2),) $(INSTALL) -S $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET_V2) endif - ifneq "$(STATICLIBTARGET)" "" + ifneq ($(STATICLIBTARGET),) - $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) endif default_pcp : default diff --git a/src/libpcp_trace/src/GNUmakefile b/src/libpcp_trace/src/GNUmakefile -index d3ea55d..034195a 100644 +index a99c493986b8..c1d5ab7aa0cc 100644 --- a/src/libpcp_trace/src/GNUmakefile +++ b/src/libpcp_trace/src/GNUmakefile -@@ -51,13 +51,13 @@ include $(BUILDRULES) +@@ -56,13 +56,13 @@ include $(BUILDRULES) install : default - ifneq "$(LIBTARGET)" "" + ifneq ($(LIBTARGET),) - $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) endif - ifneq "$(SYMTARGET)" "" + ifneq ($(SYMTARGET),) $(INSTALL) -S $(LIBTARGET) $(PCP_LIB_DIR)/$(SYMTARGET) endif - ifneq "$(STATICLIBTARGET)" "" + ifneq ($(STATICLIBTARGET),) - $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) endif default_pcp : default diff --git a/src/pmdas/aix/GNUmakefile b/src/pmdas/aix/GNUmakefile -index 9282d76..46336a7 100644 +index e4796b9994fa..77ded85a9874 100644 --- a/src/pmdas/aix/GNUmakefile +++ b/src/pmdas/aix/GNUmakefile -@@ -41,7 +41,8 @@ build-me: common.h root_aix domain.h $(CMDTARGET) $(LIBTARGET) help.dir help.pag +@@ -43,7 +43,8 @@ build-me: common.h root_aix domain.h $(CMDTARGET) $(LIBTARGET) help.dir help.pag install: build-me $(INSTALL) -m 755 -d $(PMDADIR) $(INSTALL) -m 644 domain.h help.dir help.pag $(PMDADIR) @@ -191,10 +189,10 @@ index 9282d76..46336a7 100644 else build-me: diff --git a/src/pmdas/darwin/GNUmakefile b/src/pmdas/darwin/GNUmakefile -index a2fd3a7..081cc98 100644 +index 60af8940d436..8b8a1e2963cb 100644 --- a/src/pmdas/darwin/GNUmakefile +++ b/src/pmdas/darwin/GNUmakefile -@@ -45,7 +45,8 @@ build-me: root_darwin domain.h $(LIBTARGET) $(CMDTARGET) help.dir help.pag +@@ -47,7 +47,8 @@ build-me: root_darwin domain.h $(LIBTARGET) $(CMDTARGET) help.dir help.pag install: build-me $(INSTALL) -m 755 -d $(PMDADIR) $(INSTALL) -m 644 domain.h help.dir help.pag $(PMDADIR) @@ -205,10 +203,10 @@ index a2fd3a7..081cc98 100644 else build-me: diff --git a/src/pmdas/freebsd/GNUmakefile b/src/pmdas/freebsd/GNUmakefile -index 217fcd8..00b2dcd 100644 +index 3689e2ad06b9..12c70dd140a3 100644 --- a/src/pmdas/freebsd/GNUmakefile +++ b/src/pmdas/freebsd/GNUmakefile -@@ -46,7 +46,8 @@ build-me: domain.h $(LIBTARGET) $(CMDTARGET) help.dir help.pag +@@ -48,7 +48,8 @@ build-me: domain.h $(LIBTARGET) $(CMDTARGET) help.dir help.pag install: default $(INSTALL) -m 755 -d $(PMDADIR) $(INSTALL) -m 644 domain.h help help.dir help.pag $(PMDADIR) @@ -219,38 +217,38 @@ index 217fcd8..00b2dcd 100644 else build-me: diff --git a/src/pmdas/linux/GNUmakefile b/src/pmdas/linux/GNUmakefile -index 087e53a..bc81973 100644 +index 4d645d77561d..49399a0efb8a 100644 --- a/src/pmdas/linux/GNUmakefile +++ b/src/pmdas/linux/GNUmakefile -@@ -67,7 +67,8 @@ build-me: domain.h $(LIBTARGET) $(CMDTARGET) help.dir help.pag +@@ -75,7 +75,8 @@ build-me: domain.h $(LIBTARGET) $(CMDTARGET) $(HELPTARGETS) install: default $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h help help.dir help.pag $(PMDADIR) + $(INSTALL) -m 644 domain.h help $(HELPTARGETS) $(PMDADIR) - $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) ++ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) $(INSTALL) -m 644 root_linux $(PCP_VAR_DIR)/pmns/root_linux + $(INSTALL) -m 644 proc_net_snmp_migrate.conf $(LOGREWRITEDIR)/linux_proc_net_snmp_migrate.conf else - build-me: diff --git a/src/pmdas/linux_proc/GNUmakefile b/src/pmdas/linux_proc/GNUmakefile -index 7d8961a..89aa43f 100644 +index e015425eff14..6345a97a9afe 100644 --- a/src/pmdas/linux_proc/GNUmakefile +++ b/src/pmdas/linux_proc/GNUmakefile -@@ -48,7 +48,8 @@ install: default +@@ -66,7 +66,8 @@ build-me: domain.h root_proc $(LIBTARGET) $(CMDTARGET) $(HELPTARGETS) + install: default $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 755 Install Remove $(PMDADIR) - $(INSTALL) -m 644 domain.h pmns pmns.cgroup root help $(PMDADIR) -- $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) + $(INSTALL) -m 644 domain.h help help.dir help.pag root root_proc samplehotproc.conf $(PMDADIR) +- $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDADIR) ++ $(INSTALL) -m 644 $(LIBTARGET) $(SCRIPTS) $(PMDADIR) + $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 644 linux_proc_migrate.conf $(PCP_VAR_DIR)/config/pmlogrewrite/linux_proc_migrate.conf - else - build-me: + $(INSTALL) -m 644 root_proc $(PCP_VAR_DIR)/pmns/root_proc + $(INSTALL) -m 644 $(LOGREWRITERS) $(PCP_VAR_DIR)/config/pmlogrewrite + @$(INSTALL_MAN) diff --git a/src/pmdas/lustrecomm/GNUmakefile b/src/pmdas/lustrecomm/GNUmakefile -index bd0aadc..153fe83 100644 +index 1f9e031ab5ce..2abbfaa92f5f 100644 --- a/src/pmdas/lustrecomm/GNUmakefile +++ b/src/pmdas/lustrecomm/GNUmakefile -@@ -47,7 +47,7 @@ build-me: domain.h $(TARGETS) +@@ -50,7 +50,7 @@ build-me: domain.h $(TARGETS) install: default $(INSTALL) -m 755 -d $(PMDADIR) $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) @@ -258,26 +256,12 @@ index bd0aadc..153fe83 100644 + #$(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) $(INSTALL) -m 755 Install Remove $(PMDADIR) $(INSTALL) -m 644 $(DFILES) root pmns domain.h help $(PMDADIR) - else -diff --git a/src/pmdas/mmv/GNUmakefile b/src/pmdas/mmv/GNUmakefile -index 302c212..7c6d1cd 100644 ---- a/src/pmdas/mmv/GNUmakefile -+++ b/src/pmdas/mmv/GNUmakefile -@@ -44,7 +44,8 @@ include $(BUILDRULES) - install_pcp install: default - $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h $(PMDADIR)/domain.h -- $(INSTALL) -m 755 $(TARGETS) Install Remove $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) mmvdump$(EXECSUFFIX) Install Remove $(PMDADIR) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 644 pmns $(PMDADIR)/root_mmv - $(INSTALL) -m 644 root_mmv $(PCP_VAR_DIR)/pmns/root_mmv - $(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/mmv + @$(INSTALL_MAN) diff --git a/src/pmdas/pmcd/src/GNUmakefile b/src/pmdas/pmcd/src/GNUmakefile -index 00e1e9c..34bbeb7 100644 +index a688d73767d3..851066aa10d7 100644 --- a/src/pmdas/pmcd/src/GNUmakefile +++ b/src/pmdas/pmcd/src/GNUmakefile -@@ -47,7 +47,7 @@ default: $(LIBTARGET) +@@ -54,7 +54,7 @@ default: $(LIBTARGET) domain.h install: default $(INSTALL) -m 755 -d $(PCP_PMDAS_DIR)/pmcd @@ -286,25 +270,11 @@ index 00e1e9c..34bbeb7 100644 include $(BUILDRULES) -diff --git a/src/pmdas/sample/src/GNUmakefile b/src/pmdas/sample/src/GNUmakefile -index 57b61be..57b9a17 100644 ---- a/src/pmdas/sample/src/GNUmakefile -+++ b/src/pmdas/sample/src/GNUmakefile -@@ -43,7 +43,8 @@ sample.o events.o: events.h - - install: default - $(INSTALL) -m 755 -d $(PMDADIR) -- $(INSTALL) -m 755 $(CMDTARGET) $(LIBTARGET) $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - - include $(BUILDRULES) - diff --git a/src/pmdas/sendmail/GNUmakefile b/src/pmdas/sendmail/GNUmakefile -index e551ad2..0c81c0a 100644 +index 171c7c06106e..5911c175c74f 100644 --- a/src/pmdas/sendmail/GNUmakefile +++ b/src/pmdas/sendmail/GNUmakefile -@@ -36,7 +36,7 @@ include $(BUILDRULES) +@@ -39,7 +39,7 @@ include $(BUILDRULES) install install_pcp: default $(INSTALL) -m 755 -d $(PMDADIR) @@ -314,13 +284,13 @@ index e551ad2..0c81c0a 100644 $(INSTALL) -m 755 $(SCRIPTS) $(PMDADIR) $(INSTALL) -m 644 $(DFILES) pmns help root domain.h $(PMDADIR) diff --git a/src/pmdas/solaris/GNUmakefile b/src/pmdas/solaris/GNUmakefile -index 0d81837..5a4f0d8 100644 +index 818ba9a08e49..0a9370adb929 100644 --- a/src/pmdas/solaris/GNUmakefile +++ b/src/pmdas/solaris/GNUmakefile -@@ -45,7 +45,8 @@ build-me: root_solaris domain.h $(LIBTARGET) $(CMDTARGET) help.dir help.pag +@@ -53,7 +53,8 @@ build-me: root_solaris domain.h $(LIBTARGET) $(CMDTARGET) $(HELPTARGETS) $(VERSI install: build-me $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h help.dir help.pag $(PMDADIR) + $(INSTALL) -m 644 domain.h $(HELPTARGETS) $(PMDADIR) - $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) + $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) + $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) @@ -328,5 +298,5 @@ index 0d81837..5a4f0d8 100644 else build-me: -- -1.7.10.4 +2.1.2 diff --git a/pcp_legacy_init_lsb.patch b/0003-pcp-legacy-init-lsb.patch similarity index 67% rename from pcp_legacy_init_lsb.patch rename to 0003-pcp-legacy-init-lsb.patch index 448c2a8..1d467e8 100644 --- a/pcp_legacy_init_lsb.patch +++ b/0003-pcp-legacy-init-lsb.patch @@ -1,7 +1,16 @@ -Index: src/pmcd/rc_pcp -=================================================================== ---- src/pmcd/rc_pcp.orig -+++ src/pmcd/rc_pcp +From 18efe6b86936d454773a437cf50ab6a90c6506f6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Fri, 12 Dec 2014 15:44:44 +0100 +Subject: [PATCH 3/6] pcp legacy init lsb + +--- + src/pmcd/rc_pcp | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/src/pmcd/rc_pcp b/src/pmcd/rc_pcp +index 974ca06c2f4a..8d6872cfad9c 100644 +--- a/src/pmcd/rc_pcp ++++ b/src/pmcd/rc_pcp @@ -31,12 +31,12 @@ # e.g. SuSE, where chkconfig is a perl script. ### BEGIN INIT INFO @@ -30,3 +39,6 @@ Index: src/pmcd/rc_pcp case "$1" in 'start'|'restart'|'condrestart'|'reload'|'force-reload') +-- +2.1.2 + diff --git a/remove_cpan_rpaths.patch b/0004-Remove-CPAN-rpaths.patch similarity index 55% rename from remove_cpan_rpaths.patch rename to 0004-Remove-CPAN-rpaths.patch index 2e521cb..2227883 100644 --- a/remove_cpan_rpaths.patch +++ b/0004-Remove-CPAN-rpaths.patch @@ -1,20 +1,18 @@ -Index: pcp-3.6.10/src/perl/PMDA/Makefile.PL -=================================================================== ---- pcp-3.6.10.orig/src/perl/PMDA/Makefile.PL -+++ pcp-3.6.10/src/perl/PMDA/Makefile.PL -@@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") { - else { - $ldfrom = "local.o PMDA.o"; - $inc = "-I$ENV{PCP_TOPDIR}/src/include/pcp -I/usr/include/pcp"; -- $libs = ["-L$ENV{PCP_TOPDIR}/src/libpcp_pmda/src -L$ENV{PCP_TOPDIR}/src/libpcp/src -lpcp_pmda -lpcp"]; -+ $libs = ["-lpcp_pmda -lpcp"]; - } - if ($ENV{TARGET_OS} eq "darwin") { - # standard ones, minus -arch ppc -Index: pcp-3.6.10/src/perl/LogImport/Makefile.PL -=================================================================== ---- pcp-3.6.10.orig/src/perl/LogImport/Makefile.PL -+++ pcp-3.6.10/src/perl/LogImport/Makefile.PL +From a5e63d1f241a9b574c30093a71e41ab7c9f64dc9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Fri, 12 Dec 2014 15:45:33 +0100 +Subject: [PATCH 4/6] Remove CPAN rpaths + +--- + src/perl/LogImport/Makefile.PL | 2 +- + src/perl/MMV/Makefile.PL | 2 +- + src/perl/PMDA/Makefile.PL | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/perl/LogImport/Makefile.PL b/src/perl/LogImport/Makefile.PL +index 20b716dbea6f..89d5f61e67dc 100644 +--- a/src/perl/LogImport/Makefile.PL ++++ b/src/perl/LogImport/Makefile.PL @@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") { else { $ldfrom = "LogImport.o", @@ -24,10 +22,10 @@ Index: pcp-3.6.10/src/perl/LogImport/Makefile.PL } if ($ENV{TARGET_OS} eq "darwin") { # standard ones, minus -arch ppc -Index: pcp-3.6.10/src/perl/MMV/Makefile.PL -=================================================================== ---- pcp-3.6.10.orig/src/perl/MMV/Makefile.PL -+++ pcp-3.6.10/src/perl/MMV/Makefile.PL +diff --git a/src/perl/MMV/Makefile.PL b/src/perl/MMV/Makefile.PL +index 6a85129842fb..3921421ad80c 100644 +--- a/src/perl/MMV/Makefile.PL ++++ b/src/perl/MMV/Makefile.PL @@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") { else { $ldfrom = "MMV.o"; @@ -37,3 +35,19 @@ Index: pcp-3.6.10/src/perl/MMV/Makefile.PL } if ($ENV{TARGET_OS} eq "darwin") { # standard ones, minus -arch ppc +diff --git a/src/perl/PMDA/Makefile.PL b/src/perl/PMDA/Makefile.PL +index 1191a025fedf..7b1155685ae2 100644 +--- a/src/perl/PMDA/Makefile.PL ++++ b/src/perl/PMDA/Makefile.PL +@@ -15,7 +15,7 @@ if ($ENV{TARGET_OS} eq "mingw") { + else { + $ldfrom = "local.o PMDA.o"; + $inc = "-I$ENV{PCP_TOPDIR}/src/include/pcp -I/usr/include/pcp"; +- $libs = ["-L$ENV{PCP_TOPDIR}/src/libpcp_pmda/src -L$ENV{PCP_TOPDIR}/src/libpcp/src -lpcp_pmda -lpcp"]; ++ $libs = ["-lpcp_pmda -lpcp"]; + } + if ($ENV{TARGET_OS} eq "darwin") { + # standard ones, minus -arch ppc +-- +2.1.2 + diff --git a/rm_init_script_runlevel_4.patch b/0005-Remove-runlevel-4-from-init-scripts.patch similarity index 61% rename from rm_init_script_runlevel_4.patch rename to 0005-Remove-runlevel-4-from-init-scripts.patch index e531050..b8d8827 100644 --- a/rm_init_script_runlevel_4.patch +++ b/0005-Remove-runlevel-4-from-init-scripts.patch @@ -1,7 +1,20 @@ -Index: pcp-3.6.4/src/pmcd/rc_pcp -=================================================================== ---- pcp-3.6.4.orig/src/pmcd/rc_pcp -+++ pcp-3.6.4/src/pmcd/rc_pcp +From 7b1eb0b00132d57ed184ab397e76ab1450aba773 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Fri, 12 Dec 2014 15:46:15 +0100 +Subject: [PATCH 5/6] Remove runlevel 4 from init scripts + +--- + src/pmcd/rc_pcp | 2 +- + src/pmcd/rc_pmcd | 2 +- + src/pmie/rc_pmie | 2 +- + src/pmlogger/rc_pmlogger | 2 +- + src/pmproxy/rc_pmproxy | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/pmcd/rc_pcp b/src/pmcd/rc_pcp +index 8d6872cfad9c..0fcb4eded076 100644 +--- a/src/pmcd/rc_pcp ++++ b/src/pmcd/rc_pcp @@ -35,7 +35,7 @@ # Should-Start: $network $remote_fs $syslog $time # Required-Stop: $local_fs @@ -11,11 +24,11 @@ Index: pcp-3.6.4/src/pmcd/rc_pcp # Default-Stop: 0 1 6 # Short-Description: Legacy control for PCP daemons # Description: Legacy init script wrapper for the Performance Co-Pilot (PCP) daemons -Index: pcp-3.6.4/src/pmcd/rc_pmcd -=================================================================== ---- pcp-3.6.4.orig/src/pmcd/rc_pmcd -+++ pcp-3.6.4/src/pmcd/rc_pmcd -@@ -30,7 +30,7 @@ +diff --git a/src/pmcd/rc_pmcd b/src/pmcd/rc_pmcd +index 1f5deef9f16a..e1bb4f7c2929 100644 +--- a/src/pmcd/rc_pmcd ++++ b/src/pmcd/rc_pmcd +@@ -27,7 +27,7 @@ # Should-Start: $network $remote_fs $syslog $time # Required-Stop: $local_fs # Should-Stop: $network $remote_fs $syslog @@ -24,11 +37,11 @@ Index: pcp-3.6.4/src/pmcd/rc_pmcd # Default-Stop: 0 1 6 # Short-Description: Control pmcd (the collection daemon for PCP) # Description: Configure and control pmcd (the collection daemon for the Performance Co-Pilot) -Index: pcp-3.6.4/src/pmie/rc_pmie -=================================================================== ---- pcp-3.6.4.orig/src/pmie/rc_pmie -+++ pcp-3.6.4/src/pmie/rc_pmie -@@ -24,7 +24,7 @@ +diff --git a/src/pmie/rc_pmie b/src/pmie/rc_pmie +index 685b52ab2897..51c7389aeefa 100644 +--- a/src/pmie/rc_pmie ++++ b/src/pmie/rc_pmie +@@ -25,7 +25,7 @@ # Should-Start: $local_fs $network $syslog $time $pmcd # Required-Stop: $remote_fs # Should-Stop: $local_fs $network $syslog $pmcd @@ -37,11 +50,11 @@ Index: pcp-3.6.4/src/pmie/rc_pmie # Default-Stop: 0 1 6 # Short-Description: Control pmie (performance inference engine for PCP) # Description: Configure and control pmie (the performance inference engine for the Performance Co-Pilot) -Index: pcp-3.6.4/src/pmlogger/rc_pmlogger -=================================================================== ---- pcp-3.6.4.orig/src/pmlogger/rc_pmlogger -+++ pcp-3.6.4/src/pmlogger/rc_pmlogger -@@ -30,7 +30,7 @@ +diff --git a/src/pmlogger/rc_pmlogger b/src/pmlogger/rc_pmlogger +index f28c084e097e..bdd4e72b877f 100644 +--- a/src/pmlogger/rc_pmlogger ++++ b/src/pmlogger/rc_pmlogger +@@ -27,7 +27,7 @@ # Should-Start: $network $remote_fs $syslog $time $pmcd # Required-Stop: $local_fs # Should-Stop: $network $remote_fs $syslog $pmcd @@ -50,11 +63,11 @@ Index: pcp-3.6.4/src/pmlogger/rc_pmlogger # Default-Stop: 0 1 6 # Short-Description: Control pmlogger (the performance metrics logger for PCP) # Description: Configure and control pmlogger (the performance metrics logger for the Performance Co-Pilot) -Index: pcp-3.6.4/src/pmproxy/rc_pmproxy -=================================================================== ---- pcp-3.6.4.orig/src/pmproxy/rc_pmproxy -+++ pcp-3.6.4/src/pmproxy/rc_pmproxy -@@ -30,7 +30,7 @@ +diff --git a/src/pmproxy/rc_pmproxy b/src/pmproxy/rc_pmproxy +index 5e776086cd31..c3e049483ec9 100644 +--- a/src/pmproxy/rc_pmproxy ++++ b/src/pmproxy/rc_pmproxy +@@ -27,7 +27,7 @@ # Should-Start: $local_fs $network $syslog $time $pmcd # Required-Stop: $remote_fs # Should-Stop: $local_fs $network $syslog $pmcd @@ -63,3 +76,6 @@ Index: pcp-3.6.4/src/pmproxy/rc_pmproxy # Default-Stop: 0 1 6 # Short-Description: Control pmproxy (the pmcd proxy daemon for PCP) # Description: Configure and control pmproxy (the pmcd proxy daemon for the Performance Co-Pilot) +-- +2.1.2 + diff --git a/0006-create-pmlogger-and-pmie-logdirs-during-install.patch b/0006-create-pmlogger-and-pmie-logdirs-during-install.patch new file mode 100644 index 0000000..1519d55 --- /dev/null +++ b/0006-create-pmlogger-and-pmie-logdirs-during-install.patch @@ -0,0 +1,39 @@ +From 0037ea80c895b72fffeb146c8a4eeb458001e2f6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Fri, 12 Dec 2014 15:46:47 +0100 +Subject: [PATCH 6/6] create pmlogger and pmie logdirs during install + +--- + src/pmie/GNUmakefile | 2 ++ + src/pmlogger/GNUmakefile | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/pmie/GNUmakefile b/src/pmie/GNUmakefile +index 4c8e971d519b..9c6d09445dbd 100644 +--- a/src/pmie/GNUmakefile ++++ b/src/pmie/GNUmakefile +@@ -55,6 +55,8 @@ endif + $(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR)/pmie + ifeq ($(TARGET_OS),linux) + $(INSTALL) -m 755 -d `dirname $(CRONTAB_PATH)` ++ $(INSTALL) -m 755 -d $(PCP_LOG_DIR)/pmie ++ $(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/pmie + endif + $(INSTALL) -m 644 crontab $(CRONTAB_PATH) + +diff --git a/src/pmlogger/GNUmakefile b/src/pmlogger/GNUmakefile +index ae728faff2af..483087dbd39f 100644 +--- a/src/pmlogger/GNUmakefile ++++ b/src/pmlogger/GNUmakefile +@@ -56,6 +56,8 @@ endif + $(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR)/pmlogger + ifeq ($(TARGET_OS),linux) + $(INSTALL) -m 755 -d `dirname $(CRONTAB_PATH)` ++ $(INSTALL) -m 755 -d $(PCP_LOG_DIR)/pmlogger ++ $(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/pmlogger + endif + $(INSTALL) -m 644 crontab $(CRONTAB_PATH) + +-- +2.1.2 + diff --git a/0007-Honor-CFLAGS-in-qmake.patch b/0007-Honor-CFLAGS-in-qmake.patch new file mode 100644 index 0000000..d21f686 --- /dev/null +++ b/0007-Honor-CFLAGS-in-qmake.patch @@ -0,0 +1,83 @@ +From 4f195b3a280a2ced27028a210ae88724f6fe56d8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Tue, 3 Feb 2015 14:15:10 +0100 +Subject: [PATCH 7/7] Honor CFLAGS in qmake + +rpm complained about files not compile with RPM_OPT_FLAGS + +http://stackoverflow.com/questions/17578150/add-cflags-to-qmake-project-without-hard-coding-them-in-the-pro-file +--- + src/libpcp_qed/src/libpcp_qed.pro | 1 + + src/libpcp_qmc/src/libpcp_qmc.pro | 1 + + src/libpcp_qwt/src/libpcp_qwt.pro | 1 + + src/pmdumptext/pmdumptext.pro | 1 + + src/pmquery/pmquery.pro | 1 + + src/pmtime/pmtime.pro | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/src/libpcp_qed/src/libpcp_qed.pro b/src/libpcp_qed/src/libpcp_qed.pro +index 6a3c872a4b87..c67f1d63290d 100644 +--- a/src/libpcp_qed/src/libpcp_qed.pro ++++ b/src/libpcp_qed/src/libpcp_qed.pro +@@ -6,6 +6,7 @@ INCLUDEPATH += ../../include ../../libpcp_qmc/src + release:DESTDIR = build/debug + debug:DESTDIR = build/release + QT = core gui network svg ++QMAKE_CXXFLAGS += $$(PCP_CFLAGS) + + HEADERS = qed.h \ + qed_actionlist.h \ +diff --git a/src/libpcp_qmc/src/libpcp_qmc.pro b/src/libpcp_qmc/src/libpcp_qmc.pro +index 39671ab2dceb..b59ffa4e6bb9 100644 +--- a/src/libpcp_qmc/src/libpcp_qmc.pro ++++ b/src/libpcp_qmc/src/libpcp_qmc.pro +@@ -5,6 +5,7 @@ CONFIG += qt staticlib warn_on + INCLUDEPATH += ../../include + release:DESTDIR = build/debug + debug:DESTDIR = build/release ++QMAKE_CXXFLAGS += $$(PCP_CFLAGS) + + HEADERS = qmc_context.h qmc_desc.h qmc_group.h \ + qmc_indom.h qmc_metric.h qmc_source.h \ +diff --git a/src/libpcp_qwt/src/libpcp_qwt.pro b/src/libpcp_qwt/src/libpcp_qwt.pro +index 1a7b1d8b736c..6badfc328605 100644 +--- a/src/libpcp_qwt/src/libpcp_qwt.pro ++++ b/src/libpcp_qwt/src/libpcp_qwt.pro +@@ -5,6 +5,7 @@ CONFIG += qt staticlib warn_on + release:DESTDIR = build/debug + debug:DESTDIR = build/release + QT = core gui network svg ++QMAKE_CXXFLAGS += $$(PCP_CFLAGS) + + HEADERS += \ + qwt.h \ +diff --git a/src/pmdumptext/pmdumptext.pro b/src/pmdumptext/pmdumptext.pro +index d521e2f40cb7..f9048bb1a037 100644 +--- a/src/pmdumptext/pmdumptext.pro ++++ b/src/pmdumptext/pmdumptext.pro +@@ -9,3 +9,4 @@ LIBS += -L../libpcp/src + LIBS += -L../libpcp_qmc/src -L../libpcp_qmc/src/$$DESTDIR + LIBS += -lpcp_qmc -lpcp + QT -= gui ++QMAKE_CXXFLAGS += $$(PCP_CFLAGS) +diff --git a/src/pmquery/pmquery.pro b/src/pmquery/pmquery.pro +index 6a4293fb7a23..d9392931888c 100644 +--- a/src/pmquery/pmquery.pro ++++ b/src/pmquery/pmquery.pro +@@ -7,3 +7,4 @@ RESOURCES = pmquery.qrc + CONFIG += qt warn_on + release:DESTDIR = build/debug + debug:DESTDIR = build/release ++QMAKE_CXXFLAGS += $$(PCP_CFLAGS) +diff --git a/src/pmtime/pmtime.pro b/src/pmtime/pmtime.pro +index ad3e1932e7b1..4605765cab79 100644 +--- a/src/pmtime/pmtime.pro ++++ b/src/pmtime/pmtime.pro +@@ -22,3 +22,4 @@ LIBS += -lpcp_qwt -lpcp_qmc -lpcp + win32:LIBS += -lwsock32 + QT += network + QMAKE_INFO_PLIST = pmtime.info ++QMAKE_CXXFLAGS += $$(PCP_CFLAGS) +-- +2.1.2 + diff --git a/0008-SUSE-fy-pmsnap-control-path.patch b/0008-SUSE-fy-pmsnap-control-path.patch new file mode 100644 index 0000000..d42e453 --- /dev/null +++ b/0008-SUSE-fy-pmsnap-control-path.patch @@ -0,0 +1,34 @@ +From e47109751682efd28989b6a4012cdbd032e0c9fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Mon, 23 Feb 2015 16:52:38 +0100 +Subject: [PATCH 8/9] SUSE-fy pmsnap control path + +--- + src/pmsnap/pmsnap.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pmsnap/pmsnap.sh b/src/pmsnap/pmsnap.sh +index 87434a5fbfb9..92be253313ea 100755 +--- a/src/pmsnap/pmsnap.sh ++++ b/src/pmsnap/pmsnap.sh +@@ -26,7 +26,7 @@ prog=`basename $0` + + LOCALHOST=`pmhostname` + CONFIGDIR=$PCP_VAR_DIR/config/pmsnap +-CONTROL=$CONFIGDIR/control ++CONTROL=/etc/pcp/pmsnap/control + [ -z "$PCP_PMSNAPCONTROL_PATH" ] || CONTROL="$PCP_PMSNAPCONTROL_PATH" + + _usage() +@@ -179,7 +179,7 @@ then + fi + commonargs="$commonargs $@" + +-CONTROL=$CONFIGDIR/control ++CONTROL=/etc/pcp/pmsnap/control + if [ ! -f "$CONTROL" ] + then + echo "$prog: Error: cannot find control file \"$CONTROL\"" +-- +2.1.4 + diff --git a/0009-pmsnap-control-var-www-srv-www.patch b/0009-pmsnap-control-var-www-srv-www.patch new file mode 100644 index 0000000..57d071d --- /dev/null +++ b/0009-pmsnap-control-var-www-srv-www.patch @@ -0,0 +1,24 @@ +From a778bc20b4a82ed7b72717880bff8bd91def7bd3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= +Date: Mon, 23 Feb 2015 16:54:20 +0100 +Subject: [PATCH 9/9] pmsnap/control: /var/www -> /srv/www + +--- + src/pmsnap/control | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pmsnap/control b/src/pmsnap/control +index 54440b51bb1c..6cb13206fb1f 100644 +--- a/src/pmsnap/control ++++ b/src/pmsnap/control +@@ -67,5 +67,5 @@ $commonargs='' + # === pmsnap Control Specifications === + # + # Name (Output Image) Folio|Archive Config Arguments +-/var/www/pcp/LOCALHOSTNAME.1hour.summary LOCALHOSTNAME/Latest Snap -O-0 -A 10min -t 2min -v 30 +-/var/www/pcp/LOCALHOSTNAME.12hour.summary LOCALHOSTNAME/Latest Snap -O-0 -A 1hour -t 30min -v 30 ++/srv/www/pcp/LOCALHOSTNAME.1hour.summary LOCALHOSTNAME/Latest Snap -O-0 -A 10min -t 2min -v 30 ++/srv/www/pcp/LOCALHOSTNAME.12hour.summary LOCALHOSTNAME/Latest Snap -O-0 -A 1hour -t 30min -v 30 +-- +2.1.4 + diff --git a/create-pmlogger-and-pmie-logdirs-during-install.patch b/create-pmlogger-and-pmie-logdirs-during-install.patch deleted file mode 100644 index 98130ec..0000000 --- a/create-pmlogger-and-pmie-logdirs-during-install.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 05c112bd44b4a5dbb432e9d13e1e51816bd0acf8 Mon Sep 17 00:00:00 2001 -From: David Disseldorp -Date: Wed, 21 Nov 2012 12:53:25 +0100 -Subject: [PATCH] create pmlogger and pmie logdirs during install - ---- - src/pmie/GNUmakefile | 1 + - src/pmlogger/GNUmakefile | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/pmie/GNUmakefile b/src/pmie/GNUmakefile -index c62b869..e0ec1cd 100644 ---- a/src/pmie/GNUmakefile -+++ b/src/pmie/GNUmakefile -@@ -46,6 +46,7 @@ install:: default - $(INSTALL) -m 755 pmie_daily.sh $(PCP_BINADM_DIR)/pmie_daily - $(INSTALL) -m 755 pmie2col $(PCP_BIN_DIR)/pmie2col - $(INSTALL) -m 755 rc_pmie $(PCP_RC_DIR)/pmie -+ $(INSTALL) -m 755 -d $(PCP_LOG_DIR)/pmie - $(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/pmie - - include $(BUILDRULES) -diff --git a/src/pmlogger/GNUmakefile b/src/pmlogger/GNUmakefile -index 23c810c..b045bdb 100644 ---- a/src/pmlogger/GNUmakefile -+++ b/src/pmlogger/GNUmakefile -@@ -37,6 +37,7 @@ include $(BUILDRULES) - install: $(CMDTARGET) $(OTHERS) - $(INSTALL) -m 755 $(CMDTARGET) $(PCP_BINADM_DIR)/$(CMDTARGET) - $(INSTALL) -m 755 rc_pmlogger $(PCP_RC_DIR)/pmlogger -+ $(INSTALL) -m 755 -d $(PCP_LOG_DIR)/pmlogger - $(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/pmlogger - - YFLAGS += -v --- -1.7.10.4 - diff --git a/fix_pmie_pmlogger_startup_races.patch b/fix_pmie_pmlogger_startup_races.patch deleted file mode 100644 index 09d9065..0000000 --- a/fix_pmie_pmlogger_startup_races.patch +++ /dev/null @@ -1,325 +0,0 @@ -From 26129ab3fc91a77aefa3c2807c2b49dec4631036 Mon Sep 17 00:00:00 2001 -From: Nathan Scott -Date: Wed, 28 Nov 2012 14:30:31 +1100 -Subject: [PATCH] Fix race conditions in pmie and pmlogger startup scripts - -Recent changes to tempfile handling has regressed the pmie and -pmlogger startup scripts. Errors of the form: -/etc/rc.d/init.d/pmlogger: line 100: /var/tmp/pcp.5vfQsSHKo/pmcheck: No such file or directory -are now produced. - -Because sections of these two scripts are run in parallel with -the original script, we are open to race conditions where the -main script exits and removes the temporary directory before the -co-process has an opportunity to create its temporary file. We -can resolve this using separate temporary dirs and trap handling -which thus no longer race. - -Worse still, QA failed to detect the problem. At least one test -that should have found the problem trivially (575) failed to, as -a result of aggressively discarding stderr and stdout instead of -using filtering. This has been rectified and common pmie filter -routines abstracted (from tests 115, 504 and 575) to simplify the -task for all current and future tests. ---- - qa/115 | 18 ------------------ - qa/115.out | 2 ++ - qa/504 | 14 -------------- - qa/575 | 18 ++++++++++++------ - qa/575.out | 1 + - qa/common.filter | 26 ++++++++++++++++++++++++++ - src/pmie/rc_pmie | 30 +++++++++++++++++++++--------- - src/pmlogger/rc_pmlogger | 26 +++++++++++++++++--------- - 8 files changed, 79 insertions(+), 56 deletions(-) - -diff --git a/qa/115 b/qa/115 -index 8a3f675..4be3323 100755 ---- a/qa/115 -+++ b/qa/115 -@@ -54,24 +54,6 @@ _filter() - -e "s;/private/tmp;/tmp;g" - } - --_filter_pmie_start() --{ -- sed \ -- -e '/^Waiting for pmie process(es) to terminate/d' \ -- -e "s;$PCP_RC_DIR/pmie:;RC_SCRIPT;" \ -- -e '/RC_SCRIPT/d' \ -- -e '/(pmie) is disabled/d' \ -- -e '/To enable/d' \ -- -e '/\/sbin\/chkconfig pmie on/d' \ -- -e '/\/usr\/sbin\/sysv-rc-conf pmie on/d' \ -- -e '/update-rc.d -f pmie defaults/d' \ -- -e '/ln -sf \.\.\/init.d\/pmie \/etc\/rc\.d\//d' \ -- -e "s;$PCP_PMIECONTROL_PATH;\$PCP_PMIECONTROL_PATH;" \ -- -e '/^\.\.*done$/d' \ -- -e '/^\.\.*failed$/d' \ -- -e "s;/private/tmp;/tmp;g" --} -- - _count_pmies() - { - count=0 -diff --git a/qa/115.out b/qa/115.out -index 0b8cfe6..7229a9e 100644 ---- a/qa/115.out -+++ b/qa/115.out -@@ -5,6 +5,7 @@ pmie count at start of QA testing: 0 - pmie count after chkconfig pmie off: 0 - - === check for missing control file === -+$PCP_RC_DIR/pmie: - Error: PCP inference engine control file $PCP_PMIECONTROL_PATH - is missing! Cannot start any Performance Co-Pilot inference engine(s). - pmie count after attempt without control file: 0 -@@ -34,3 +35,4 @@ No current pmie process exists for: - Restarting pmie for host "LOCALHOST" ... - + pmie -b -h LOCALHOST -l /tmp/PID.log0 /tmp/PID.conf - -+$PCP_RC_DIR/pmie: PMIE not running -diff --git a/qa/504 b/qa/504 -index c65df90..047b859 100755 ---- a/qa/504 -+++ b/qa/504 -@@ -62,20 +62,6 @@ _filter() - -e "s/$lhost/LOCALHOST/g" - } - -- --_filter_pmie_start() --{ -- $PCP_AWK_PROG ' --/^Waiting for pmie process\(es\) to terminate/ { next } --/^Waiting for PMIE process\(es\) to terminate/ { next } --/^\/etc.*\/init\.d\/pmie:/ { next } --/\(pmie\) is disabled/ { next } --/To enable/ { next } --/\/sbin\/chkconfig pmie on/ { next } -- --{ print }' --} -- - _count_pmies() - { - count=0 -diff --git a/qa/575 b/qa/575 -index 785c034..41a6266 100755 ---- a/qa/575 -+++ b/qa/575 -@@ -1,7 +1,7 @@ - #! /bin/sh - # PCP QA Test No. 575 --# exercise fix for bug #692244 - # -+# Copyright (c) 2012 Red Hat. - # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved. - # - -@@ -13,18 +13,24 @@ echo "QA output created by $seq" - . ./common.filter - . ./common.check - -+_cleanup() -+{ -+ _change_config pmie off -+ rm -f $tmp.* -+} -+ - signal=$PCP_BINADM_DIR/pmsignal - status=1 # failure is the default! --trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 -+trap "_cleanup; exit \$status" 0 1 2 3 15 - - # real QA test starts here - $sudo $signal -a pmie >/dev/null 2>&1 - $sudo rm -fr $PCP_TMP_DIR/pmie --$sudo $PCP_RC_DIR/pmie stop \ --| _filter_pcp_stop \ --| sed -e "s;$PCP_RC_DIR;\$PCP_RC_DIR;g" - --$sudo $PCP_RC_DIR/pmie start >/dev/null 2>&1 -+_change_config pmie on -+$sudo $PCP_RC_DIR/pmie stop | _filter_pmie_stop -+$sudo $PCP_RC_DIR/pmie start | _filter_pmie_start -+ - # success, all done - status=0 - exit -diff --git a/qa/575.out b/qa/575.out -index 2842d31..3077d2a 100644 ---- a/qa/575.out -+++ b/qa/575.out -@@ -1,2 +1,3 @@ - QA output created by 575 - $PCP_RC_DIR/pmie: PMIE not running -+Performance Co-Pilot starting inference engine(s) ... -diff --git a/qa/common.filter b/qa/common.filter -index fbbdbfd..648e115 100644 ---- a/qa/common.filter -+++ b/qa/common.filter -@@ -412,6 +412,32 @@ s/PMCD/pmcd/ - | _filter_init_distro - } - -+_filter_pmie_start() -+{ -+ sed \ -+ -e '/^Waiting for pmie process(es) to terminate/d' \ -+ -e "s;$PCP_RC_DIR/pmie;\$PCP_RC_DIR/pmie;g" \ -+ -e '/(pmie) is disabled/d' \ -+ -e '/To enable/d' \ -+ -e '/\/sbin\/chkconfig pmie on/d' \ -+ -e '/\/usr\/sbin\/sysv-rc-conf pmie on/d' \ -+ -e '/update-rc.d -f pmie defaults/d' \ -+ -e '/ln -sf \.\.\/init.d\/pmie \/etc\/rc\.d\//d' \ -+ -e "s;$PCP_PMIECONTROL_PATH;\$PCP_PMIECONTROL_PATH;" \ -+ -e '/^\.\.*done$/d' \ -+ -e "s;/private/tmp;/tmp;g" \ -+ | _filter_init_distro -+} -+ -+_filter_pmie_stop() -+{ -+ sed \ -+ -e "s;$PCP_RC_DIR/pmie;\$PCP_RC_DIR/pmie;g" \ -+ -e '/^Waiting for pmie/s/\.\.\.[. ]*done/.../' \ -+ -e '/^Waiting for pmie/s/\.\.\. *$/.../' \ -+ | _filter_init_distro -+} -+ - _filterall_pcp_start() - { - _filter_pcp_start \ -diff --git a/src/pmie/rc_pmie b/src/pmie/rc_pmie -index bcb0ba7..698c45a 100644 ---- a/src/pmie/rc_pmie -+++ b/src/pmie/rc_pmie -@@ -1,5 +1,6 @@ - #!/bin/sh - # -+# Copyright (c) 2012 Red Hat. - # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - # - # This program is free software; you can redistribute it and/or modify it -@@ -109,37 +110,48 @@ _reboot_setup() - [ ! -d "$LOGDIR" ] && mkdir -p "$LOGDIR" && chown pcp:pcp "$LOGDIR" - } - -+# Note: _start_pmie is running in the background, in parallel with -+# the rest of the script. It might complete well after the caller -+# so tmpfile handling is especially problematic. Goal is to speed -+# bootup by starting potentially slow (remote monitoring) processes -+# in the background. -+# - _start_pmie() - { -+ bgstatus=0 -+ bgtmp=`mktemp -d /var/tmp/pcp.XXXXXXXXX` || exit 1 -+ trap "rm -rf $bgtmp; exit \$bgstatus" 0 1 2 3 15 -+ - wait_option='' - [ ! -z "$PMCD_WAIT_TIMEOUT" ] && wait_option="-t $PMCD_WAIT_TIMEOUT" - - if pmcd_wait $wait_option - then -- pmie_check >$tmp/pmie 2>&1 -- if [ -s $tmp/pmie ] -+ pmie_check >$bgtmp/pmie 2>&1 -+ bgstatus=$? -+ if [ -s $bgtmp/pmie ] - then - pmpost "pmie_check start failed in $prog, mailing output to root" - if [ ! -z "$MAIL" ] - then -- $MAIL -s "pmie_check start failed in $prog" root <$tmp/pmie >/dev/null 2>&1 -+ $MAIL -s "pmie_check start failed in $prog" root <$bgtmp/pmie >/dev/null 2>&1 - else - echo "$prog: pmie_check start failed ..." -- cat $tmp/pmie -+ cat $bgtmp/pmie - fi - fi -- rm -f $tmp/pmie - else -- status=$? -- pmpost "pmcd_wait failed in $prog: exit status: $status" -+ bgstatus=$? -+ pmpost "pmcd_wait failed in $prog: exit status: $bgstatus" - if [ ! -z "$MAIL" ] - then -- echo "pmcd_wait: exit status: $status" | $MAIL -s "pmcd_wait failed in $prog" root -+ echo "pmcd_wait: exit status: $bgstatus" | $MAIL -s "pmcd_wait failed in $prog" root - else - echo "$prog: pmcd_wait failed ..." -- echo "pmcd_wait: exit status: $status" -+ echo "pmcd_wait: exit status: $bgstatus" - fi - fi -+ exit $bgstatus # co-process is now complete - } - - _shutdown() -diff --git a/src/pmlogger/rc_pmlogger b/src/pmlogger/rc_pmlogger -index 6f9949f..84f3382 100644 ---- a/src/pmlogger/rc_pmlogger -+++ b/src/pmlogger/rc_pmlogger -@@ -1,5 +1,6 @@ - #!/bin/sh - # -+# Copyright (c) 2012 Red Hat. - # Copyright (c) 2000-2008 Silicon Graphics, Inc. All Rights Reserved. - # - # This program is free software; you can redistribute it and/or modify it -@@ -12,10 +13,6 @@ - # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - # for more details. - # --# You should have received a copy of the GNU General Public License along --# with this program; if not, write to the Free Software Foundation, Inc., --# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --# - # Start or Stop the Performance Co-Pilot pmlogger processes. - # - # The following is for chkconfig on RedHat based systems -@@ -95,21 +92,32 @@ in - ;; - esac - -+# Note: _start_pmcheck() runs in the background, in parallel with -+# the rest of the script. It might complete well after the caller -+# so tmpfile handling is especially problematic. Goal is to speed -+# bootup by starting potentially slow (remote monitoring) pmlogger -+# processes in the background. -+# - _start_pmcheck() - { -- pmlogger_check $VFLAG >$tmp/pmcheck 2>&1 -- if [ -s $tmp/pmcheck ] -+ bgstatus=0 -+ bgtmp=`mktemp -d /var/tmp/pcp.XXXXXXXXX` || exit 1 -+ trap "rm -rf $bgtmp; exit \$bgstatus" 0 1 2 3 15 -+ -+ pmlogger_check $VFLAG >$bgtmp/pmcheck 2>&1 -+ bgstatus=$? -+ if [ -s $bgtmp/pmcheck ] - then - pmpost "pmlogger_check failed in $prog, mailing output to root" - if [ ! -z "$MAIL" ] - then -- $MAIL -s "pmlogger_check failed in $prog" root <$tmp/pmcheck -+ $MAIL -s "pmlogger_check failed in $prog" root <$bgtmp/pmcheck - else - echo "$prog: pmlogger_check failed ..." -- cat $tmp/pmcheck -+ cat $bgtmp/pmcheck - fi - fi -- rm -f $tmp/pmcheck -+ exit $bgstatus # co-process is now complete - } - - _start_pmlogger() --- -1.7.10.4 - diff --git a/pcp-3.10.2.src.tar.gz b/pcp-3.10.2.src.tar.gz new file mode 100644 index 0000000..1d8772b --- /dev/null +++ b/pcp-3.10.2.src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c641c26a476f1743c17590a39c1b19edb9fc4becc16a910d92c72a4c3eeda01a +size 14111630 diff --git a/pcp-3.6.10-gcc5-reservedword.patch b/pcp-3.6.10-gcc5-reservedword.patch deleted file mode 100644 index ceb7685..0000000 --- a/pcp-3.6.10-gcc5-reservedword.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: src/pmdas/bash/event.c -=================================================================== ---- src/pmdas/bash/event.c.orig 2012-10-14 00:50:38.000000000 +0200 -+++ src/pmdas/bash/event.c 2015-02-23 16:08:13.039795393 +0100 -@@ -168,7 +168,7 @@ process_alloc(const char *bashname, bash - bashful->queueid = queueid; - bashful->exited = 0; - bashful->finished = 0; -- bashful->restrict = 0; -+ bashful->restricted = 0; - bashful->version = init->version; - bashful->padding = 0; - -Index: src/pmdas/bash/event.h -=================================================================== ---- src/pmdas/bash/event.h.orig 2012-10-08 07:16:37.000000000 +0200 -+++ src/pmdas/bash/event.h 2015-02-23 16:08:03.822057504 +0100 -@@ -29,7 +29,7 @@ typedef struct bash_process { - - int exited : 1; /* flag: process running? */ - int finished: 1; /* flag: exit event sent? */ -- int restrict: 1; /* flag: store-to-access? */ -+ int restricted: 1; /* flag: store-to-access? */ - int version : 8; /* pmda <-> bash xtrace version */ - int padding : 21; /* filler */ - diff --git a/pcp-3.6.10.src.tar.gz b/pcp-3.6.10.src.tar.gz deleted file mode 100644 index 6ef237e..0000000 --- a/pcp-3.6.10.src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d3b5d38536b48b5a21fc139a294e3177af96e9ac22a7cc89cef9457589bb46b -size 4687066 diff --git a/pcp-webjs.src.tar.gz b/pcp-webjs.src.tar.gz new file mode 100644 index 0000000..3058d68 --- /dev/null +++ b/pcp-webjs.src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df470158fb5a075e5b4a260b8fc52dcda6f8b93baf3e3bc8cd31edd9ee846135 +size 3874320 diff --git a/pcp-xenbuild.patch b/pcp-xenbuild.patch deleted file mode 100644 index 72ff1b5..0000000 --- a/pcp-xenbuild.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: configure.in -=================================================================== ---- configure.in.orig -+++ configure.in -@@ -545,6 +545,7 @@ NR == 1 { if ($1 != "UID" && $1 != "US - # Unix variants - $2 == 1 && / init/ { print "OK"; exit } - $2 == 1 && / \/etc\/init/ { print "OK"; exit } -+$2 == 1 && / \/bin\/bash/ { print "OK"; exit } - # Fedora 9 - $2 == 1 && / \/sbin\/init/ { print "OK"; exit } - # Fedora 15 diff --git a/pcp.changes b/pcp.changes index 328835f..08d713c 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Mon Feb 23 20:21:40 UTC 2015 - kkaempf@suse.com + +- Update to 3.10.2 + See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD + for details + +- new patches + 0007-Honor-CFLAGS-in-qmake.patch + 0008-SUSE-fy-pmsnap-control-path.patch + 0009-pmsnap-control-var-www-srv-www.patch + +- renamed patches + create-pmlogger-and-pmie-logdirs-during-install.patch + to 0006-create-pmlogger-and-pmie-logdirs-during-install.patch + +- Update to 3.10.1 + See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD + for details + +- new sub-packages + * pcp-doc + * pcp-gui + * python3-pcp + * python-pcp + * pmda-infiniband + * pmda-perfevent + * pmda-papi + * import-collectl2pcp + +- drop fix_pmie_pmlogger_startup_races.patch, upstream + drop pcp-3.6.10-gcc5-reservedword.patch, obsolete + ------------------------------------------------------------------- Mon Feb 23 16:28:50 UTC 2015 - boris@steki.net diff --git a/pcp.spec b/pcp.spec index 52de2cd..358998b 100644 --- a/pcp.spec +++ b/pcp.spec @@ -1,7 +1,7 @@ # # spec file for package pcp # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,15 +16,15 @@ # -Summary: System-level performance monitoring and performance management -License: GPL-2.0 -Group: System/Monitoring +BuildRequires: -post-build-checks -Name: pcp -Version: 3.6.10 -Release: 0 +%if 0%{?suse_version} > 1140 || 0%{?fedora_version} > 14 +%define has_systemd 1 +%else +%define has_systemd 0 +%endif -%if (0%{?suse_version} > 0) +%if 0%{?suse_version} %define pcp_gr System/Monitoring %define lib_pkg libpcp3 %define lib_pkg_conflict pcp-libs @@ -32,10 +32,15 @@ Release: 0 %define lib_devel_pkg libpcp-devel %define lib_devel_pkg_conflict pcp-libs-devel %define lib_devel_gr Development/Libraries/Other +%define license_apache2 Apache-2.0 +%define license_cc_by CC-BY-SA-3.0 %define license_gplv2 GPL-2.0 +%define license_gplv2plus GPL-2.0+ %define license_lgplv2 LGPL-2.0 -%define license_lgplv2plus LGPL-2.1+ -%define perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!") +%define license_lgplv2plus LGPL-2.0+ +%define license_lgplv21plus LGPL-2.1+ +%define license_mit MIT +%define _libexecdir %{_libdir} %else %define pcp_gr Applications/System %define lib_pkg pcp-libs @@ -43,56 +48,253 @@ Release: 0 %define lib_gr Applications/System %define lib_devel_pkg pcp-libs-devel %define lib_devel_pkg_conflict libpcp-devel -%define lib_devel_gr Applications/System +%define lib_devel_gr Development/Libraries +%define license_apache2 ASL2.0 +%define license_cc_by CC-BY %define license_gplv2 GPLv2 +%define license_gplv2plus GPLv2+ %define license_lgplv2 LGPLv2 %define license_lgplv2plus LGPLv2+ +%define license_lgplv21plus LGPLv2.1+ +%define license_mit MIT +%endif + +Summary: System-level performance monitoring and performance management +License: %{license_gplv2plus} and %{license_lgplv2plus} and %{license_cc_by} +Group: %{pcp_gr} +Name: pcp +Version: 3.10.2 +Release: 0 +%define buildversion 1 + +%if 0%{?suse_version} +%else +%endif + +Url: http://www.pcp.io +Source0: pcp-%{version}.src.tar.gz +Source1: pcp-webjs.src.tar.gz +%if 0%{?suse_version} +Source2: pcp-rpmlintrc +%endif + +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch1: 0001-Fix-XEN-build.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch2: 0002-Install-libraries-without-exec-permission.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch3: 0003-pcp-legacy-init-lsb.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch4: 0004-Remove-CPAN-rpaths.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch5: 0005-Remove-runlevel-4-from-init-scripts.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch6: 0006-create-pmlogger-and-pmie-logdirs-during-install.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch7: 0007-Honor-CFLAGS-in-qmake.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch8: 0008-SUSE-fy-pmsnap-control-path.patch +# PACTH-FIX-OPENSUSE, kkaempf@suse.de +Patch9: 0009-pmsnap-control-var-www-srv-www.patch + +# There are no papi/libpfm devel packages for s390 nor for some rhels, disable +%ifarch s390 s390x +%{!?disable_papi: %global disable_papi 1} +%{!?disable_perfevent: %global disable_perfevent 1} +%else +%{!?disable_papi: %global disable_papi (0%{?rhel} < 6)} +%{!?disable_perfevent: %global disable_perfevent (0%{?rhel} < 7)} +%endif + +%if 0%{?suse_version} +%define disable_sheet2pcp 0 +%else +%define disable_sheet2pcp 1 +%endif + +%define disable_microhttpd 0 +%define disable_cairo 0 +%if 0%{?rhel} > 6 +%define disable_python3 0 +%else +%define disable_python3 1 +%endif +%if 0%{?rhel} == 0 || 0%{?rhel} > 5 +%define disable_qt 0 +%else +%define disable_qt 1 +%endif + +%if 0%{?suse_version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%else +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif +BuildRequires: autoconf +BuildRequires: avahi-devel +BuildRequires: bison +%if 0%{?suse_version} > 1010 +BuildRequires: fdupes +%endif +BuildRequires: flex +BuildRequires: gcc-c++ +%if 0%{?suse_version} +BuildRequires: mozilla-nss-devel +%else +BuildRequires: nss-devel +%endif +BuildRequires: perl +BuildRequires: procps +BuildRequires: python-devel +BuildRequires: rpm-devel +%if !%{disable_python3} +BuildRequires: python3-devel +%endif +BuildRequires: cyrus-sasl-devel +BuildRequires: ncurses-devel +BuildRequires: readline-devel +%if !%{disable_papi} +BuildRequires: papi-devel +%endif +%if !%{disable_perfevent} +BuildRequires: libpfm-devel >= 4.4 +%endif +%if !%{disable_microhttpd} +BuildRequires: libmicrohttpd-devel +%endif +%if !%{disable_cairo} +BuildRequires: cairo-devel +%endif +%if 0%{?rhel} == 0 || 0%{?rhel} > 5 +BuildRequires: systemtap-sdt-devel +%else +%ifnarch ppc ppc64 +BuildRequires: systemtap-sdt-devel +%endif +%endif +BuildRequires: perl(ExtUtils::MakeMaker) +%if 0%{?suse_version} +BuildRequires: update-desktop-files +%else +BuildRequires: initscripts +%endif +BuildRequires: man +%if 0%{?has_systemd} +BuildRequires: systemd-devel +%{?systemd_requires} +%else +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +BuildRequires: systemd-devel +%endif +%endif +%if !%{disable_qt} +BuildRequires: desktop-file-utils +%if 0%{?suse_version} +BuildRequires: libqt4-devel >= 4.4 +%else +BuildRequires: qt4-devel >= 4.4 +%endif +%endif + +# for set_permissions +%if 0%{?suse_version} >= 1131 +PreReq: permissions +%endif +Requires: bash +Requires: cron +Requires: fileutils +Requires: findutils +Requires: gawk +Requires: grep +Requires: perl +Requires: sed +Requires: which +%if 0%{?suse_version} +Requires: cpp +Requires: cyrus-sasl +Requires: sysconfig +# pmatop needs curses.py +Requires: python-curses +%else +Requires: initscripts +%endif + +Requires: python +%if 0%{?rhel} <= 5 +Requires: python-ctypes +%endif + +Requires: %{lib_pkg} = %{version}-%{release} +Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: python-pcp = %{version}-%{release} +Obsoletes: pcp-pmda-nvidia < %{version} + +%global tapsetdir %{_datadir}/systemtap/tapset + +%define _confdir %{_sysconfdir}/pcp +%define _logsdir %{_localstatedir}/log/pcp +%define _pmnsdir %{_localstatedir}/lib/pcp/pmns +%define _tempsdir %{_localstatedir}/lib/pcp/tmp +%define _pmdasdir %{_localstatedir}/lib/pcp/pmdas +%define _testsdir %{_localstatedir}/lib/pcp/testsuite +%if 0%{?suse_version} +%define _pixmapdir %{_datadir}/pixmaps +%define _booksdir %{_docdir}/pcp +%else +%define _pixmapdir %{_datadir}/pcp-gui/pixmaps +%define _booksdir %{_datadir}/doc/pcp-doc +%endif + +%if 0%{?fedora} >= 20 || 0%{?suse_version} +%define _with_doc --with-docdir=%{_docdir}/%{name} +%endif +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 || 0%{?has_systemd} +%define _initddir %{_datadir}/pcp/lib +%define disable_systemd 0 +%else +%if 0%{?suse_version} +%define _initddir %{_sysconfdir}/init.d +%else +%define _initddir %{_sysconfdir}/rc.d/init.d +%endif +%define _with_initd --with-rcdir=%{_initddir} +%define disable_systemd 1 +%endif + +# we never want Infiniband on s390 platforms +%ifarch s390 s390x +%define disable_infiniband 1 +%else + +# we never want Infiniband on RHEL5 or earlier +%if 0%{?rhel} != 0 && 0%{?rhel} < 6 +%define disable_infiniband 1 +%else +%define disable_infiniband 0 +%endif + +%endif + +%if %{disable_infiniband} +%define _with_ib --with-infiniband=no +%endif + +%if !%{disable_papi} +%define _with_papi --with-papi=yes +%endif + +%if !%{disable_perfevent} +%define _with_perfevent --with-perfevent=yes +%endif + +%if %{disable_qt} +%define _with_ib --with-qt=no %endif %if ! %{defined _rundir} %define _rundir %{_localstatedir}/run %endif -Url: http://oss.sgi.com/projects/pcp -Source0: ftp://oss.sgi.com/projects/pcp/download/pcp-%{version}.src.tar.gz -Source1: pcp-rpmlintrc - -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: autoconf -BuildRequires: bison -BuildRequires: flex -BuildRequires: ncurses-devel -BuildRequires: procps -BuildRequires: pwdutils -BuildRequires: readline-devel -BuildRequires: perl(ExtUtils::MakeMaker) -Patch6: pcp-xenbuild.patch -Patch9: static_lib_perms.diff -Patch10: pcp_legacy_init_lsb.patch -Patch13: remove_cpan_rpaths.patch -Patch14: rm_init_script_runlevel_4.patch -Patch15: create-pmlogger-and-pmie-logdirs-during-install.patch -Patch16: fix_pmie_pmlogger_startup_races.patch -Patch17: pcp-3.6.10-gcc5-reservedword.patch - -%if (0%{?suse_version} > 0) -Requires: cpp -Requires: sysconfig -%else -Requires: initscripts -BuildRequires: initscripts -%if (0%{?fedora} > 0) -AutoReq: no -%endif -%endif -Requires: %{lib_pkg} = %{version} -Requires: bash -Requires: fileutils -Requires: findutils -Requires: gawk -Requires: grep -Requires: sed - %define _pmdasdir %{_localstatedir}/lib/pcp/pmdas %description @@ -103,17 +305,37 @@ The PCP open source release provides a unifying abstraction for all of the interesting performance data in a system, and allows client applications to easily retrieve and process any subset of that data. +# +# pcp-conf +# +%package conf +%if 0%{?suse_version} +%else +%endif +Summary: Performance Co-Pilot run-time configuration +License: %{license_lgplv2plus} +Group: Development/Libraries +Url: http://www.pcp.io +%if !0%{?suse_version} +# http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages" +Conflicts: pcp-libs < 3.9 +%endif +%description conf +Performance Co-Pilot (PCP) run-time configuration + # # pcp-libs # %package -n %{lib_pkg} Summary: Performance Co-Pilot run-time libraries -License: %{license_lgplv2} +License: %{license_lgplv2plus} Group: %{lib_gr} -Url: http://oss.sgi.com/projects/pcp/ +Url: http://www.pcp.io Conflicts: %{lib_pkg_conflict} -AutoReq: no +%if !0%{?suse_version} +Requires: pcp-conf = %{version}-%{release} +%endif %description -n %{lib_pkg} Performance Co-Pilot (PCP) run-time libraries @@ -124,33 +346,113 @@ Performance Co-Pilot (PCP) run-time libraries # %package -n %{lib_devel_pkg} Summary: Performance Co-Pilot (PCP) development headers and documentation -License: %{license_gplv2} +License: %{license_gplv2plus} and %{license_lgplv21plus} Group: %{lib_devel_gr} -Url: http://oss.sgi.com/projects/pcp/ -Requires: %{lib_pkg} = %{version} +Url: http://www.pcp.io +Requires: %{lib_pkg} = %{version}-%{release} Conflicts: %{lib_devel_pkg_conflict} %if (0%{?suse_version} > 0) Provides: pcp-devel = %{version} Obsoletes: pcp-devel < %{version} %endif -%if (0%{?fedora} > 0) -AutoReq: no -%endif %description -n %{lib_devel_pkg} Performance Co-Pilot (PCP) headers, documentation and tools for development. +# +# pcp-testsuite +# +%package testsuite +Summary: Performance Co-Pilot (PCP) test suite +License: %{license_gplv2plus} and %{license_mit} +Group: Development/Libraries +Url: http://www.pcp.io +Requires: pcp = %{version}-%{release} +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif +Requires: %{lib_devel_pkg} = %{version}-%{release} +Obsoletes: pcp-gui-testsuite + +%description testsuite +Quality assurance test suite for Performance Co-Pilot (PCP). + +# +# pcp-manager +# +%package manager +Summary: Performance Co-Pilot (PCP) manager daemon +License: %{license_gplv2plus} +Group: %{pcp_gr} +Url: http://www.pcp.io +Requires: pcp = %{version}-%{release} +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif + +%description manager +An optional daemon (pmmgr) that manages a collection of pmlogger and +pmie daemons, for a set of discovered local and remote hosts running +the performance metrics collection daemon (pmcd). It ensures these +daemons are running when appropriate, and manages their log rotation +needs (which are particularly complex in the case of pmlogger). +The base PCP package provides comparable functionality through cron +scripts which predate this daemon but do still provide effective and +efficient log management services. +The pcp-manager package aims to aggressively enable new PCP features +and as a result may not be suited to all production environments. + +%if !%{disable_microhttpd} +# +# pcp-webapi +# +%package webapi +Summary: Performance Co-Pilot (PCP) web API service +License: %{license_gplv2plus} +Group: %{pcp_gr} +Url: http://www.pcp.io +%if 0%{?suse_version} +Requires: pcp-conf = %{version}-%{release} +%else +Requires: pcp-libs = %{version}-%{release} +%endif + +%description webapi +Provides a daemon (pmwebd) that binds a large subset of the Performance +Co-Pilot (PCP) client API (PMAPI) to RESTful web applications using the +HTTP (PMWEBAPI) protocol. +%endif + +%if !%{disable_microhttpd} +# +# pcp-webjs +# +%package webjs +%if 0%{?rhel} == 0 || 0%{?rhel} > 5 +BuildArch: noarch +%endif +Summary: Performance Co-Pilot (PCP) web applications +License: %{license_apache2} and %{license_mit} and %{license_cc_by} +Group: Applications/System +Url: http://www.pcp.io + +%description webjs +Javascript web application content for the Performance Co-Pilot (PCP) +web service. +%endif + # # perl-PCP-PMDA. This is the PCP agent perl binding. # %package -n perl-PCP-PMDA Summary: Performance Co-Pilot (PCP) Perl bindings and documentation -License: %{license_gplv2} -Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ -Requires: pcp >= %{version} -%if (0%{?suse_version} > 0) -Requires: perl = %{perl_version} +License: %{license_gplv2plus} +Group: %{lib_devel_gr} +Url: http://www.pcp.io +%if 0%{?suse_version} +%perl_requires +%else +Requires: pcp-libs = %{version}-%{release} %endif %description -n perl-PCP-PMDA @@ -165,12 +467,14 @@ an application, etc. # %package -n perl-PCP-MMV Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values -License: %{license_gplv2} -Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ +License: %{license_gplv2plus} +Group: %{lib_devel_gr} +Url: http://www.pcp.io Requires: pcp >= %{version} -%if (0%{?suse_version} > 0) -Requires: perl = %{perl_version} +%if 0%{?suse_version} +%perl_requires +%else +Requires: pcp-libs = %{version}-%{release} %endif %description -n perl-PCP-MMV @@ -186,12 +490,14 @@ and analysis with pmchart, pmie, pmlogger and other PCP tools. # %package -n perl-PCP-LogImport Summary: Performance Co-Pilot Perl bindings for importing external archive data -License: %{license_gplv2} -Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ +License: %{license_gplv2plus} +Group: %{lib_devel_gr} +Url: http://www.pcp.io Requires: pcp >= %{version} -%if (0%{?suse_version} > 0) -Requires: perl = %{perl_version} +%if 0%{?suse_version} +%perl_requires +%else +Requires: pcp-libs = %{version}-%{release} %endif %description -n perl-PCP-LogImport @@ -204,12 +510,14 @@ they can be replayed with standard PCP monitoring tools. # %package -n perl-PCP-LogSummary Summary: Performance Co-Pilot Perl bindings for processing pmlogsummary output -License: %{license_gplv2} -Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ +License: %{license_gplv2plus} +Group: %{lib_devel_gr} +Url: http://www.pcp.io Requires: pcp >= %{version} -%if (0%{?suse_version} > 0) -Requires: perl = %{perl_version} +%if 0%{?suse_version} +%perl_requires +%else +Requires: pcp-libs = %{version}-%{release} %endif %description -n perl-PCP-LogSummary @@ -227,9 +535,11 @@ exporting this data into third-party tools (e.g. spreadsheets). Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs License: %{license_lgplv2plus} Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ -Requires: %{lib_pkg} >= %{version} -Requires: perl-PCP-LogImport >= %{version} +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif +Requires: perl-PCP-LogImport = %{version}-%{version} Requires: sysstat %description import-sar2pcp @@ -243,15 +553,18 @@ into standard PCP archive logs for replay with any PCP monitoring tool. Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs License: %{license_lgplv2plus} Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ -Requires: %{lib_pkg} >= %{version} -Requires: perl-PCP-LogImport >= %{version} +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif +Requires: perl-PCP-LogImport = %{version}-%{release} Requires: sysstat %description import-iostat2pcp Performance Co-Pilot (PCP) front-end tools for importing iostat data into standard PCP archive logs for replay with any PCP monitoring tool. +%if !%{disable_sheet2pcp} # # pcp-import-sheet2pcp # @@ -259,15 +572,19 @@ into standard PCP archive logs for replay with any PCP monitoring tool. Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs License: %{license_lgplv2plus} Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ -Requires: %{lib_pkg} >= %{version} -Requires: perl-PCP-LogImport >= %{version} +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif +Requires: perl-PCP-LogImport = %{version}-%{release} Requires: sysstat %description import-sheet2pcp Performance Co-Pilot (PCP) front-end tools for importing spreadsheet data into standard PCP archive logs for replay with any PCP monitoring tool. +%endif + # # pcp-import-mrtg2pcp # @@ -275,24 +592,187 @@ into standard PCP archive logs for replay with any PCP monitoring tool. Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs License: %{license_lgplv2plus} Group: %{pcp_gr} -Url: http://oss.sgi.com/projects/pcp/ -Requires: %{lib_pkg} >= %{version} -Requires: perl-PCP-LogImport >= %{version} +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif +Requires: perl-PCP-LogImport = %{version}-%{release} %description import-mrtg2pcp Performance Co-Pilot (PCP) front-end tools for importing MTRG data into standard PCP archive logs for replay with any PCP monitoring tool. +# +# pcp-import-collectl2pcp +# +%package import-collectl2pcp +Summary: Performance Co-Pilot tools for importing collectl log files into PCP archive logs +License: %{license_lgplv2plus} +Group: Applications/System +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif + +%description import-collectl2pcp +Performance Co-Pilot (PCP) front-end tools for importing collectl data +into standard PCP archive logs for replay with any PCP monitoring tool. + +%if !%{disable_papi} +# +# pcp-pmda-papi +# +%package pmda-papi +Summary: Performance Co-Pilot (PCP) metrics for Performance API and hardware counters +License: %{license_gplv2plus} +Group: Applications/System +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif +BuildRequires: papi-devel + +%description pmda-papi +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting hardware counters statistics through PAPI (Performance API). +%endif + +%if !%{disable_perfevent} +# +# pcp-pmda-perfevent +# +%package pmda-perfevent +Summary: Performance Co-Pilot (PCP) metrics for hardware counters +License: %{license_gplv2plus} +Group: Applications/System +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: libpfm >= 4.4 +Requires: pcp-libs = %{version}-%{release} +%endif +BuildRequires: libpfm-devel >= 4.4 + +%description pmda-perfevent +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting hardware counters statistics through libpfm. +%endif + +%if !%{disable_infiniband} +# +# pcp-pmda-infiniband +# +%package pmda-infiniband +Summary: Performance Co-Pilot (PCP) metrics for Infiniband HCAs and switches +License: %{license_gplv2plus} +Group: Applications/System +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: libibmad >= 1.3.7 +Requires: libibumad >= 1.3.7 +Requires: pcp-libs = %{version}-%{release} +%endif +BuildRequires: libibmad-devel >= 1.3.7 +BuildRequires: libibumad-devel >= 1.3.7 + +%description pmda-infiniband +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting Infiniband statistics. By default, it monitors the local HCAs +but can also be configured to monitor remote GUIDs such as IB switches. +%endif + +# +# python-pcp. This is the PCP library bindings for python. +# +%package -n python-pcp +Summary: Performance Co-Pilot (PCP) Python bindings and documentation +License: %{license_gplv2plus} +Group: Development/Libraries +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif + +%description -n python-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. + +%if !%{disable_python3} +# +# python3-pcp. This is the PCP library bindings for python3. +# +%package -n python3-pcp +Summary: Performance Co-Pilot (PCP) Python3 bindings and documentation +License: %{license_gplv2plus} +Group: Development/Libraries +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif + +%description -n python3-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 Python3. +%endif + +%if !%{disable_qt} +# +# pcp-gui package for Qt tools +# +%package -n pcp-gui +Summary: Visualization tools for the Performance Co-Pilot toolkit +License: %{license_gplv2plus} and %{license_lgplv2plus} +Group: Applications/System +Url: http://www.pcp.io +%if !0%{?suse_version} +Requires: pcp-libs = %{version}-%{release} +%endif + +%description -n pcp-gui +Visualization tools for the Performance Co-Pilot toolkit. +The pcp-gui package primarily includes visualization tools for +monitoring systems using live and archived Performance Co-Pilot +(PCP) sources. +%endif + +# +# pcp-doc package +# +%package -n pcp-doc +%if 0%{?rhel} == 0 || 0%{?rhel} > 5 +BuildArch: noarch +%endif +Summary: Documentation and tutorial for the Performance Co-Pilot +License: %{license_gplv2plus} and %{license_cc_by} +Group: Documentation +Url: http://www.pcp.io + +%description -n pcp-doc +Documentation and tutorial for the Performance Co-Pilot +Performance Co-Pilot (PCP) provides a framework and services to support +system-level performance monitoring and performance management. + +The pcp-doc package provides useful information on using and +configuring the Performance Co-Pilot (PCP) toolkit for system +level performance management. It includes tutorials, HOWTOs, +and other detailed documentation about the internals of core +PCP utilities and daemons, and the PCP graphical tools. + +############################################################################### + %prep %setup -q -%patch6 +%setup -q -T -D -a 1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch9 -p1 -%patch10 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 autoconf @@ -300,31 +780,103 @@ autoconf rm -Rf $RPM_BUILD_ROOT %build -%configure --with-rcdir=/etc/init.d \ - --with-tmpdir=%{_localstatedir}/lib/pcp/tmp \ - --with-docdir=%{_datadir}/doc/packages/pcp -make default_pcp +PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %configure \ + --with-tmpdir=%{_tempsdir} \ + --datarootdir=%{_datadir} \ + --docdir=%{_docdir} \ + %{?_with_initd} \ + %{?_with_doc} \ + %{?_with_ib} \ + %{?_with_papi} \ + %{?_with_perfevent} \ + %{?_with_qt} +PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" make default_pcp + +############################################################################### %install -export DIST_ROOT=$RPM_BUILD_ROOT +export NO_CHOWN=true DIST_ROOT=$RPM_BUILD_ROOT make install_pcp +PCP_GUI='pmchart|pmconfirm|pmdumptext|pmmessage|pmquery|pmsnap|pmtime' + # Fix stuff we do/don't want to ship rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a -# bnc 796448: qa/src/xmktime.c and qa/src/pthread_barrier.h have unacceptable -# license entries. Remove these along with everything under testsuite. -rm -rf $RPM_BUILD_ROOT/%{_localstatedir}/lib/pcp/testsuite +%if %{disable_sheet2pcp} +# remove sheet2pcp until BZ 830923 and BZ 754678 are resolved. +rm -f $RPM_BUILD_ROOT/%{_bindir}/sheet2pcp $RPM_BUILD_ROOT/%{_mandir}/man1/sheet2pcp.1.gz +%endif + +# remove configsz.h as this is not multilib friendly. +rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/configsz.h + +%if %{disable_microhttpd} +rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/pmwebd.* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/PMWEBAPI.* +rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmwebd +rm -fr $RPM_BUILD_ROOT/%{_initddir}/pmwebd +rm -fr $RPM_BUILD_ROOT/%{_unitdir}/pmwebd.service +rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd +%else +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps +mv pcp-webjs/* $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps +rmdir pcp-webjs +%endif + +%if %{disable_infiniband} +# remove pmdainfiniband on platforms lacking IB devel packages. +rm -f $RPM_BUILD_ROOT/%{_pmdasdir}/ib +rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/pmdaib.1.gz +rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/infiniband +%endif + +%if %{disable_qt} +%if !0%{?suse_version} +rm -fr $RPM_BUILD_ROOT/%{_pixmapdir} +%endif +rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmsnap +rm -f `find $RPM_BUILD_ROOT/%{_mandir}/man1 | grep -E "$PCP_GUI"` +%else +rm -rf $RPM_BUILD_ROOT/usr/share/doc/pcp-gui +%if 0%{?suse_version} +mkdir -p $RPM_BUILD_ROOT/%{_pixmapdir} +mv $RPM_BUILD_ROOT/%{_datadir}/pcp-gui/pixmaps/*.png $RPM_BUILD_ROOT/%{_pixmapdir} +rm -rf $RPM_BUILD_ROOT/%{_datadir}/pcp-gui/pixmaps +%suse_update_desktop_file -r -G 'Performance Copilot Chart' $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop System Monitor +%else +desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop +%endif +%endif + +%if 0%{?suse_version} mkdir -p $RPM_BUILD_ROOT/%{_rundir}/pcp -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/pcp/tmp +mkdir -p $RPM_BUILD_ROOT/%{_tempsdir} + +# move sample code to doc dir +mv $RPM_BUILD_ROOT/%{_pmdasdir}/sample $RPM_BUILD_ROOT/%{_docdir}/%{name} +mv $RPM_BUILD_ROOT/%{_pmdasdir}/simple $RPM_BUILD_ROOT/%{_docdir}/%{name} +mv $RPM_BUILD_ROOT/%{_pmdasdir}/trivial $RPM_BUILD_ROOT/%{_docdir}/%{name} +mv $RPM_BUILD_ROOT/%{_pmdasdir}/txmon $RPM_BUILD_ROOT/%{_docdir}/%{name} +mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/examples $RPM_BUILD_ROOT/%{_docdir}/%{name} -%if (0%{?suse_version} > 0) -# add /etc/init.d/X symlinks at /usr/sbin/rcX %__install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sbindir} + +%if !0%{?has_systemd} +# add /etc/init.d/X symlinks at /usr/sbin/rcX for script in pcp pmie pmproxy pmlogger pmcd; do ln -s "%{_sysconfdir}/init.d/${script}" \ "${RPM_BUILD_ROOT}/%{_sbindir}/rc${script}" done +%else +ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmcd +ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmie +ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmlogger +ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmproxy +ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmmgr +ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmwebd +%endif + %else # default chkconfig off for Fedora and RHEL for f in $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/{pcp,pmie,pmproxy}; do @@ -333,147 +885,445 @@ done %endif # list of PMDAs in the base pkg -ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} | egrep -v 'simple|sample|trivial|txmon' |\ -sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list +ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\ + grep -E -v 'simple|sample|trivial|txmon' |\ + grep -E -v 'perfevent|perfalloc.1' |\ + grep -E -v '^ib$|infiniband' |\ + grep -E -v 'papi' |\ + sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list -# bin and man1 files except those split out into sub packages -# man pages are transparently compressed so append a '*' suffix -ls -1 $RPM_BUILD_ROOT/%{_bindir} | grep -v '2pcp' |\ -sed -e 's#^#'%{_bindir}'\/#' >base_binfiles.list -ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 | grep -v '2pcp' |\ -sed -e 's#^#'%{_mandir}'\/man1\/#' |\ -sed -e 's#$#*#' >base_man1files.list +# all base pcp package files except those split out into sub packages +ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ + sed -e 's#^#'%{_bindir}'\/#' >base_bin.list +ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ + sed -e 's#^#'%{_libexecdir}/pcp/bin'\/#' >base_exec.list +ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 |\ + sed -e 's#^#'%{_mandir}'\/man1\/#' >base_man.list +ls -1 $RPM_BUILD_ROOT/%{_booksdir} |\ + sed -e 's#^#'%{_booksdir}'\/#' > pcp-doc.list +%if 0%{?suse_version} +mv $RPM_BUILD_ROOT/%{_datadir}/pcp/demos $RPM_BUILD_ROOT/%{_docdir}/pcp +ls -1 $RPM_BUILD_ROOT/%{_docdir}/pcp/demos/tutorials |\ + sed -e 's#^#'%{_docdir}/pcp/demos/tutorials'\/#' >>pcp-doc.list +%else +ls -1 $RPM_BUILD_ROOT/%{_datadir}/pcp/demos/tutorials |\ + sed -e 's#^#'%{_datadir}/pcp/demos/tutorials'\/#' >>pcp-doc.list +%endif +%if !%{disable_qt} +ls -1 $RPM_BUILD_ROOT/%{_pixmapdir} |\ + sed -e 's#^#'%{_pixmapdir}'\/#' > pcp-gui.list +cat base_bin.list base_exec.list base_man.list |\ + grep -E "$PCP_GUI" >> pcp-gui.list +%endif +cat base_pmdas.list base_bin.list base_exec.list base_man.list |\ + grep -E -v 'pmdaib|pmmgr|pmweb|pmsnap|2pcp' |\ + grep -E -v "$PCP_GUI|pixmaps|doc|tutorials" |\ + grep -E -v %{_confdir} | grep -E -v %{_logsdir} > base.list -cat base_pmdas.list base_binfiles.list base_man1files.list > base_specialfiles.list +# all devel pcp package files except those split out into sub packages +ls -1 $RPM_BUILD_ROOT/%{_mandir}/man3 |\ +sed -e 's#^#'%{_mandir}'\/man3\/#' | grep -E -v '3pm|PMWEBAPI' >devel.list +%if 0%{?suse_version} +ls -1 $RPM_BUILD_ROOT/%{_docdir}/pcp/demos |\ +sed -e 's#^#'%{_docdir}'\/pcp\/demos\/#' | grep -E -v tutorials >> devel.list +%else +ls -1 $RPM_BUILD_ROOT/%{_datadir}/pcp/demos |\ +sed -e 's#^#'%{_datadir}'\/pcp\/demos\/#' | grep -E -v tutorials >> devel.list +%endif + +%if 0%{?suse_version} +mv $RPM_BUILD_ROOT/%{_datadir}/doc/pcp-doc/* $RPM_BUILD_ROOT/%{_booksdir} +rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/pcp-doc +%if 0%{?suse_version} > 1010 +%fdupes %{buildroot} +%endif +%endif + +############################################################################### + +%pre testsuite +test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir} +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 +chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null +exit 0 + +%post testsuite +chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null +exit 0 %pre 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 + useradd -c "Performance Co-Pilot" -g pcp -d %{_localstatedir}/lib/pcp -M -r -s /sbin/nologin pcp +%if !0%{?suse_version} +PCP_SYSCONF_DIR=%{_confdir} +PCP_LOG_DIR=%{_logsdir} +PCP_ETC_DIR=%{_sysconfdir} +# rename crontab files to align with current Fedora packaging guidelines +for crontab in pmlogger pmie +do + test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue + mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab" +done +# produce a script to run post-install to move configs to their new homes +save_configs_script() +{ + _new="$1" + shift + for _dir + do + [ "$_dir" = "$_new" ] && continue + if [ -d "$_dir" ] + then + ( cd "$_dir" ; find . -type f -print ) | sed -e 's/^\.\///' \ + | while read _file + do + _want=true + if [ -f "$_new/$_file" ] + then + # file exists in both directories, pick the more + # recently modified one + _try=`find "$_dir/$_file" -newer "$_new/$_file" -print` + [ -n "$_try" ] || _want=false + fi + $_want && echo cp -p "$_dir/$_file" "$_new/$_file" + done + fi + done +} +# migrate and clean configs if we have had a previous in-use installation +[ -d "$PCP_LOG_DIR" ] || exit 0 # no configuration file upgrades required +rm -f "$PCP_LOG_DIR/configs.sh" +for daemon in pmcd pmie pmlogger pmproxy +do + save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_SYSCONF_DIR/$daemon" \ + /var/lib/pcp/config/$daemon /etc/$daemon /etc/pcp/$daemon /etc/sysconfig/$daemon +done +%endif exit 0 -%if (0%{?suse_version} > 0) - -%preun -%{?stop_on_removal:%{stop_on_removal pmlogger pmie pmproxy pmcd}} - -%postun -/sbin/ldconfig -%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}} -%{?insserv_cleanup:%{insserv_cleanup}} - -%post -for i in cd logger ie proxy; do - chown -R pcp:pcp /var/log/pcp/pm$i 2>/dev/null -done -/sbin/ldconfig -%if 0%{?suse_version} < 1131 -%run_permissions +%if !%{disable_microhttpd} +%preun webapi +%if 0%{?suse_version} +%if 0%{?has_systemd} +%service_del_preun pmwebd %else -%set_permissions %{_localstatedir}/lib/pcp/tmp/ -%set_permissions %{_localstatedir}/lib/pcp/tmp/pmdabash/ -%set_permissions %{_localstatedir}/lib/pcp/tmp/mmv/ -%set_permissions %{_localstatedir}/lib/pcp/tmp/pmie/ -%set_permissions %{_localstatedir}/lib/pcp/tmp/pmlogger/ +%{stop_on_removal pmwebd} %endif - -%verifyscript -%verify_permissions -e %{_localstatedir}/lib/pcp/tmp/ -e %{_localstatedir}/lib/pcp/tmp/pmdabash/ -e %{_localstatedir}/lib/pcp/tmp/mmv/ -e %{_localstatedir}/lib/pcp/tmp/pmie/ -e %{_localstatedir}/lib/pcp/tmp/pmlogger/ - %else - -%preun if [ "$1" -eq 0 ] then - # - # Stop daemons before erasing the package - # - /sbin/service pmlogger stop >/dev/null 2>&1 - /sbin/service pmie stop >/dev/null 2>&1 - /sbin/service pmproxy stop >/dev/null 2>&1 - /sbin/service pcp stop >/dev/null 2>&1 - /sbin/service pmcd stop >/dev/null 2>&1 - - /sbin/chkconfig --del pcp >/dev/null 2>&1 - /sbin/chkconfig --del pmcd >/dev/null 2>&1 - /sbin/chkconfig --del pmlogger >/dev/null 2>&1 - /sbin/chkconfig --del pmie >/dev/null 2>&1 - /sbin/chkconfig --del pmproxy >/dev/null 2>&1 +%if !%{disable_systemd} + systemctl --no-reload disable pmwebd.service >/dev/null 2>&1 + systemctl stop pmwebd.service >/dev/null 2>&1 +%else + /sbin/service pmwebd stop >/dev/null 2>&1 + /sbin/chkconfig --del pmwebd >/dev/null 2>&1 +%endif fi +%endif +%endif + +%preun manager +%if 0%{?suse_version} +%if 0%{?has_systemd} +%service_del_preun pmmgr +%else +%{stop_on_removal pmmgr} +%endif +%else +if [ "$1" -eq 0 ] +then +%if !%{disable_systemd} + systemctl --no-reload disable pmmgr.service >/dev/null 2>&1 + systemctl stop pmmgr.service >/dev/null 2>&1 +%else + /sbin/service pmmgr stop >/dev/null 2>&1 + /sbin/chkconfig --del pmmgr >/dev/null 2>&1 +%endif +fi +%endif + +%preun +%if 0%{?suse_version} +%if 0%{?has_systemd} +%service_del_preun pmlogger pmie pmproxy pmcd +%else +%{?stop_on_removal:%{stop_on_removal pmlogger pmie pmproxy pmcd}} +%endif +%else +if [ "$1" -eq 0 ] +then + # stop daemons before erasing the package + %if !%{disable_systemd} + systemctl --no-reload disable pmlogger.service >/dev/null 2>&1 + systemctl --no-reload disable pmie.service >/dev/null 2>&1 + systemctl --no-reload disable pmproxy.service >/dev/null 2>&1 + systemctl --no-reload disable pmcd.service >/dev/null 2>&1 + + systemctl stop pmlogger.service >/dev/null 2>&1 + systemctl stop pmie.service >/dev/null 2>&1 + systemctl stop pmproxy.service >/dev/null 2>&1 + systemctl stop pmcd.service >/dev/null 2>&1 + %else + /sbin/service pmlogger stop >/dev/null 2>&1 + /sbin/service pmie stop >/dev/null 2>&1 + /sbin/service pmproxy stop >/dev/null 2>&1 + /sbin/service pmcd stop >/dev/null 2>&1 + + /sbin/chkconfig --del pcp >/dev/null 2>&1 + /sbin/chkconfig --del pmcd >/dev/null 2>&1 + /sbin/chkconfig --del pmlogger >/dev/null 2>&1 + /sbin/chkconfig --del pmie >/dev/null 2>&1 + /sbin/chkconfig --del pmproxy >/dev/null 2>&1 + %endif + # cleanup namespace state/flag, may still exist + PCP_PMNS_DIR=%{_pmnsdir} + rm -f "$PCP_PMNS_DIR/.NeedRebuild" >/dev/null 2>&1 +fi +%endif + +%if !%{disable_microhttpd} +%post webapi +chown -R pcp:pcp %{_logsdir}/pmwebd 2>/dev/null +%if 0%{?suse_version} +%if 0%{?has_systemd} +%service_add_post pmwebd +%else +%{fillup_and_insserv pmwebd} +%endif +%else +%if !%{disable_systemd} + systemctl condrestart pmwebd.service >/dev/null 2>&1 +%else + /sbin/chkconfig --add pmwebd >/dev/null 2>&1 + /sbin/service pmwebd condrestart +%endif +%endif +%endif + +%post manager +chown -R pcp:pcp %{_logsdir}/pmmgr 2>/dev/null +%if 0%{?suse_version} +%if 0%{?has_systemd} +%service_add_post pmmgr +%else +%{fillup_and_insserv pmmgr} +%endif +%else +%if !%{disable_systemd} + systemctl condrestart pmmgr.service >/dev/null 2>&1 +%else + /sbin/chkconfig --add pmmgr >/dev/null 2>&1 + /sbin/service pmmgr condrestart +%endif +%endif %post -chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null -/sbin/chkconfig --add pmcd >/dev/null 2>&1 -/sbin/service pmcd condrestart -/sbin/chkconfig --add pmlogger >/dev/null 2>&1 -/sbin/service pmlogger condrestart -/sbin/chkconfig --add pmie >/dev/null 2>&1 -/sbin/service pmie condrestart -/sbin/chkconfig --add pmproxy >/dev/null 2>&1 -/sbin/service pmproxy condrestart +/sbin/ldconfig +%if 0%{?has_systemd} +%service_add_post pmmgr +%else +%{fillup_and_insserv pmmgr} +%endif +PCP_LOG_DIR=%{_logsdir} +PCP_PMNS_DIR=%{_pmnsdir} +# restore saved configs, if any +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 +chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null +touch "$PCP_PMNS_DIR/.NeedRebuild" +chmod 644 "$PCP_PMNS_DIR/.NeedRebuild" +%if !%{disable_systemd} + systemctl condrestart pmcd.service >/dev/null 2>&1 + systemctl condrestart pmlogger.service >/dev/null 2>&1 + systemctl condrestart pmie.service >/dev/null 2>&1 + systemctl condrestart pmproxy.service >/dev/null 2>&1 +%else + /sbin/chkconfig --add pmcd >/dev/null 2>&1 + /sbin/service pmcd condrestart + /sbin/chkconfig --add pmlogger >/dev/null 2>&1 + /sbin/service pmlogger condrestart + /sbin/chkconfig --add pmie >/dev/null 2>&1 + /sbin/service pmie condrestart + /sbin/chkconfig --add pmproxy >/dev/null 2>&1 + /sbin/service pmproxy condrestart %endif %post -n %{lib_pkg} -p /sbin/ldconfig - %postun -n %{lib_pkg} -p /sbin/ldconfig -%files -f base_specialfiles.list +%if 0%{?suse_version} +%postun +/sbin/ldconfig +%if 0%{?has_systemd} +%service_del_postun pcp pmproxy pmie +%else +%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}} +%{?insserv_cleanup:%{insserv_cleanup}} +%endif +%endif + +############################################################################### + +%files -f base.list # # Note: there are some headers (e.g. domain.h) and in a few cases some # C source files that rpmlint complains about. These are not devel files, # but rather they are (slightly obscure) PMDA config files. # %defattr(-,root,root) -%{_datadir}/doc/packages/pcp -%if (0%{?suse_version} > 0) -%{_sbindir}/rc* +%doc CHANGELOG COPYING README VERSION.pcp pcp.lsm +%if 0%{?suse_version} +%exclude %{_booksdir}/html +%exclude %{_booksdir}/*.pdf +%exclude %{_docdir}/pcp/demos +%exclude %{_docdir}/pcp/examples +%exclude %{_docdir}/pcp/sample +%exclude %{_docdir}/pcp/simple +%exclude %{_docdir}/pcp/trivial +%exclude %{_docdir}/pcp/txmon +%exclude %{_testsdir} +# -> pcp-pmda-infiniband +%exclude %{_pmdasdir}/infiniband %endif %ghost %dir %{_rundir}/pcp -%verify(not mode) %attr(755,root,root) %dir %{_localstatedir}/lib/pcp/tmp -%verify(not mode) %attr(755,root,root) %dir %{_localstatedir}/lib/pcp/tmp/pmdabash -%verify(not mode) %attr(755,root,root) %dir %{_localstatedir}/lib/pcp/tmp/mmv -%verify(not mode) %attr(755,root,root) %dir %{_localstatedir}/lib/pcp/tmp/pmie -%verify(not mode) %attr(755,root,root) %dir %{_localstatedir}/lib/pcp/tmp/pmlogger +%dir %{_confdir} %dir %{_pmdasdir} %dir %{_datadir}/pcp %dir %{_localstatedir}/lib/pcp +%if 0%{?suse_version} +%dir %{_libdir}/pcp +%dir %{_libdir}/pcp/bin +%endif +%{_localstatedir}/lib/pcp %dir %{_localstatedir}/lib/pcp/config +%if 0%{?suse_version} +# part of pcp-gui +%exclude %{_localstatedir}/lib/pcp/config/pmsnap +%exclude %{_localstatedir}/lib/pcp/config/pmchart +%exclude %{_localstatedir}/lib/pcp/config/pmafm/pcp-gui +%{_initddir}/pcp +%{_initddir}/pmcd +%{_initddir}/pmlogger +%{_initddir}/pmie +%{_initddir}/pmproxy +%endif +%dir %attr(0775,pcp,pcp) %{_tempsdir} +%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmie +%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmlogger -%{_libexecdir}/pcp -%{_datadir}/pcp/lib -%{_localstatedir}/log/pcp +%dir %{_datadir}/pcp/lib +%{_datadir}/pcp/lib/ReplacePmnsSubtree +%{_datadir}/pcp/lib/bashproc.sh +%{_datadir}/pcp/lib/lockpmns +%{_datadir}/pcp/lib/pmdaproc.sh +%{_datadir}/pcp/lib/rc-proc.sh +%{_datadir}/pcp/lib/rc-proc.sh.minimal +%{_datadir}/pcp/lib/unlockpmns + +%dir %attr(0775,pcp,pcp) %{_logsdir} +%attr(0775,pcp,pcp) %{_logsdir}/pmcd +%attr(0775,pcp,pcp) %{_logsdir}/pmlogger +%attr(0775,pcp,pcp) %{_logsdir}/pmie +%attr(0775,pcp,pcp) %{_logsdir}/pmproxy %{_localstatedir}/lib/pcp/pmns -%config(missingok) %{_localstatedir}/lib/pcp/pmns/.NeedRebuild +%if !0%{?has_systemd} %{_initrddir}/pcp %{_initrddir}/pmcd %{_initrddir}/pmlogger %{_initrddir}/pmie %{_initrddir}/pmproxy -%{_mandir}/man4/* +%else +%{_unitdir}/pmcd.service +%{_unitdir}/pmlogger.service +%{_unitdir}/pmie.service +%{_unitdir}/pmproxy.service +%{_sbindir}/rcpmcd +%{_sbindir}/rcpmie +%{_sbindir}/rcpmlogger +%{_sbindir}/rcpmproxy +%endif +%{_mandir}/man5/* +%dir %{_sysconfdir}/sasl2 +%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf +%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger +%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmie %config %{_sysconfdir}/bash_completion.d/pcp %config %{_sysconfdir}/pcp.env %config %{_sysconfdir}/pcp.sh -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmcd/pmcd.conf -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmcd/pmcd.options -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmcd/rc.local -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmie/config.default -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmie/control -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmie/crontab -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/config.default -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/control -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmlogger/crontab -%config(noreplace) %{_localstatedir}/lib/pcp/config/pmproxy/pmproxy.options -%{_localstatedir}/lib/pcp/config/* +%dir %{_confdir}/pmcd +%config(noreplace) %{_confdir}/pmcd/pmcd.conf +%config(noreplace) %{_confdir}/pmcd/pmcd.options +%config(noreplace) %{_confdir}/pmcd/rc.local +%dir %{_confdir}/pmproxy +%config(noreplace) %{_confdir}/pmproxy/pmproxy.options +%dir %{_confdir}/pmie +%config(noreplace) %{_confdir}/pmie/control +%dir %{_confdir}/pmlogger +%config(noreplace) %{_confdir}/pmlogger/control -%files -n %{lib_pkg} +%{_localstatedir}/lib/pcp/config/pmafm +%dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmie +%{_localstatedir}/lib/pcp/config/pmieconf +%dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmlogger +%{_localstatedir}/lib/pcp/config/pmlogger/* +%{_localstatedir}/lib/pcp/config/pmlogconf +%{_localstatedir}/lib/pcp/config/pmlogrewrite +%dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmda + +%if 0%{?rhel} == 0 || 0%{?rhel} > 5 +%{tapsetdir}/pmcd.stp +%else # rhel5 +%ifarch ppc ppc64 +# no systemtap-sdt-devel +%else # ! ppc +%{tapsetdir}/pmcd.stp +%endif # ppc +%endif + +%files conf %defattr(-,root,root) %dir %{_includedir}/pcp %{_includedir}/pcp/builddefs %{_includedir}/pcp/buildrules %config %{_sysconfdir}/pcp.conf + +%files -n %{lib_pkg} +%defattr(-,root,root) + %{_libdir}/libpcp.so.3 %{_libdir}/libpcp_gui.so.2 %{_libdir}/libpcp_mmv.so.1 @@ -481,7 +1331,7 @@ chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null %{_libdir}/libpcp_trace.so.2 %{_libdir}/libpcp_import.so.1 -%files -n %{lib_devel_pkg} +%files -n %{lib_devel_pkg} -f devel.list %defattr(-,root,root) %{_libdir}/libpcp.so @@ -494,16 +1344,63 @@ chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null %{_libdir}/libpcp_trace.so %{_libdir}/libpcp_import.so %{_includedir}/pcp/*.h -%{_mandir}/man3/*.3.gz -%{_datadir}/pcp/demos -%{_datadir}/pcp/examples - # PMDAs that ship src and are not for production use # straight out-of-the-box, for devel or QA use only. -%{_localstatedir}/lib/pcp/pmdas/simple -%{_localstatedir}/lib/pcp/pmdas/sample -%{_localstatedir}/lib/pcp/pmdas/trivial -%{_localstatedir}/lib/pcp/pmdas/txmon +%if 0%{?suse_version} +%{_docdir}/pcp/sample +%{_docdir}/pcp/simple +%{_docdir}/pcp/trivial +%{_docdir}/pcp/txmon +%else +%{_pmdasdir}/simple +%{_pmdasdir}/sample +%{_pmdasdir}/trivial +%{_pmdasdir}/txmon +%endif + +%files testsuite +%defattr(-,pcpqa,pcpqa) +%{_testsdir} + +%if !%{disable_microhttpd} +%files webapi +%defattr(-,root,root) +%{_initddir}/pmwebd +%if !%{disable_systemd} +%{_unitdir}/pmwebd.service +%{_sbindir}/rcpmwebd +%endif +%{_libexecdir}/pcp/bin/pmwebd +%attr(0775,pcp,pcp) %{_logsdir}/pmwebd +%dir %{_confdir}/pmwebd +%config(noreplace) %{_confdir}/pmwebd/pmwebd.options +%dir %{_datadir}/pcp/webapps +%{_mandir}/man1/pmwebd.1.gz +%{_mandir}/man3/PMWEBAPI.3.gz +%endif + +%if !%{disable_microhttpd} +%files webjs +%defattr(-,root,root) +%{_datadir}/pcp/webapps/* +%endif + +%files manager +%defattr(-,root,root) +%if 0%{?suse_version} +%dir %{_confdir}/pmmgr +%{_confdir}/pmmgr +%endif +%{_initddir}/pmmgr +%if !%{disable_systemd} +%{_unitdir}/pmmgr.service +%{_sbindir}/rcpmmgr +%endif +%{_libexecdir}/pcp/bin/pmmgr +%attr(0775,pcp,pcp) %{_logsdir}/pmmgr +%dir %{_confdir}/pmmgr +%config(noreplace) %{_confdir}/pmmgr/pmmgr.options +%{_mandir}/man1/pmmgr.1.gz %files import-sar2pcp %defattr(-,root,root) @@ -515,19 +1412,51 @@ chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null %{_bindir}/iostat2pcp %{_mandir}/man1/iostat2pcp.1.gz +%if !%{disable_sheet2pcp} %files import-sheet2pcp %defattr(-,root,root) %{_bindir}/sheet2pcp %{_mandir}/man1/sheet2pcp.1.gz +%endif %files import-mrtg2pcp %defattr(-,root,root) %{_bindir}/mrtg2pcp %{_mandir}/man1/mrtg2pcp.1.gz +%files import-collectl2pcp +%defattr(-,root,root) +%{_bindir}/collectl2pcp +%{_mandir}/man1/collectl2pcp.1.gz + +%if !%{disable_papi} +%files pmda-papi +%defattr(-,root,root) +%{_pmdasdir}/papi +%{_mandir}/man1/pmdapapi.1.gz +%endif + +%if !%{disable_perfevent} +%files pmda-perfevent +%defattr(-,root,root) +%{_pmdasdir}/perfevent +%config(noreplace) %{_pmdasdir}/perfevent/perfevent.conf +%{_mandir}/man1/perfalloc.1.gz +%{_mandir}/man1/pmdaperfevent.1.gz +%{_mandir}/man5/perfevent.conf.5.gz +%endif + +%if !%{disable_infiniband} +%files pmda-infiniband +%defattr(-,root,root) +%{_pmdasdir}/ib +%{_pmdasdir}/infiniband +%{_mandir}/man1/pmdaib.1.gz +%endif + %files -n perl-PCP-PMDA -f perl-pcp-pmda.list %defattr(-,root,root) -%if (0%{?suse_version} > 0) +%if 0%{?suse_version} %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/PMDA @@ -535,7 +1464,7 @@ chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null %files -n perl-PCP-MMV -f perl-pcp-mmv.list %defattr(-,root,root) -%if (0%{?suse_version} > 0) +%if 0%{?suse_version} %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/MMV @@ -543,7 +1472,7 @@ chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null %files -n perl-PCP-LogImport -f perl-pcp-logimport.list %defattr(-,root,root) -%if (0%{?suse_version} > 0) +%if 0%{?suse_version} %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP %dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/LogImport @@ -551,8 +1480,50 @@ chown -R pcp:pcp /var/log/pcp/{pmcd,pmlogger,pmie,pmproxy} 2>/dev/null %files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list %defattr(-,root,root) -%if (0%{?suse_version} > 0) +%if 0%{?suse_version} %dir %{_prefix}/lib/perl5/vendor_perl/*/PCP %endif +%files -n python-pcp -f python-pcp.list.rpm +%defattr(-,root,root) +%if 0%{?suse_version} +%{python_sitearch}/*.so +%dir %{python_sitearch}/pcp +%{python_sitearch}/pcp +%endif + +%if !%{disable_python3} +%files -n python3-pcp -f python3-pcp.list.rpm +%defattr(-,root,root) +%endif + +%if !%{disable_qt} +%files -n pcp-gui -f pcp-gui.list +%defattr(-,root,root,-) +%{_pixmapdir}/pmchart.png +%{_confdir}/pmsnap +%config(noreplace) %{_confdir}/pmsnap/control +%{_localstatedir}/lib/pcp/config/pmsnap +%{_localstatedir}/lib/pcp/config/pmchart +%{_localstatedir}/lib/pcp/config/pmafm/pcp-gui +%{_datadir}/applications/pmchart.desktop +%endif + +%files -n pcp-doc -f pcp-doc.list +%defattr(-,root,root,-) +%if 0%{?suse_version} +%exclude %{_docdir}/pcp/CHANGELOG +%exclude %{_docdir}/pcp/COPYING +%exclude %{_docdir}/pcp/INSTALL +%exclude %{_docdir}/pcp/README +%exclude %{_docdir}/pcp/VERSION.pcp +%exclude %{_docdir}/pcp/pcp.lsm +%exclude %{_docdir}/pcp/sample +%exclude %{_docdir}/pcp/simple +%exclude %{_docdir}/pcp/trivial +%exclude %{_docdir}/pcp/txmon +%dir %{_docdir}/pcp/demos +%dir %{_docdir}/pcp/demos/tutorials +%endif + %changelog From 8f96b4c91fdaa5e2b65077da5a6b71759ab8db98d5af2ce3aea3a882213a4c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Wed, 25 Feb 2015 12:29:41 +0000 Subject: [PATCH 3/5] Accepting request 287685 from home:dmdiss:pcp_threeten - Require pcp-conf with libpcp3 on [open]SUSE platforms. OBS-URL: https://build.opensuse.org/request/show/287685 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=38 --- pcp.changes | 7 ++++++- pcp.spec | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pcp.changes b/pcp.changes index 08d713c..87792cb 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 25 00:14:12 UTC 2015 - ddiss@suse.com + +- Require pcp-conf with libpcp3 on [open]SUSE platforms. + ------------------------------------------------------------------- Mon Feb 23 20:21:40 UTC 2015 - kkaempf@suse.com @@ -8,7 +13,7 @@ Mon Feb 23 20:21:40 UTC 2015 - kkaempf@suse.com - new patches 0007-Honor-CFLAGS-in-qmake.patch 0008-SUSE-fy-pmsnap-control-path.patch - 0009-pmsnap-control-var-www-srv-www.patch + 0009-pmsnap-control-var-www-srv-www.patch - renamed patches create-pmlogger-and-pmie-logdirs-during-install.patch diff --git a/pcp.spec b/pcp.spec index 358998b..440bbd5 100644 --- a/pcp.spec +++ b/pcp.spec @@ -333,9 +333,7 @@ License: %{license_lgplv2plus} Group: %{lib_gr} Url: http://www.pcp.io Conflicts: %{lib_pkg_conflict} -%if !0%{?suse_version} Requires: pcp-conf = %{version}-%{release} -%endif %description -n %{lib_pkg} Performance Co-Pilot (PCP) run-time libraries From 57af77754b3c72cac3d4fc8ced2713eb91b817ddf9cd0c4fe2f8e0663624c8ae Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Thu, 26 Feb 2015 11:06:23 +0000 Subject: [PATCH 4/5] Add missing renamed patches entries to changelog. OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=39 --- pcp.changes | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pcp.changes b/pcp.changes index 87792cb..8d054c8 100644 --- a/pcp.changes +++ b/pcp.changes @@ -16,8 +16,15 @@ Mon Feb 23 20:21:40 UTC 2015 - kkaempf@suse.com 0009-pmsnap-control-var-www-srv-www.patch - renamed patches - create-pmlogger-and-pmie-logdirs-during-install.patch - to 0006-create-pmlogger-and-pmie-logdirs-during-install.patch + + pcp-xenbuild.patch to 0001-Fix-XEN-build.patch + + static_lib_perms.diff to + 0002-Install-libraries-without-exec-permission.patch + + pcp_legacy_init_lsb.patch to 0003-pcp-legacy-init-lsb.patch + + remove_cpan_rpaths.patch to 0004-Remove-CPAN-rpaths.patch + + rm_init_script_runlevel_4.patch to + 0005-Remove-runlevel-4-from-init-scripts.patch + + create-pmlogger-and-pmie-logdirs-during-install.patch + to 0006-create-pmlogger-and-pmie-logdirs-during-install.patch - Update to 3.10.1 See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD From 6b6b669652d16a7d3e430aff8f2d4a8d262eb6be2b4e949825efeecd487951b6 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Fri, 27 Feb 2015 13:27:10 +0000 Subject: [PATCH 5/5] Accepting request 288083 from home:dmdiss:pcp_threeten - Fix perl-PCP-LogImport requires version for pcp-import-sar2pcp. OBS-URL: https://build.opensuse.org/request/show/288083 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=40 --- pcp.changes | 5 +++++ pcp.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pcp.changes b/pcp.changes index 8d054c8..4f9c873 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 27 13:18:15 UTC 2015 - ddiss@suse.com + +- Fix perl-PCP-LogImport requires version for pcp-import-sar2pcp. + ------------------------------------------------------------------- Wed Feb 25 00:14:12 UTC 2015 - ddiss@suse.com diff --git a/pcp.spec b/pcp.spec index 440bbd5..796f4c2 100644 --- a/pcp.spec +++ b/pcp.spec @@ -537,7 +537,7 @@ Url: http://www.pcp.io %if !0%{?suse_version} Requires: pcp-libs = %{version}-%{release} %endif -Requires: perl-PCP-LogImport = %{version}-%{version} +Requires: perl-PCP-LogImport = %{version}-%{release} Requires: sysstat %description import-sar2pcp