From 0e0d8171c0b256e76b68807959c1794b4b02ed5b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 05:46:46 +0000 Subject: import pcp-3.11.3-4.el7 --- diff --git a/.gitignore b/.gitignore index 3dbd94a..466cd93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -SOURCES/pcp-3.10.6.src.tar.gz -SOURCES/pcp-webjs.src.tar.gz +SOURCES/pcp-3.11.3.src.tar.gz +SOURCES/pcp-webjs-3.11.2.tar.gz +SOURCES/vector-1.1.0.tar.gz diff --git a/.pcp.metadata b/.pcp.metadata index 6123394..6855e85 100644 --- a/.pcp.metadata +++ b/.pcp.metadata @@ -1,2 +1,3 @@ -1663b9f29462e8c240a28746373fb7fa03586223 SOURCES/pcp-3.10.6.src.tar.gz -fa4d5d376901669dc98f40d0c300c58000ee983c SOURCES/pcp-webjs.src.tar.gz +8f29aba8b9b69f3a7413ccf96531f7aca73ad573 SOURCES/pcp-3.11.3.src.tar.gz +642f251e68e64b83c50d98d3b130f19cec38138b SOURCES/pcp-webjs-3.11.2.tar.gz +687b20283d4aee6c5494341843cb7ff01c393459 SOURCES/vector-1.1.0.tar.gz diff --git a/SOURCES/rhbz1241591.patch b/SOURCES/rhbz1241591.patch deleted file mode 100644 index 64ba8ea..0000000 --- a/SOURCES/rhbz1241591.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff -Naurp pcp-3.10.6.orig/qa/GNUmakefile pcp-3.10.6/qa/GNUmakefile ---- pcp-3.10.6.orig/qa/GNUmakefile 2015-07-22 10:07:48.000000000 +1000 -+++ pcp-3.10.6/qa/GNUmakefile 2015-08-24 17:21:04.393904471 +1000 -@@ -63,8 +63,7 @@ ifeq "$(HAVE_PYTHON)" "true" - COMMON += common.python - endif - --OTHERS = GNUmakefile.install group qa_hosts.master README \ -- valgrind-suppress sanity.coverage -+OTHERS = group qa_hosts.master README valgrind-suppress sanity.coverage - - DOTOUTFILES = $(shell [ -f qa_outfiles ] && cat qa_outfiles || ls -1 | grep '^[0-9]' | grep -v '^[0-9][0-9][0-9]$$' | grep -v '^[0-9][0-9][0-9][0-9]$$' | egrep -v '^[0-9][0-9][0-9]*\.(full|out\.bad|notrun|work)' | tee qa_outfiles) - -diff -Naurp pcp-3.10.6.orig/src/pmdas/linux/proc_partitions.c pcp-3.10.6/src/pmdas/linux/proc_partitions.c ---- pcp-3.10.6.orig/src/pmdas/linux/proc_partitions.c 2015-07-01 16:51:04.000000000 +1000 -+++ pcp-3.10.6/src/pmdas/linux/proc_partitions.c 2015-08-24 17:21:04.391904471 +1000 -@@ -610,17 +610,17 @@ proc_partitions_fetch(pmdaMetric *mdesc, - case 38: /* disk.dev.read_bytes */ - if (p == NULL) - return PM_ERR_INST; -- atom->ull = p->rd_sectors / 2; -+ atom->ul = p->rd_sectors / 2; - break; - case 39: /* disk.dev.write_bytes */ - if (p == NULL) - return PM_ERR_INST; -- atom->ull = p->wr_sectors / 2; -+ atom->ul = p->wr_sectors / 2; - break; - case 40: /* disk.dev.total_bytes */ - if (p == NULL) - return PM_ERR_INST; -- atom->ull = (p->rd_sectors + p->wr_sectors) / 2; -+ atom->ul = (p->rd_sectors + p->wr_sectors) / 2; - break; - case 46: /* disk.dev.avactive ... already msec from /proc/diskstats */ - if (p == NULL) -@@ -690,13 +690,13 @@ proc_partitions_fetch(pmdaMetric *mdesc, - atom->ull += p->rd_sectors + p->wr_sectors; - break; - case 41: /* disk.all.read_bytes */ -- atom->ull += p->rd_sectors / 2; -+ atom->ul += p->rd_sectors / 2; - break; - case 42: /* disk.all.write_bytes */ -- atom->ull += p->wr_sectors / 2; -+ atom->ul += p->wr_sectors / 2; - break; - case 43: /* disk.all.total_bytes */ -- atom->ull += (p->rd_sectors + p->wr_sectors) / 2; -+ atom->ul += (p->rd_sectors + p->wr_sectors) / 2; - break; - case 44: /* disk.all.avactive ... already msec from /proc/diskstats */ - atom->ull += p->io_ticks; -@@ -777,13 +777,13 @@ proc_partitions_fetch(pmdaMetric *mdesc, - if (_pm_have_kernel_2_6_partition_stats) - return PM_ERR_APPVERSION; /* no avactive for partition in 2.6 */ - else -- atom->ull = p->io_ticks; -+ atom->ul = p->io_ticks; - break; - case 12: /* disk.partitions.aveq */ - if (_pm_have_kernel_2_6_partition_stats) - return PM_ERR_APPVERSION; /* no aveq for partition in 2.6 */ - else -- atom->ull = p->aveq; -+ atom->ul = p->aveq; - break; - case 13: /* disk.partitions.read_rawactive */ - if (_pm_have_kernel_2_6_partition_stats) -@@ -831,13 +831,13 @@ proc_partitions_fetch(pmdaMetric *mdesc, - atom->ull = p->rd_sectors + p->wr_sectors; - break; - case 6: /* disk.dm.read_bytes */ -- atom->ull = p->rd_sectors / 2; -+ atom->ul = p->rd_sectors / 2; - break; - case 7: /* disk.dm.write_bytes */ -- atom->ull = p->wr_sectors / 2; -+ atom->ul = p->wr_sectors / 2; - break; - case 8: /* disk.dm.total_bytes */ -- atom->ull = (p->rd_sectors + p->wr_sectors) / 2; -+ atom->ul = (p->rd_sectors + p->wr_sectors) / 2; - break; - case 9: /* disk.dm.read_merge */ - _pm_assign_ulong(atom, p->rd_merges); -@@ -846,10 +846,10 @@ proc_partitions_fetch(pmdaMetric *mdesc, - _pm_assign_ulong(atom, p->wr_merges); - break; - case 11: /* disk.dm.avactive */ -- atom->ull = p->io_ticks; -+ atom->ul = p->io_ticks; - break; - case 12: /* disk.dm.aveq */ -- atom->ull = p->aveq; -+ atom->ul = p->aveq; - break; - case 13: /* hinv.map.dmname */ - atom->cp = p->dmname; -diff -Naurp pcp-3.10.6.orig/src/pmdas/postfix/pmdapostfix.pl pcp-3.10.6/src/pmdas/postfix/pmdapostfix.pl ---- pcp-3.10.6.orig/src/pmdas/postfix/pmdapostfix.pl 2015-06-26 11:11:58.000000000 +1000 -+++ pcp-3.10.6/src/pmdas/postfix/pmdapostfix.pl 2015-08-24 17:21:04.392904471 +1000 -@@ -234,13 +234,13 @@ if (defined($ENV{'PMDA_POSTFIX_REFRESH'} - - foreach my $file ( @logfiles ) { - if ( -r $file ) { -- $logfile = $file; -+ $logfile = $file unless ( -d $file ); - } - } - if (defined($ENV{'PMDA_POSTFIX_LOG'})) { $logfile = $ENV{'PMDA_POSTFIX_LOG'}; } - unless(defined($logfile)) - { -- pmda->log("Fatal: No Postfix log file found in: @logfiles"); -+ $pmda->log("Fatal: No Postfix log file found in: @logfiles"); - die 'No Postfix log file found'; - } - if (!$setup) { $pmda->log("logfile: $logfile"); } diff --git a/SOURCES/rhbz1243809.patch b/SOURCES/rhbz1243809.patch deleted file mode 100644 index 6a766ec..0000000 --- a/SOURCES/rhbz1243809.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -Naurp pcp-3.10.6.orig/qa/366.out pcp-3.10.6/qa/366.out ---- pcp-3.10.6.orig/qa/366.out 2015-06-02 11:33:33.000000000 +1000 -+++ pcp-3.10.6/qa/366.out 2015-08-24 17:24:30.471859394 +1000 -@@ -340,7 +340,7 @@ QA output created by 366 - > #---- - > #+ tools/atop-httpstats:x:: - > #---- --> #+ tools/atop-proc:n:120 seconds: -+> #+ tools/atop-proc:n:default: - > ## per-process metrics used by the atop command - > #---- - > #+ tools/atop-summary:y:once: -@@ -427,7 +427,7 @@ QA output created by 366 - > pmcd.pmie - > } - > #---- --> #+ tools/pmclient:n:5 second: -+> #+ tools/pmclient:n:default: - > ## metrics sampled frequently by the pmclient(1) command - > #---- - > #+ tools/pmclient-summary:n:once: -diff -Naurp pcp-3.10.6.orig/src/pmlogconf/tools/atop pcp-3.10.6/src/pmlogconf/tools/atop ---- pcp-3.10.6.orig/src/pmlogconf/tools/atop 2015-06-02 11:34:10.000000000 +1000 -+++ pcp-3.10.6/src/pmlogconf/tools/atop 2015-08-24 17:24:30.470859394 +1000 -@@ -1,7 +1,7 @@ - #pmlogconf-setup 2.0 - ident metrics used by the atop command - probe kernel.uname.sysname ~ Linux ? include : exclude --delta 10 seconds -+ - disk.dev.read - disk.dev.write - disk.dev.blkread -diff -Naurp pcp-3.10.6.orig/src/pmlogconf/tools/atop-httpstats pcp-3.10.6/src/pmlogconf/tools/atop-httpstats ---- pcp-3.10.6.orig/src/pmlogconf/tools/atop-httpstats 2015-06-02 11:33:33.000000000 +1000 -+++ pcp-3.10.6/src/pmlogconf/tools/atop-httpstats 2015-08-24 17:24:30.470859394 +1000 -@@ -1,7 +1,7 @@ - #pmlogconf-setup 2.0 - ident metrics sampled once by the atop command - probe apache.uptime exists ? include : exclude --delta 10 seconds -+ - apache.total_accesses - apache.total_kbytes - apache.uptime -diff -Naurp pcp-3.10.6.orig/src/pmlogconf/tools/atop-proc pcp-3.10.6/src/pmlogconf/tools/atop-proc ---- pcp-3.10.6.orig/src/pmlogconf/tools/atop-proc 2015-06-02 11:33:33.000000000 +1000 -+++ pcp-3.10.6/src/pmlogconf/tools/atop-proc 2015-08-24 17:24:30.470859394 +1000 -@@ -1,7 +1,7 @@ - #pmlogconf-setup 2.0 - ident per-process metrics used by the atop command - force available --delta 120 seconds -+ - proc.psinfo.cmd - proc.psinfo.sname - proc.psinfo.ppid -diff -Naurp pcp-3.10.6.orig/src/pmlogconf/tools/pmclient pcp-3.10.6/src/pmlogconf/tools/pmclient ---- pcp-3.10.6.orig/src/pmlogconf/tools/pmclient 2014-10-08 16:23:49.000000000 +1100 -+++ pcp-3.10.6/src/pmlogconf/tools/pmclient 2015-08-24 17:24:30.471859394 +1000 -@@ -1,7 +1,7 @@ - #pmlogconf-setup 2.0 - ident metrics sampled frequently by the pmclient(1) command - force available --delta 5 second -+ - kernel.all.load [ 1 15 ] - kernel.percpu.cpu.user - kernel.percpu.cpu.sys diff --git a/SOURCES/rhbz1336211.patch b/SOURCES/rhbz1336211.patch new file mode 100644 index 0000000..53ecac2 --- /dev/null +++ b/SOURCES/rhbz1336211.patch @@ -0,0 +1,131 @@ +diff -Naurp pcp-3.11.3.orig/src/pmdas/linux_proc/getinfo.c pcp-3.11.3/src/pmdas/linux_proc/getinfo.c +--- pcp-3.11.3.orig/src/pmdas/linux_proc/getinfo.c 2016-02-29 11:53:04.000000000 +1100 ++++ pcp-3.11.3/src/pmdas/linux_proc/getinfo.c 2016-08-05 15:06:14.699422894 +1000 +@@ -1,4 +1,5 @@ + /* ++ * Copyright (c) 2016 Red Hat. + * Copyright (c) 2010 Aconex. All Rights Reserved. + * Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. + * +@@ -14,42 +15,54 @@ + */ + + #include +-#include + #include + #include + #include "pmapi.h" + ++/* ++ * Convert kernels string device number encoding into a dev_t. ++*/ ++dev_t ++get_encoded_dev(const char *devnum) ++{ ++ unsigned device = (unsigned int)strtoul(devnum, NULL, 0); ++ return (dev_t)device; ++} ++ ++/* ++ * Attempt to map a device number to a tty for a given process. ++ * ++ * Previously this was much more elaborate, scanning all open fds ++ * for a match on the device; but that is expensive for processes ++ * with many open fds, and we end up stat'ing all sorts of files ++ * unrelated to the job at hand (which SElinux blocks and reports ++ * as poor form). ++ * ++ * Returns a pointer into a static buffer, so no free'ing needed. ++ */ + char * +-get_ttyname_info(int pid, dev_t dev, char *ttyname) ++get_ttyname_info(int pid, dev_t dev) + { +- DIR *dir; +- struct dirent *dp; +- struct stat sbuf; +- int found=0; +- char procpath[MAXPATHLEN]; ++ int i; ++ size_t length; ++ struct stat statbuf; + char ttypath[MAXPATHLEN]; ++ char procpath[MAXPATHLEN]; ++ static char ttyname[MAXPATHLEN]; ++ const int fds[] = { STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO }; + +- sprintf(procpath, "/proc/%d/fd", pid); +- if ((dir = opendir(procpath)) != NULL) { +- while ((dp = readdir(dir)) != NULL) { +- if (!isdigit((int)dp->d_name[0])) +- continue; +- sprintf(procpath, "/proc/%d/fd/%s", pid, dp->d_name); +- if (realpath(procpath, ttypath) == NULL || stat(ttypath, &sbuf) < 0) +- continue; +- if (S_ISCHR(sbuf.st_mode) && dev == sbuf.st_rdev) { +- found=1; +- break; +- } ++ strcpy(ttyname, "?"); ++ for (i = 0; i < sizeof(fds)/sizeof(int); i++) { ++ sprintf(procpath, "/proc/%d/fd/%d", pid, fds[i]); ++ if ((length = readlink(procpath, ttypath, sizeof(ttypath)-1)) < 0) ++ continue; ++ ttypath[length] = '\0'; ++ if (strncmp(ttypath, "/dev/", 5) == 0 && ++ stat(ttypath, &statbuf) == 0 && ++ S_ISCHR(statbuf.st_mode) && dev == statbuf.st_rdev) { ++ strcpy(ttyname, &ttypath[5]); /* skip "/dev/" prefix */ ++ break; + } +- closedir(dir); + } +- +- if (!found) +- strcpy(ttyname, "?"); +- else +- /* skip the "/dev/" prefix */ +- strcpy(ttyname, &ttypath[5]); +- + return ttyname; + } +diff -Naurp pcp-3.11.3.orig/src/pmdas/linux_proc/getinfo.h pcp-3.11.3/src/pmdas/linux_proc/getinfo.h +--- pcp-3.11.3.orig/src/pmdas/linux_proc/getinfo.h 2016-02-29 11:53:04.000000000 +1100 ++++ pcp-3.11.3/src/pmdas/linux_proc/getinfo.h 2016-08-05 15:06:14.700422880 +1000 +@@ -1,4 +1,5 @@ + /* ++ * Copyright (c) 2016 Red Hat. + * Copyright (c) 2010 Aconex. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it +@@ -12,5 +13,6 @@ + * for more details. + */ + +-extern char *get_ttyname_info(int, dev_t, char *); ++extern dev_t get_encoded_dev(const char *); ++extern char *get_ttyname_info(int, dev_t); + +diff -Naurp pcp-3.11.3.orig/src/pmdas/linux_proc/pmda.c pcp-3.11.3/src/pmdas/linux_proc/pmda.c +--- pcp-3.11.3.orig/src/pmdas/linux_proc/pmda.c 2016-05-16 16:28:19.000000000 +1000 ++++ pcp-3.11.3/src/pmdas/linux_proc/pmda.c 2016-08-05 15:06:14.701422866 +1000 +@@ -1896,8 +1896,6 @@ proc_fetchCallBack(pmdaMetric *mdesc, un + if (idp->item == 99) /* proc.nprocs */ + atom->ul = active_proc_pid->indom->it_numinst; + else { +- static char ttyname[MAXPATHLEN]; +- + if (!have_access) + return PM_ERR_PERMISSION; + entry = fetch_proc_pid_stat(inst, active_proc_pid, &sts); +@@ -1914,8 +1912,8 @@ proc_fetchCallBack(pmdaMetric *mdesc, un + if (f == NULL) + atom->cp = "?"; + else { +- dev_t dev = (dev_t)atoi(f); +- atom->cp = get_ttyname_info(inst, dev, ttyname); ++ dev_t dev = get_encoded_dev(f); ++ atom->cp = get_ttyname_info(inst, dev); + } + break; + diff --git a/SOURCES/rhbz1349932.patch b/SOURCES/rhbz1349932.patch new file mode 100644 index 0000000..3510215 --- /dev/null +++ b/SOURCES/rhbz1349932.patch @@ -0,0 +1,49 @@ +diff -Naurp pcp-3.11.3.orig/src/pmdas/linux/filesys.c pcp-3.11.3/src/pmdas/linux/filesys.c +--- pcp-3.11.3.orig/src/pmdas/linux/filesys.c 2016-02-29 11:53:04.000000000 +1100 ++++ pcp-3.11.3/src/pmdas/linux/filesys.c 2016-07-07 16:46:00.633663707 +1000 +@@ -1,7 +1,7 @@ + /* + * Linux Filesystem Cluster + * +- * Copyright (c) 2014-2015 Red Hat. ++ * Copyright (c) 2014-2016 Red Hat. + * Copyright (c) 2000,2004,2007-2008 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it +@@ -90,8 +90,12 @@ refresh_filesys(pmInDom filesys_indom, p + } + else if (strncmp(device, "/dev", 4) != 0) + continue; +- if (realpath(device, src) != NULL) +- device = src; ++ ++ /* keep dm and md persistent names, RHBZ#1349932 */ ++ if (strncmp(device, "/dev/mapper", 11) != 0 && strncmp(device, "/dev/md", 7) != 0) { ++ if (realpath(device, src) != NULL) ++ device = src; ++ } + + sts = pmdaCacheLookupName(indom, device, NULL, (void **)&fs); + if (sts == PMDA_CACHE_ACTIVE) /* repeated line in /proc/mounts? */ +diff -Naurp pcp-3.11.3.orig/src/pmdas/mounts/mounts.c pcp-3.11.3/src/pmdas/mounts/mounts.c +--- pcp-3.11.3.orig/src/pmdas/mounts/mounts.c 2016-02-29 11:53:04.000000000 +1100 ++++ pcp-3.11.3/src/pmdas/mounts/mounts.c 2016-07-07 16:46:00.633663707 +1000 +@@ -1,7 +1,7 @@ + /* + * Mounts PMDA, info on current tracked filesystem mounts + * +- * Copyright (c) 2012,2015 Red Hat. ++ * Copyright (c) 2012,2015-2016 Red Hat. + * Copyright (c) 2001,2003,2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001 Alan Bailey (bailey@mcs.anl.gov or abailey@ncsa.uiuc.edu) + * All rights reserved. +@@ -323,7 +323,8 @@ mounts_refresh_mounts(void) + if (strcmp(path, mounts[item].i_name) != 0) + continue; + strncpy(mp->type, type, MAXFSTYPE-1); +- if (realpath(device, mp->device) == NULL) ++ /* don't resolve dm symlinks - we want the persistent device name, not the dm-* name */ ++ if (strncmp(device, "/dev/mapper", 11) == 0 || realpath(device, mp->device) == NULL) + strncpy(mp->device, device, MAXPATHLEN-1); + strncpy(mp->options, options, MAXOPTSTR-1); + mp->flags = MOUNTS_FLAG_UP; diff --git a/SOURCES/rhbz1351223.patch b/SOURCES/rhbz1351223.patch new file mode 100644 index 0000000..98ac72a --- /dev/null +++ b/SOURCES/rhbz1351223.patch @@ -0,0 +1,53 @@ +diff -Naurp pcp-3.11.3.orig/qa/006.out pcp-3.11.3/qa/006.out +--- pcp-3.11.3.orig/qa/006.out 2016-05-23 14:59:11.000000000 +1000 ++++ pcp-3.11.3/qa/006.out 2016-08-05 15:09:10.008021649 +1000 +@@ -57,7 +57,7 @@ QA output created by 006 + -12400 Bad input to pmstore + -12401 Archives overlap in time + -12402 Archives differ by host +--12403 Archives differ by time zone ++-12403 No such PMAPI error code (-12403) + -12404 The type of a metric has changed in an archive + -12405 The semantics of a metric has changed in an archive + -12406 The instance domain of a metric has changed in an archive +diff -Naurp pcp-3.11.3.orig/src/include/pcp/pmapi.h pcp-3.11.3/src/include/pcp/pmapi.h +--- pcp-3.11.3.orig/src/include/pcp/pmapi.h 2016-05-25 09:37:12.000000000 +1000 ++++ pcp-3.11.3/src/include/pcp/pmapi.h 2016-08-05 15:09:10.009021635 +1000 +@@ -189,7 +189,7 @@ typedef struct pmDesc { + #define PM_ERR_BADSTORE (-PM_ERR_BASE-55) /* Bad input to pmstore */ + #define PM_ERR_LOGOVERLAP (-PM_ERR_BASE-56) /* Archives overlap in time */ + #define PM_ERR_LOGHOST (-PM_ERR_BASE-57) /* Archives differ by host */ +-#define PM_ERR_LOGTIMEZONE (-PM_ERR_BASE-58) /* Archives differ in time zone */ ++ /* retired PM_ERR_LOGTIMEZONE (-PM_ERR_BASE-58) Archives differ in time zone */ + #define PM_ERR_LOGCHANGETYPE (-PM_ERR_BASE-59) /* The type of a metric has changed in an archive */ + #define PM_ERR_LOGCHANGESEM (-PM_ERR_BASE-60) /* The semantics of a metric has changed in an archive */ + #define PM_ERR_LOGCHANGEINDOM (-PM_ERR_BASE-61) /* The instance domain of a metric has changed in an archive */ +diff -Naurp pcp-3.11.3.orig/src/libpcp/src/err.c pcp-3.11.3/src/libpcp/src/err.c +--- pcp-3.11.3.orig/src/libpcp/src/err.c 2016-05-23 14:59:11.000000000 +1000 ++++ pcp-3.11.3/src/libpcp/src/err.c 2016-08-05 15:09:10.009021635 +1000 +@@ -154,8 +154,6 @@ static const struct { + "Archives overlap in time" }, + { PM_ERR_LOGHOST, "PM_ERR_LOGHOST", + "Archives differ by host" }, +- { PM_ERR_LOGTIMEZONE, "PM_ERR_LOGTIMEZONE", +- "Archives differ by time zone" }, + { PM_ERR_LOGCHANGETYPE, "PM_ERR_LOGCHANGETYPE", + "The type of a metric has changed in an archive" }, + { PM_ERR_LOGCHANGESEM, "PM_ERR_LOGCHANGESEM", +diff -Naurp pcp-3.11.3.orig/src/libpcp/src/logutil.c pcp-3.11.3/src/libpcp/src/logutil.c +--- pcp-3.11.3.orig/src/libpcp/src/logutil.c 2016-05-16 16:42:00.000000000 +1000 ++++ pcp-3.11.3/src/libpcp/src/logutil.c 2016-08-05 15:09:10.008021649 +1000 +@@ -108,12 +108,10 @@ checkLabelConsistency (__pmContext *ctxp + * When checking for consistency, it is sufficient to check vs the + * first archive in the context. + * The version number is checked by __pmLogChkLabel. +- * Check the hostname and the time zone. ++ * Check the hostname. + */ + if (strcmp(lp->ill_hostname, ctxp->c_archctl->ac_log_list[0]->ml_hostname) != 0) + return PM_ERR_LOGHOST; +- if (strcmp(lp->ill_tz, ctxp->c_archctl->ac_log_list[0]->ml_tz) != 0) +- return PM_ERR_LOGTIMEZONE; + + /* All is ok */ + return 0; diff --git a/SOURCES/rhbz1357607.patch b/SOURCES/rhbz1357607.patch new file mode 100644 index 0000000..4d606d5 --- /dev/null +++ b/SOURCES/rhbz1357607.patch @@ -0,0 +1,40 @@ +commit 1f0ee8705d108b628e59746e851f51fd1599190c +Author: Nathan Scott +Date: Wed Jul 20 11:47:30 2016 +1000 + + pmda ds389log: use dirsrv as default user account + + In all current Fedora versions and since RHEL7.3 the default + user for 389-ds is dirsrv instead of nobody. + + Update defaults for pcp-pmda-ds389log to reflect this change. + The configuration file can still be used to explicitly set an + alternative user if needed. + + Resolves Red Hat BZ #1357607. + +diff --git a/qa/960 b/qa/960 +index 845da39..5c9f269 100755 +--- a/qa/960 ++++ b/qa/960 +@@ -18,6 +18,7 @@ echo "QA output created by $seq" + which logconv.pl >/dev/null 2>&1 || _notrun "No logconv.pl script installed" + $sudo ls /var/log/dirsrv/slapd-*/access 2>&1 >/dev/null || \ + _notrun "No ds389 directory log files accessible" ++id dirsrv >/dev/null 2>&1 || _notrun "No dirsrv (default) account installed" + + status=1 # failure is the default! + $sudo rm -rf $tmp.* $seq.full +diff --git a/src/pmdas/ds389log/pmdads389log.pl b/src/pmdas/ds389log/pmdads389log.pl +index a7e7c32..fd063db 100644 +--- a/src/pmdas/ds389log/pmdads389log.pl ++++ b/src/pmdas/ds389log/pmdads389log.pl +@@ -25,7 +25,7 @@ our $lc_opts = '-D /dev/shm -s all'; + our $lc_ival = 30; # minimal query interval in seconds, must be >= 30 + our $ds_alog = ''; # empty - guess; ok if only one DS instance in use + our $ds_logd = '/var/log/dirsrv'; +-our $ds_user = 'nobody'; # empty - use root ++our $ds_user = 'dirsrv'; # empty - use root + + # Configuration files for overriding the above settings + for my $file (pmda_config('PCP_PMDAS_DIR') . '/ds389log/ds389log.conf', './ds389log.conf') { diff --git a/SPECS/pcp.spec b/SPECS/pcp.spec index 7455762..713b74d 100644 --- a/SPECS/pcp.spec +++ b/SPECS/pcp.spec @@ -1,26 +1,29 @@ Summary: System-level performance monitoring and performance management Name: pcp -Version: 3.10.6 -%global buildversion 2 +Version: 3.11.3 +%global buildversion 4 Release: %{buildversion}%{?dist} License: GPLv2+ and LGPLv2.1+ and CC-BY URL: http://www.pcp.io Group: Applications/System -Source0: pcp-%{version}.src.tar.gz -Source1: pcp-webjs.src.tar.gz +# https://bintray.com/artifact/download/pcp/source/pcp-%{version}.src.tar.gz +Source0: %{name}-%{version}.src.tar.gz +# https://bintray.com/artifact/download/netflixoss/downloads/vector.tar.gz +Source1: vector-1.1.0.tar.gz +# https://github.com/performancecopilot/pcp-webjs/archive/3.11.2.tar.gz +Source2: pcp-webjs-3.11.2.tar.gz -# drop intervals from pmlogconf files -Patch0: rhbz1243809.patch -# fixes targetting QE failures -Patch1: rhbz1241591.patch +# selinux improvements in pmdaproc ttyname access +Patch0: rhbz1336211.patch +# filesys metrics with persistent device mapper names +Patch1: rhbz1349932.patch +# remove multi-archive log label timezone assertions +Patch2: rhbz1351223.patch +# Update pcp-pmda-ds389log defaults to use dirsrv user instead of nobody +Patch3: rhbz1357607.patch -# Compat check for distros that already have single install pmda's -%if 0%{?fedora} > 22 || 0%{?rhel} > 7 -%global with_compat 0 -%else -%global with_compat 1 -%endif +%global disable_snmp 0 # There are no papi/libpfm devel packages for s390 nor for some rhels, disable %ifarch s390 s390x @@ -112,10 +115,13 @@ Patch1: rhbz1241591.patch Conflicts: librapi BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B +BuildRequires: gcc gcc-c++ BuildRequires: procps autoconf bison flex BuildRequires: nss-devel BuildRequires: rpm-devel BuildRequires: avahi-devel +BuildRequires: zlib-devel %if !%{disable_python2} %if 0%{?default_python} != 3 BuildRequires: python%{?default_python}-devel @@ -144,7 +150,7 @@ BuildRequires: cairo-devel %if !%{disable_sdt} BuildRequires: systemtap-sdt-devel %endif -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl-devel perl(ExtUtils::MakeMaker) BuildRequires: initscripts man %if !%{disable_systemd} BuildRequires: systemd-devel @@ -166,9 +172,9 @@ Requires: python-pcp = %{version}-%{release} Obsoletes: pcp-gui-debuginfo Obsoletes: pcp-pmda-nvidia -%if %{with_compat} -Requires: pcp-compat -%endif +# Obsoletes for distros that already have single install pmda's with compat package +Obsoletes: pcp-compat + Requires: pcp-libs = %{version}-%{release} Obsoletes: pcp-gui-debuginfo @@ -224,6 +230,22 @@ Obsoletes: pcp-gui-debuginfo %global _with_json --with-pmdajson=yes %endif +%if %{disable_snmp} +%global _with_snmp --with-pmdasnmp=no +%else +%global _with_snmp --with-pmdasnmp=yes +%endif + +%global pmda_remove() %{expand: +if [ "%1" -eq 0 ] +then + if [ -f "%{_confdir}/pmcd/pmcd.conf" ] && [ -f "%{_pmdasdir}/%2/domain.h" ] + then + (cd %{_pmdasdir}/%2/ && ./Remove >/dev/null 2>&1) + fi +fi +} + %description Performance Co-Pilot (PCP) provides a framework and services to support system-level performance monitoring and performance management. @@ -266,13 +288,28 @@ Performance Co-Pilot (PCP) run-time libraries %package libs-devel License: GPLv2+ and LGPLv2.1+ Group: Development/Libraries -Summary: Performance Co-Pilot (PCP) development headers and documentation +Summary: Performance Co-Pilot (PCP) development headers +URL: http://www.pcp.io +#Requires: pcp = %{version}-%{release} +#Requires: pcp-libs = %{version}-%{release} + +%description libs-devel +Performance Co-Pilot (PCP) headers, for development + +# +# pcp-devel +# +%package devel +License: GPLv2+ and LGPLv2.1+ +Group: Development/Libraries +Summary: Performance Co-Pilot (PCP) development tools and documentation URL: http://www.pcp.io Requires: pcp = %{version}-%{release} Requires: pcp-libs = %{version}-%{release} +Requires: pcp-libs-devel = %{version}-%{release} -%description libs-devel -Performance Co-Pilot (PCP) headers, documentation and tools for development. +%description devel +Performance Co-Pilot (PCP) documentation and tools for development. # # pcp-testsuite @@ -285,6 +322,7 @@ URL: http://www.pcp.io Requires: pcp = %{version}-%{release} Requires: pcp-libs = %{version}-%{release} Requires: pcp-libs-devel = %{version}-%{release} +Requires: pcp-devel = %{version}-%{release} Obsoletes: pcp-gui-testsuite %description testsuite @@ -470,6 +508,7 @@ URL: http://www.pcp.io Requires: pcp-libs = %{version}-%{release} Requires: perl-PCP-LogImport = %{version}-%{release} Requires: sysstat +Requires: perl(XML::TokeParser) %description import-sar2pcp Performance Co-Pilot (PCP) front-end tools for importing sar data @@ -521,6 +560,20 @@ Requires: perl-PCP-LogImport = %{version}-%{release} Performance Co-Pilot (PCP) front-end tools for importing ganglia data into standard PCP archive logs for replay with any PCP monitoring tool. +# +# pcp-export-zabbix-agent +# +%package export-zabbix-agent +License: GPLv2+ +Group: Applications/System +Summary: Module for exporting PCP metrics to Zabbix agent +URL: http://www.pcp.io +Requires: pcp-libs = %{version}-%{release} + +%description export-zabbix-agent +Performance Co-Pilot (PCP) module for exporting metrics from PCP to +Zabbix via the Zabbix agent - see zbxpcp(3) for further details. + %if !%{disable_python2} || !%{disable_python3} # # pcp-export-pcp2graphite @@ -618,6 +671,7 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for ActiveMQ URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl(LWP::UserAgent) %description pmda-activemq This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -663,6 +717,7 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for 389 Directory Servers URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl-LDAP %description pmda-ds389 This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -678,6 +733,7 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for 389 Directory Server Loggers URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl-Date-Manip %description pmda-ds389log This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -693,6 +749,8 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for Elasticsearch URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl(LWP::UserAgent) +BuildRequires: perl(LWP::UserAgent) %description pmda-elasticsearch This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -799,6 +857,8 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for MySQL URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl(DBI) perl(DBD::mysql) +BuildRequires: perl(DBI) perl(DBD::mysql) %description pmda-mysql This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -858,6 +918,8 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for the Nginx Webserver URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl(LWP::UserAgent) +BuildRequires: perl(LWP::UserAgent) %description pmda-nginx This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -880,6 +942,23 @@ collecting metrics for NFS Clients. #end pcp-pmda-nfsclient # +# pcp-pmda-oracle +# +%package pmda-oracle +License: GPLv2+ +Group: Applications/System +Summary: Performance Co-Pilot (PCP) metrics for the Oracle database +URL: http://www.pcp.io +Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl(DBI) +BuildRequires: perl(DBI) + +%description pmda-oracle +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics about the Oracle database. +#end pcp-pmda-oracle + +# # pcp-pmda-pdns # %package pmda-pdns @@ -905,12 +984,15 @@ URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} %if 0%{?fedora} > 16 || 0%{?rhel} > 5 Requires: postfix-perl-scripts +BuildRequires: postfix-perl-scripts %endif %if 0%{?rhel} <= 5 Requires: postfix +BuildRequires: postfix %endif %if "%{_vendor}" == "suse" Requires: postfix-doc +BuildRequires: postfix-doc %endif %description pmda-postfix @@ -927,6 +1009,8 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for PostgreSQL URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +Requires: perl(DBI) perl(DBD::Pg) +BuildRequires: perl(DBI) perl(DBD::Pg) %description pmda-postgresql This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -964,6 +1048,22 @@ collecting metrics about Samba. #end pcp-pmda-samba # +# pcp-pmda-slurm +# +%package pmda-slurm +License: GPLv2+ +Group: Applications/System +Summary: Performance Co-Pilot (PCP) metrics for NFS Clients +URL: http://www.pcp.io +Requires: perl-PCP-PMDA = %{version}-%{release} + +%description pmda-slurm +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics from the SLURM Workload Manager. +#end pcp-pmda-slurm + +%if !%{disable_snmp} +# # pcp-pmda-snmp # %package pmda-snmp @@ -972,11 +1072,16 @@ Group: Applications/System Summary: Performance Co-Pilot (PCP) metrics for Simple Network Management Protocol URL: http://www.pcp.io Requires: perl-PCP-PMDA = %{version}-%{release} +# There are no perl-Net-SNMP packages in rhel, disable unless non-rhel or epel5 +%if 0%{?rhel} == 0 || 0%{?rhel} < 6 +Requires: perl(Net::SNMP) +%endif %description pmda-snmp This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about SNMP. #end pcp-pmda-snmp +%endif # # pcp-pmda-vmware @@ -1078,6 +1183,24 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the Unbound DNS Resolver. # end pcp-pmda-unbound +# +# pcp-pmda-mic +# +%package pmda-mic +License: GPLv2+ +Group: Applications/System +Summary: Performance Co-Pilot (PCP) metrics for Intel MIC cards +URL: http://www.pcp.io +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: python-pcp +%endif +%description pmda-mic +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics about Intel MIC cards. +# end pcp-pmda-mic + %endif # !%{disable_python2} || !%{disable_python3} %if !%{disable_json} @@ -1091,12 +1214,12 @@ Summary: Performance Co-Pilot (PCP) metrics for JSON data URL: http://www.pcp.io %if !%{disable_python3} Requires: python3-pcp -Requires: python3-jsonpointer -Requires: python3-six +Requires: python3-jsonpointer python3-six +BuildRequires: python3-jsonpointer python3-six %else Requires: python-pcp -Requires: python-jsonpointer -Requires: python-six +Requires: python-jsonpointer python-six +BuildRequires: python-jsonpointer python-six %endif %description pmda-json This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -1369,41 +1492,6 @@ collecting metrics about web server logs. # end pcp-pmda-weblog # end C pmdas -# -# pcp-compat -# -%if %{with_compat} -%package compat -License: GPLv2+ -Group: Applications/System -Summary: Performance Co-Pilot (PCP) compat package for existing systems -URL: http://www.pcp.io -Requires: pcp-pmda-activemq pcp-pmda-bonding pcp-pmda-dbping pcp-pmda-ds389 pcp-pmda-ds389log -Requires: pcp-pmda-elasticsearch pcp-pmda-gpfs pcp-pmda-gpsd pcp-pmda-kvm pcp-pmda-lustre -Requires: pcp-pmda-memcache pcp-pmda-mysql pcp-pmda-named pcp-pmda-netfilter pcp-pmda-news -Requires: pcp-pmda-nginx pcp-pmda-nfsclient pcp-pmda-pdns pcp-pmda-postfix pcp-pmda-postgresql -Requires: pcp-pmda-dm pcp-pmda-apache -Requires: pcp-pmda-bash pcp-pmda-cisco pcp-pmda-gfs2 pcp-pmda-lmsensors pcp-pmda-mailq pcp-pmda-mounts -Requires: pcp-pmda-nvidia-gpu pcp-pmda-roomtemp pcp-pmda-sendmail pcp-pmda-shping pcp-pmda-logger -Requires: pcp-pmda-lustrecomm -%if !%{disable_python2} || !%{disable_python3} -Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound -Requires: pcp-system-tools pcp-export-pcp2graphite -%endif -%if !%{disable_json} -Requires: pcp-pmda-json -%endif -%if !%{disable_rpm} -Requires: pcp-pmda-rpm -%endif -Requires: pcp-pmda-summary pcp-pmda-trace pcp-pmda-weblog -Requires: pcp-doc -%description compat -This package contains the PCP compatibility dependencies for existing PCP -installations. This is not a package that should be depended on, and will -be removed in future releases. -%endif #compat - # pcp-collector metapackage %package collector License: GPLv2+ @@ -1413,14 +1501,17 @@ URL: http://www.pcp.io Requires: pcp-pmda-activemq pcp-pmda-bonding pcp-pmda-dbping pcp-pmda-ds389 pcp-pmda-ds389log Requires: pcp-pmda-elasticsearch pcp-pmda-gpfs pcp-pmda-gpsd pcp-pmda-kvm pcp-pmda-lustre Requires: pcp-pmda-memcache pcp-pmda-mysql pcp-pmda-named pcp-pmda-netfilter pcp-pmda-news -Requires: pcp-pmda-nginx pcp-pmda-nfsclient pcp-pmda-pdns pcp-pmda-postfix pcp-pmda-postgresql -Requires: pcp-pmda-samba pcp-pmda-snmp pcp-pmda-vmware pcp-pmda-zimbra +Requires: pcp-pmda-nginx pcp-pmda-nfsclient pcp-pmda-pdns pcp-pmda-postfix pcp-pmda-postgresql pcp-pmda-oracle +Requires: pcp-pmda-samba pcp-pmda-slurm pcp-pmda-vmware pcp-pmda-zimbra Requires: pcp-pmda-dm pcp-pmda-apache Requires: pcp-pmda-bash pcp-pmda-cisco pcp-pmda-gfs2 pcp-pmda-lmsensors pcp-pmda-mailq pcp-pmda-mounts Requires: pcp-pmda-nvidia-gpu pcp-pmda-roomtemp pcp-pmda-sendmail pcp-pmda-shping Requires: pcp-pmda-lustrecomm pcp-pmda-logger %if !%{disable_python2} || !%{disable_python3} -Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound +Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic +%endif +%if !%{disable_snmp} +Requires: pcp-pmda-snmp %endif %if !%{disable_json} Requires: pcp-pmda-json @@ -1466,6 +1557,11 @@ Group: Development/Libraries Summary: Performance Co-Pilot (PCP) Python bindings and documentation URL: http://www.pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +%if 0%{?rhel} == 5 +Requires: python%{default_python} +%else +Requires: python +%endif %description -n python-pcp This python PCP module contains the language bindings for @@ -1483,6 +1579,7 @@ Group: Development/Libraries Summary: Performance Co-Pilot (PCP) Python3 bindings and documentation URL: http://www.pcp.io Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +Requires: python3 %description -n python3-pcp This python PCP module contains the language bindings for @@ -1558,9 +1655,12 @@ PCP utilities and daemons, and the PCP graphical tools. %prep %setup -q -%setup -q -T -D -a 1 +%setup -q -T -D -a 1 -c -n pcp-%{version}/vector +%setup -q -T -D -a 2 %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %clean rm -Rf $RPM_BUILD_ROOT @@ -1569,7 +1669,7 @@ rm -Rf $RPM_BUILD_ROOT %if !%{disable_python2} && 0%{?default_python} != 3 export PYTHON=python%{?default_python} %endif -%configure %{?_with_initd} %{?_with_doc} %{?_with_ib} %{?_with_papi} %{?_with_perfevent} %{?_with_json} +%configure %{?_with_initd} %{?_with_doc} %{?_with_ib} %{?_with_papi} %{?_with_perfevent} %{?_with_json} %{?_with_snmp} make %{?_smp_mflags} default_pcp %install @@ -1585,8 +1685,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a # remove sheet2pcp until BZ 830923 and BZ 754678 are resolved. rm -f $RPM_BUILD_ROOT/%{_bindir}/sheet2pcp $RPM_BUILD_ROOT/%{_mandir}/man1/sheet2pcp.1* -# remove configsz.h as this is not multilib friendly. +# remove {config,platform}sz.h as these are not multilib friendly. rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/configsz.h +rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/platformsz.h %if %{disable_microhttpd} rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmwebd @@ -1594,8 +1695,12 @@ rm -fr $RPM_BUILD_ROOT/%{_initddir}/pmwebd rm -fr $RPM_BUILD_ROOT/%{_unitdir}/pmwebd.service rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd %endif +# prefer latest released Netflix version over pcp-webjs copy. +rm -fr pcp-webjs/vector +sed -i -e 's/vector [0-9]\.[0-9]*\.[0-9]*/vector/g' pcp-webjs/index.html mv pcp-webjs/* $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps rmdir pcp-webjs +mv vector $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps %if %{disable_infiniband} # remove pmdainfiniband on platforms lacking IB devel packages. @@ -1646,11 +1751,13 @@ ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\ grep -E -v '^news' |\ grep -E -v '^nfsclient' |\ grep -E -v '^nginx' |\ + grep -E -v '^oracle' |\ grep -E -v '^pdns' |\ grep -E -v '^postfix' |\ grep -E -v '^postgresql' |\ grep -E -v '^rsyslog' |\ grep -E -v '^samba' |\ + grep -E -v '^slurm' |\ grep -E -v '^snmp' |\ grep -E -v '^vmware' |\ grep -E -v '^zimbra' |\ @@ -1673,6 +1780,7 @@ ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\ grep -E -v '^weblog' |\ grep -E -v '^rpm' |\ grep -E -v '^json' |\ + grep -E -v '^mic' |\ grep -E -v '^gluster' |\ grep -E -v '^zswap' |\ grep -E -v '^unbound' |\ @@ -1680,8 +1788,9 @@ ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\ # all base pcp package files except those split out into sub packages ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ - grep -E -v 'pmiostat|pmcollectl|pmatop|pcp2graphite' |\ - sed -e 's#^#'%{_bindir}'\/#' >base_bin.list + grep -E -v 'pmiostat|pmcollectl|pmatop|pmrep|pcp2graphite|zabbix|zbxpcp' |\ + grep -E -v 'pmdbg|pmclient|pmerr|genpmda' |\ +sed -e 's#^#'%{_bindir}'\/#' >base_bin.list # # Separate the pcp-system-tools package files. # @@ -1689,7 +1798,7 @@ ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ # pcp(1) sub-command variants so must also be in pcp-system-tools. %if !%{disable_python2} || !%{disable_python3} ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ - grep -E 'pmiostat|pmcollectl|pmatop' |\ + grep -E 'pmiostat|pmcollectl|pmatop|pmrep' |\ sed -e 's#^#'%{_bindir}'\/#' >pcp_system_tools.list ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ grep -E 'atop|collectl|dmcache|free|iostat|numastat|verify|uptime|shping' |\ @@ -1725,6 +1834,9 @@ ls -1 $RPM_BUILD_ROOT/%{_mandir}/man3 |\ sed -e 's#^#'%{_mandir}'\/man3\/#' | grep -v '3pm' >>pcp-doc.list ls -1 $RPM_BUILD_ROOT/%{_datadir}/pcp/demos |\ sed -e 's#^#'%{_datadir}'\/pcp\/demos\/#' | grep -E -v tutorials >> devel.list +ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ +grep -E 'pmdbg|pmclient|pmerr|genpmda' |\ +sed -e 's#^#'%{_bindir}'\/#' >>devel.list %pre testsuite test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir} @@ -1762,7 +1874,7 @@ save_configs_script() [ "$_dir" = "$_new" ] && continue if [ -d "$_dir" ] then - ( cd "$_dir" ; find . -type f -print ) | sed -e 's/^\.\///' \ + ( cd "$_dir" ; find . -maxdepth 1 -type f ) | sed -e 's/^\.\///' \ | while read _file do [ "$_file" = "control" ] && continue @@ -1790,7 +1902,7 @@ done for daemon in pmcd pmproxy do save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_SYSCONF_DIR/$daemon"\ - "$PCP_CONFIG_DIR/$daemon" /etc/$daemon /etc/sysconfig/$daemon + "$PCP_CONFIG_DIR/$daemon" /etc/$daemon done exit 0 @@ -1820,6 +1932,184 @@ then %endif fi +%if !%{disable_rpm} +%preun pmda-rpm +%{pmda_remove "$1" "rpm"} +%endif #preun pmda-rpm + +%if !%{disable_papi} +%preun pmda-papi +%{pmda_remove "$1" "papi"} +%endif #preun pmda-papi + +%if !%{disable_systemd} +%preun pmda-systemd +%{pmda_remove "$1" "systemd"} +%endif #preun pmda-systemd + +%if !%{disable_infiniband} +%preun pmda-infiniband +%{pmda_remove "$1" "infiniband"} +%endif #preun pmda-infiniband + +%if !%{disable_perfevent} +%preun pmda-perfevent +%{pmda_remove "$1" "perfevent"} +%endif #preun pmda-perfevent + +%if !%{disable_json} +%preun pmda-json +%{pmda_remove "$1" "json"} +%endif #preun pmda-json + +%preun pmda-nginx +%{pmda_remove "$1" "nginx"} + +%preun pmda-oracle +%{pmda_remove "$1" "oracle"} + +%preun pmda-postgresql +%{pmda_remove "$1" "postgresql"} + +%preun pmda-postfix +%{pmda_remove "$1" "postfix"} + +%preun pmda-elasticsearch +%{pmda_remove "$1" "elasticsearch"} + +%if !%{disable_snmp} +%preun pmda-snmp +%{pmda_remove "$1" "snmp"} +%endif + +%preun pmda-mysql +%{pmda_remove "$1" "mysql"} + +%preun pmda-activemq +%{pmda_remove "$1" "activemq"} + +%preun pmda-bonding +%{pmda_remove "$1" "bonding"} + +%preun pmda-dbping +%{pmda_remove "$1" "dbping"} + +%preun pmda-ds389 +%{pmda_remove "$1" "ds389"} + +%preun pmda-ds389log +%{pmda_remove "$1" "ds389log"} + +%preun pmda-gpfs +%{pmda_remove "$1" "gpfs"} + +%preun pmda-gpsd +%{pmda_remove "$1" "gpsd"} + +%preun pmda-kvm +%{pmda_remove "$1" "kvm"} + +%preun pmda-lustre +%{pmda_remove "$1" "lustre"} + +%preun pmda-lustrecomm +%{pmda_remove "$1" "lustrecomm"} + +%preun pmda-memcache +%{pmda_remove "$1" "memcache"} + +%preun pmda-named +%{pmda_remove "$1" "named"} + +%preun pmda-netfilter +%{pmda_remove "$1" "netfilter"} + +%preun pmda-news +%{pmda_remove "$1" "news"} + +%preun pmda-nfsclient +%{pmda_remove "$1" "nfsclient"} + +%preun pmda-pdns +%{pmda_remove "$1" "pdns"} + +%preun pmda-rsyslog +%{pmda_remove "$1" "rsyslog"} + +%preun pmda-samba +%{pmda_remove "$1" "samba"} + +%preun pmda-vmware +%{pmda_remove "$1" "vmware"} + +%preun pmda-zimbra +%{pmda_remove "$1" "zimbra"} + +%preun pmda-dm +%{pmda_remove "$1" "dm"} + +%if !%{disable_python2} || !%{disable_python3} +%preun pmda-gluster +%{pmda_remove "$1" "gluster"} + +%preun pmda-zswap +%{pmda_remove "$1" "zswap"} + +%preun pmda-unbound +%{pmda_remove "$1" "unbound"} + +%preun pmda-mic +%{pmda_remove "$1" "mic"} +%endif # !%{disable_python[2,3]} + +%preun pmda-apache +%{pmda_remove "$1" "apache"} + +%preun pmda-bash +%{pmda_remove "$1" "bash"} + +%preun pmda-cifs +%{pmda_remove "$1" "cifs"} + +%preun pmda-cisco +%{pmda_remove "$1" "cisco"} + +%preun pmda-gfs2 +%{pmda_remove "$1" "gfs2"} + +%preun pmda-lmsensors +%{pmda_remove "$1" "lmsensors"} + +%preun pmda-logger +%{pmda_remove "$1" "logger"} + +%preun pmda-mailq +%{pmda_remove "$1" "mailq"} + +%preun pmda-mounts +%{pmda_remove "$1" "mounts"} + +%preun pmda-nvidia-gpu +%{pmda_remove "$1" "nvidia"} + +%preun pmda-roomtemp +%{pmda_remove "$1" "roomtemp"} + +%preun pmda-sendmail +%{pmda_remove "$1" "sendmail"} + +%preun pmda-shping +%{pmda_remove "$1" "shping"} + +%preun pmda-summary +%{pmda_remove "$1" "summary"} + +%preun pmda-trace +%{pmda_remove "$1" "trace"} + +%preun pmda-weblog +%{pmda_remove "$1" "weblog"} + %preun if [ "$1" -eq 0 ] then @@ -1951,7 +2241,7 @@ cd # C source files that rpmlint complains about. These are not devel files, # but rather they are (slightly obscure) PMDA config files. # -%doc CHANGELOG COPYING INSTALL README VERSION.pcp pcp.lsm +%doc CHANGELOG COPYING INSTALL.md README.md VERSION.pcp pcp.lsm %dir %{_confdir} %dir %{_pmdasdir} @@ -1968,6 +2258,7 @@ cd %{_datadir}/pcp/lib/bashproc.sh %{_datadir}/pcp/lib/lockpmns %{_datadir}/pcp/lib/pmdaproc.sh +%{_datadir}/pcp/lib/utilproc.sh %{_datadir}/pcp/lib/rc-proc.sh %{_datadir}/pcp/lib/rc-proc.sh.minimal %{_datadir}/pcp/lib/unlockpmns @@ -1992,9 +2283,10 @@ cd %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(noreplace) %{_sysconfdir}/sysconfig/pmlogger +%config(noreplace) %{_sysconfdir}/sysconfig/pmproxy +%config(noreplace) %{_sysconfdir}/sysconfig/pmcd %config %{_sysconfdir}/pcp.env -%config %{_sysconfdir}/pcp.sh %dir %{_confdir}/pmcd %config(noreplace) %{_confdir}/pmcd/pmcd.conf %config(noreplace) %{_confdir}/pmcd/pmcd.options @@ -2002,9 +2294,14 @@ cd %dir %{_confdir}/pmproxy %config(noreplace) %{_confdir}/pmproxy/pmproxy.options %dir %{_confdir}/pmie +%dir %{_confdir}/pmie/control.d %config(noreplace) %{_confdir}/pmie/control +%config(noreplace) %{_confdir}/pmie/control.d/local %dir %{_confdir}/pmlogger +%dir %{_confdir}/pmlogger/control.d %config(noreplace) %{_confdir}/pmlogger/control +%config(noreplace) %{_confdir}/pmlogger/control.d/local +%dir %attr(0775,pcp,pcp) %{_confdir}/nssdb %{_localstatedir}/lib/pcp/config/pmafm %dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmie @@ -2016,15 +2313,13 @@ cd %{_localstatedir}/lib/pcp/config/pmlogrewrite %dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmda +%{_datadir}/bash-completion/completions/pcp +%{_datadir}/zsh/site-functions/_pcp + %if !%{disable_sdt} %{tapsetdir}/pmcd.stp %endif -%if %{with_compat} -%files compat -#empty -%endif - %files monitor #empty @@ -2036,6 +2331,8 @@ cd %{_includedir}/pcp/builddefs %{_includedir}/pcp/buildrules %config %{_sysconfdir}/pcp.conf +%dir %{_localstatedir}/lib/pcp/config/derived +%config %{_localstatedir}/lib/pcp/config/derived/* %files libs %{_libdir}/libpcp.so.3 @@ -2045,7 +2342,7 @@ cd %{_libdir}/libpcp_trace.so.2 %{_libdir}/libpcp_import.so.1 -%files libs-devel -f devel.list +%files libs-devel %{_libdir}/libpcp.so %{_libdir}/libpcp_gui.so %{_libdir}/libpcp_mmv.so @@ -2053,6 +2350,8 @@ cd %{_libdir}/libpcp_trace.so %{_libdir}/libpcp_import.so %{_includedir}/pcp/*.h + +%files devel -f devel.list %{_datadir}/pcp/examples # PMDAs that ship src and are not for production use @@ -2088,6 +2387,7 @@ cd %{_datadir}/pcp/webapps/*.png %{_datadir}/pcp/webapps/*.ico %{_datadir}/pcp/webapps/*.html +%{_datadir}/pcp/webapps/*.txt %{_datadir}/pcp/webapps/blinkenlights %files webapp-grafana @@ -2168,142 +2468,156 @@ cd %files pmda-gpfs %{_pmdasdir}/gpfs -%files pmda-gpsd -%{_pmdasdir}/gpsd +%files pmda-gpsd +%{_pmdasdir}/gpsd -%files pmda-kvm -%{_pmdasdir}/kvm +%files pmda-kvm +%{_pmdasdir}/kvm -%files pmda-lustre +%files pmda-lustre %{_pmdasdir}/lustre %files pmda-lustrecomm %{_pmdasdir}/lustrecomm -%files pmda-memcache -%{_pmdasdir}/memcache +%files pmda-memcache +%{_pmdasdir}/memcache + +%files pmda-mysql +%{_pmdasdir}/mysql -%files pmda-mysql -%{_pmdasdir}/mysql +%files pmda-named +%{_pmdasdir}/named -%files pmda-named -%{_pmdasdir}/named +%files pmda-netfilter +%{_pmdasdir}/netfilter -%files pmda-netfilter -%{_pmdasdir}/netfilter +%files pmda-news +%{_pmdasdir}/news -%files pmda-news -%{_pmdasdir}/news +%files pmda-nginx +%{_pmdasdir}/nginx -%files pmda-nginx -%{_pmdasdir}/nginx +%files pmda-nfsclient +%{_pmdasdir}/nfsclient -%files pmda-nfsclient -%{_pmdasdir}/nfsclient +%files pmda-oracle +%{_pmdasdir}/oracle -%files pmda-pdns -%{_pmdasdir}/pdns +%files pmda-pdns +%{_pmdasdir}/pdns -%files pmda-postfix -%{_pmdasdir}/postfix +%files pmda-postfix +%{_pmdasdir}/postfix -%files pmda-postgresql -%{_pmdasdir}/postgresql +%files pmda-postgresql +%{_pmdasdir}/postgresql -%files pmda-rsyslog -%{_pmdasdir}/rsyslog +%files pmda-rsyslog +%{_pmdasdir}/rsyslog %files pmda-samba %{_pmdasdir}/samba -%files pmda-snmp -%{_pmdasdir}/snmp +%if !%{disable_snmp} +%files pmda-snmp +%{_pmdasdir}/snmp +%endif + +%files pmda-slurm +%{_pmdasdir}/slurm -%files pmda-vmware -%{_pmdasdir}/vmware +%files pmda-vmware +%{_pmdasdir}/vmware -%files pmda-zimbra -%{_pmdasdir}/zimbra +%files pmda-zimbra +%{_pmdasdir}/zimbra -%files pmda-dm -%{_pmdasdir}/dm +%files pmda-dm +%{_pmdasdir}/dm %if !%{disable_python2} || !%{disable_python3} -%files pmda-gluster -%{_pmdasdir}/gluster +%files pmda-gluster +%{_pmdasdir}/gluster + +%files pmda-zswap +%{_pmdasdir}/zswap -%files pmda-zswap -%{_pmdasdir}/zswap +%files pmda-unbound +%{_pmdasdir}/unbound -%files pmda-unbound -%{_pmdasdir}/unbound +%files pmda-mic +%{_pmdasdir}/mic %files export-pcp2graphite %{_bindir}/pcp2graphite %endif # !%{disable_python2} || !%{disable_python3} +%files export-zabbix-agent +%{_libdir}/zabbix + %if !%{disable_json} %files pmda-json %{_pmdasdir}/json %endif -%files pmda-apache -%{_pmdasdir}/apache +%files pmda-apache +%{_pmdasdir}/apache -%files pmda-bash -%{_pmdasdir}/bash +%files pmda-bash +%{_pmdasdir}/bash -%files pmda-cifs -%{_pmdasdir}/cifs +%files pmda-cifs +%{_pmdasdir}/cifs -%files pmda-cisco -%{_pmdasdir}/cisco +%files pmda-cisco +%{_pmdasdir}/cisco -%files pmda-gfs2 -%{_pmdasdir}/gfs2 +%files pmda-gfs2 +%{_pmdasdir}/gfs2 -%files pmda-lmsensors -%{_pmdasdir}/lmsensors +%files pmda-lmsensors +%{_pmdasdir}/lmsensors -%files pmda-logger -%{_pmdasdir}/logger +%files pmda-logger +%{_pmdasdir}/logger -%files pmda-mailq -%{_pmdasdir}/mailq +%files pmda-mailq +%{_pmdasdir}/mailq -%files pmda-mounts -%{_pmdasdir}/mounts +%files pmda-mounts +%{_pmdasdir}/mounts -%files pmda-nvidia-gpu +%files pmda-nvidia-gpu %{_pmdasdir}/nvidia -%files pmda-roomtemp -%{_pmdasdir}/roomtemp +%files pmda-roomtemp +%{_pmdasdir}/roomtemp %if !%{disable_rpm} -%files pmda-rpm -%{_pmdasdir}/rpm +%files pmda-rpm +%{_pmdasdir}/rpm %endif -%files pmda-sendmail -%{_pmdasdir}/sendmail +%files pmda-sendmail +%{_pmdasdir}/sendmail -%files pmda-shping -%{_pmdasdir}/shping +%files pmda-shping +%{_pmdasdir}/shping -%files pmda-summary -%{_pmdasdir}/summary +%files pmda-summary +%{_pmdasdir}/summary %if !%{disable_systemd} -%files pmda-systemd -%{_pmdasdir}/systemd +%files pmda-systemd +%{_pmdasdir}/systemd %endif -%files pmda-trace -%{_pmdasdir}/trace +%files pmda-trace +%{_pmdasdir}/trace -%files pmda-weblog -%{_pmdasdir}/weblog +%files pmda-weblog +%{_pmdasdir}/weblog %files -n perl-PCP-PMDA -f perl-pcp-pmda.list @@ -2336,9 +2650,45 @@ cd %if !%{disable_python2} || !%{disable_python3} %files -n pcp-system-tools -f pcp_system_tools.list +%dir %{_confdir}/pmrep +%config(noreplace) %{_confdir}/pmrep/pmrep.conf %endif %changelog +* Fri Aug 26 2016 Lukas Berk - 3.11.3-4 +- pcp-pmda-ds389log uses dirsrv user instead of nobody + +* Fri Aug 05 2016 Nathan Scott - 3.11.3-3 +- Install the missing /etc/pcp/nssdb directory (BZ 1360206) +- pcp-pmda-ds389 requires perl-LDAP dependency (BZ 1357605) +- Switch pcp-pmda-ds389log to the dirsrv user (BZ 1357607) +- pcp-pmda-ds389log requires perl-Date-Manip (BZ 1354055) +- Remove multi-archive loglabel timezone check (BZ 1351223) + +* Thu Jul 07 2016 Nathan Scott - 3.11.3-2 +- Export filesys metrics with persistent DM naming (BZ 1349932) + +* Fri Jun 17 2016 Nathan Scott - 3.11.3-1 +- Latest upstream PCP, dropping all earlier patches (BZ 1284307) +- Minimal package dependencies for PMAPI applications (BZ 1298993) +- Resolve perl Net:SNMP pmdasnmp dependency problem (BZ 1332624) +- Improve time taken to detect pmcd startup failure (BZ 1336210) +- Fix cron service stopping disabled pmie/pmlogger (BZ 1336792) +- Fix instance domain handling in derived metrics (BZ 1337212) +- Include latest Oracle database PMDA enhancements (BZ 1340430) +- Workaround valgrind failure for pmmgr test case (BZ 1343319) + +* Mon May 02 2016 Nathan Scott - 3.11.2-1 +- Improve PMAPI python clients signal handling (BZ 1238550) +- Fix issues in postfix PMDA search for mail log (BZ 1252308) +- Fix local_sock() souble free error in perl API (BZ 1258860) +- Fix sigsegv in pcp-uptime(1) --archive option (BZ 1262721) +- Update to current stable PCP version (BZ 1284307) +- Fix pcp-compat dependency drawing in many packages (BZ 1293466) +- Support for per-processor softnet kernel metrics (BZ 1316085) +- Fix GFS2 PMDA Install script PMNS parsing error (BZ 1320591) +- Report Docker version 1.10+ container information (BZ 1327737) + * Mon Aug 24 2015 Nathan Scott - 3.10.6-2 - Fixes targetting several QE reported test failures (BZ 1241591) - Remove tool-specific interval settings for pmlogconf (BZ 1243809)