Accepting request 663403 from home:dmdiss:fate326864_pcp_42

- Use systemd timers instead of crontab; (bsc#1115413).
  + 0007-pmie-add-systemd-timers-as-cron-alternative.patch
  + 0008-pmlogger_daily-add-systemd-timers-as-cron-alternativ.patch
  + 0009-pmlogger_daily_report-add-systemd-timers-as-cron-alt.patch

- Upgrade to 4.2.0 (fate#326865)
- python package dependency changes
  + add setuptools and python-requests
  + fix python-jsonpointer
  + disable pcp-pmda-postgresql due to missing psycopg2 dependency

OBS-URL: https://build.opensuse.org/request/show/663403
OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=65
This commit is contained in:
David Disseldorp 2019-01-08 10:31:11 +00:00 committed by Git OBS Bridge
parent 4c9c407f67
commit e303564cab
8 changed files with 583 additions and 59 deletions

View File

@ -0,0 +1,144 @@
From 7264f3bee5f1c9bf2fc666ca2a862c25b1173992 Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Mon, 7 Jan 2019 01:27:54 +0100
Subject: [PATCH] pmie: add systemd timers as cron alternative
The pmie_check and pmie_daily check timer/service files are
installed by default with ENABLE_SYSTEMD. crontab.docker is kept as-is.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
src/pmie/GNUmakefile | 22 ++++++++++++++++++++--
src/pmie/pmie_check.service.in | 8 ++++++++
src/pmie/pmie_check.timer | 10 ++++++++++
src/pmie/pmie_daily.service.in | 8 ++++++++
src/pmie/pmie_daily.timer | 8 ++++++++
5 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 src/pmie/pmie_check.service.in
create mode 100644 src/pmie/pmie_check.timer
create mode 100644 src/pmie/pmie_daily.service.in
create mode 100644 src/pmie/pmie_daily.timer
diff --git a/src/pmie/GNUmakefile b/src/pmie/GNUmakefile
index e27f2968d..11f472c11 100644
--- a/src/pmie/GNUmakefile
+++ b/src/pmie/GNUmakefile
@@ -18,7 +18,7 @@ include $(TOPDIR)/src/include/builddefs
SUBDIRS = src examples
OTHERS = control stomp rc_pmie pmie2col.sh pmie_check.sh pmie_daily.sh
-LDIRT = crontab crontab.docker pmie.service
+LDIRT = crontab crontab.docker pmie.service pmie_daily.service pmie_check.service
ifeq ($(TARGET_OS),linux)
CRONTAB_USER = $(PCP_USER)
@@ -28,7 +28,7 @@ CRONTAB_USER =
CRONTAB_PATH = $(PCP_SYSCONF_DIR)/pmie/crontab
endif
-default:: crontab crontab.docker pmie.service
+default:: crontab crontab.docker pmie.service pmie_daily.service pmie_check.service
default:: $(SUBDIRS)
$(SUBDIRS_MAKERULE)
@@ -50,6 +50,10 @@ endif
$(INSTALL) -m 755 rc_pmie $(PCP_RC_DIR)/pmie
ifeq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 pmie.service $(PCP_SYSTEMDUNIT_DIR)/pmie.service
+ $(INSTALL) -m 644 pmie_daily.timer $(PCP_SYSTEMDUNIT_DIR)/pmie_daily.timer
+ $(INSTALL) -m 644 pmie_daily.service $(PCP_SYSTEMDUNIT_DIR)/pmie_daily.service
+ $(INSTALL) -m 644 pmie_check.timer $(PCP_SYSTEMDUNIT_DIR)/pmie_check.timer
+ $(INSTALL) -m 644 pmie_check.service $(PCP_SYSTEMDUNIT_DIR)/pmie_check.service
endif
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_LOG_DIR)/pmie
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR)/pmie
@@ -61,7 +65,9 @@ ifeq ($(TARGET_OS),linux)
$(INSTALL) -m 755 -d $(PCP_LOG_DIR)/pmie
$(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/pmie
endif
+ifneq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 crontab $(CRONTAB_PATH)
+endif
include $(BUILDRULES)
@@ -72,6 +78,18 @@ install_pcp : install
pmie.service : pmie.service.in
$(SED) -e 's;@path@;'$(PCP_RC_DIR)';' <$< >$@
+pmie_check.service : pmie_check.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ # END
+
+pmie_daily.service : pmie_daily.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ # END
+
crontab: crontab.in
$(SED) -e 's;@user@;'$(CRONTAB_USER)';' -e 's;@path@;'$(PCP_BINADM_DIR)';g' $< > $@
diff --git a/src/pmie/pmie_check.service.in b/src/pmie/pmie_check.service.in
new file mode 100644
index 000000000..f216f7a67
--- /dev/null
+++ b/src/pmie/pmie_check.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Check PMIE instances are running
+Documentation=man:pmie(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmie_check -C
+User=@PCP_USER@
diff --git a/src/pmie/pmie_check.timer b/src/pmie/pmie_check.timer
new file mode 100644
index 000000000..ae91a192b
--- /dev/null
+++ b/src/pmie/pmie_check.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Half-hourly check of PMIE instances
+
+[Timer]
+OnCalendar=*-*-* *:28:00
+OnCalendar=*-*-* *:58:00
+
+[Install]
+WantedBy=timers.target
+
diff --git a/src/pmie/pmie_daily.service.in b/src/pmie/pmie_daily.service.in
new file mode 100644
index 000000000..ea933da4b
--- /dev/null
+++ b/src/pmie/pmie_daily.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Process PMIE logs
+Documentation=man:pmie(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmie_daily -X xz -x 3
+User=@PCP_USER@
diff --git a/src/pmie/pmie_daily.timer b/src/pmie/pmie_daily.timer
new file mode 100644
index 000000000..e36b79990
--- /dev/null
+++ b/src/pmie/pmie_daily.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Daily processing of PMIE logs
+
+[Timer]
+OnCalendar=*-*-* 00:08:00
+
+[Install]
+WantedBy=timers.target
--
2.13.7

View File

@ -0,0 +1,185 @@
From 4482bde0673fe1e548060a5c7ef6f58cf43209c3 Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Mon, 7 Jan 2019 02:07:01 +0100
Subject: [PATCH] pmlogger_daily: add systemd timers as cron alternative
The timer and service files are installed by default with
ENABLE_SYSTEMD. crontab.docker is kept as-is.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
src/pmlogger/GNUmakefile | 32 ++++++++++++++++++++++++++--
src/pmlogger/pmlogger_daily.service.in | 8 +++++++
src/pmlogger/pmlogger_daily.timer | 8 +++++++
src/pmlogger/pmlogger_daily_check.service.in | 8 +++++++
src/pmlogger/pmlogger_daily_check.timer | 9 ++++++++
src/pmlogger/pmlogger_daily_poll.service.in | 8 +++++++
src/pmlogger/pmlogger_daily_poll.timer | 8 +++++++
7 files changed, 79 insertions(+), 2 deletions(-)
create mode 100644 src/pmlogger/pmlogger_daily.service.in
create mode 100644 src/pmlogger/pmlogger_daily.timer
create mode 100644 src/pmlogger/pmlogger_daily_check.service.in
create mode 100644 src/pmlogger/pmlogger_daily_check.timer
create mode 100644 src/pmlogger/pmlogger_daily_poll.service.in
create mode 100644 src/pmlogger/pmlogger_daily_poll.timer
diff --git a/src/pmlogger/GNUmakefile b/src/pmlogger/GNUmakefile
index 75af514d5..942458e1f 100644
--- a/src/pmlogger/GNUmakefile
+++ b/src/pmlogger/GNUmakefile
@@ -20,7 +20,9 @@ SUBDIRS = src
OTHERS = pmnewlog.sh control rc_pmlogger \
pmlogger_daily.sh pmlogger_check.sh pmlogger_merge.sh pmlogmv.sh \
pmlogger_daily_report.sh pmlogger_rewrite.sh
-LDIRT = crontab crontab.docker crontab.daily_report pmlogger.service
+LDIRT = crontab crontab.docker crontab.daily_report pmlogger.service \
+ pmlogger_daily.service pmlogger_daily_poll.service \
+ pmlogger_daily_check.service
ifeq ($(TARGET_OS),linux)
CRONTAB_USER = $(PCP_USER)
@@ -31,7 +33,7 @@ CRONTAB_PATH = $(PCP_SYSCONF_DIR)/pmlogger/crontab
endif
CRONTAB_DAILY_REPORT_PATH = $(CRONTAB_PATH)-daily-report
-default:: crontab crontab.docker pmlogger.service crontab.daily_report
+default:: $(LDIRT)
default:: $(SUBDIRS)
$(SUBDIRS_MAKERULE)
@@ -57,6 +59,12 @@ endif
$(INSTALL) -m 755 rc_pmlogger $(PCP_RC_DIR)/pmlogger
ifeq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 pmlogger.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger.service
+ $(INSTALL) -m 644 pmlogger_daily.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily.timer
+ $(INSTALL) -m 644 pmlogger_daily.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily.service
+ $(INSTALL) -m 644 pmlogger_daily_poll.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_poll.timer
+ $(INSTALL) -m 644 pmlogger_daily_poll.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_poll.service
+ $(INSTALL) -m 644 pmlogger_daily_check.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_check.timer
+ $(INSTALL) -m 644 pmlogger_daily_check.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_check.service
endif
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_LOG_DIR)/pmlogger
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR)/pmlogger
@@ -68,7 +76,9 @@ ifeq ($(TARGET_OS),linux)
$(INSTALL) -m 755 -d $(PCP_LOG_DIR)/pmlogger
$(INSTALL) -m 1777 -d $(PCP_TMP_DIR)/pmlogger
endif
+ifneq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 crontab $(CRONTAB_PATH)
+endif
$(INSTALL) -m 644 utilproc.sh $(PCP_SHARE_DIR)/lib/utilproc.sh
$(INSTALL) -m 755 pmlogger_daily_report.sh $(PCP_BINADM_DIR)/pmlogger_daily_report$(SHELLSUFFIX)
$(INSTALL) -m 644 crontab.daily_report $(CRONTAB_DAILY_REPORT_PATH)
@@ -83,6 +93,24 @@ install_pcp : install
pmlogger.service : pmlogger.service.in
$(SED) -e 's;@path@;'$(PCP_RC_DIR)';' <$< >$@
+pmlogger_daily.service : pmlogger_daily.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ # END
+
+pmlogger_daily_poll.service : pmlogger_daily_poll.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ # END
+
+pmlogger_daily_check.service : pmlogger_daily_check.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ # END
+
crontab : crontab.in
$(SED) -e 's;@user@;'$(CRONTAB_USER)';' -e 's;@path@;'$(PCP_BINADM_DIR)';' $< > $@
diff --git a/src/pmlogger/pmlogger_daily.service.in b/src/pmlogger/pmlogger_daily.service.in
new file mode 100644
index 000000000..d08438370
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Process archive logs
+Documentation=man:pmlogger(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmlogger_daily
+User=@PCP_USER@
diff --git a/src/pmlogger/pmlogger_daily.timer b/src/pmlogger/pmlogger_daily.timer
new file mode 100644
index 000000000..92bc398cf
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Daily processing of archive logs
+
+[Timer]
+OnCalendar=*-*-* 00:10:00
+
+[Install]
+WantedBy=timers.target
diff --git a/src/pmlogger/pmlogger_daily_check.service.in b/src/pmlogger/pmlogger_daily_check.service.in
new file mode 100644
index 000000000..56fd47c55
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_check.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Check pmlogger instances are running
+Documentation=man:pmlogger(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmlogger_daily -C
+User=@PCP_USER@
diff --git a/src/pmlogger/pmlogger_daily_check.timer b/src/pmlogger/pmlogger_daily_check.timer
new file mode 100644
index 000000000..381b2c5ab
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_check.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Half-hourly check of pmlogger instances
+
+[Timer]
+OnCalendar=*-*-* *:25:00
+OnCalendar=*-*-* *:55:00
+
+[Install]
+WantedBy=timers.target
diff --git a/src/pmlogger/pmlogger_daily_poll.service.in b/src/pmlogger/pmlogger_daily_poll.service.in
new file mode 100644
index 000000000..da5859d8b
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_poll.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Poll log processing
+Documentation=man:pmlogger(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmlogger_daily -p
+User=@PCP_USER@
diff --git a/src/pmlogger/pmlogger_daily_poll.timer b/src/pmlogger/pmlogger_daily_poll.timer
new file mode 100644
index 000000000..0b4650b37
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_poll.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Hourly polling of log processing
+
+[Timer]
+OnCalendar=*-*-* *:30:00
+
+[Install]
+WantedBy=timers.target
--
2.13.7

View File

@ -0,0 +1,136 @@
From f026b0e562172e05fd2753caad2ae41e390cad90 Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Mon, 7 Jan 2019 13:24:52 +0100
Subject: [PATCH] pmlogger_daily_report: add systemd timers as cron alternative
The timer and service files are installed by default with
ENABLE_SYSTEMD.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
src/pmlogger/GNUmakefile | 23 +++++++++++++++++++++-
src/pmlogger/pmlogger_daily_report.service.in | 8 ++++++++
src/pmlogger/pmlogger_daily_report.timer | 8 ++++++++
src/pmlogger/pmlogger_daily_report_poll.service.in | 8 ++++++++
src/pmlogger/pmlogger_daily_report_poll.timer | 8 ++++++++
5 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 src/pmlogger/pmlogger_daily_report.service.in
create mode 100644 src/pmlogger/pmlogger_daily_report.timer
create mode 100644 src/pmlogger/pmlogger_daily_report_poll.service.in
create mode 100644 src/pmlogger/pmlogger_daily_report_poll.timer
diff --git a/src/pmlogger/GNUmakefile b/src/pmlogger/GNUmakefile
index fe94a3964..845575cb6 100644
--- a/src/pmlogger/GNUmakefile
+++ b/src/pmlogger/GNUmakefile
@@ -22,7 +22,8 @@ OTHERS = pmnewlog.sh control rc_pmlogger \
pmlogger_daily_report.sh pmlogger_rewrite.sh
LDIRT = crontab crontab.docker crontab.daily_report pmlogger.service \
pmlogger_daily.service pmlogger_daily_poll.service \
- pmlogger_daily_check.service
+ pmlogger_daily_check.service pmlogger_daily_report.service \
+ pmlogger_daily_report_poll.service
ifeq ($(TARGET_OS),linux)
CRONTAB_USER = $(PCP_USER)
@@ -65,6 +66,10 @@ ifeq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 pmlogger_daily_poll.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_poll.service
$(INSTALL) -m 644 pmlogger_daily_check.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_check.timer
$(INSTALL) -m 644 pmlogger_daily_check.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_check.service
+ $(INSTALL) -m 644 pmlogger_daily_report.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_report.timer
+ $(INSTALL) -m 644 pmlogger_daily_report.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_report.service
+ $(INSTALL) -m 644 pmlogger_daily_report_poll.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_report_poll.timer
+ $(INSTALL) -m 644 pmlogger_daily_report_poll.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_report_poll.service
endif
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_LOG_DIR)/pmlogger
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_TMP_DIR)/pmlogger
@@ -79,7 +84,9 @@ ifneq ($(ENABLE_SYSTEMD),true)
endif
$(INSTALL) -m 644 utilproc.sh $(PCP_SHARE_DIR)/lib/utilproc.sh
$(INSTALL) -m 755 pmlogger_daily_report.sh $(PCP_BINADM_DIR)/pmlogger_daily_report$(SHELLSUFFIX)
+ifneq ($(ENABLE_SYSTEMD),true)
$(INSTALL) -m 644 crontab.daily_report $(CRONTAB_DAILY_REPORT_PATH)
+endif
$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_SA_DIR)
include $(BUILDRULES)
@@ -109,6 +116,20 @@ pmlogger_daily_check.service : pmlogger_daily_check.service.in
-e 's;@PCP_USER@;'$(PCP_USER)';' \
# END
+pmlogger_daily_report.service : pmlogger_daily_report.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ -e 's;@PCP_SA_DIR@;'$(PCP_SA_DIR)';' \
+ # END
+
+pmlogger_daily_report_poll.service : pmlogger_daily_report_poll.service.in
+ $(SED) <$< >$@ \
+ -e 's;@PCP_BINADM_DIR@;'$(PCP_BINADM_DIR)';' \
+ -e 's;@PCP_USER@;'$(PCP_USER)';' \
+ -e 's;@PCP_SA_DIR@;'$(PCP_SA_DIR)';' \
+ # END
+
crontab : crontab.in
$(SED) -e 's;@user@;'$(CRONTAB_USER)';' -e 's;@path@;'$(PCP_BINADM_DIR)';' $< > $@
diff --git a/src/pmlogger/pmlogger_daily_report.service.in b/src/pmlogger/pmlogger_daily_report.service.in
new file mode 100644
index 000000000..f4b3e8d30
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_report.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Generate system activity reports
+Documentation=man:pmlogger(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmlogger_daily_report -o @PCP_SA_DIR@
+User=@PCP_USER@
diff --git a/src/pmlogger/pmlogger_daily_report.timer b/src/pmlogger/pmlogger_daily_report.timer
new file mode 100644
index 000000000..f2294b9b3
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_report.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Daily generation of system activity reports
+
+[Timer]
+OnCalendar=*-*-* 02:00:00
+
+[Install]
+WantedBy=timers.target
diff --git a/src/pmlogger/pmlogger_daily_report_poll.service.in b/src/pmlogger/pmlogger_daily_report_poll.service.in
new file mode 100644
index 000000000..241138e7e
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_report_poll.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Poll system activity report generation
+Documentation=man:pmlogger(1)
+
+[Service]
+Type=oneshot
+ExecStart=@PCP_BINADM_DIR@/pmlogger_daily_report -o @PCP_SA_DIR@ -p
+User=@PCP_USER@
diff --git a/src/pmlogger/pmlogger_daily_report_poll.timer b/src/pmlogger/pmlogger_daily_report_poll.timer
new file mode 100644
index 000000000..f74801e47
--- /dev/null
+++ b/src/pmlogger/pmlogger_daily_report_poll.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Hourly polling of system activity report generation
+
+[Timer]
+OnCalendar=*-*-* *:30:00
+
+[Install]
+WantedBy=timers.target
--
2.13.7

View File

@ -3,7 +3,7 @@
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">https://github.com/performancecopilot/pcp.git</param> <param name="url">https://github.com/performancecopilot/pcp.git</param>
<param name="filename">pcp</param> <param name="filename">pcp</param>
<param name="revision">6a273f2027f9d052316b81f2beb1b5efe12c4ae5</param> <param name="revision">4.2.0</param>
<param name="versionformat">@PARENT_TAG@</param> <param name="versionformat">@PARENT_TAG@</param>
<param name="changesgenerate">disable</param> <param name="changesgenerate">disable</param>
</service> </service>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f0e368cbba0208858a6a5d08747cd732d80b74bdc71900a9079f95e94793f269
size 33226562

3
pcp-4.2.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82c21aa119229a989ba53a6bbca4aa5702a7928aae549f4b3e21c5fba2bb43da
size 32111070

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Jan 7 15:36:54 UTC 2019 - ddiss@suse.com
- Use systemd timers instead of crontab; (bsc#1115413).
+ 0007-pmie-add-systemd-timers-as-cron-alternative.patch
+ 0008-pmlogger_daily-add-systemd-timers-as-cron-alternativ.patch
+ 0009-pmlogger_daily_report-add-systemd-timers-as-cron-alt.patch
-------------------------------------------------------------------
Fri Dec 7 14:31:07 UTC 2018 - ddiss@suse.com
- Upgrade to 4.2.0 (fate#326865)
- python package dependency changes
+ add setuptools and python-requests
+ fix python-jsonpointer
+ disable pcp-pmda-postgresql due to missing psycopg2 dependency
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 7 10:39:49 UTC 2018 - kkaempf@suse.com Fri Sep 7 10:39:49 UTC 2018 - kkaempf@suse.com

151
pcp.spec
View File

@ -1,7 +1,7 @@
# #
# spec file for package pcp # spec file for package pcp
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -73,12 +73,12 @@ Summary: System-level performance monitoring and performance management
License: %{license_gplv2plus} AND %{license_lgplv2plus} AND %{license_cc_by} License: %{license_gplv2plus} AND %{license_lgplv2plus} AND %{license_cc_by}
Group: %{pcp_gr} Group: %{pcp_gr}
Name: pcp Name: pcp
Version: 4.1.1 Version: 4.2.0
Release: 0 Release: 0
%global buildversion 1 %global buildversion 1
Url: http://www.pcp.io Url: http://www.pcp.io
Source0: pcp-%{version}.tar.gz Source0: pcp-%{version}.tar.bz2
%if 0%{?suse_version} %if 0%{?suse_version}
Source2: pcp-rpmlintrc Source2: pcp-rpmlintrc
%endif %endif
@ -95,6 +95,12 @@ Patch4: 0004-create-pmlogger-and-pmie-logdirs-during-install.patch
Patch5: 0005-SUSE-fy-pmsnap-control-path.patch Patch5: 0005-SUSE-fy-pmsnap-control-path.patch
# PATCH-FIX-OPENSUSE, kkaempf@suse.de # PATCH-FIX-OPENSUSE, kkaempf@suse.de
Patch6: 0006-pmsnap-control-var-www-srv-www.patch Patch6: 0006-pmsnap-control-var-www-srv-www.patch
# PATCH-FIX-UPSTREAM, ddiss@suse.de
Patch7: 0007-pmie-add-systemd-timers-as-cron-alternative.patch
# PATCH-FIX-UPSTREAM, ddiss@suse.de
Patch8: 0008-pmlogger_daily-add-systemd-timers-as-cron-alternativ.patch
# PATCH-FIX-UPSTREAM, ddiss@suse.de
Patch9: 0009-pmlogger_daily_report-add-systemd-timers-as-cron-alt.patch
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
%global disable_selinux 0 %global disable_selinux 0
@ -126,17 +132,10 @@ Patch6: 0006-pmsnap-control-var-www-srv-www.patch
%global disable_cairo 0 %global disable_cairo 0
%global disable_python2 0 %global disable_python2 0
# Default for epel5 is python24, so use the (optional) python26 packages
%if 0%{?rhel} == 5
%global default_python 26
%endif
# No python3 development environment before el8 # No python3 development environment before el8
%if 0%{?rhel} == 0 || 0%{?rhel} > 7 %if 0%{?rhel} == 0 || 0%{?rhel} > 7
%global disable_python3 0 %global disable_python3 0
# Do we wish to mandate python3 use in pcp? (f22+ and el8+) # Do we wish to mandate python3 use in pcp? (f22+ and el8+)
%if 0%{?fedora} >= 22 || 0%{?rhel} > 7
%global default_python 3
%endif
%else %else
%global disable_python3 1 %global disable_python3 1
%endif %endif
@ -146,6 +145,12 @@ Patch6: 0006-pmsnap-control-var-www-srv-www.patch
%global disable_python3 1 %global disable_python3 1
%endif %endif
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7 || 0%{?sle_version} > 150000
%global __python2 python2
%else
%global __python2 python
%endif
# support for pmdajson # support for pmdajson
%if 0%{?rhel} == 0 || 0%{?rhel} > 6 %if 0%{?rhel} == 0 || 0%{?rhel} > 6
%if !%{disable_python2} || !%{disable_python3} %if !%{disable_python2} || !%{disable_python3}
@ -207,8 +212,8 @@ Patch6: 0006-pmsnap-control-var-www-srv-www.patch
%global disable_libvirt 0 %global disable_libvirt 0
%endif %endif
%if 0%{?sle_version} && 0%{?sle_version} <= 120300 %if 0%{?suse_version}
# SUSE doesn't currently ship the perl-DBD-Pg dependency # SUSE doesn't currently ship the python psycopg2 dependency
%global disable_postgresql 1 %global disable_postgresql 1
%else %else
%global disable_postgresql 0 %global disable_postgresql 0
@ -249,7 +254,6 @@ BuildRequires: nss-devel
%endif %endif
BuildRequires: perl BuildRequires: perl
BuildRequires: procps BuildRequires: procps
BuildRequires: python-devel
BuildRequires: rpm-devel BuildRequires: rpm-devel
BuildRequires: perl(JSON) BuildRequires: perl(JSON)
BuildRequires: perl(LWP::UserAgent) BuildRequires: perl(LWP::UserAgent)
@ -312,7 +316,9 @@ Requires: pcp-selinux = %{version}-%{release}
PreReq: permissions PreReq: permissions
%endif %endif
Requires: bash Requires: bash
%if %{disable_systemd}
Requires: cron Requires: cron
%endif
Requires: fileutils Requires: fileutils
Requires: findutils Requires: findutils
Requires: gawk Requires: gawk
@ -325,15 +331,15 @@ Requires: cpp
Requires: cyrus-sasl Requires: cyrus-sasl
Requires: sysconfig Requires: sysconfig
# pmatop needs curses.py # pmatop needs curses.py
Requires: python-curses Requires: %{__python2}-curses
%else %else
Requires: initscripts Requires: initscripts
%endif %endif
Requires: %{__python2}-pcp = %{version}-%{release}
Requires: %{lib_pkg} = %{version}-%{release} Requires: %{lib_pkg} = %{version}-%{release}
Requires: perl-PCP-PMDA = %{version}-%{release} Requires: perl-PCP-PMDA = %{version}-%{release}
Requires: python Requires: python
Requires: python-pcp = %{version}-%{release}
Obsoletes: pcp-pmda-nvidia < %{version} Obsoletes: pcp-pmda-nvidia < %{version}
%global tapsetdir %{_datadir}/systemtap/tapset %global tapsetdir %{_datadir}/systemtap/tapset
@ -810,7 +816,7 @@ Requires: %{lib_pkg} = %{version}-%{release}
%if !%{disable_python3} %if !%{disable_python3}
Requires: python3-pcp = %{version}-%{release} Requires: python3-pcp = %{version}-%{release}
%else %else
Requires: python-pcp = %{version}-%{release} Requires: %{__python2}-pcp = %{version}-%{release}
%endif %endif
%description export-pcp2graphite %description export-pcp2graphite
@ -830,9 +836,11 @@ Requires: %{lib_pkg} >= %{version}-%{release}
%if !%{disable_python3} %if !%{disable_python3}
Requires: python3-pcp = %{version}-%{release} Requires: python3-pcp = %{version}-%{release}
Requires: python3-requests Requires: python3-requests
BuildRequires: python3-requests
%else %else
Requires: python-pcp = %{version}-%{release} Requires: %{__python2}-pcp = %{version}-%{release}
Requires: python-requests Requires: %{__python2}-requests
BuildRequires: %{__python2}-requests
%endif %endif
%description export-pcp2influxdb %description export-pcp2influxdb
@ -1336,11 +1344,15 @@ Summary: Performance Co-Pilot (PCP) metrics for PostgreSQL
License: %{license_gplv2plus} License: %{license_gplv2plus}
Group: %{pcp_gr} Group: %{pcp_gr}
Url: http://www.pcp.io Url: http://www.pcp.io
Requires: perl-PCP-PMDA = %{version}-%{release} %if !%{disable_python3}
Requires: perl(DBD::Pg) Requires: python3-pcp
Requires: perl(DBI) Requires: python3-psycopg2
BuildRequires: perl(DBD::Pg) BuildRequires: python3-psycopg2
BuildRequires: perl(DBI) %else
Requires: %{__python2}-pcp
Requires: %{__python2}-psycopg2
BuildRequires: %{__python2}-psycopg2
%endif
Supplements: pcp Supplements: pcp
%description pmda-postgresql %description pmda-postgresql
@ -1480,7 +1492,7 @@ Url: http://www.pcp.io
%if !%{disable_python3} %if !%{disable_python3}
Requires: python3-pcp Requires: python3-pcp
%else %else
Requires: python-pcp Requires: %{__python2}-pcp
%endif %endif
%description pmda-gluster %description pmda-gluster
This package contains the PCP Performance Metrics Domain Agent (PMDA) for This package contains the PCP Performance Metrics Domain Agent (PMDA) for
@ -1498,7 +1510,7 @@ Url: http://www.pcp.io
%if !%{disable_python3} %if !%{disable_python3}
Requires: python3-pcp Requires: python3-pcp
%else %else
Requires: python-pcp Requires: %{__python2}-pcp
%endif %endif
%description pmda-zswap %description pmda-zswap
This package contains the PCP Performance Metrics Domain Agent (PMDA) for This package contains the PCP Performance Metrics Domain Agent (PMDA) for
@ -1516,7 +1528,7 @@ Url: http://www.pcp.io
%if !%{disable_python3} %if !%{disable_python3}
Requires: python3-pcp Requires: python3-pcp
%else %else
Requires: python-pcp Requires: %{__python2}-pcp
%endif %endif
%description pmda-unbound %description pmda-unbound
This package contains the PCP Performance Metrics Domain Agent (PMDA) for This package contains the PCP Performance Metrics Domain Agent (PMDA) for
@ -1534,7 +1546,7 @@ Url: http://www.pcp.io
%if !%{disable_python3} %if !%{disable_python3}
Requires: python3-pcp Requires: python3-pcp
%else %else
Requires: python-pcp Requires: %{__python2}-pcp
%endif %endif
%description pmda-mic %description pmda-mic
This package contains the PCP Performance Metrics Domain Agent (PMDA) for This package contains the PCP Performance Metrics Domain Agent (PMDA) for
@ -1556,9 +1568,9 @@ Requires: python3-lxml
Requires: python3-pcp Requires: python3-pcp
BuildRequires: libvirt-python3 BuildRequires: libvirt-python3
%else %else
Requires: %{__python2}-lxml
Requires: %{__python2}-pcp
Requires: libvirt-python Requires: libvirt-python
Requires: python-lxml
Requires: python-pcp
%if 0%{?rhel} == 0 || 0%{?rhel} > 5 %if 0%{?rhel} == 0 || 0%{?rhel} > 5
BuildRequires: libvirt-python BuildRequires: libvirt-python
%endif %endif
@ -1587,11 +1599,11 @@ Requires: python3-rtslib-fb
Requires: python3-rtslib Requires: python3-rtslib
%endif %endif
%else # !%{disable_python3} %else # !%{disable_python3}
Requires: python-pcp Requires: %{__python2}-pcp
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: python-rtslib-fb Requires: %{__python2}-rtslib-fb
%else %else
Requires: python-rtslib Requires: %{__python2}-rtslib
%endif %endif
%endif # !%{disable_python3} %endif # !%{disable_python3}
%description pmda-lio %description pmda-lio
@ -1618,19 +1630,14 @@ Url: http://www.pcp.io
Requires: python3-pcp Requires: python3-pcp
Requires: python3-six Requires: python3-six
BuildRequires: python3-six BuildRequires: python3-six
%if 0%{?suse_version}
Requires: python-jsonpointer
BuildRequires: python-jsonpointer
%else
Requires: python3-jsonpointer Requires: python3-jsonpointer
BuildRequires: python3-jsonpointer BuildRequires: python3-jsonpointer
%endif
%else %else
Requires: python-jsonpointer Requires: %{__python2}-jsonpointer
Requires: python-pcp Requires: %{__python2}-pcp
Requires: python-six Requires: %{__python2}-six
BuildRequires: python-jsonpointer BuildRequires: %{__python2}-jsonpointer
BuildRequires: python-six BuildRequires: %{__python2}-six
%endif %endif
%description pmda-json %description pmda-json
This package contains the PCP Performance Metrics Domain Agent (PMDA) for This package contains the PCP Performance Metrics Domain Agent (PMDA) for
@ -1973,22 +1980,24 @@ collecting metrics about web server logs.
# #
# python-pcp. This is the PCP library bindings for python. # python-pcp. This is the PCP library bindings for python.
# #
%package -n python-pcp %package -n %{__python2}-pcp
Summary: Performance Co-Pilot (PCP) Python bindings and documentation Summary: Performance Co-Pilot (PCP) Python bindings and documentation
License: %{license_gplv2plus} License: %{license_gplv2plus}
Group: Development/Libraries Group: Development/Libraries
Url: http://www.pcp.io Url: http://www.pcp.io
BuildRequires: %{__python2}-devel
%if !0%{?suse_version} %if !0%{?suse_version}
Requires: %{lib_pkg} = %{version}-%{release} Requires: %{lib_pkg} = %{version}-%{release}
%endif %endif
Requires: %{__python2}
Requires: pcp = %{version}-%{release} Requires: pcp = %{version}-%{release}
%if 0%{?rhel} == 5 BuildRequires: %{__python2}-setuptools
Requires: python%{default_python} %if 0%{?fedora} >= 26 || 0%{?rhel} > 7 || 0%{?sle_version} > 150000
%else # on these platforms, python2-pcp replaces python-pcp
Requires: python Obsoletes: python-pcp
%endif %endif
%description -n python-pcp %description -n %{__python2}-pcp
This python PCP module contains the language bindings for This python PCP module contains the language bindings for
Performance Metric API (PMAPI) monitor tools and Performance Performance Metric API (PMAPI) monitor tools and Performance
Metric Domain Agent (PMDA) collector tools written in Python. Metric Domain Agent (PMDA) collector tools written in Python.
@ -2006,6 +2015,7 @@ Url: http://www.pcp.io
Requires: %{lib_pkg} = %{version}-%{release} Requires: %{lib_pkg} = %{version}-%{release}
%endif %endif
Requires: python3 Requires: python3
BuildRequires: python3-setuptools
%description -n python3-pcp %description -n python3-pcp
This python PCP module contains the language bindings for This python PCP module contains the language bindings for
@ -2026,7 +2036,7 @@ Url: http://www.pcp.io
Requires: python3-pcp = %{version}-%{release} Requires: python3-pcp = %{version}-%{release}
%endif %endif
%if !%{disable_python2} %if !%{disable_python2}
Requires: python-pcp = %{version}-%{release} Requires: %{__python2}-pcp = %{version}-%{release}
%endif %endif
%if !0%{?suse_version} %if !0%{?suse_version}
Requires: %{lib_pkg} = %{version}-%{release} Requires: %{lib_pkg} = %{version}-%{release}
@ -2115,6 +2125,9 @@ updated policy package.
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
autoconf autoconf
@ -2644,6 +2657,13 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%service_add_post pmlogger %service_add_post pmlogger
%service_add_post pmie %service_add_post pmie
%service_add_post pmproxy %service_add_post pmproxy
%service_add_post pmie_check.timer
%service_add_post pmie_daily.timer
%service_add_post pmlogger_daily.timer
%service_add_post pmlogger_daily_check.timer
%service_add_post pmlogger_daily_poll.timer
%service_add_post pmlogger_daily_report.timer
%service_add_post pmlogger_daily_report_poll.timer
%else %else
%{fillup_and_insserv pmcd} %{fillup_and_insserv pmcd}
%{fillup_and_insserv pmlogger} %{fillup_and_insserv pmlogger}
@ -2726,7 +2746,14 @@ fi
%postun %postun
/sbin/ldconfig /sbin/ldconfig
%if !%{disable_systemd} %if !%{disable_systemd}
%service_del_postun pcp pmproxy pmie %service_del_postun pmcd pmlogger pmproxy pmie
%service_del_postun pmie_check.timer
%service_del_postun pmie_daily.timer
%service_del_postun pmlogger_daily.timer
%service_del_postun pmlogger_daily_check.timer
%service_del_postun pmlogger_daily_poll.timer
%service_del_postun pmlogger_daily_report.timer
%service_del_postun pmlogger_daily_report_poll.timer
%else %else
%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}} %{?restart_on_update:%{restart_on_update pcp pmproxy pmie}}
%{?insserv_cleanup:%{insserv_cleanup}} %{?insserv_cleanup:%{insserv_cleanup}}
@ -2808,9 +2835,26 @@ fi
%endif %endif
%dir %{_sysconfdir}/sasl2 %dir %{_sysconfdir}/sasl2
%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf %config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf
%if %{disable_systemd}
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger %config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger-daily-report %config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger-daily-report
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmie %config(noreplace) %{_sysconfdir}/cron.d/pcp-pmie
%else
%{_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_daily_check.service
%{_unitdir}/pmlogger_daily_check.timer
%{_unitdir}/pmlogger_daily_poll.service
%{_unitdir}/pmlogger_daily_poll.timer
%{_unitdir}/pmlogger_daily_report.service
%{_unitdir}/pmlogger_daily_report.timer
%{_unitdir}/pmlogger_daily_report_poll.service
%{_unitdir}/pmlogger_daily_report_poll.timer
%endif
%if 0%{?suse_version} %if 0%{?suse_version}
%{_fillupdir}/sysconfig.pmlogger %{_fillupdir}/sysconfig.pmlogger
%{_fillupdir}/sysconfig.pmproxy %{_fillupdir}/sysconfig.pmproxy
@ -2941,10 +2985,6 @@ fi
%files manager %files manager
%defattr(-,root,root) %defattr(-,root,root)
%if 0%{?suse_version}
%dir %{_confdir}/pmmgr
%{_confdir}/pmmgr
%endif
%{_initddir}/pmmgr %{_initddir}/pmmgr
%if !%{disable_systemd} %if !%{disable_systemd}
%{_unitdir}/pmmgr.service %{_unitdir}/pmmgr.service
@ -2953,6 +2993,7 @@ fi
%{_libexecdir}/pcp/bin/pmmgr %{_libexecdir}/pcp/bin/pmmgr
%attr(0775,pcp,pcp) %{_logsdir}/pmmgr %attr(0775,pcp,pcp) %{_logsdir}/pmmgr
%dir %{_confdir}/pmmgr %dir %{_confdir}/pmmgr
%{_confdir}/pmmgr
%config(noreplace) %{_confdir}/pmmgr/pmmgr.options %config(noreplace) %{_confdir}/pmmgr/pmmgr.options
%files import-sar2pcp %files import-sar2pcp
@ -3236,7 +3277,7 @@ fi
%endif %endif
%if !%{disable_python2} %if !%{disable_python2}
%files -n python-pcp -f python-pcp.list.rpm %files -n %{__python2}-pcp -f python-pcp.list.rpm
%defattr(-,root,root) %defattr(-,root,root)
%if 0%{?suse_version} %if 0%{?suse_version}
%{python_sitearch}/*.so %{python_sitearch}/*.so