From f4f94002b875d066e85754fd9ad94b6799e782b4566410b636b535f5f4425c14 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 9 Feb 2021 21:45:47 +0000 Subject: [PATCH 1/8] Accepting request 870679 from home:dmdiss:pcp_522 - Upgrade to 5.2.2; (jsc#SLE-16929) + improvements to client tools and utilities + new pmdabpftrace monitoring agent + pmdaperfevent enhancements + pmproxy, libpcp_web and libpcp hardening and improvements + assorted bug fixes + obsolete pcp-manager discovery service, now provided by pmfind + improved FHS compliance - Remove upstreamed: + 0001-Add-missing-includes-in-Qt-5.15-beta2.patch - Rebase against upstream (faeb2507f): + 0001-Install-libraries-without-exec-permission.patch - Fix build with -fno-common; (bsc#1160411) - Merge upstream build-time tmpdir fixes + 0007-pmns-Make-drop-duplicate-if-else.patch + 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch OBS-URL: https://build.opensuse.org/request/show/870679 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=98 --- ...dd-missing-includes-in-Qt-5.15-beta2.patch | 116 -- ...ll-libraries-without-exec-permission.patch | 344 +++-- 0007-pmns-Make-drop-duplicate-if-else.patch | 36 + ...H-1140-PCP_TMPFILE_DIR-used-in-build.patch | 111 ++ _service | 2 +- pcp-4.3.4.tar.bz2 | 3 - pcp-5.2.2.tar.bz2 | 3 + pcp.changes | 20 + pcp.spec | 1107 ++++++++++------- 9 files changed, 1059 insertions(+), 683 deletions(-) delete mode 100644 0001-Add-missing-includes-in-Qt-5.15-beta2.patch create mode 100644 0007-pmns-Make-drop-duplicate-if-else.patch create mode 100644 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch delete mode 100644 pcp-4.3.4.tar.bz2 create mode 100644 pcp-5.2.2.tar.bz2 diff --git a/0001-Add-missing-includes-in-Qt-5.15-beta2.patch b/0001-Add-missing-includes-in-Qt-5.15-beta2.patch deleted file mode 100644 index 1044a28..0000000 --- a/0001-Add-missing-includes-in-Qt-5.15-beta2.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 04e083361da6c1f4ca4f58341ab9f2b9a6fdf892 Mon Sep 17 00:00:00 2001 -From: Antonio Larrosa -Date: Fri, 27 Mar 2020 13:32:53 +0100 -Subject: [PATCH] Add missing includes in Qt 5.15 beta2 - -Submitted to upstream in https://github.com/performancecopilot/pcp/pull/868 - ---- - src/libpcp_qwt/src/qwt_compass_rose.cpp | 1 + - src/libpcp_qwt/src/qwt_dial_needle.cpp | 1 + - src/libpcp_qwt/src/qwt_null_paintdevice.cpp | 1 + - src/libpcp_qwt/src/qwt_painter.cpp | 1 + - src/libpcp_qwt/src/qwt_painter_command.h | 3 +-- - src/libpcp_qwt/src/qwt_plot_panner.cpp | 1 + - src/libpcp_qwt/src/qwt_plot_renderer.cpp | 1 + - src/libpcp_qwt/src/qwt_widget_overlay.cpp | 1 + - 8 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/libpcp_qwt/src/qwt_compass_rose.cpp b/src/libpcp_qwt/src/qwt_compass_rose.cpp -index 21a35f2444..d67175940b 100644 ---- a/src/libpcp_qwt/src/qwt_compass_rose.cpp -+++ b/src/libpcp_qwt/src/qwt_compass_rose.cpp -@@ -11,6 +11,7 @@ - #include "qwt_point_polar.h" - #include "qwt_painter.h" - #include -+#include - - static QPointF qwtIntersection( - QPointF p11, QPointF p12, QPointF p21, QPointF p22 ) -diff --git a/src/libpcp_qwt/src/qwt_dial_needle.cpp b/src/libpcp_qwt/src/qwt_dial_needle.cpp -index 1b53a3d5b3..694f7f2bb5 100644 ---- a/src/libpcp_qwt/src/qwt_dial_needle.cpp -+++ b/src/libpcp_qwt/src/qwt_dial_needle.cpp -@@ -13,6 +13,7 @@ - #include "qwt_painter.h" - #include - #include -+#include - - #if QT_VERSION < 0x040601 - #define qFastSin(x) qSin(x) -diff --git a/src/libpcp_qwt/src/qwt_null_paintdevice.cpp b/src/libpcp_qwt/src/qwt_null_paintdevice.cpp -index db1611da25..b9b5dafb65 100644 ---- a/src/libpcp_qwt/src/qwt_null_paintdevice.cpp -+++ b/src/libpcp_qwt/src/qwt_null_paintdevice.cpp -@@ -9,6 +9,7 @@ - - #include "qwt_null_paintdevice.h" - #include -+#include - #include - - class QwtNullPaintDevice::PrivateData -diff --git a/src/libpcp_qwt/src/qwt_painter.cpp b/src/libpcp_qwt/src/qwt_painter.cpp -index 0501298b18..18d8939028 100644 ---- a/src/libpcp_qwt/src/qwt_painter.cpp -+++ b/src/libpcp_qwt/src/qwt_painter.cpp -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/src/libpcp_qwt/src/qwt_painter_command.h b/src/libpcp_qwt/src/qwt_painter_command.h -index 2da597a7fa..612a0fb260 100644 ---- a/src/libpcp_qwt/src/qwt_painter_command.h -+++ b/src/libpcp_qwt/src/qwt_painter_command.h -@@ -15,8 +15,7 @@ - #include - #include - #include -- --class QPainterPath; -+#include - - /*! - QwtPainterCommand represents the attributes of a paint operation -diff --git a/src/libpcp_qwt/src/qwt_plot_panner.cpp b/src/libpcp_qwt/src/qwt_plot_panner.cpp -index 62a75a2fb3..b242acceab 100644 ---- a/src/libpcp_qwt/src/qwt_plot_panner.cpp -+++ b/src/libpcp_qwt/src/qwt_plot_panner.cpp -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - static QBitmap qwtBorderMask( const QWidget *canvas, const QSize &size ) - { -diff --git a/src/libpcp_qwt/src/qwt_plot_renderer.cpp b/src/libpcp_qwt/src/qwt_plot_renderer.cpp -index 3416f98062..33c4c932e6 100644 ---- a/src/libpcp_qwt/src/qwt_plot_renderer.cpp -+++ b/src/libpcp_qwt/src/qwt_plot_renderer.cpp -@@ -18,6 +18,7 @@ - #include "qwt_text_label.h" - #include "qwt_math.h" - #include -+#include - #include - #include - #include -diff --git a/src/libpcp_qwt/src/qwt_widget_overlay.cpp b/src/libpcp_qwt/src/qwt_widget_overlay.cpp -index d2b4220c4d..cdc3d16fef 100644 ---- a/src/libpcp_qwt/src/qwt_widget_overlay.cpp -+++ b/src/libpcp_qwt/src/qwt_widget_overlay.cpp -@@ -10,6 +10,7 @@ - #include "qwt_widget_overlay.h" - #include "qwt_painter.h" - #include -+#include - #include - #include - #include diff --git a/0001-Install-libraries-without-exec-permission.patch b/0001-Install-libraries-without-exec-permission.patch index 5e85dc6..0659818 100644 --- a/0001-Install-libraries-without-exec-permission.patch +++ b/0001-Install-libraries-without-exec-permission.patch @@ -50,7 +50,7 @@ Index: pcp/src/libpcp/src/GNUmakefile =================================================================== --- pcp.orig/src/libpcp/src/GNUmakefile +++ pcp/src/libpcp/src/GNUmakefile -@@ -124,7 +124,7 @@ endif +@@ -125,7 +125,7 @@ endif install : default ifneq ($(LIBTARGET),) @@ -59,7 +59,7 @@ Index: pcp/src/libpcp/src/GNUmakefile $(INSTALL) -m 644 $(LIBCONFIG) $(PCP_LIB_DIR)/pkgconfig/$(LIBCONFIG) endif ifneq ($(SYMTARGET),) -@@ -133,7 +133,7 @@ ifneq ($(SYMTARGET),) +@@ -134,7 +134,7 @@ ifneq ($(SYMTARGET),) done endif ifneq ($(STATICLIBTARGET),) @@ -72,7 +72,7 @@ Index: pcp/src/libpcp_fault/src/GNUmakefile =================================================================== --- pcp.orig/src/libpcp_fault/src/GNUmakefile +++ pcp/src/libpcp_fault/src/GNUmakefile -@@ -145,7 +145,7 @@ endif +@@ -150,7 +150,7 @@ endif install : default ifneq ($(LIBTARGET),) @@ -81,7 +81,7 @@ Index: pcp/src/libpcp_fault/src/GNUmakefile endif ifneq ($(SYMTARGET),) for tt in $(SYMTARGET); do \ -@@ -153,7 +153,7 @@ ifneq ($(SYMTARGET),) +@@ -158,7 +158,7 @@ ifneq ($(SYMTARGET),) done endif ifneq ($(STATICLIBTARGET),) @@ -211,99 +211,50 @@ Index: pcp/src/libpcp_trace/src/GNUmakefile endif default_pcp : default -Index: pcp/src/pmdas/aix/GNUmakefile -=================================================================== ---- pcp.orig/src/pmdas/aix/GNUmakefile -+++ pcp/src/pmdas/aix/GNUmakefile -@@ -44,7 +44,8 @@ build-me: common.h root_aix $(CMDTARGET) - install: build-me - $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h help.dir help.pag $(PMDADIR) -- $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 644 root_aix $(PCP_VAR_DIR)/pmns/root_aix - else - build-me: -Index: pcp/src/pmdas/darwin/GNUmakefile -=================================================================== ---- pcp.orig/src/pmdas/darwin/GNUmakefile -+++ pcp/src/pmdas/darwin/GNUmakefile -@@ -48,7 +48,8 @@ build-me: root_darwin $(LIBTARGET) $(CMD - install: build-me - $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h help.dir help.pag $(PMDADIR) -- $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 644 root_darwin $(PCP_VAR_DIR)/pmns/root_darwin - else - build-me: -Index: pcp/src/pmdas/freebsd/GNUmakefile -=================================================================== ---- pcp.orig/src/pmdas/freebsd/GNUmakefile -+++ pcp/src/pmdas/freebsd/GNUmakefile -@@ -49,7 +49,8 @@ build-me: $(LIBTARGET) $(CMDTARGET) help - install: default - $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h help help.dir help.pag $(PMDADIR) -- $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 644 root_freebsd $(PCP_VAR_DIR)/pmns/root_freebsd - $(INSTALL) -m 644 freebsd_disk_units.conf $(LOGREWRITEDIR)/freebsd_disk_units.conf - $(INSTALL) -m 644 freebsd_misc.conf $(LOGREWRITEDIR)/freebsd_misc.conf Index: pcp/src/pmdas/linux/GNUmakefile =================================================================== --- pcp.orig/src/pmdas/linux/GNUmakefile +++ pcp/src/pmdas/linux/GNUmakefile -@@ -88,7 +88,8 @@ install: default - $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 644 domain.h help $(HELPTARGETS) $(PMDADIR) - $(INSTALL) -m 644 bandwidth.conf $(PMDADIR)/samplebandwidth.conf -- $(INSTALL) -m 755 $(LIBTARGET) $(CMDTARGET) $(PMDADIR) -+ $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 644 root_linux $(PCP_VAR_DIR)/pmns/root_linux - $(INSTALL) -m 644 proc_fs_nfsd_fixups.conf $(LOGREWRITEDIR)/linux_proc_fs_nfsd_fixups.conf - $(INSTALL) -m 644 proc_net_snmp_migrate.conf $(LOGREWRITEDIR)/linux_proc_net_snmp_migrate.conf +@@ -89,10 +89,10 @@ build-me: $(LIBTARGET) $(CMDTARGET) $(HE + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help $(HELPTARGETS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help $(HELPTARGETS) $(LIBTARGET) $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDACONFIG) + $(INSTALL) -m 644 -t $(PMDATMPDIR)/samplebandwidth.conf bandwidth.conf $(PMDACONFIG)/samplebandwidth.conf +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR)/$(CMDTARGET) $(CMDTARGET) $(PMDAADMDIR)/$(CMDTARGET) + $(INSTALL) -m 644 -t $(PCP_PMNS_DIR)/root_linux root_linux $(PCP_PMNSADM_DIR)/root_linux + $(INSTALL) -m 644 -t $(REWRITEVARDIR)/linux_proc_fs_nfsd_fixups.conf proc_fs_nfsd_fixups.conf $(REWRITEDIR)/linux_proc_fs_nfsd_fixups.conf + $(INSTALL) -m 644 -t $(REWRITEVARDIR)/linux_proc_net_snmp_migrate.conf proc_net_snmp_migrate.conf $(REWRITEDIR)/linux_proc_net_snmp_migrate.conf Index: pcp/src/pmdas/linux_proc/GNUmakefile =================================================================== --- pcp.orig/src/pmdas/linux_proc/GNUmakefile +++ pcp/src/pmdas/linux_proc/GNUmakefile -@@ -69,7 +69,8 @@ build-me: root_proc $(LIBTARGET) $(CMDTA +@@ -73,10 +73,10 @@ build-me: root_proc $(LIBTARGET) $(CMDTA install: default - $(INSTALL) -m 755 -d $(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 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(SCRIPTS) $(PMDADIR) - $(INSTALL) -m 644 root_proc $(PCP_VAR_DIR)/pmns/root_proc - $(INSTALL) -m 644 $(LOGREWRITERS) $(PCP_VAR_DIR)/config/pmlogrewrite - @$(INSTALL_MAN) -Index: pcp/src/pmdas/lustrecomm/GNUmakefile -=================================================================== ---- pcp.orig/src/pmdas/lustrecomm/GNUmakefile -+++ pcp/src/pmdas/lustrecomm/GNUmakefile -@@ -51,7 +51,7 @@ build-me: $(TARGETS) - install: default - $(INSTALL) -m 755 -d $(PMDADIR) - $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/$(CMDTARGET) -- #$(INSTALL) -m 755 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) -+ #$(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 755 Install Remove $(PMDADIR) - $(INSTALL) -m 644 $(DFILES) root pmns domain.h help $(PMDADIR) + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_proc $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_proc $(LIBTARGET) $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDACONFIG) + $(INSTALL) -m 644 -t $(PMDATMPDIR)/samplehotproc.conf samplehotproc.conf $(PMDACONFIG)/samplehotproc.conf +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PCP_PMNS_DIR)/root_proc root_proc $(PCP_PMNSADM_DIR)/root_proc + $(INSTALL) -m 644 -t $(REWRITEVARDIR) $(LOGREWRITERS) $(REWRITEDIR) @$(INSTALL_MAN) Index: pcp/src/pmdas/pmcd/src/GNUmakefile =================================================================== --- pcp.orig/src/pmdas/pmcd/src/GNUmakefile +++ pcp/src/pmdas/pmcd/src/GNUmakefile -@@ -55,7 +55,7 @@ default: $(LIBTARGET) - +@@ -59,7 +59,7 @@ default: $(LIBTARGET) install: default - $(INSTALL) -m 755 -d $(PCP_PMDAS_DIR)/pmcd -- $(INSTALL) -m 755 $(LIBTARGET) $(PCP_PMDAS_DIR)/pmcd/$(LIBTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PCP_PMDAS_DIR)/pmcd/$(LIBTARGET) + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR)/$(LIBTARGET) $(LIBTARGET) $(PMDAADMDIR)/$(LIBTARGET) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR)/$(LIBTARGET) $(LIBTARGET) $(PMDAADMDIR)/$(LIBTARGET) include $(BUILDRULES) @@ -311,26 +262,217 @@ Index: pcp/src/pmdas/sendmail/GNUmakefile =================================================================== --- pcp.orig/src/pmdas/sendmail/GNUmakefile +++ pcp/src/pmdas/sendmail/GNUmakefile -@@ -40,7 +40,7 @@ include $(BUILDRULES) +@@ -44,8 +44,8 @@ install install_pcp: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) + $(INSTALL) -m 755 -t $(PMDATMPDIR)/pmda$(IAM)$(EXECSUFFIX) $(CMDTARGET) $(PMDAADMDIR)/pmda$(IAM)$(EXECSUFFIX) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(SCRIPTS) $(PMDAADMDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) $(DFILES) pmns help root domain.h $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) $(DFILES) pmns help root domain.h $(LIBTARGET) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PMCHARTVARDIR)/Sendmail Sendmail.pmchart $(PMCHARTDIR)/Sendmail - install install_pcp: default - $(INSTALL) -m 755 -d $(PMDADIR) -- $(INSTALL) -m 755 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) -+ $(INSTALL) -m 644 $(LIBTARGET) $(PMDADIR)/$(LIBTARGET) - $(INSTALL) -m 755 $(CMDTARGET) $(PMDADIR)/pmda$(IAM)$(EXECSUFFIX) - $(INSTALL) -m 755 $(SCRIPTS) $(PMDADIR) - $(INSTALL) -m 644 $(DFILES) pmns help root domain.h $(PMDADIR) -Index: pcp/src/pmdas/solaris/GNUmakefile + $(CMDTARGET): $(OBJECTS) +Index: pcp/src/libpcp_web/src/GNUmakefile =================================================================== ---- pcp.orig/src/pmdas/solaris/GNUmakefile -+++ pcp/src/pmdas/solaris/GNUmakefile -@@ -53,7 +53,8 @@ build-me: root_solaris $(LIBTARGET) $(CM - install: build-me - $(INSTALL) -m 755 -d $(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) - $(INSTALL) -m 644 root_solaris $(PCP_VAR_DIR)/pmns/root_solaris +--- pcp.orig/src/libpcp_web/src/GNUmakefile ++++ pcp/src/libpcp_web/src/GNUmakefile +@@ -84,7 +84,7 @@ endif + + install: default + ifneq ($(LIBTARGET),) +- $(INSTALL) -m 755 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) ++ $(INSTALL) -m 644 $(LIBTARGET) $(PCP_LIB_DIR)/$(LIBTARGET) + endif + ifneq ($(SYMTARGET),) + for tt in $(SYMTARGET); do \ +@@ -92,7 +92,7 @@ ifneq ($(SYMTARGET),) + done + endif + ifneq ($(STATICLIBTARGET),) +- $(INSTALL) -m 755 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) ++ $(INSTALL) -m 644 $(STATICLIBTARGET) $(PCP_LIB_DIR)/$(STATICLIBTARGET) + endif + + $(XFILES): +Index: pcp/src/pmdas/cifs/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/cifs/GNUmakefile ++++ pcp/src/pmdas/cifs/GNUmakefile +@@ -44,8 +44,8 @@ build-me: $(CMDTARGET) $(LIBTARGET) + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h help $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(CMDTARGET) $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h help $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(CMDTARGET) $(PMDAADMDIR) + @$(INSTALL_MAN) else build-me: +Index: pcp/src/pmdas/dm/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/dm/GNUmakefile ++++ pcp/src/pmdas/dm/GNUmakefile +@@ -56,8 +56,8 @@ install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) + $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help $(PMDAADMDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) root $(PMNSFILES) $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) root $(PMNSFILES) $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PMIEVARDIR)/data_high_util dmthin.data_high_util.pmie $(PMIEDIR)/data_high_util + $(INSTALL) -m 644 -t $(PMIEVARDIR)/metadata_high_util dmthin.metadata_high_util.pmie $(PMIEDIR)/metadata_high_util + @$(INSTALL_MAN) +Index: pcp/src/pmdas/docker/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/docker/GNUmakefile ++++ pcp/src/pmdas/docker/GNUmakefile +@@ -45,8 +45,8 @@ build-me: $(CMDTARGET) $(LIBTARGET) + install_pcp install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(CMDTARGET) $(LIBTARGET) $(PMDAADMDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h $(DFILES) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(CMDTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h $(DFILES) $(LIBTARGET) $(PMDAADMDIR) + @$(INSTALL_MAN) + else + build-me: +Index: pcp/src/pmdas/jbd2/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/jbd2/GNUmakefile ++++ pcp/src/pmdas/jbd2/GNUmakefile +@@ -57,8 +57,8 @@ build-me: $(LIBTARGET) $(CMDTARGET) $(HE + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help $(HELPTARGETS) root root_jbd2 $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help $(HELPTARGETS) root root_jbd2 $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PCP_PMNS_DIR)/root_jbd2 root_jbd2 $(PCP_PMNSADM_DIR)/root_jbd2 + $(INSTALL) -m 644 -t $(REWRITEVARDIR)/jbd2_kernel_ulong.conf jbd2_kernel_ulong.conf $(REWRITEDIR)/jbd2_kernel_ulong.conf + @$(INSTALL_MAN) +Index: pcp/src/pmdas/kvm/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/kvm/GNUmakefile ++++ pcp/src/pmdas/kvm/GNUmakefile +@@ -55,10 +55,10 @@ build-me: $(LIBTARGET) $(CMDTARGET) $(HE + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_kvm $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_kvm $(LIBTARGET) $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDACONFIG) + $(INSTALL) -m 644 -t $(PMDATMPDIR)/kvm.conf kvm.conf $(PMDACONFIG)/kvm.conf +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PCP_PMNS_DIR)/root_kvm root_kvm $(PCP_PMNSADM_DIR)/root_kvm + @$(INSTALL_MAN) + else +Index: pcp/src/pmdas/linux_xfs/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/linux_xfs/GNUmakefile ++++ pcp/src/pmdas/linux_xfs/GNUmakefile +@@ -57,8 +57,8 @@ build-me: $(LIBTARGET) $(CMDTARGET) $(HE + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_xfs $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_xfs $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PCP_PMNS_DIR)/root_xfs root_xfs $(PCP_PMNSADM_DIR)/root_xfs + $(INSTALL) -m 644 -t $(REWRITEVARDIR)/linux_xfs_migrate.conf linux_xfs_migrate.conf $(REWRITEDIR)/linux_xfs_migrate.conf + @$(INSTALL_MAN) +Index: pcp/src/pmdas/nvidia/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/nvidia/GNUmakefile ++++ pcp/src/pmdas/nvidia/GNUmakefile +@@ -37,9 +37,8 @@ include $(BUILDRULES) + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(PMDAADMDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) $(DFILES) root help pmns domain.h $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) Install Remove $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) $(DFILES) root help pmns domain.h $(LIBTARGET) $(PMDAADMDIR) + + $(OBJECTS): domain.h + +Index: pcp/src/pmdas/podman/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/podman/GNUmakefile ++++ pcp/src/pmdas/podman/GNUmakefile +@@ -48,8 +48,8 @@ build-me: $(LIBTARGET) $(CMDTARGET) $(HE + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_podman $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h help help.dir help.pag root root_podman $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(PCP_PMNS_DIR)/root_podman root_podman $(PCP_PMNSADM_DIR)/root_podman + @$(INSTALL_MAN) + else +Index: pcp/src/pmdas/rpm/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/rpm/GNUmakefile ++++ pcp/src/pmdas/rpm/GNUmakefile +@@ -51,8 +51,8 @@ build-me: $(CMDTARGET) $(LIBTARGET) + install_pcp install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h help $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(LIBTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h help $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + $(INSTALL) -m 644 -t $(REWRITEVARDIR)/rpm_migrate.conf migrate.conf $(REWRITEDIR)/rpm_migrate.conf + @$(INSTALL_MAN) + else +Index: pcp/src/pmdas/smart/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/smart/GNUmakefile ++++ pcp/src/pmdas/smart/GNUmakefile +@@ -48,8 +48,8 @@ build-me: $(CMDTARGET) $(LIBTARGET) + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h help $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) root pmns domain.h help $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) $(CMDTARGET) $(SCRIPTS) $(PMDAADMDIR) + @$(INSTALL_MAN) + else + build-me: +Index: pcp/src/pmdas/statsd/src/GNUmakefile +=================================================================== +--- pcp.orig/src/pmdas/statsd/src/GNUmakefile ++++ pcp/src/pmdas/statsd/src/GNUmakefile +@@ -68,8 +68,8 @@ build-me: $(RAGELTARGET).o $(CMDTARGET) + install: default + $(INSTALL) -m 755 -d $(PMDAADMDIR) + $(INSTALL) -m 755 -d $(PMDATMPDIR) +- $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h root_statsd $(PMDAADMDIR) +- $(INSTALL) -m 755 -t $(PMDATMPDIR) $(LIBTARGET) $(CMDTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 644 -t $(PMDATMPDIR) domain.h root_statsd $(LIBTARGET) $(PMDAADMDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR)/$(CMDTARGET) $(CMDTARGET) $(PMDAADMDIR)/$(CMDTARGET) + + CFILES += $(RFILES) + +Index: pcp/src/zabbix-agent/src/GNUmakefile +=================================================================== +--- pcp.orig/src/zabbix-agent/src/GNUmakefile ++++ pcp/src/zabbix-agent/src/GNUmakefile +@@ -43,7 +43,7 @@ install: default + $(INSTALL) -m 755 -d $(ZABBIX_DIR) + $(INSTALL) -m 755 -d $(MODULE_DIR) + $(INSTALL) -m 755 -d $(AGENT_DIR) +- $(INSTALL) -m 755 $(LIBTARGET) $(AGENT_DIR)/$(LIBTARGET) ++ $(INSTALL) -m 644 $(LIBTARGET) $(AGENT_DIR)/$(LIBTARGET) + $(INSTALL) -S $(AGENT_DIR)/$(LIBTARGET) $(MODULE_DIR)/$(LIBTARGET) + $(INSTALL) -m 755 -d $(CONFIG_DIR) + $(INSTALL) -m 644 $(LIBCONFIG) $(CONFIG_DIR)/$(LIBCONFIG) diff --git a/0007-pmns-Make-drop-duplicate-if-else.patch b/0007-pmns-Make-drop-duplicate-if-else.patch new file mode 100644 index 0000000..5d060b2 --- /dev/null +++ b/0007-pmns-Make-drop-duplicate-if-else.patch @@ -0,0 +1,36 @@ +From 7d35e45561eaba184711676f587118ff054d8f14 Mon Sep 17 00:00:00 2001 +From: David Disseldorp +Date: Tue, 10 Nov 2020 18:21:08 +0100 +Subject: [PATCH] pmns/Make: drop duplicate if/else + +As of 029add427a42344ea7129452c9e0fb286d3cf881, both the if and else +branches here match. Restoration of the previous build-time logic is +tracked via https://github.com/performancecopilot/pcp/issues/1140 and +will affect more scripts than just this one. + +Signed-off-by: David Disseldorp +--- + src/pmns/Make.stdpmid | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/pmns/Make.stdpmid b/src/pmns/Make.stdpmid +index 8eaaf94ce2..aa6cd74275 100755 +--- a/src/pmns/Make.stdpmid ++++ b/src/pmns/Make.stdpmid +@@ -16,15 +16,7 @@ + # source the PCP configuration environment variables + . $PCP_DIR/etc/pcp.env + +-if [ -d "$PCP_TMPFILE_DIR" ] +-then +- tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmns_stdpmid.XXXXXXXXX"` || exit 1 +-else +- # if configure --prefix is used in a the build, then $PCP_TMPFILE_DIR +- # may not yet exist ... /tmp is a safe bet +- # +- tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmns_stdpmid.XXXXXXXXX"` || exit 1 +-fi ++tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmns_stdpmid.XXXXXXXXX"` || exit 1 + status=1 + trap "rm -rf $tmp; exit \$status" 0 1 2 3 15 + diff --git a/0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch b/0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch new file mode 100644 index 0000000..da6c4a7 --- /dev/null +++ b/0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch @@ -0,0 +1,111 @@ +From adb769a8a9a56659774bc127a0bb7bc3527e4d25 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Fri, 29 Jan 2021 11:18:18 +1100 +Subject: [PATCH] fixes for GH #1140 - PCP_TMPFILE_DIR used in build + +$PCP_TMPFILE_DIR does double duty for both build time and run time +(some scripts are used in the build AND installed in the packages). + +As outlined in https://github.com/performancecopilot/pcp/issues/1140 +if, via configure options, $PCP_TMPFILE_DIR is set to something that +will be a directory after package installation, but does not exist +on the build machine, the build would fail. + +Change the files below to check if $PCP_TMPFILE_DIR is set and is +the name of an existing directory before using it, otherwise fallback +to /tmp. + +modified: src/libpcp/src/mk.exports +modified: src/libpcp/src/mk.pmdbg +modified: src/pmieconf/xtractnames +modified: src/pmns/Make.stdpmid +--- + src/libpcp/src/mk.exports | 10 +++++++++- + src/libpcp/src/mk.pmdbg | 9 ++++++++- + src/pmieconf/xtractnames | 10 +++++++++- + src/pmns/Make.stdpmid | 10 +++++++++- + 4 files changed, 35 insertions(+), 4 deletions(-) + +diff --git a/src/libpcp/src/mk.exports b/src/libpcp/src/mk.exports +index 2f4fdfefca..a22c15c2c8 100755 +--- a/src/libpcp/src/mk.exports ++++ b/src/libpcp/src/mk.exports +@@ -13,7 +13,15 @@ fi + + . ../../include/pcp.conf + +-tmp=`mktemp -d "$PCP_TMPFILE_DIR/pcp-build-mk.exports.XXXXXXXXX"` || exit 1 ++if [ -n "$PCP_TMPFILE_DIR" -a -d "$PCP_TMPFILE_DIR" ] ++then ++ tmp=`mktemp -d "$PCP_TMPFILE_DIR/pcp-build-mk.exports.XXXXXXXXX"` || exit 1 ++else ++ # assume run during a build and /tmp is a safe bet ++ # ++ tmp=`mktemp -d "/tmp/pcp-build-mk.exports.XXXXXXXXX"` || exit 1 ++fi ++ + sts=0 + trap "rm -rf $tmp; exit \$sts" 0 1 2 3 15 + +diff --git a/src/libpcp/src/mk.pmdbg b/src/libpcp/src/mk.pmdbg +index 174fd3f515..44e88ef92d 100755 +--- a/src/libpcp/src/mk.pmdbg ++++ b/src/libpcp/src/mk.pmdbg +@@ -45,7 +45,14 @@ then + exit 1 + fi + +-tmp=`mktemp -d "$PCP_TMPFILE_DIR/pcp-build-mk.pmdbg.XXXXXXXXX"` || exit 1 ++if [ -n "$PCP_TMPFILE_DIR" -a -d "$PCP_TMPFILE_DIR" ] ++then ++ tmp=`mktemp -d "$PCP_TMPFILE_DIR/pcp-build-mk.pmdbg.XXXXXXXXX"` || exit 1 ++else ++ # assume run during a build and /tmp is a safe bet ++ # ++ tmp=`mktemp -d "/tmp/pcp-build-mk.pmdbg.XXXXXXXXX"` || exit 1 ++fi + trap "rm -rf $tmp; exit 0" 0 1 2 3 15 + + rm -f pmdbg.h +diff --git a/src/pmieconf/xtractnames b/src/pmieconf/xtractnames +index 6178f362a3..b5986b5f86 100755 +--- a/src/pmieconf/xtractnames ++++ b/src/pmieconf/xtractnames +@@ -29,7 +29,15 @@ do + fi + done + +-tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmieconf-xtract.XXXXXXXXX"` || exit 1 ++if [ -n "$PCP_TMPFILE_DIR" -a -d "$PCP_TMPFILE_DIR" ] ++then ++ tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmieconf-xtract.XXXXXXXXX"` || exit 1 ++else ++ # assume run during a build and /tmp is a safe bet ++ # ++ tmp=`mktemp -d "/tmp/pmieconf-xtract.XXXXXXXXX"` || exit 1 ++fi ++ + trap "rm -rf $tmp; exit" 0 1 2 3 15 + + _usage() +diff --git a/src/pmns/Make.stdpmid b/src/pmns/Make.stdpmid +index aa6cd74275..4d06929c84 100755 +--- a/src/pmns/Make.stdpmid ++++ b/src/pmns/Make.stdpmid +@@ -16,7 +16,15 @@ + # source the PCP configuration environment variables + . $PCP_DIR/etc/pcp.env + +-tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmns_stdpmid.XXXXXXXXX"` || exit 1 ++if [ -n "$PCP_TMPFILE_DIR" -a -d "$PCP_TMPFILE_DIR" ] ++then ++ tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmns_stdpmid.XXXXXXXXX"` || exit 1 ++else ++ # assume run during a build and /tmp is a safe bet ++ # ++ tmp=`mktemp -d "/tmp/pmms_stdpmid.XXXXXXXXX"` || exit 1 ++fi ++ + status=1 + trap "rm -rf $tmp; exit \$status" 0 1 2 3 15 + diff --git a/_service b/_service index 787df1f..e7901f6 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ git https://github.com/performancecopilot/pcp.git pcp - 4.3.4 + 5.2.2 @PARENT_TAG@ disable diff --git a/pcp-4.3.4.tar.bz2 b/pcp-4.3.4.tar.bz2 deleted file mode 100644 index a100e71..0000000 --- a/pcp-4.3.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0cfff498a4af680055350a40d5cdfa776107921397ac4934ab5f8a9e7d5659e -size 32893034 diff --git a/pcp-5.2.2.tar.bz2 b/pcp-5.2.2.tar.bz2 new file mode 100644 index 0000000..fb439ac --- /dev/null +++ b/pcp-5.2.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d06de7e9c95b93f6282b13bc57ebd734f49c9c6302aa997b88cf0646f7afced +size 34249889 diff --git a/pcp.changes b/pcp.changes index b69055d..1284176 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Thu Nov 19 11:39:51 UTC 2020 - David Disseldorp + +- Upgrade to 5.2.2; (jsc#SLE-16929) + + improvements to client tools and utilities + + new pmdabpftrace monitoring agent + + pmdaperfevent enhancements + + pmproxy, libpcp_web and libpcp hardening and improvements + + assorted bug fixes + + obsolete pcp-manager discovery service, now provided by pmfind + + improved FHS compliance +- Remove upstreamed: + + 0001-Add-missing-includes-in-Qt-5.15-beta2.patch +- Rebase against upstream (faeb2507f): + + 0001-Install-libraries-without-exec-permission.patch +- Fix build with -fno-common; (bsc#1160411) +- Merge upstream build-time tmpdir fixes + + 0007-pmns-Make-drop-duplicate-if-else.patch + + 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch + ------------------------------------------------------------------- Wed Aug 19 11:33:20 UTC 2020 - Dominique Leuenberger diff --git a/pcp.spec b/pcp.spec index 23cdcef..c90d838 100644 --- a/pcp.spec +++ b/pcp.spec @@ -1,7 +1,7 @@ # # spec file for package pcp # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,6 +43,7 @@ %global license_lgplv2plus LGPL-2.0+ %global license_lgplv21plus LGPL-2.1+ %global license_mit MIT +%global _libexecdir %{_libdir} %else %global pcp_gr Applications/System %global lib_pkg pcp-libs @@ -72,7 +73,7 @@ Summary: System-level performance monitoring and performance management License: %{license_gplv2plus} AND %{license_lgplv2plus} AND %{license_cc_by} Group: %{pcp_gr} Name: pcp -Version: 4.3.4 +Version: 5.2.2 Release: 0 %global buildversion 1 @@ -92,8 +93,10 @@ Patch3: 0003-Remove-runlevel-4-from-init-scripts.patch Patch5: 0005-SUSE-fy-pmsnap-control-path.patch # PATCH-FIX-OPENSUSE, kkaempf@suse.de Patch6: 0006-pmsnap-control-var-www-srv-www.patch -# PATCH-FIX-UPSTREAM, Fix missing include with Qt 5.15 (alarrosa@suse.com) -Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch +# PATCH-FIX-UPSTREAM, ddiss@suse.de +Patch7: 0007-pmns-Make-drop-duplicate-if-else.patch +# PATCH-FIX-UPSTREAM, (queued) ddiss@suse.de +Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch %if 0%{?fedora} || 0%{?rhel} %global disable_selinux 0 @@ -114,9 +117,21 @@ Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch %endif %endif +# libvarlink and pmdapodman +%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +%global disable_podman 0 +%else +%global disable_podman 1 +%endif + +# libchan, libhdr_histogram and pmdastatsd +%if 0%{?fedora} >= 29 || 0%{?rhel} > 8 +%global disable_statsd 0 +%else +%global disable_statsd 1 +%endif + %global disable_sheet2pcp 1 -%global disable_microhttpd 0 -%global disable_cairo 0 %global disable_python2 0 # No python3 development environment before el8 @@ -141,6 +156,34 @@ Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch %global __python2 python %endif +%if 0%{?fedora} >= 24 || 0%{?rhel} > 7 +%global perl_interpreter perl-interpreter +%else +%global perl_interpreter perl +%endif + +# support for pmdabcc +%if 0%{?fedora} >= 25 || 0%{?rhel} > 6 +%ifarch s390 s390x armv7hl aarch64 i686 +%global disable_bcc 1 +%else +%global disable_bcc 0 +%endif +%else +%global disable_bcc 1 +%endif + +# support for pmdabpftrace +%if 0%{?fedora} >= 30 || 0%{?rhel} > 8 +%ifarch s390 s390x armv7hl aarch64 i686 +%global disable_bpftrace 1 +%else +%global disable_bpftrace 0 +%endif +%else +%global disable_bpftrace 1 +%endif + # support for pmdajson %if 0%{?rhel} == 0 || 0%{?rhel} > 6 %if !%{disable_python2} || !%{disable_python3} @@ -152,6 +195,17 @@ Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch %global disable_json 1 %endif +# No mssql ODBC driver on non-x86 platforms +%ifarch x86_64 +%if !%{disable_python2} || !%{disable_python3} +%global disable_mssql 0 +%else +%global disable_mssql 1 +%endif +%else +%global disable_mssql 1 +%endif + # support for pmdanutcracker (perl deps missing on rhel) %if 0%{?rhel} == 0 %global disable_nutcracker 0 @@ -195,13 +249,15 @@ Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch %endif %endif -%if 0%{?suse_version} && !%{disable_python3} -# SUSE doesn't currently ship the libvirt-python3 dependency -%global disable_libvirt 1 +# libuv async event library +%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 || 0%{?suse_version} +%global disable_libuv 0 %else -%global disable_libvirt 0 +%global disable_libuv 1 %endif +%global disable_libvirt 0 + %if 0%{?suse_version} # SUSE doesn't currently ship the python psycopg2 dependency %global disable_postgresql 1 @@ -222,8 +278,7 @@ Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch %global disable_xlsx 1 %endif -# python3-rtslib-fb not yet available on SUSE, see boo#1045332 -%if 0%{?suse_version} && !%{disable_python3} +%if 0%{?suse_version} <= 1500 && !%{disable_python3} %global disable_lio 1 %else %global disable_lio 0 @@ -233,6 +288,15 @@ Patch7: 0001-Add-missing-includes-in-Qt-5.15-beta2.patch Obsoletes: pcp-pmda-kvm < %{version} Provides: pcp-pmda-kvm +# PCP REST APIs are now provided by pmproxy +Obsoletes: pcp-webapi < 5.0.0 +Obsoletes: pcp-webapi-debuginfo < 5.0.0 +Provides: pcp-webapi + +# PCP discovery service now provided by pmfind +Obsoletes: pcp-manager < 5.2.0 +Obsoletes: pcp-manager-debuginfo < 5.2.0 + %if 0%{?suse_version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %else @@ -261,18 +325,23 @@ BuildRequires: python3-devel BuildRequires: cyrus-sasl-devel BuildRequires: ncurses-devel BuildRequires: readline-devel +%if !%{disable_podman} +BuildRequires: libvarlink-devel +%endif +%if !%{disable_statsd} +BuildRequires: HdrHistogram_c-devel +BuildRequires: chan-devel +BuildRequires: ragel +%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 !%{disable_sdt} BuildRequires: systemtap-sdt-devel %endif +%if !%{disable_libuv} +BuildRequires: libuv-devel >= 1.0 +%endif BuildRequires: openssl-devel >= 1.1.1 BuildRequires: perl-ExtUtils-MakeMaker %if 0%{?suse_version} @@ -337,23 +406,28 @@ Requires: initscripts Requires: %{lib_pkg} = %{version}-%{release} Obsoletes: pcp-pmda-nvidia < %{version} -%global tapsetdir %{_datadir}/systemtap/tapset - -%global _confdir %{_sysconfdir}/pcp -%global _logsdir %{_localstatedir}/log/pcp -%global _pmnsdir %{_localstatedir}/lib/pcp/pmns -%global _tempsdir %{_localstatedir}/lib/pcp/tmp -%global _pmdasdir %{_localstatedir}/lib/pcp/pmdas -%global _testsdir %{_localstatedir}/lib/pcp/testsuite -%global _selinuxdir %{_localstatedir}/lib/pcp/selinux -%global _logconfdir %{_localstatedir}/lib/pcp/config/pmlogconf +%global _confdir %{_sysconfdir}/pcp +%global _logsdir %{_localstatedir}/log/pcp +%global _pmnsdir %{_localstatedir}/lib/pcp/pmns +%global _pmnsexecdir %{_libexecdir}/pcp/pmns +%global _tempsdir %{_localstatedir}/lib/pcp/tmp +%global _pmdasdir %{_localstatedir}/lib/pcp/pmdas +%global _pmdasexecdir %{_libexecdir}/pcp/pmdas +%global _testsdir %{_localstatedir}/lib/pcp/testsuite +%global _selinuxdir %{_localstatedir}/lib/pcp/selinux +%global _selinuxexecdir %{_libexecdir}/pcp/selinux +%global _logconfdir %{_localstatedir}/lib/pcp/config/pmlogconf +%global _ieconfdir %{_localstatedir}/lib/pcp/config/pmieconf +%global _tapsetdir %{_datadir}/systemtap/tapset +%global _bashcompdir %{_datadir}/bash-completion/completions %if 0%{?suse_version} -%global _pixmapdir %{_datadir}/pixmaps -%global _booksdir %{_docdir}/pcp-doc +%global _pixmapdir %{_datadir}/pixmaps +%global _booksdir %{_docdir}/pcp-doc %else -%global _pixmapdir %{_datadir}/pcp-gui/pixmaps -%global _booksdir %{_datadir}/doc/pcp-doc +%global _pixmapdir %{_datadir}/pcp-gui/pixmaps +%global _booksdir %{_datadir}/doc/pcp-doc %endif +%global _hicolordir %{_datadir}/icons/hicolor %if 0%{?fedora} >= 20 || 0%{?rhel} >= 8 || 0%{?suse_version} # FIXME: PCP defaults to using %{_datadir}/doc/pcp-doc @@ -381,17 +455,42 @@ Obsoletes: pcp-pmda-nvidia < %{version} %else %global disable_infiniband 0 %endif - %endif -%if %{disable_infiniband} -%global _with_ib --with-infiniband=no +%if !%{disable_infiniband} +%global _with_ib --with-infiniband=yes %endif -%if !%{disable_perfevent} +%if %{disable_perfevent} +%global _with_perfevent --with-perfevent=no +%else %global _with_perfevent --with-perfevent=yes %endif +%if %{disable_podman} +%global _with_podman --with-podman=no +%else +%global _with_podman --with-podman=yes +%endif + +%if %{disable_statsd} +%global _with_statsd --with-statsd=no +%else +%global _with_statsd --with-statsd=yes +%endif + +%if %{disable_bcc} +%global _with_bcc --with-pmdabcc=no +%else +%global _with_bcc --with-pmdabcc=yes +%endif + +%if %{disable_bpftrace} +%global _with_bpftrace --with-pmdabpftrace=no +%else +%global _with_bpftrace --with-pmdabpftrace=yes +%endif + %if %{disable_json} %global _with_json --with-pmdajson=no %else @@ -410,9 +509,49 @@ Obsoletes: pcp-pmda-nvidia < %{version} %global _with_snmp --with-pmdasnmp=yes %endif +%global pmda_remove() %{expand: +if [ %1 -eq 0 ] +then + PCP_PMDAS_DIR=%{_pmdasdir} + PCP_PMCDCONF_PATH=%{_confdir}/pmcd/pmcd.conf + if [ -f "$PCP_PMCDCONF_PATH" -a -f "$PCP_PMDAS_DIR/%2/domain.h" ] + then + (cd "$PCP_PMDAS_DIR/%2/" && ./Remove >/dev/null 2>&1) + fi +fi +} + +%global install_file() %{expand: +if [ -w "%1" ] +then + (cd "%1" && touch "%2" && chmod 644 "%2") +else + echo "WARNING: Cannot write to %1, skipping %2 creation." >&2 +fi +} + +%global rebuild_pmns() %{expand: +if [ -w "%1" ] +then + (cd "%1" && ./Rebuild -s && rm -f "%2") +else + echo "WARNING: Cannot write to %1, skipping namespace rebuild." >&2 +fi +} + +%global selinux_handle_policy() %{expand: +if [ %1 -ge 1 ] +then + %{_libexecdir}/pcp/bin/selinux-setup %{_selinuxdir} install %2 +elif [ %1 -eq 0 ] +then + %{_libexecdir}/pcp/bin/selinux-setup %{_selinuxdir} remove %2 +fi +} + %description Performance Co-Pilot (PCP) provides a framework and services to support -system-level performance monitoring and performance management. +system-level performance monitoring and performance management. The PCP open source release provides a unifying abstraction for all of the interesting performance data in a system, and allows client @@ -549,47 +688,6 @@ 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: https://pcp.io -%if !0%{?suse_version} -Requires: %{lib_pkg} = %{version}-%{release} -%endif -Requires: pcp = %{version}-%{release} - -%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. It is an alternative to the cron-based pmlogger/pmie service -scripts. - -%if !%{disable_microhttpd} -# -# pcp-webapi -# -%package webapi -Summary: Performance Co-Pilot (PCP) web API service -License: %{license_gplv2plus} -Group: %{pcp_gr} -URL: https://pcp.io -%if !0%{?suse_version} -Requires: %{lib_pkg} = %{version}-%{release} -%endif -Requires: pcp = %{version}-%{release} - -%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 - # # perl-PCP-PMDA. This is the PCP agent perl binding. # @@ -964,6 +1062,27 @@ Performance Co-Pilot (PCP) front-end tools for exporting metric values to the Zabbix (https://www.zabbix.org/) monitoring software. %endif +%if !%{disable_statsd} +# +# pcp-pmda-statsd +# +%package pmda-statsd +Summary: Performance Co-Pilot (PCP) metrics from statsd +License: %{license_gplv2plus} +Group: %{pcp_gr} +URL: https://pcp.io +Requires: pcp = %{version}-%{release} +%if !0%{?suse_version} +Requires: %{lib_pkg} = %{version}-%{release} +%endif +Requires: HdrHistogram_c +Requires: chan + +%description pmda-statsd +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting statistics from the statsd daemon. +%endif + %if !%{disable_perfevent} # # pcp-pmda-perfevent @@ -978,8 +1097,8 @@ Requires: %{lib_pkg} = %{version}-%{release} Requires: libpfm >= 4.4 %endif BuildRequires: libpfm-devel >= 4.4 -Obsoletes: pcp-pmda-papi -Obsoletes: pcp-pmda-papi-debuginfo +Obsoletes: pcp-pmda-papi < 5.0.0 +Obsoletes: pcp-pmda-papi-debuginfo < 5.0.0 %description pmda-perfevent This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -1647,17 +1766,22 @@ License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io %if !%{disable_python3} +%if 0%{?suse_version} +Requires: python3-libvirt-python +BuildRequires: python3-libvirt-python +%else Requires: libvirt-python3 -Requires: python3-lxml -Requires: python3-pcp BuildRequires: libvirt-python3 +%endif +Requires: python3-lxml +BuildRequires: python3-lxml +Requires: python3-pcp %else Requires: %{__python2}-lxml +BuildRequires: %{__python2}-lxml Requires: %{__python2}-pcp -Requires: libvirt-python -%if 0%{?rhel} == 0 || 0%{?rhel} > 5 -BuildRequires: libvirt-python -%endif +Requires: libvirt-%{__python2} +BuildRequires: libvirt-%{__python2} %endif %description pmda-libvirt This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -1684,6 +1808,42 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about Elasticsearch. #end pcp-pmda-elasticsearch +# +# pcp-pmda-openvswitch +# +%package pmda-openvswitch +Summary: Performance Co-Pilot (PCP) metrics for Open vSwitch +License: %{license_gplv2plus} +Group: %{pcp_gr} +URL: https://pcp.io +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: %{__python2}-pcp +%endif +%description pmda-openvswitch +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics from Open vSwitch. +#end pcp-pmda-openvswitch + +# +# pcp-pmda-rabbitmq +# +%package pmda-rabbitmq +Summary: Performance Co-Pilot (PCP) metrics for RabbitMQ queues +License: %{license_gplv2plus} +Group: %{pcp_gr} +URL: https://pcp.io +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: %{__python2}-pcp +%endif +%description pmda-rabbitmq +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics about RabbitMQ message queues. +#end pcp-pmda-rabbitmq + %if !%{disable_lio} # # pcp-pmda-lio @@ -1697,15 +1857,19 @@ URL: https://pcp.io Requires: python3-pcp %if 0%{?suse_version} Requires: python3-rtslib-fb +BuildRequires: python3-rtslib-fb %else Requires: python3-rtslib +BuildRequires: python3-rtslib %endif %else # !%{disable_python3} Requires: %{__python2}-pcp %if 0%{?suse_version} Requires: %{__python2}-rtslib-fb +BuildRequires: %{__python2}-rtslib-fb %else Requires: %{__python2}-rtslib +BuildRequires: %{__python2}-rtslib %endif %endif # !%{disable_python3} %description pmda-lio @@ -1718,10 +1882,10 @@ target. %endif # !%{disable_lio} # -# pcp-pmda-prometheus +# pcp-pmda-openmetrics # -%package pmda-prometheus -Summary: Performance Co-Pilot (PCP) metrics from Prometheus endpoints +%package pmda-openmetrics +Summary: Performance Co-Pilot (PCP) metrics from OpenMetrics endpoints License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io @@ -1734,11 +1898,13 @@ Requires: %{__python2}-pcp Requires: %{__python2}-requests BuildRequires: %{__python2}-requests %endif +Obsoletes: pcp-pmda-prometheus < 5.0.0 +Provides: pcp-pmda-prometheus < 5.0.0 -%description pmda-prometheus +%description pmda-openmetrics This package contains the PCP Performance Metrics Domain Agent (PMDA) for -extracting statistics from programs instrumented as Prometheus endpoints. -#end pcp-pmda-prometheus +extracting metrics from OpenMetrics (https://openmetrics.io/) endpoints. +#end pcp-pmda-openmetrics # # pcp-pmda-lmsensors @@ -1761,8 +1927,52 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the Linux hardware monitoring sensors. # end pcp-pmda-lmsensors +# +# pcp-pmda-netcheck +# +%package pmda-netcheck +Summary: Performance Co-Pilot (PCP) metrics for simple network checks +License: %{license_gplv2plus} +Group: %{pcp_gr} +URL: https://pcp.io +%if !0%{?suse_version} +Requires: %{lib_pkg} = %{version}-%{release} +%endif +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: %{__python2}-pcp +%endif +%description pmda-netcheck +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics from simple network checks. +# end pcp-pmda-netcheck + %endif # !%{disable_python2} || !%{disable_python3} +%if !%{disable_mssql} +# +# pcp-pmda-mssql +# +%package pmda-mssql +Summary: Performance Co-Pilot (PCP) metrics for Microsoft SQL Server +License: %{license_gplv2plus} +Group: %{pcp_gr} +URL: https://pcp.io +%if !0%{?suse_version} +Requires: %{lib_pkg} = %{version}-%{release} +%endif +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: %{__python2}-pcp +%endif +%description pmda-mssql +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics from Microsoft SQL Server. +# end pcp-pmda-mssql +%endif + %if !%{disable_json} # # pcp-pmda-json @@ -2229,6 +2439,8 @@ URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} = %{version}-%{release} %endif +Requires: liberation-sans-fonts +BuildRequires: hicolor-icon-theme %description gui Visualization tools for the Performance Co-Pilot toolkit. @@ -2296,6 +2508,7 @@ updated policy package. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 autoconf @@ -2304,11 +2517,11 @@ rm -Rf $RPM_BUILD_ROOT %build %define _lto_cflags %{nil} -%global optflags %{optflags} -fcommon %if 0%{?suse_version} # in case we're building without os-release (bsc#1123311)... export PACKAGE_DISTRIBUTION="suse" %endif +# tmpdir used during build https://github.com/performancecopilot/pcp/issues/1140 export PACKAGE_BUILD_DATE=`date -u -r CHANGELOG +%Y-%m-%d` PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %configure \ --with-tmpdir=%{_tempsdir} \ @@ -2317,8 +2530,13 @@ PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXX --with-dstat-symlink=no \ %{?_with_initd} \ %{?_with_doc} \ + %{?_with_dstat} \ %{?_with_ib} \ + %{?_with_podman} \ + %{?_with_statsd} \ %{?_with_perfevent} \ + %{?_with_bcc} \ + %{?_with_bpftrace} \ %{?_with_json} \ %{?_with_snmp} \ %{?_with_nutcracker} \ @@ -2328,7 +2546,11 @@ PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXX ############################################################################### %install -export NO_CHOWN=true DIST_ROOT=$RPM_BUILD_ROOT +BACKDIR=`pwd` +NO_CHOWN=true +DIST_ROOT=$RPM_BUILD_ROOT +DIST_TMPFILES=$BACKDIR/install.tmpfiles +export NO_CHOWN DIST_ROOT DIST_TMPFILES make install_pcp PCP_GUI='pmchart|pmconfirm|pmdumptext|pmmessage|pmquery|pmsnap|pmtime' @@ -2353,21 +2575,23 @@ rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/postgresql rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/configsz.h rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/platformsz.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 -%endif - %if %{disable_infiniband} # remove pmdainfiniband on platforms lacking IB devel packages. rm -f $RPM_BUILD_ROOT/%{_pmdasdir}/ib rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/infiniband %endif +%if %{disable_mssql} +# remove pmdamssql on platforms lacking MSODBC driver packages. +rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/mssql +rm -fr $RPM_BUILD_ROOT/%{_pmdasexecdir}/mssql +rm -fr $RPM_BUILD_ROOT/%{_confdir}/mssql +%endif + +%if %{disable_sdt} +rm -fr $RPM_BUILD_ROOT/%{_tapsetdir} +%endif + %if %{disable_selinux} rm -fr $RPM_BUILD_ROOT/%{_selinuxdir} %endif @@ -2376,6 +2600,7 @@ rm -fr $RPM_BUILD_ROOT/%{_selinuxdir} %if !0%{?suse_version} rm -fr $RPM_BUILD_ROOT/%{_pixmapdir} %endif +rm -fr $RPM_BUILD_ROOT/%{_hicolordir} rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmsnap rm -fr $RPM_BUILD_ROOT/%{_localstatedir}/lib/pcp/config/pmsnap rm -fr $RPM_BUILD_ROOT/%{_localstatedir}/lib/pcp/config/pmchart @@ -2394,15 +2619,22 @@ desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop %endif %endif +%if %{disable_xlsx} +rm -f $RPM_BUILD_ROOT/%{_bashcompdir}/pcp2xlsx +%endif + %if %{disable_lio} rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/lio %endif +%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version} +# Fedora and RHEL default local only access for pmcd and pmlogger +sed -i -e '/^# .*_LOCAL=1/s/^# //' $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/{pmcd,pmlogger} +%endif + rm -f $RPM_BUILD_ROOT/%{_localstatedir}/lib/pcp/testsuite/perfevent/perfevent_coverage # drop unreproducible file (boo#1040589) %if 0%{?suse_version} -rm -rf $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps - mkdir -p $RPM_BUILD_ROOT/%{_tempsdir} %__install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sbindir} @@ -2418,13 +2650,11 @@ 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 # SUSE requires use of %fillup_and_insserv mkdir -p $RPM_BUILD_ROOT/%{_fillupdir} -for f in pmlogger pmproxy pmcd pmie_timers pmlogger_timers; do +for f in pmlogger pmproxy pmcd pmie_timers pmlogger_timers pmfind; do mv $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/${f} \ $RPM_BUILD_ROOT/%{_fillupdir}/sysconfig.${f} done @@ -2437,90 +2667,49 @@ for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmmgr,pmpro done %endif -# list of PMDAs in the base pkg -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 '^activemq' |\ - grep -E -v '^bonding' |\ - grep -E -v '^bind2' |\ - grep -E -v '^dbping' |\ - grep -E -v '^docker' |\ - grep -E -v '^ds389log'|\ - grep -E -v '^ds389' |\ - grep -E -v '^elasticsearch' |\ - grep -E -v '^gpfs' |\ - grep -E -v '^gpsd' |\ - grep -E -v '^lio' |\ - grep -E -v '^lustre' |\ - grep -E -v '^lustrecomm' |\ - grep -E -v '^memcache' |\ - grep -E -v '^mysql' |\ - grep -E -v '^named' |\ - grep -E -v '^netfilter' |\ - grep -E -v '^news' |\ - grep -E -v '^nfsclient' |\ - grep -E -v '^nginx' |\ - grep -E -v '^nutcracker' |\ - grep -E -v '^oracle' |\ - grep -E -v '^pdns' |\ - grep -E -v '^postfix' |\ - grep -E -v '^postgresql' |\ - grep -E -v '^prometheus' |\ - grep -E -v '^redis' |\ - grep -E -v '^rsyslog' |\ - grep -E -v '^samba' |\ - grep -E -v '^slurm' |\ - grep -E -v '^snmp' |\ - grep -E -v '^vmware' |\ - grep -E -v '^zimbra' |\ - grep -E -v '^dm' |\ - grep -E -v '^apache' |\ - grep -E -v '^bash' |\ - grep -E -v '^cifs' |\ - grep -E -v '^cisco' |\ - grep -E -v '^gfs2' |\ - grep -E -v '^libvirt' |\ - grep -E -v '^lmsensors' |\ - grep -E -v '^logger' |\ - grep -E -v '^mailq' |\ - grep -E -v '^mounts' |\ - grep -E -v '^nvidia' |\ - grep -E -v '^roomtemp' |\ - grep -E -v '^sendmail' |\ - grep -E -v '^shping' |\ - grep -E -v '^smart' |\ - grep -E -v '^summary' |\ - grep -E -v '^trace' |\ - 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' |\ - grep -E -v '^haproxy' |\ - sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list +# list of PMDAs in the base pcp package +for pmda in jbd2 kvm linux mmv pipe pmcd proc root xfs; do + for alt in %{_pmdasdir} %{_pmdasexecdir} %{_confdir}; do + [ -d $RPM_BUILD_ROOT/$alt/$pmda ] && echo $alt/$pmda >>base_pmdas.list + done +done -# all base pcp package files except those split out into sub packages +# list of conf directories in base pcp package +for conf in discover labels nssdb pmafm pmcd pmfind pmie pmieconf pmlogconf \ + proc pipe linux pmlogger pmlogrewrite pmproxy pmsearch pmseries; do + for alt in %{_confdir} %{_localstatedir}/lib/pcp/config; do + replace=""; [ "$alt" = "%{_confdir}" ] && replace="%config(noreplace)" + [ -d $RPM_BUILD_ROOT/$alt/$conf ] && echo "$replace $alt/$conf" >>base_conf.list + done +done + +# all base binary files except those split out into sub-packages ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ - grep -E -v 'pmiostat|pmcollectl|zabbix|zbxpcp|dstat' |\ - grep -E -v 'pmrep|pcp2csv|pcp2graphite|pcp2influxdb|pcp2zabbix' |\ + grep -E -v 'pmiostat|zabbix|zbxpcp|dstat|pmrep|pcp2csv' |\ + grep -E -v 'pcp2spark|pcp2graphite|pcp2influxdb|pcp2zabbix' |\ grep -E -v 'pcp2elasticsearch|pcp2json|pcp2xlsx|pcp2xml' |\ - grep -E -v 'pcp2spark' |\ grep -E -v 'pmdbg|pmclient|pmerr|genpmda' |\ sed -e 's#^#'%{_bindir}'\/#' >base_bin.list -# + +# all base pmns files +echo %{_pmnsdir} >>base_pmns.list +echo %{_pmnsexecdir} >>base_pmns.list + +ls -1 $RPM_BUILD_ROOT/%{_bashcompdir} |\ + grep -E -v 'pcp2spark|pcp2graphite|pcp2influxdb|pcp2zabbix' |\ + grep -E -v 'pcp2elasticsearch|pcp2json|pcp2xlsx|pcp2xml' |\ + grep -E -v 'pcp2csv|pmrep|pmdumptext' |\ +sed -e 's#^#'%{_bashcompdir}'\/#' >base_bashcomp.list + # Separate the pcp-system-tools package files. -# pmcollectl and pmiostat are back-compat symlinks to their -# pcp(1) sub-command variants so are also in pcp-system-tools. +# pmiostat is a back-compat symlink to its pcp(1) sub-command variant +# so its also in pcp-system-tools. %if !%{disable_python2} || !%{disable_python3} ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ - egrep -e 'pmiostat|pmcollectl|pmrep|pcp2csv|dstat' |\ + grep -E -e 'pmiostat|pmrep|dstat|pcp2csv' |\ sed -e 's#^#'%{_bindir}'\/#' >pcp-system-tools.list ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ - egrep -e 'atop|collectl|dmcache|dstat|free|iostat|ipcs|lvmcache|mpstat' \ + grep -E -e 'atop|dmcache|dstat|free|iostat|ipcs|lvmcache|mpstat' \ -e 'numastat|pidstat|shping|tapestat|uptime|verify' |\ sed -e 's#^#'%{_libexecdir}/pcp/bin'\/#' >>pcp-system-tools.list %endif @@ -2528,6 +2717,8 @@ ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ %if !%{disable_selinux} ls -1 $RPM_BUILD_ROOT/%{_selinuxdir} |\ sed -e 's#^#'%{_selinuxdir}'\/#' > pcp-selinux.list +ls -1 $RPM_BUILD_ROOT/%{_selinuxexecdir} |\ + sed -e 's#^#'%{_selinuxexecdir}'\/#' >> pcp-selinux.list ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ grep -E 'selinux-setup' |\ sed -e 's#^#'%{_libexecdir}/pcp/bin'\/#' >> pcp-selinux.list @@ -2535,10 +2726,14 @@ ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ %if !%{disable_python2} || !%{disable_python3} - grep -E -v 'atop|collectl|dmcache|lvmcache|dstat|free|iostat|ipcs|mpstat|numastat' |\ - grep -E -v 'shping|tapestat|uptime|verify|selinux-setup' |\ + grep -E -v 'atop|dmcache|dstat|free|iostat|ipcs|lvmcache|mpstat' |\ + grep -E -v 'numastat|shping|tapestat|uptime|verify|selinux-setup' |\ %endif + grep -E -v 'pmlogger_daily_report' |\ + grep -E -v 'pmsnap' |\ sed -e 's#^#'%{_libexecdir}/pcp/bin'\/#' >base_exec.list +echo %{_libexecdir}/pcp/lib >>base_exec.list + ls -1 $RPM_BUILD_ROOT/%{_booksdir} |\ sed -e 's#^#'%{_booksdir}'\/#' > pcp-doc.list ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 |\ @@ -2553,19 +2748,36 @@ ls -1 $RPM_BUILD_ROOT/%{_docdir}/pcp/demos/tutorials |\ 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 |\ +ls -1 $RPM_BUILD_ROOT/%{_hicolordir} |\ + sed -e 's#^#'%{_hicolordir}'\/#' >> pcp-gui.list +cat base_bin.list base_exec.list base_bashcomp.list |\ grep -E "$PCP_GUI" >> pcp-gui.list +echo %{_confdir}/pmchart >>pcp-gui.list +echo %{_libexecdir}/pcp/bin/pmsnap >>pcp-gui.list %endif + ls -1 $RPM_BUILD_ROOT/%{_logconfdir}/ |\ sed -e 's#^#'%{_logconfdir}'\/#' |\ grep -E -v 'zeroconf' >pcp-logconf.list -cat base_pmdas.list base_bin.list base_exec.list pcp-logconf.list |\ - grep -E -v 'pmdaib|pmmgr|pmweb|pmsnap|2pcp|pmdas/systemd' |\ - grep -E -v "$PCP_GUI|pixmaps|pcp-doc|tutorials|selinux|pmlogger_daily_report" |\ - grep -E -v %{_confdir} | grep -E -v %{_logsdir} > base.list +ls -1 $RPM_BUILD_ROOT/%{_ieconfdir}/ |\ + sed -e 's#^#'%{_ieconfdir}'\/#' |\ + grep -E -v 'zeroconf' >pcp-ieconf.list + +# generate full base package file list +cat base_pmdas.list base_conf.list base_bin.list base_exec.list base_bashcomp.list \ + pcp-logconf.list pcp-ieconf.list base_pmns.list |\ + grep -E -v 'pmdaib|pmsnap|2pcp|pmdas/systemd|zeroconf' |\ + grep -E -v "$PCP_GUI|pixmaps|hicolor|pcp-doc|tutorials|selinux" |\ + grep -E -v %{_logsdir} > base.list +%if !%{disable_systemd} +mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir} +mv $DIST_TMPFILES $RPM_BUILD_ROOT/%{_tmpfilesdir}/pcp.conf +echo %{_tmpfilesdir}/pcp.conf >> base.list +%endif # all devel pcp package files except those split out into sub packages ls -1 $RPM_BUILD_ROOT/%{_mandir}/man3 |\ @@ -2580,6 +2792,10 @@ 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 +for pmda in sample simple trivial txmon; do + echo %{_libexecdir}/pcp/pmdas/$pmda >>devel.list +done +echo %{_confdir}/simple/simple.conf >>devel.list %pre testsuite test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir} @@ -2605,100 +2821,16 @@ exit 0 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 -%if !0%{?suse_version} -PCP_CONFIG_DIR=%{_localstatedir}/lib/pcp/config -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 . -maxdepth 1 -type f ) | sed -e 's/^\.\///' \ - | while read _file - do - [ "$_file" = "control" ] && continue - _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 pmie pmlogger -do - save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_CONFIG_DIR/$daemon" \ - "$PCP_SYSCONF_DIR/$daemon" -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 -done -%endif exit 0 -%if !%{disable_microhttpd} -%preun webapi -%if 0%{?suse_version} -%if !%{disable_systemd} -%service_del_preun pmwebd -%else -%{stop_on_removal pmwebd} -%endif -%else -if [ "$1" -eq 0 ] -then -%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 +%if !%{disable_rpm} +%preun pmda-rpm +%{pmda_remove "$1" "rpm"} %endif -%preun manager -%if 0%{?suse_version} %if !%{disable_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 +%preun pmda-systemd +%{pmda_remove "$1" "systemd"} %endif %if 0%{?suse_version} && !%{disable_systemd} @@ -2738,42 +2870,6 @@ then fi %endif -%if !%{disable_microhttpd} -%post webapi -chown -R pcp:pcp %{_logsdir}/pmwebd 2>/dev/null -%if 0%{?suse_version} -%if !%{disable_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 !%{disable_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 zeroconf %if 0%{?suse_version} %if !%{disable_systemd} @@ -2801,69 +2897,24 @@ chown -R pcp:pcp %{_logsdir}/pmmgr 2>/dev/null %if !%{disable_selinux} %post selinux -%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 - semodule -X 400 -i %{_selinuxdir}/pcpupstream.pp -%else - semodule -i %{_selinuxdir}/pcpupstream.pp -%endif #distro version check +%{selinux_handle_policy "$1" "pcpupstream"} + %triggerin selinux -- docker-selinux -if ls %{_selinuxdir} | grep -q docker 2>/dev/null -then -%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 - semodule -X 400 -i %{_selinuxdir}/pcpupstream-docker.pp -%else - semodule -i %{_selinuxdir}/pcpupstream-docker.pp -%endif #distro version check -fi +%{selinux_handle_policy "$1" "pcpupstream-docker"} %triggerin selinux -- container-selinux -if ls %{_selinuxdir} | grep -q container 2>/dev/null -then -%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 - semodule -X 400 -i %{_selinuxdir}/pcpupstream-container.pp -%else - semodule -i %{_selinuxdir}/pcpupstream-container.pp -%endif #distro version check -fi +%{selinux_handle_policy "$1" "pcpupstream-container"} %endif %post -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 +PCP_LOG_DIR=%{_logsdir} 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" +%{install_file "$PCP_PMNS_DIR" .NeedRebuild} +%{install_file "$PCP_LOG_DIR/pmlogger" .NeedRewrite} %if 0%{?suse_version} %if !%{disable_systemd} %{fillup_only -n pmcd} @@ -2880,7 +2931,13 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild" %endif %else %if !%{disable_systemd} - systemctl condrestart pmcd pmlogger pmie pmproxy >/dev/null 2>&1 + %systemd_postun_with_restart pmcd.service + %systemd_post pmcd.service + %systemd_postun_with_restart pmlogger.service + %systemd_post pmlogger.service + %systemd_postun_with_restart pmie.service + %systemd_post pmie.service + systemctl condrestart pmproxy.service >/dev/null 2>&1 %else /sbin/chkconfig --add pmcd >/dev/null 2>&1 /sbin/service pmcd condrestart @@ -2892,8 +2949,7 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild" /sbin/service pmproxy condrestart %endif %endif - -(cd $PCP_PMNS_DIR && ./Rebuild -s && rm -f .NeedRebuild) +%{rebuild_pmns "$PCP_PMNS_DIR" .NeedRebuild} %post -n %{lib_pkg} -p /sbin/ldconfig %postun -n %{lib_pkg} -p /sbin/ldconfig @@ -2916,34 +2972,13 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild" %if !%{disable_selinux} %preun selinux -if [ `semodule -l | grep pcpupstream` ] -then -%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 - semodule -X 400 -r pcpupstream >/dev/null -%else - semodule -r pcpupstream >/dev/null -%endif -fi +%{selinux_handle_policy "$1" "pcpupstream"} %triggerun selinux -- docker-selinux -if [ `semodule -l | grep pcpupstream-docker` ] -then -%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 - semodule -X 400 -r pcpupstream-docker -%else -semodule -r pcpupstream-docker -%endif #distro version check -fi +%{selinux_handle_policy "$1" "pcpupstream-docker"} %triggerun selinux -- container-selinux -if [ `semodule -l | grep pcpupstream-container` ] -then -%if 0%{?fedora} >= 24 || 0%{?rhel} > 6 - semodule -X 400 -r pcpupstream-container -%else - semodule -r pcpupstream-container -%endif #distro version check -fi +%{selinux_handle_policy "$1" "pcpupstream-container"} %endif %if 0%{?suse_version} && !%{disable_systemd} @@ -2978,25 +3013,23 @@ fi %dir %{_confdir} %dir %{_pmdasdir} +%dir %{_pmdasexecdir} %dir %{_datadir}/pcp -%dir %{_localstatedir}/lib/pcp -%if 0%{?suse_version} %dir %{_libexecdir}/pcp %dir %{_libexecdir}/pcp/bin -%endif +%dir %{_localstatedir}/lib/pcp %dir %{_localstatedir}/lib/pcp/config %if 0%{?suse_version} # part of pcp-gui %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}/bash +%dir %attr(0775,pcp,pcp) %{_tempsdir}/json +%dir %attr(0775,pcp,pcp) %{_tempsdir}/mmv %dir %attr(0775,pcp,pcp) %{_tempsdir}/pmie %dir %attr(0775,pcp,pcp) %{_tempsdir}/pmlogger +%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmproxy %dir %attr(0700,root,root) %{_tempsdir}/pmcd %dir %{_datadir}/pcp/lib @@ -3014,54 +3047,64 @@ fi %attr(0775,pcp,pcp) %{_logsdir}/pmlogger %attr(0775,pcp,pcp) %{_logsdir}/pmie %attr(0775,pcp,pcp) %{_logsdir}/pmproxy +%attr(0775,pcp,pcp) %{_logsdir}/pmfind %{_localstatedir}/lib/pcp/pmns %if %{disable_systemd} -%{_initrddir}/pcp -%{_initrddir}/pmcd -%{_initrddir}/pmlogger -%{_initrddir}/pmie -%{_initrddir}/pmproxy +%{_initddir}/pcp +%{_initddir}/pmcd +%{_initddir}/pmlogger +%{_initddir}/pmie +%{_initddir}/pmproxy %else %{_unitdir}/pmcd.service -%{_unitdir}/pmlogger.service -%{_unitdir}/pmie.service %{_unitdir}/pmproxy.service +%{_unitdir}/pmlogger.service +%{_unitdir}/pmfind.service +%{_unitdir}/pmie.service %{_sbindir}/rcpmcd %{_sbindir}/rcpmie %{_sbindir}/rcpmlogger %{_sbindir}/rcpmproxy %endif -%dir %{_sysconfdir}/sasl2 -%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf %if %{disable_systemd} %config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger +%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmfind %config(noreplace) %{_sysconfdir}/cron.d/pcp-pmie %else +%{_unitdir}/pmlogger_check.service +%{_unitdir}/pmlogger_check.timer +%{_unitdir}/pmlogger_daily.service +%{_unitdir}/pmlogger_daily.timer +%{_unitdir}/pmlogger_daily-poll.service +%{_unitdir}/pmlogger_daily-poll.timer %{_unitdir}/pmie_check.service %{_unitdir}/pmie_check.timer %{_unitdir}/pmie_daily.service %{_unitdir}/pmie_daily.timer -%{_unitdir}/pmlogger_daily.service -%{_unitdir}/pmlogger_daily.timer -%{_unitdir}/pmlogger_check.service -%{_unitdir}/pmlogger_check.timer -%{_unitdir}/pmlogger_daily-poll.service -%{_unitdir}/pmlogger_daily-poll.timer +%{_unitdir}/pmfind.timer %endif %if 0%{?suse_version} %{_fillupdir}/sysconfig.pmlogger %{_fillupdir}/sysconfig.pmproxy +%{_fillupdir}/sysconfig.pmfind %{_fillupdir}/sysconfig.pmcd %{_fillupdir}/sysconfig.pmie_timers %{_fillupdir}/sysconfig.pmlogger_timers %else %config(noreplace) %{_sysconfdir}/sysconfig/pmlogger %config(noreplace) %{_sysconfdir}/sysconfig/pmproxy +%config(noreplace) %{_sysconfdir}/sysconfig/pmfind %config(noreplace) %{_sysconfdir}/sysconfig/pmcd %config(noreplace) %{_sysconfdir}/sysconfig/pmie_timers %config(noreplace) %{_sysconfdir}/sysconfig/pmlogger_timers %endif +%dir %{_sysconfdir}/sasl2 +%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf %config %{_sysconfdir}/pcp.env +%dir %{_confdir}/labels +%dir %{_confdir}/labels/optional +%config(noreplace) %{_confdir}/labels.conf +%dir %{_confdir}/pipe.conf.d %dir %{_confdir}/pmcd %config(noreplace) %{_confdir}/pmcd/pmcd.conf %config(noreplace) %{_confdir}/pmcd/pmcd.options @@ -3080,44 +3123,59 @@ fi %dir %attr(0775,pcp,pcp) %{_confdir}/nssdb %dir %{_confdir}/discover %config(noreplace) %{_confdir}/discover/pcp-kube-pods.conf +%if !%{disable_libuv} +%dir %{_confdir}/pmseries +%config(noreplace) %{_confdir}/pmseries/pmseries.conf +%endif %{_localstatedir}/lib/pcp/config/pmafm %dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmie -%{_localstatedir}/lib/pcp/config/pmie -%{_localstatedir}/lib/pcp/config/pmieconf +# exclude pmieconf for pmda-dm +%exclude %{_confdir}/pmieconf/dm +%exclude %{_ieconfdir}/dm +# exclude zeroconf +%exclude %{_ieconfdir}/zeroconf +%exclude %{_logconfdir}/zeroconf +%exclude %{_confdir}/pmlogconf/zeroconf +%exclude %{_confdir}/pmieconf/zeroconf %dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmlogger %{_localstatedir}/lib/pcp/config/pmlogger/* %dir %{_logconfdir} %{_localstatedir}/lib/pcp/config/pmlogrewrite %dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmda -%{_datadir}/bash-completion/completions/* %{_datadir}/zsh/site-functions/_pcp - %if !%{disable_sdt} -%{tapsetdir}/pmcd.stp +%{_tapsetdir}/pmcd.stp %endif %files zeroconf %defattr(-,root,root) %{_libexecdir}/pcp/bin/pmlogger_daily_report -%if %{disable_systemd} -%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger-daily-report -%else +%if !%{disable_systemd} +# systemd services for pmlogger_daily_report to replace the cron script %{_unitdir}/pmlogger_daily_report.service %{_unitdir}/pmlogger_daily_report.timer %{_unitdir}/pmlogger_daily_report-poll.service %{_unitdir}/pmlogger_daily_report-poll.timer +%else +%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger-daily-report %endif -%{_logconfdir}/zeroconf +%config(noreplace) %{_ieconfdir}/zeroconf +%config(noreplace) %{_logconfdir}/zeroconf +%config(noreplace) %{_confdir}/pmlogconf/zeroconf +%config(noreplace) %{_confdir}/pmieconf/zeroconf + +#additional pmlogger config files %files conf %defattr(-,root,root) - %dir %{_includedir}/pcp %{_includedir}/pcp/builddefs %{_includedir}/pcp/buildrules %config %{_sysconfdir}/pcp.conf +%dir %{_confdir}/derived +%config %{_confdir}/derived/* %dir %{_localstatedir}/lib/pcp/config/derived %config %{_localstatedir}/lib/pcp/config/derived/* @@ -3163,15 +3221,18 @@ fi %{_libdir}/libpcp_trace.so %{_libdir}/libpcp_import.so %{_libdir}/libpcp_web.so +%{_libdir}/pkgconfig/libpcp.pc +%{_libdir}/pkgconfig/libpcp_pmda.pc +%{_libdir}/pkgconfig/libpcp_import.pc %{_includedir}/pcp/*.h %files devel -f devel.list %{_datadir}/pcp/examples -%{_libdir}/pkgconfig/*.pc # PMDAs that ship src and are not for production use # straight out-of-the-box, for devel or QA use only. %{_pmdasdir}/simple +%config(noreplace) %{_confdir}/simple %{_pmdasdir}/sample %{_pmdasdir}/trivial %{_pmdasdir}/txmon @@ -3180,34 +3241,6 @@ fi %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 -# duplicate directories from pcp and pcp-webjs, but rpm copes with that. -%dir %{_datadir}/pcp -%endif - -%files manager -%defattr(-,root,root) -%{_initddir}/pmmgr -%if !%{disable_systemd} -%{_unitdir}/pmmgr.service -%{_sbindir}/rcpmmgr -%endif -%{_libexecdir}/pcp/bin/pmmgr -%attr(0775,pcp,pcp) %{_logsdir}/pmmgr -%config(missingok,noreplace) %{_confdir}/pmmgr -%config(noreplace) %{_confdir}/pmmgr/pmmgr.options - %files import-sar2pcp %defattr(-,root,root) %{_bindir}/sar2pcp @@ -3234,249 +3267,391 @@ fi %defattr(-,root,root) %{_bindir}/collectl2pcp +%if !%{disable_podman} +%files pmda-podman +%defattr(-,root,root) +%{_pmdasdir}/podman +%{_pmdasexecdir}/podman +%endif + +%if !%{disable_statsd} +%files pmda-statsd +%defattr(-,root,root) +%{_pmdasdir}/statsd +%{_pmdasexecdir}/statsd +%{_confdir}/statsd +%config(noreplace) %{_pmdasdir}/statsd/pmdastatsd.ini +%endif + %if !%{disable_perfevent} %files pmda-perfevent %defattr(-,root,root) %{_pmdasdir}/perfevent +%{_pmdasexecdir}/perfevent +%{_confdir}/perfevent %config(noreplace) %{_pmdasdir}/perfevent/perfevent.conf %endif %if !%{disable_infiniband} %files pmda-infiniband %defattr(-,root,root) -%{_pmdasdir}/ib %{_pmdasdir}/infiniband +%{_pmdasexecdir}/infiniband %endif %files pmda-activemq %{_pmdasdir}/activemq +%{_pmdasexecdir}/activemq %files pmda-bonding %{_pmdasdir}/bonding +%{_pmdasexecdir}/bonding %files pmda-bind2 %{_pmdasdir}/bind2 +%{_pmdasexecdir}/bind2 +%{_confdir}/bind2 %files pmda-dbping %{_pmdasdir}/dbping +%{_pmdasexecdir}/dbping %files pmda-ds389log %{_pmdasdir}/ds389log +%{_pmdasexecdir}/ds389log %files pmda-ds389 %{_pmdasdir}/ds389 +%{_pmdasexecdir}/ds389 %files pmda-elasticsearch %{_pmdasdir}/elasticsearch +%{_pmdasexecdir}/elasticsearch +%{_confdir}/elasticsearch + +%files pmda-openvswitch +%{_pmdasdir}/openvswitch +%{_pmdasexecdir}/openvswitch + +%files pmda-rabbitmq +%{_pmdasdir}/rabbitmq +%{_pmdasexecdir}/rabbitmq +%{_confdir}/rabbitmq %files pmda-gpfs %{_pmdasdir}/gpfs +%{_pmdasexecdir}/gpfs %files pmda-gpsd %{_pmdasdir}/gpsd +%{_pmdasexecdir}/gpsd %files pmda-docker %{_pmdasdir}/docker +%{_pmdasexecdir}/docker %if !%{disable_lio} %files pmda-lio %{_pmdasdir}/lio +%{_pmdasexecdir}/lio %endif -%files pmda-prometheus -%{_pmdasdir}/prometheus +%files pmda-openmetrics +%{_pmdasdir}/openmetrics +%{_pmdasexecdir}/openmetrics +%config(noreplace) %{_confdir}/openmetrics %files pmda-lustre %{_pmdasdir}/lustre +%{_pmdasexecdir}/lustre +%config(noreplace) %{_confdir}/lustre %files pmda-lustrecomm %{_pmdasdir}/lustrecomm +%{_pmdasexecdir}/lustrecomm %files pmda-memcache %{_pmdasdir}/memcache +%{_pmdasexecdir}/memcache %files pmda-mysql %{_pmdasdir}/mysql +%{_pmdasexecdir}/mysql %files pmda-named %{_pmdasdir}/named +%{_pmdasexecdir}/named %files pmda-netfilter %{_pmdasdir}/netfilter +%{_pmdasexecdir}/netfilter %files pmda-news %{_pmdasdir}/news +%{_pmdasexecdir}/news %files pmda-nginx %{_pmdasdir}/nginx +%{_pmdasexecdir}/nginx +%config(noreplace) %{_confdir}/nginx %files pmda-nfsclient %{_pmdasdir}/nfsclient +%{_pmdasexecdir}/nfsclient %if !%{disable_nutcracker} %files pmda-nutcracker %{_pmdasdir}/nutcracker +%{_pmdasexecdir}/nutcracker +%config(noreplace) %{_confdir}/nutcracker %endif %files pmda-oracle %{_pmdasdir}/oracle +%{_pmdasexecdir}/oracle +%config(noreplace) %{_confdir}/oracle %files pmda-pdns %{_pmdasdir}/pdns +%{_pmdasexecdir}/pdns %files pmda-postfix %{_pmdasdir}/postfix +%{_pmdasexecdir}/postfix %if !%{disable_postgresql} %files pmda-postgresql %{_pmdasdir}/postgresql -%config(noreplace) %{_pmdasdir}/postgresql/pmdapostgresql.conf +%{_pmdasexecdir}/postgresql +%dir %{_confdir}/postgresql +%config(noreplace) %{_confdir}/postgresql/pmdapostgresql.conf %endif %files pmda-redis %{_pmdasdir}/redis +%{_pmdasexecdir}/redis +%{_confdir}/redis %files pmda-rsyslog %{_pmdasdir}/rsyslog +%{_pmdasexecdir}/rsyslog -%files pmda-samba -%{_pmdasdir}/samba +%files pmda-samba +%{_pmdasdir}/samba +%{_pmdasexecdir}/samba %if !%{disable_snmp} %files pmda-snmp %{_pmdasdir}/snmp +%{_pmdasexecdir}/snmp +%{_confdir}/snmp %endif %files pmda-slurm %{_pmdasdir}/slurm +%{_pmdasexecdir}/slurm %files pmda-vmware %{_pmdasdir}/vmware +%{_pmdasexecdir}/vmware %files pmda-zimbra %{_pmdasdir}/zimbra +%{_pmdasexecdir}/zimbra %files pmda-dm %{_pmdasdir}/dm +%{_pmdasexecdir}/dm +%{_ieconfdir}/dm +%dir %{_confdir}/pmieconf/dm +%config(noreplace) %{_confdir}/pmieconf/dm + +%if !%{disable_bcc} +%files pmda-bcc +%{_pmdasdir}/bcc +%{_pmdasexecdir}/bcc +%endif + +%if !%{disable_bpftrace} +%files pmda-bpftrace +%{_pmdasdir}/bpftrace +%{_pmdasexecdir}/bpftrace +%config(noreplace) %{_confdir}/bpftrace +%endif %if !%{disable_python2} || !%{disable_python3} %files pmda-gluster %{_pmdasdir}/gluster +%{_pmdasexecdir}/gluster %files pmda-zswap %{_pmdasdir}/zswap +%{_pmdasexecdir}/zswap %files pmda-unbound %{_pmdasdir}/unbound +%{_pmdasexecdir}/unbound %files pmda-mic %{_pmdasdir}/mic +%{_pmdasexecdir}/mic %files pmda-haproxy %{_pmdasdir}/haproxy +%{_pmdasexecdir}/haproxy +%{_confdir}/haproxy %if !%{disable_libvirt} %files pmda-libvirt %{_pmdasdir}/libvirt +%{_pmdasexecdir}/libvirt +%{_confdir}/libvirt %endif %files export-pcp2elasticsearch %{_bindir}/pcp2elasticsearch +%{_bashcompdir}/pcp2elasticsearch %files export-pcp2graphite %{_bindir}/pcp2graphite +%{_bashcompdir}/pcp2graphite %files export-pcp2influxdb %{_bindir}/pcp2influxdb +%{_bashcompdir}/pcp2influxdb %files export-pcp2json %{_bindir}/pcp2json +%{_bashcompdir}/pcp2json %files export-pcp2spark %{_bindir}/pcp2spark +%{_bashcompdir}/pcp2spark %if !%{disable_xlsx} %files export-pcp2xlsx %{_bindir}/pcp2xlsx +%{_bashcompdir}/pcp2xlsx %endif %files export-pcp2xml %{_bindir}/pcp2xml +%{_bashcompdir}/pcp2xml %files export-pcp2zabbix %{_bindir}/pcp2zabbix +%{_bashcompdir}/pcp2zabbix %files pmda-lmsensors %{_pmdasdir}/lmsensors +%{_pmdasexecdir}/lmsensors + +%files pmda-netcheck +%{_pmdasdir}/netcheck +%{_pmdasexecdir}/netcheck +%{_confdir}/netcheck %endif # !%{disable_python2} || !%{disable_python3} %files export-zabbix-agent %{_libdir}/zabbix -%{_sysconfdir}/zabbix +# FIXME: %{_sysconfdir}/zabbix is provided by zabbix-server +%dir %{_sysconfdir}/zabbix +%dir %{_sysconfdir}/zabbix/zabbix_agentd.d +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.d/zbxpcp.conf + +%if !%{disable_mssql} +%files pmda-mssql +%{_pmdasdir}/mssql +%{_pmdasexecdir}/mssql +%config(noreplace) %{_confdir}/mssql +%endif %if !%{disable_json} %files pmda-json %{_pmdasdir}/json +%{_pmdasexecdir}/json +%config(noreplace) %{_confdir}/json %endif %files pmda-apache %{_pmdasdir}/apache +%{_pmdasexecdir}/apache %files pmda-bash %{_pmdasdir}/bash +%{_pmdasexecdir}/bash %files pmda-cifs %{_pmdasdir}/cifs +%{_pmdasexecdir}/cifs %files pmda-cisco %{_pmdasdir}/cisco +%{_pmdasexecdir}/cisco %files pmda-gfs2 %{_pmdasdir}/gfs2 +%{_pmdasexecdir}/gfs2 %files pmda-logger %{_pmdasdir}/logger +%{_pmdasexecdir}/logger %files pmda-mailq %{_pmdasdir}/mailq +%{_pmdasexecdir}/mailq %files pmda-mounts %{_pmdasdir}/mounts +%{_pmdasexecdir}/mounts +%config(noreplace) %{_confdir}/mounts %files pmda-nvidia-gpu %{_pmdasdir}/nvidia +%{_pmdasexecdir}/nvidia %files pmda-roomtemp %{_pmdasdir}/roomtemp +%{_pmdasexecdir}/roomtemp %if !%{disable_rpm} %files pmda-rpm %{_pmdasdir}/rpm +%{_pmdasexecdir}/rpm %endif %files pmda-sendmail %{_pmdasdir}/sendmail +%{_pmdasexecdir}/sendmail %files pmda-shping %{_pmdasdir}/shping +%{_pmdasexecdir}/shping +%config(noreplace) %{_confdir}/shping %files pmda-smart %{_pmdasdir}/smart +%{_pmdasexecdir}/smart %files pmda-summary %{_pmdasdir}/summary +%{_pmdasexecdir}/summary +%config(noreplace) %{_confdir}/summary %if !%{disable_systemd} %files pmda-systemd %{_pmdasdir}/systemd +%{_pmdasexecdir}/systemd %endif %files pmda-trace %{_pmdasdir}/trace +%{_pmdasexecdir}/trace %files pmda-weblog %{_pmdasdir}/weblog +%{_pmdasexecdir}/weblog %files -n perl-PCP-PMDA -f perl-pcp-pmda.list %defattr(-,root,root) @@ -3533,6 +3708,7 @@ fi %{_localstatedir}/lib/pcp/config/pmchart %{_localstatedir}/lib/pcp/config/pmafm/pcp-gui %{_datadir}/applications/pmchart.desktop +%{_bashcompdir}/pmdumptext %endif %files doc -f pcp-doc.list @@ -3552,12 +3728,19 @@ fi %{_datadir}/doc/pcp-doc/pcp-users-and-administrators-guide.pdf %endif +%if !%{disable_selinux} +%files selinux -f pcp-selinux.list +%dir %{_selinuxdir} +%dir %{_selinuxexecdir} +%endif + %if !%{disable_python2} || !%{disable_python3} %files system-tools -f pcp-system-tools.list %dir %{_confdir}/dstat %dir %{_confdir}/pmrep %config(noreplace) %{_confdir}/dstat/* %config(noreplace) %{_confdir}/pmrep/* +%{_bashcompdir}/pmrep %endif %changelog From d969e2404091fd9f49a8b41fc8d5c93812419a47952d3e9955f5f391c456b078 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 10 Feb 2021 23:55:17 +0000 Subject: [PATCH 2/8] Accepting request 871004 from home:dmdiss:pcp_522 - Drop unnecessary %pre/%post recursive chown calls; (bsc#1152533) - Merge SLE changelog entries OBS-URL: https://build.opensuse.org/request/show/871004 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=99 --- pcp.changes | 21 +++++++++++++++++++++ pcp.spec | 9 --------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/pcp.changes b/pcp.changes index 1284176..870915a 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 10 11:03:13 UTC 2021 - David Disseldorp + +- Drop unnecessary %pre/%post recursive chown calls; (bsc#1152533) + ------------------------------------------------------------------- Thu Nov 19 11:39:51 UTC 2020 - David Disseldorp @@ -35,6 +40,22 @@ Fri Mar 27 09:43:05 UTC 2020 - Antonio Larrosa - Add patch (submitted to upstream) to fix missing includes with Qt 5.15: * 0001-Add-missing-includes-in-Qt-5.15-beta2.patch +------------------------------------------------------------------- +Wed Feb 26 10:57:30 UTC 2020 - Michal Suchanek + +- hv24x7 support (bsc#1155054 ltc#182081). + + 0007-pmdas-perf-Add-cpunumber-option-for-dynamic-perf-eve.patch + + 0008-pmdas-perf-Add-support-for-hv_24x7-nest-events-on-mu.patch + + 0009-qa-perfevent-Test-hv_24x7-events-on-multinode.patch + +------------------------------------------------------------------- +Fri Jan 24 15:56:53 UTC 2020 - David Disseldorp + +- Fix for security advisory CVE-2019-3696; (bsc#1153921) + + code change already carried +- Fix for security advisory CVE-2019-3695; (bsc#1152763) + + build-drop-old-config-file-transition-code-from-rpm-.patch + ------------------------------------------------------------------- Thu Dec 19 14:41:01 UTC 2019 - Dominique Leuenberger diff --git a/pcp.spec b/pcp.spec index c90d838..806984c 100644 --- a/pcp.spec +++ b/pcp.spec @@ -2802,11 +2802,6 @@ 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 %if 0%{?suse_version} && !%{disable_systemd} @@ -2909,10 +2904,6 @@ fi %post PCP_PMNS_DIR=%{_pmnsdir} PCP_LOG_DIR=%{_logsdir} -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 %{install_file "$PCP_PMNS_DIR" .NeedRebuild} %{install_file "$PCP_LOG_DIR/pmlogger" .NeedRewrite} %if 0%{?suse_version} From 00982bbc3d745495df349178dd5d54e0225466738521835c07291f2186590a1b Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Thu, 11 Feb 2021 09:47:10 +0000 Subject: [PATCH 3/8] - Changelog for patches carried as part of 5.2.2 source tarball: + 0007-pmdas-perf-Add-cpunumber-option-for-dynamic-perf-eve.patch + 0008-pmdas-perf-Add-support-for-hv_24x7-nest-events-on-mu.patch + 0009-qa-perfevent-Test-hv_24x7-events-on-multinode.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=100 --- pcp.changes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcp.changes b/pcp.changes index 870915a..13b1627 100644 --- a/pcp.changes +++ b/pcp.changes @@ -2,6 +2,10 @@ Wed Feb 10 11:03:13 UTC 2021 - David Disseldorp - Drop unnecessary %pre/%post recursive chown calls; (bsc#1152533) +- Changelog for patches carried as part of 5.2.2 source tarball: + + 0007-pmdas-perf-Add-cpunumber-option-for-dynamic-perf-eve.patch + + 0008-pmdas-perf-Add-support-for-hv_24x7-nest-events-on-mu.patch + + 0009-qa-perfevent-Test-hv_24x7-events-on-multinode.patch ------------------------------------------------------------------- Thu Nov 19 11:39:51 UTC 2020 - David Disseldorp From 407d51349af3474714f9436f861813f560ef3e506325def1fbc1b1eddee48e79 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Thu, 11 Feb 2021 15:02:33 +0000 Subject: [PATCH 4/8] Mention another patch which is in the upstream tarball. + build-drop-old-config-file-transition-code-from-rpm-.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=101 --- pcp.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/pcp.changes b/pcp.changes index 13b1627..e15846d 100644 --- a/pcp.changes +++ b/pcp.changes @@ -3,6 +3,7 @@ Wed Feb 10 11:03:13 UTC 2021 - David Disseldorp - Drop unnecessary %pre/%post recursive chown calls; (bsc#1152533) - Changelog for patches carried as part of 5.2.2 source tarball: + + build-drop-old-config-file-transition-code-from-rpm-.patch + 0007-pmdas-perf-Add-cpunumber-option-for-dynamic-perf-eve.patch + 0008-pmdas-perf-Add-support-for-hv_24x7-nest-events-on-mu.patch + 0009-qa-perfevent-Test-hv_24x7-events-on-multinode.patch From 1abd95a65a7f7956bfc672598b29a4b5404cb9f771bec51f77c65289f57b996c Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Mon, 15 Feb 2021 00:26:25 +0000 Subject: [PATCH 5/8] Accepting request 872213 from home:dmdiss:pcp_522 - Spec file fixes and cleanups + disable pcp-export-zabbix-agent to avoid conflicting /etc/zabbix/ ownership. + fix unversioned Provides + remove unused python2 build logic and unconditionally enable python3 + 0009-remove-rundir-install.patch OBS-URL: https://build.opensuse.org/request/show/872213 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=102 --- 0009-remove-rundir-install.patch | 16 ++ pcp.changes | 10 ++ pcp.spec | 261 ++++++------------------------- 3 files changed, 77 insertions(+), 210 deletions(-) create mode 100644 0009-remove-rundir-install.patch diff --git a/0009-remove-rundir-install.patch b/0009-remove-rundir-install.patch new file mode 100644 index 0000000..e8bbaa6 --- /dev/null +++ b/0009-remove-rundir-install.patch @@ -0,0 +1,16 @@ +Index: pcp/GNUmakefile +=================================================================== +--- pcp.orig/GNUmakefile ++++ pcp/GNUmakefile +@@ -80,9 +80,9 @@ ifneq ($(TARGET_OS),mingw) + $(INSTALL) -m 1777 -d $(PCP_TMPFILE_DIR) + endif + $(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR) +-ifeq "$(findstring $(PACKAGE_DISTRIBUTION), debian)" "" ++ifeq (, $(filter debian suse, $(PACKAGE_DISTRIBUTION))) + # PCP_RUN_DIR usually -> /var/run which may be a temporary filesystem +- # and Debian's lintian complains about packages including /var/run/xxx ++ # and lint checks may complain about packages including /var/run/xxx + # artifacts ... PCP_RUN_DIR is also conditionally created on the + # fly in each before use case, so the inclusion in the package is + # sometimes desirable, but not mandatory diff --git a/pcp.changes b/pcp.changes index e15846d..ea4d794 100644 --- a/pcp.changes +++ b/pcp.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Feb 14 21:43:28 UTC 2021 - David Disseldorp + +- Spec file fixes and cleanups + + disable pcp-export-zabbix-agent to avoid conflicting /etc/zabbix/ + ownership. + + fix unversioned Provides + + remove unused python2 build logic and unconditionally enable python3 + + 0009-remove-rundir-install.patch + ------------------------------------------------------------------- Wed Feb 10 11:03:13 UTC 2021 - David Disseldorp diff --git a/pcp.spec b/pcp.spec index 806984c..642bed4 100644 --- a/pcp.spec +++ b/pcp.spec @@ -97,6 +97,8 @@ Patch6: 0006-pmsnap-control-var-www-srv-www.patch Patch7: 0007-pmns-Make-drop-duplicate-if-else.patch # PATCH-FIX-UPSTREAM, (queued) ddiss@suse.de Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch +# PATCH-FIX-UPSTREAM, (queued) ddiss@suse.de +Patch9: 0009-remove-rundir-install.patch %if 0%{?fedora} || 0%{?rhel} %global disable_selinux 0 @@ -133,28 +135,9 @@ Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch %global disable_sheet2pcp 1 -%global disable_python2 0 -# No python3 development environment before el8 -%if 0%{?rhel} == 0 || 0%{?rhel} > 7 %global disable_python3 0 -# Do we wish to mandate python3 use in pcp? (f22+ and el8+) -%else -%global disable_python3 1 -%endif - -# some Python3 deps missing for SLE <= 12SP2 -%if 0%{?sle_version} && 0%{?sle_version} <= 120200 -%global disable_python3 1 -%endif - -# drop python2 packages on Tumbleweed and SLE15 -%if 0%{?fedora} >= 26 || 0%{?rhel} > 7 || 0%{?suse_version} >= 1500 +# drop python2 packages %global _with_python2 --with-python=no -%global disable_python2 1 -%global __python2 python2 -%else -%global __python2 python -%endif %if 0%{?fedora} >= 24 || 0%{?rhel} > 7 %global perl_interpreter perl-interpreter @@ -186,7 +169,7 @@ Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch # support for pmdajson %if 0%{?rhel} == 0 || 0%{?rhel} > 6 -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %global disable_json 0 %else %global disable_json 1 @@ -197,7 +180,7 @@ Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch # No mssql ODBC driver on non-x86 platforms %ifarch x86_64 -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %global disable_mssql 0 %else %global disable_mssql 1 @@ -284,14 +267,21 @@ Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch %global disable_lio 0 %endif +%if 0%{?suse_version} +# pcp-export-zabbix-agent installs under a zabbix owned directory +%global disable_zabbix_agent 1 +%else +%global disable_zabbix_agent 0 +%endif + # KVM PMDA moved into pcp (no longer using Perl, default on) Obsoletes: pcp-pmda-kvm < %{version} -Provides: pcp-pmda-kvm +Provides: pcp-pmda-kvm = %{version} # PCP REST APIs are now provided by pmproxy Obsoletes: pcp-webapi < 5.0.0 Obsoletes: pcp-webapi-debuginfo < 5.0.0 -Provides: pcp-webapi +Provides: pcp-webapi = %{version} # PCP discovery service now provided by pmfind Obsoletes: pcp-manager < 5.2.0 @@ -395,10 +385,6 @@ Requires: which Requires: cpp Requires: cyrus-sasl Requires: sysconfig -%if !%{disable_python2} -# pmatop needs curses.py -Requires: %{__python2}-curses -%endif %else Requires: initscripts %endif @@ -875,6 +861,7 @@ Requires: %{lib_pkg} = %{version}-%{release} 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_zabbix_agent} # # pcp-export-zabbix-agent # @@ -885,13 +872,17 @@ Group: %{pcp_gr} URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} >= %{version}-%{release} +%else +# this package nests files under %{_sysconfdir}/zabbix, which is provided by: +Requires: zabbix-server %endif %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. +%endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} # # pcp-export-pcp2elasticsearch # @@ -901,15 +892,9 @@ License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io Requires: %{lib_pkg} >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} Requires: python3-requests BuildRequires: python3-requests -%else -Requires: %{__python2}-pcp = %{version}-%{release} -Requires: %{__python2}-requests -BuildRequires: %{__python2}-requests -%endif %description export-pcp2elasticsearch Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -927,11 +912,7 @@ URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} = %{version}-%{release} %endif -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%else -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %description export-pcp2graphite Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -947,15 +928,9 @@ URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} >= %{version}-%{release} %endif -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} Requires: python3-requests BuildRequires: python3-requests -%else -Requires: %{__python2}-pcp = %{version}-%{release} -Requires: %{__python2}-requests -BuildRequires: %{__python2}-requests -%endif %description export-pcp2influxdb Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -970,11 +945,7 @@ Summary: Performance Co-Pilot tools for exporting PCP metrics in JSON for License: %{license_gplv2plus} Group: %{pcp_gr} Requires: %{lib_pkg} >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%else -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %description export-pcp2json Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -989,11 +960,7 @@ Summary: Performance Co-Pilot tools for exporting PCP metrics to Apache S License: %{license_gplv2plus} Group: %{pcp_gr} Requires: %{lib_pkg} >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%else -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %description export-pcp2spark Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1010,15 +977,9 @@ Summary: Performance Co-Pilot tools for exporting PCP metrics to Excel License: %{license_gplv2plus} Group: %{pcp_gr} Requires: %{lib_pkg} >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-openpyxl Requires: python3-pcp = %{version}-%{release} BuildRequires: python3-openpyxl -%else -Requires: %{__python2}-openpyxl -Requires: %{__python2}-pcp = %{version}-%{release} -BuildRequires: %{__python2}-openpyxl -%endif %description export-pcp2xlsx Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1033,11 +994,7 @@ Summary: Performance Co-Pilot tools for exporting PCP metrics in XML form License: %{license_gplv2plus} Group: %{pcp_gr} Requires: %{lib_pkg} >= %{version}-%{release} -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%else -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %description export-pcp2xml Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1051,11 +1008,7 @@ Summary: Performance Co-Pilot tools for exporting PCP metrics to Zabbix License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%else -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %description export-pcp2zabbix Performance Co-Pilot (PCP) front-end tools for exporting metric values @@ -1623,7 +1576,7 @@ collecting metrics about the Device Mapper Cache and Thin Client. # end pcp-pmda-dm -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} # # pcp-pmda-gluster # @@ -1632,11 +1585,8 @@ Summary: Performance Co-Pilot (PCP) metrics for the Gluster filesystem License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-gluster This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the gluster filesystem. @@ -1650,11 +1600,8 @@ Summary: Performance Co-Pilot (PCP) metrics for NFS Clients License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-nfsclient This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics for NFS Clients. @@ -1669,15 +1616,10 @@ Summary: Performance Co-Pilot (PCP) metrics for PostgreSQL License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp Requires: python3-psycopg2 BuildRequires: python3-psycopg2 -%else -Requires: %{__python2}-pcp -Requires: %{__python2}-psycopg2 -BuildRequires: %{__python2}-psycopg2 -%endif + %description pmda-postgresql This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the PostgreSQL database. @@ -1692,11 +1634,8 @@ Summary: Performance Co-Pilot (PCP) metrics for compressed swap License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-zswap This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about compressed swap. @@ -1710,11 +1649,8 @@ Summary: Performance Co-Pilot (PCP) metrics for the Unbound DNS Resolver License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-unbound This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the Unbound DNS Resolver. @@ -1728,11 +1664,8 @@ Summary: Performance Co-Pilot (PCP) metrics for Intel MIC cards License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-mic This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about Intel MIC cards. @@ -1746,11 +1679,8 @@ Summary: Performance Co-Pilot (PCP) metrics for HAProxy License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-haproxy This package contains the PCP Performance Metrics Domain Agent (PMDA) for extracting performance metrics from HAProxy over the HAProxy stats socket. @@ -1765,7 +1695,6 @@ Summary: Performance Co-Pilot (PCP) metrics for virtual machines License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} %if 0%{?suse_version} Requires: python3-libvirt-python BuildRequires: python3-libvirt-python @@ -1776,13 +1705,7 @@ BuildRequires: libvirt-python3 Requires: python3-lxml BuildRequires: python3-lxml Requires: python3-pcp -%else -Requires: %{__python2}-lxml -BuildRequires: %{__python2}-lxml -Requires: %{__python2}-pcp -Requires: libvirt-%{__python2} -BuildRequires: libvirt-%{__python2} -%endif + %description pmda-libvirt This package contains the PCP Performance Metrics Domain Agent (PMDA) for extracting virtualisation statistics from libvirt about behaviour of guest @@ -1798,11 +1721,8 @@ Summary: Performance Co-Pilot (PCP) metrics for Elasticsearch License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-elasticsearch This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about Elasticsearch. @@ -1816,11 +1736,8 @@ Summary: Performance Co-Pilot (PCP) metrics for Open vSwitch License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-openvswitch This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from Open vSwitch. @@ -1834,11 +1751,8 @@ Summary: Performance Co-Pilot (PCP) metrics for RabbitMQ queues License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-rabbitmq This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about RabbitMQ message queues. @@ -1853,7 +1767,6 @@ Summary: Performance Co-Pilot (PCP) metrics for the LIO subsystem License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp %if 0%{?suse_version} Requires: python3-rtslib-fb @@ -1862,16 +1775,6 @@ BuildRequires: python3-rtslib-fb Requires: python3-rtslib BuildRequires: python3-rtslib %endif -%else # !%{disable_python3} -Requires: %{__python2}-pcp -%if 0%{?suse_version} -Requires: %{__python2}-rtslib-fb -BuildRequires: %{__python2}-rtslib-fb -%else -Requires: %{__python2}-rtslib -BuildRequires: %{__python2}-rtslib -%endif -%endif # !%{disable_python3} %description pmda-lio This package provides a PMDA to gather performance metrics from the kernels iSCSI target interface (LIO). The metrics are stored by LIO within the Linux @@ -1889,17 +1792,11 @@ Summary: Performance Co-Pilot (PCP) metrics from OpenMetrics endpoints License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp Requires: python3-requests BuildRequires: python3-requests -%else -Requires: %{__python2}-pcp -Requires: %{__python2}-requests -BuildRequires: %{__python2}-requests -%endif Obsoletes: pcp-pmda-prometheus < 5.0.0 -Provides: pcp-pmda-prometheus < 5.0.0 +Provides: pcp-pmda-prometheus = %{version} %description pmda-openmetrics This package contains the PCP Performance Metrics Domain Agent (PMDA) for @@ -1914,11 +1811,7 @@ Summary: Performance Co-Pilot (PCP) metrics for hardware sensors License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif # rewritten in python, so there is no longer a debuginfo package Obsoletes: pcp-pmda-lmsensors-debuginfo @@ -1938,17 +1831,14 @@ URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} = %{version}-%{release} %endif -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-netcheck This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from simple network checks. # end pcp-pmda-netcheck -%endif # !%{disable_python2} || !%{disable_python3} +%endif # !%{disable_python3} %if !%{disable_mssql} # @@ -1962,11 +1852,8 @@ URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} = %{version}-%{release} %endif -%if !%{disable_python3} Requires: python3-pcp -%else -Requires: %{__python2}-pcp -%endif + %description pmda-mssql This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics from Microsoft SQL Server. @@ -1982,19 +1869,12 @@ Summary: Performance Co-Pilot (PCP) metrics for JSON data License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp Requires: python3-six BuildRequires: python3-six Requires: python3-jsonpointer BuildRequires: python3-jsonpointer -%else -Requires: %{__python2}-jsonpointer -Requires: %{__python2}-pcp -Requires: %{__python2}-six -BuildRequires: %{__python2}-jsonpointer -BuildRequires: %{__python2}-six -%endif + %description pmda-json This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics output in JSON. @@ -2350,36 +2230,6 @@ automated pmie diagnosis, alerting and self-healing for the localhost. A timer script also writes daily performance summary reports similar to those written by sysstat. -%if !%{disable_python2} -# -# python-pcp. This is the PCP library bindings for python. -# -%package -n %{__python2}-pcp -Summary: Performance Co-Pilot (PCP) Python bindings and documentation -License: %{license_gplv2plus} -Group: %{lib_gr} -URL: https://pcp.io -BuildRequires: %{__python2}-devel -Requires: %{lib_pkg} = %{version}-%{release} -%if 0%{?suse_version} -Requires: libpcp_gui%{libpcp_gui_sover} = %{version}-%{release} -Requires: libpcp_import%{libpcp_import_sover} = %{version}-%{release} -Requires: libpcp_mmv%{libpcp_mmv_sover} = %{version}-%{release} -%endif -Requires: %{__python2} -Requires: pcp = %{version}-%{release} -BuildRequires: %{__python2}-setuptools -%if 0%{?fedora} >= 26 || 0%{?rhel} > 7 || 0%{?sle_version} > 150000 -# on these platforms, python2-pcp replaces python-pcp -Obsoletes: python-pcp -%endif - -%description -n %{__python2}-pcp -This python PCP module contains the language bindings for -Performance Metric API (PMAPI) monitor tools and Performance -Metric Domain Agent (PMDA) collector tools written in Python. -%endif # !%{disable_python2} - %if !%{disable_python3} # # python3-pcp. This is the PCP library bindings for python3. @@ -2404,7 +2254,7 @@ Performance Metric API (PMAPI) monitor tools and Performance Metric Domain Agent (PMDA) collector tools written in Python3. %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} # # pcp-system-tools # @@ -2413,12 +2263,7 @@ Summary: Performance Co-Pilot (PCP) System and Monitoring Tools License: %{license_gplv2plus} Group: %{pcp_gr} URL: https://pcp.io -%if !%{disable_python3} Requires: python3-pcp = %{version}-%{release} -%endif -%if !%{disable_python2} -Requires: %{__python2}-pcp = %{version}-%{release} -%endif %if !0%{?suse_version} Requires: %{lib_pkg} = %{version}-%{release} %endif @@ -2509,6 +2354,7 @@ updated policy package. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 autoconf @@ -2588,6 +2434,11 @@ rm -fr $RPM_BUILD_ROOT/%{_pmdasexecdir}/mssql rm -fr $RPM_BUILD_ROOT/%{_confdir}/mssql %endif +%if %{disable_zabbix_agent} +rm -fr $RPM_BUILD_ROOT/%{_libdir}/zabbix +rm -fr $RPM_BUILD_ROOT/%{_sysconfdir}/zabbix +%endif + %if %{disable_sdt} rm -fr $RPM_BUILD_ROOT/%{_tapsetdir} %endif @@ -2704,7 +2555,7 @@ sed -e 's#^#'%{_bashcompdir}'\/#' >base_bashcomp.list # Separate the pcp-system-tools package files. # pmiostat is a back-compat symlink to its pcp(1) sub-command variant # so its also in pcp-system-tools. -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} ls -1 $RPM_BUILD_ROOT/%{_bindir} |\ grep -E -e 'pmiostat|pmrep|dstat|pcp2csv' |\ sed -e 's#^#'%{_bindir}'\/#' >pcp-system-tools.list @@ -2725,7 +2576,7 @@ ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ %endif ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\ -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} grep -E -v 'atop|dmcache|dstat|free|iostat|ipcs|lvmcache|mpstat' |\ grep -E -v 'numastat|shping|tapestat|uptime|verify|selinux-setup' |\ %endif @@ -3470,7 +3321,7 @@ PCP_LOG_DIR=%{_logsdir} %config(noreplace) %{_confdir}/bpftrace %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files pmda-gluster %{_pmdasdir}/gluster %{_pmdasexecdir}/gluster @@ -3542,14 +3393,14 @@ PCP_LOG_DIR=%{_logsdir} %{_pmdasexecdir}/netcheck %{_confdir}/netcheck -%endif # !%{disable_python2} || !%{disable_python3} +%endif # !%{disable_python3} +%if !%{disable_zabbix_agent} %files export-zabbix-agent %{_libdir}/zabbix -# FIXME: %{_sysconfdir}/zabbix is provided by zabbix-server -%dir %{_sysconfdir}/zabbix %dir %{_sysconfdir}/zabbix/zabbix_agentd.d %config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.d/zbxpcp.conf +%endif %if !%{disable_mssql} %files pmda-mssql @@ -3674,16 +3525,6 @@ PCP_LOG_DIR=%{_logsdir} %dir %{_prefix}/lib/perl5/vendor_perl/*/PCP %endif -%if !%{disable_python2} -%files -n %{__python2}-pcp -f python-pcp.list.rpm -%defattr(-,root,root) -%if 0%{?suse_version} -%{python_sitearch}/*.so -%dir %{python_sitearch}/pcp -%{python_sitearch}/pcp -%endif -%endif - %if !%{disable_python3} %files -n python3-pcp -f python3-pcp.list.rpm %defattr(-,root,root) @@ -3725,7 +3566,7 @@ PCP_LOG_DIR=%{_logsdir} %dir %{_selinuxexecdir} %endif -%if !%{disable_python2} || !%{disable_python3} +%if !%{disable_python3} %files system-tools -f pcp-system-tools.list %dir %{_confdir}/dstat %dir %{_confdir}/pmrep From 99cb6837a27da69a9b03dd04a0d53444ca2e316a9e5efc9b8c7dd45ce2ecded7 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Mon, 15 Feb 2021 11:58:57 +0000 Subject: [PATCH 6/8] Accepting request 872372 from home:dmdiss:pcp_522 Don't redefine _libexecdir. Drop (queued) tag from upstreamed patches. OBS-URL: https://build.opensuse.org/request/show/872372 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=103 --- pcp.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pcp.spec b/pcp.spec index 642bed4..901e7ca 100644 --- a/pcp.spec +++ b/pcp.spec @@ -43,7 +43,6 @@ %global license_lgplv2plus LGPL-2.0+ %global license_lgplv21plus LGPL-2.1+ %global license_mit MIT -%global _libexecdir %{_libdir} %else %global pcp_gr Applications/System %global lib_pkg pcp-libs @@ -95,9 +94,9 @@ Patch5: 0005-SUSE-fy-pmsnap-control-path.patch Patch6: 0006-pmsnap-control-var-www-srv-www.patch # PATCH-FIX-UPSTREAM, ddiss@suse.de Patch7: 0007-pmns-Make-drop-duplicate-if-else.patch -# PATCH-FIX-UPSTREAM, (queued) ddiss@suse.de +# PATCH-FIX-UPSTREAM, ddiss@suse.de Patch8: 0008-fixes-for-GH-1140-PCP_TMPFILE_DIR-used-in-build.patch -# PATCH-FIX-UPSTREAM, (queued) ddiss@suse.de +# PATCH-FIX-UPSTREAM, ddiss@suse.de Patch9: 0009-remove-rundir-install.patch %if 0%{?fedora} || 0%{?rhel} From 0c6e8899958bde4c98de42767941d4e4eea830e0f157efe622b5dbb0467eb9e1 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 17 Feb 2021 22:42:16 +0000 Subject: [PATCH 7/8] Accepting request 873234 from home:dmdiss:pcp_522 - Add SUSE specific dejavu-fonts dependency for pcp-gui sans OBS-URL: https://build.opensuse.org/request/show/873234 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=104 --- pcp.changes | 1 + pcp.spec | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pcp.changes b/pcp.changes index ea4d794..b3fb887 100644 --- a/pcp.changes +++ b/pcp.changes @@ -7,6 +7,7 @@ Sun Feb 14 21:43:28 UTC 2021 - David Disseldorp + fix unversioned Provides + remove unused python2 build logic and unconditionally enable python3 + 0009-remove-rundir-install.patch +- Add SUSE specific dejavu-fonts dependency for pcp-gui sans ------------------------------------------------------------------- Wed Feb 10 11:03:13 UTC 2021 - David Disseldorp diff --git a/pcp.spec b/pcp.spec index 901e7ca..f65640d 100644 --- a/pcp.spec +++ b/pcp.spec @@ -2282,8 +2282,10 @@ Group: %{pcp_gr} URL: https://pcp.io %if !0%{?suse_version} Requires: %{lib_pkg} = %{version}-%{release} -%endif Requires: liberation-sans-fonts +%else +Requires: dejavu-fonts +%endif BuildRequires: hicolor-icon-theme %description gui From 9c640009860931103560e9a919e18ffaf84e0f0ab705551024035ebec99ebc6c Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Thu, 18 Feb 2021 11:33:19 +0000 Subject: [PATCH 8/8] Accepting request 873350 from home:dmdiss:pcp_522 - Disable pcp-pmda-libvirt to avoid build dependency loop OBS-URL: https://build.opensuse.org/request/show/873350 OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=105 --- pcp.changes | 1 + pcp.spec | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pcp.changes b/pcp.changes index b3fb887..4a1c147 100644 --- a/pcp.changes +++ b/pcp.changes @@ -8,6 +8,7 @@ Sun Feb 14 21:43:28 UTC 2021 - David Disseldorp + remove unused python2 build logic and unconditionally enable python3 + 0009-remove-rundir-install.patch - Add SUSE specific dejavu-fonts dependency for pcp-gui sans +- Disable pcp-pmda-libvirt to avoid build dependency loop ------------------------------------------------------------------- Wed Feb 10 11:03:13 UTC 2021 - David Disseldorp diff --git a/pcp.spec b/pcp.spec index f65640d..2d236ac 100644 --- a/pcp.spec +++ b/pcp.spec @@ -238,7 +238,9 @@ Patch9: 0009-remove-rundir-install.patch %global disable_libuv 1 %endif -%global disable_libvirt 0 +# libvirt pmda introduces a dependency loop: ffmpeg-4=>gstreamer-plugins-bad +# =>libquicktime=>libvirt=>pcp=>samba=>Wireshark +%global disable_libvirt 1 %if 0%{?suse_version} # SUSE doesn't currently ship the python psycopg2 dependency