From 41957462ffbf117f8930c11bcb88bd881100d31e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 4 Jul 2018 18:59:58 +0200 Subject: [PATCH] - partial update to 4.1.0; files left --- pcp-opt.patch | 12 ++-- pcp-ps.patch | 33 ----------- pcp.spec | 133 +++++++++++++++++++------------------------ python-install.patch | 14 ++--- systemd.patch | 11 ---- 5 files changed, 70 insertions(+), 133 deletions(-) delete mode 100644 pcp-ps.patch delete mode 100644 systemd.patch diff --git a/pcp-opt.patch b/pcp-opt.patch index 3fd1f23..1d3192a 100644 --- a/pcp-opt.patch +++ b/pcp-opt.patch @@ -1,11 +1,11 @@ ---- pcp-3.9.6/configure.ac.orig 2013-09-15 16:11:00.907263278 +0200 -+++ pcp-3.9.6/configure.ac 2013-09-15 16:12:28.537259600 +0200 -@@ -127,7 +127,7 @@ - test -f /etc/slackware-version && target_distro=slackware +--- pcp-4.1.0/configure.ac~ 2018-06-15 03:48:02.000000000 +0200 ++++ pcp-4.1.0/configure.ac 2018-07-04 17:50:38.620258455 +0200 +@@ -278,7 +278,7 @@ then test -f /etc/gentoo-release && target_distro=gentoo test -f /etc/mandriva-release && target_distro=mandriva + test -f /etc/arch-release && target_distro=arch - export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE" + export CFLAGS="$CFLAGS -fPIC -fno-strict-aliasing -D_GNU_SOURCE" + pcp_platform_paths='/usr/bin/X11:/usr/local/bin' + pcp_ps_all_flags=-efw elif test $target_os = darwin - then - AC_DEFINE(IS_DARWIN) diff --git a/pcp-ps.patch b/pcp-ps.patch deleted file mode 100644 index e2d0b3e..0000000 --- a/pcp-ps.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- pcp-3.9.6/configure.ac.orig 2014-06-19 19:02:57.625789139 +0200 -+++ pcp-3.9.6/configure.ac 2014-06-19 19:06:56.395784163 +0200 -@@ -937,17 +937,7 @@ - NR == 1 { if ($1 != "UID" && $1 != "USER") exit - if ($2 != "PID") exit - } --# Unix variants --$2 == 1 && / init/ { print "OK"; exit } --$2 == 1 && / \/etc\/init/ { print "OK"; exit } --# Fedora 9 --$2 == 1 && / \/sbin\/init/ { print "OK"; exit } --# Fedora 15 --$2 == 1 && / \/bin\/systemd/ { print "OK"; exit } --# Fedora 17 --$2 == 1 && / \/usr\/lib\/systemd\/systemd/ { print "OK"; exit } --# Debian sid --$2 == 1 && / \/lib\/systemd\/systemd/ { print "OK"; exit }'` -+$2 ~ /^[[0-9]]+$/ && /configure/ { print "OK"; exit }'` - if test "$ans" = OK - then - pcp_ps_have_bsd=false -@@ -962,10 +952,7 @@ - NR == 1 { if ($1 != "UID" && $1 != "USER") exit - if ($2 != "PID") exit - } --$2 == 1 && / init/ { print "OK"; exit } --$2 == 1 && / \/sbin\/init/ { print "OK"; exit } --$2 == 1 && / \/sbin\/launchd/ { print "OK"; exit } --$2 == 1 && / \/init/ { print "OK"; exit }'` -+$2 ~ /^[[0-9]]+$/ && /configure/ { print "OK"; exit }'` - if test "$ans" = OK - then - pcp_ps_have_bsd=true diff --git a/pcp.spec b/pcp.spec index b298a51..20a4095 100644 --- a/pcp.spec +++ b/pcp.spec @@ -12,20 +12,19 @@ Summary: Performance Co-Pilot - system level performance monitoring and management Summary(pl.UTF-8): Performance Co-Pilot - monitorowanie i zarządzanie wydajnością na poziomie systemu Name: pcp -Version: 3.10.0 -Release: 16 +Version: 4.1.0 +Release: 0.1 License: LGPL v2.1 (libraries), GPL v2 (the rest) Group: Applications/System -Source0: ftp://oss.sgi.com/projects/pcp/download/%{name}-%{version}.src.tar.gz -# Source0-md5: 483b20d7245fc0a3ef895a965f2b59c2 -Patch0: %{name}-ps.patch +Source0: https://github.com/performancecopilot/pcp/archive/%{version}.tar.gz +# Source0-md5: 12e82f2464452e74d0104caf964df994 + Patch1: %{name}-opt.patch Patch2: %{name}-nspr.patch Patch3: %{name}-saslconfdir.patch Patch4: %{name}-rpm.patch Patch5: python-install.patch -Patch6: systemd.patch -URL: http://oss.sgi.com/projects/pcp/ +URL: http://pcp.io/ BuildRequires: autoconf >= 2.60 BuildRequires: avahi-devel BuildRequires: bison @@ -219,18 +218,18 @@ Sondy systemtap/dtrace dla PCP. %prep %setup -q -%patch0 -p1 + %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 %build +QTDIR=%{_libdir}/qt5; export QTDIR %{__autoconf} %configure \ - %{!?with_qt:--without-qt} \ + --with%{!?with_qt:out}-qt \ --with-python_prefix=%{_prefix} \ --with-rcdir=/etc/rc.d/init.d # ensure not *zipping man pages on install @@ -244,6 +243,7 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir} %{__make} install \ DIST_ROOT=$RPM_BUILD_ROOT \ + BASHDIR=/etc/bash_completion.d/pcp \ INSTALL='$(INSTALL_SH)' \ HAVE_BZIP2ED_MANPAGES=false \ HAVE_GZIPPED_MANPAGES=false \ @@ -275,6 +275,7 @@ ln -snf pmdakernel.1 $RPM_BUILD_ROOT%{_mandir}/man1/pmdalinux.1 # some files packaged as %doc, the rest useless in package %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} # packaged as %doc +%{__rm} -rf html %{__mv} $RPM_BUILD_ROOT%{_docdir}/pcp-doc/html html %clean @@ -299,7 +300,7 @@ fi %files %defattr(644,root,root,755) -%doc CHANGELOG README +%doc CHANGELOG README.md %attr(755,root,root) %{_bindir}/collectl2pcp %attr(755,root,root) %{_bindir}/dbpmda %attr(755,root,root) %{_bindir}/genpmda @@ -307,7 +308,6 @@ fi %attr(755,root,root) %{_bindir}/mrtg2pcp %attr(755,root,root) %{_bindir}/pcp %attr(755,root,root) %{_bindir}/pmafm -%attr(755,root,root) %{_bindir}/pmatop %attr(755,root,root) %{_bindir}/pmclient %attr(755,root,root) %{_bindir}/pmcollectl %attr(755,root,root) %{_bindir}/pmdate @@ -337,44 +337,43 @@ fi %attr(755,root,root) %{_bindir}/pmval %attr(755,root,root) %{_bindir}/sar2pcp %attr(755,root,root) %{_bindir}/sheet2pcp -%attr(755,root,root) %{_libdir}/pcp/bin/autofsd-probe -%attr(755,root,root) %{_libdir}/pcp/bin/chkhelp -%attr(755,root,root) %{_libdir}/pcp/bin/install-sh -%attr(755,root,root) %{_libdir}/pcp/bin/mkaf -%attr(755,root,root) %{_libdir}/pcp/bin/pcp-dmcache -%attr(755,root,root) %{_libdir}/pcp/bin/pcp-free -%attr(755,root,root) %{_libdir}/pcp/bin/pcp-numastat -%attr(755,root,root) %{_libdir}/pcp/bin/pcp-uptime -%attr(755,root,root) %{_libdir}/pcp/bin/pmcd -%attr(755,root,root) %{_libdir}/pcp/bin/pmcd_wait -%attr(755,root,root) %{_libdir}/pcp/bin/pmconfig -%attr(755,root,root) %{_libdir}/pcp/bin/pmgetopt -%attr(755,root,root) %{_libdir}/pcp/bin/pmhostname -%attr(755,root,root) %{_libdir}/pcp/bin/pmie_check -%attr(755,root,root) %{_libdir}/pcp/bin/pmie_daily -%attr(755,root,root) %{_libdir}/pcp/bin/pmie_email -%attr(755,root,root) %{_libdir}/pcp/bin/pmiestatus -%attr(755,root,root) %{_libdir}/pcp/bin/pmlock -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogconf -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogconf-setup -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogextract -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogger -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogger_check -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogger_daily -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogger_merge -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogreduce -%attr(755,root,root) %{_libdir}/pcp/bin/pmlogrewrite -%attr(755,root,root) %{_libdir}/pcp/bin/pmmgr -%attr(755,root,root) %{_libdir}/pcp/bin/pmnewlog -%attr(755,root,root) %{_libdir}/pcp/bin/pmnsadd -%attr(755,root,root) %{_libdir}/pcp/bin/pmnsdel -%attr(755,root,root) %{_libdir}/pcp/bin/pmpost -%attr(755,root,root) %{_libdir}/pcp/bin/pmproxy -%attr(755,root,root) %{_libdir}/pcp/bin/pmsignal -%attr(755,root,root) %{_libdir}/pcp/bin/pmsleep -%attr(755,root,root) %{_libdir}/pcp/bin/pmwebd -%attr(755,root,root) %{_libdir}/pcp/bin/pmwtf -%attr(755,root,root) %{_libdir}/pcp/bin/telnet-probe +%attr(755,root,root) %{_libexecdir}/pcp/bin/chkhelp +%attr(755,root,root) %{_libexecdir}/pcp/bin/install-sh +%attr(755,root,root) %{_libexecdir}/pcp/bin/mkaf +%attr(755,root,root) %{_libexecdir}/pcp/bin/pcp-dmcache +%attr(755,root,root) %{_libexecdir}/pcp/bin/pcp-free +%attr(755,root,root) %{_libexecdir}/pcp/bin/pcp-numastat +%attr(755,root,root) %{_libexecdir}/pcp/bin/pcp-uptime +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmcd +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmcd_wait +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmconfig +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmgetopt +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmhostname +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmie_check +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmie_daily +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmie_email +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmiestatus +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlock +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogconf +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogconf-setup +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogextract +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogger +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogger_check +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogger_daily +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogger_merge +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogreduce +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmlogrewrite +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmmgr +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmnewlog +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmnsadd +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmnsdel +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmpost +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmproxy +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmsignal +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmsleep +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmwebd +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmwtf +%attr(755,root,root) %{_libexecdir}/pcp/bin/telnet-probe %dir %{_datadir}/pcp %dir %{_datadir}/pcp/lib %attr(755,root,root) %{_datadir}/pcp/lib/ReplacePmnsSubtree @@ -387,7 +386,6 @@ fi %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/pcp-pmie %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/pcp-pmlogger %config(noreplace) %verify(not md5 mtime size) /etc/sasl/pmcd.conf -%{_sysconfdir}/pcp.sh %dir %{_sysconfdir}/pcp %dir %{_sysconfdir}/pcp/pmcd %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pcp/pmcd/pmcd.conf @@ -484,7 +482,6 @@ fi %config(noreplace) %verify(not md5 mtime size) /var/lib/pcp/config/pmlogconf/filesystem/all %config(noreplace) %verify(not md5 mtime size) /var/lib/pcp/config/pmlogconf/filesystem/summary %config(noreplace) %verify(not md5 mtime size) /var/lib/pcp/config/pmlogconf/filesystem/xfs-all -%config(noreplace) %verify(not md5 mtime size) /var/lib/pcp/config/pmlogconf/filesystem/xfs-io-irix %config(noreplace) %verify(not md5 mtime size) /var/lib/pcp/config/pmlogconf/filesystem/xfs-io-linux %dir /var/lib/pcp/config/pmlogconf/kernel %config(noreplace) %verify(not md5 mtime size) /var/lib/pcp/config/pmlogconf/kernel/bufcache-activity @@ -639,10 +636,6 @@ fi %attr(755,root,root) /var/lib/pcp/pmdas/dbping/Remove %attr(755,root,root) /var/lib/pcp/pmdas/dbping/dbprobe.pl %attr(755,root,root) /var/lib/pcp/pmdas/dbping/pmdadbping.pl -%dir /var/lib/pcp/pmdas/dmcache -%attr(755,root,root) /var/lib/pcp/pmdas/dmcache/Install -%attr(755,root,root) /var/lib/pcp/pmdas/dmcache/Remove -%attr(755,root,root) /var/lib/pcp/pmdas/dmcache/pmdadmcache.python %dir /var/lib/pcp/pmdas/ds389 %attr(755,root,root) /var/lib/pcp/pmdas/ds389/Install %attr(755,root,root) /var/lib/pcp/pmdas/ds389/Remove @@ -780,7 +773,6 @@ fi %dir /var/lib/pcp/pmdas/nfsclient %attr(755,root,root) /var/lib/pcp/pmdas/nfsclient/Install %attr(755,root,root) /var/lib/pcp/pmdas/nfsclient/Remove -%attr(755,root,root) /var/lib/pcp/pmdas/nfsclient/pmdanfsclient.pl %dir /var/lib/pcp/pmdas/nginx %attr(755,root,root) /var/lib/pcp/pmdas/nginx/Install %attr(755,root,root) /var/lib/pcp/pmdas/nginx/Remove @@ -803,10 +795,6 @@ fi %dir /var/lib/pcp/pmdas/pmcd %attr(755,root,root) /var/lib/pcp/pmdas/pmcd/pmda_pmcd.so /var/lib/pcp/pmdas/pmcd/help.* -%dir /var/lib/pcp/pmdas/postfix -%attr(755,root,root) /var/lib/pcp/pmdas/postfix/Install -%attr(755,root,root) /var/lib/pcp/pmdas/postfix/Remove -%attr(755,root,root) /var/lib/pcp/pmdas/postfix/pmdapostfix.pl %dir /var/lib/pcp/pmdas/postgresql %attr(755,root,root) /var/lib/pcp/pmdas/postgresql/Install %attr(755,root,root) /var/lib/pcp/pmdas/postgresql/Remove @@ -1004,7 +992,6 @@ fi %attr(775,pcp,pcp) %dir /var/log/pcp/pmproxy %attr(775,pcp,pcp) %dir /var/log/pcp/pmwebd %{_mandir}/man1/PCPIntro.1* -%{_mandir}/man1/autofsd-probe.1* %{_mandir}/man1/chkhelp.1* %{_mandir}/man1/collectl2pcp.1* %{_mandir}/man1/dbpmda.1* @@ -1019,7 +1006,6 @@ fi %{_mandir}/man1/pcp-numastat.1* %{_mandir}/man1/pcp-uptime.1* %{_mandir}/man1/pmafm.1* -%{_mandir}/man1/pmatop.1* %{_mandir}/man1/pmcd.1* %{_mandir}/man1/pmcd_wait.1* %{_mandir}/man1/pmclient.1* @@ -1030,7 +1016,6 @@ fi %{_mandir}/man1/pmdabonding.1* %{_mandir}/man1/pmdacisco.1* %{_mandir}/man1/pmdadbping.1* -%{_mandir}/man1/pmdadmcache.1* %{_mandir}/man1/pmdads389.1* %{_mandir}/man1/pmdads389log.1* %{_mandir}/man1/pmdaelasticsearch.1* @@ -1142,7 +1127,7 @@ fi %attr(755,root,root) %{_bindir}/pmmessage %attr(755,root,root) %{_bindir}/pmquery %attr(755,root,root) %{_bindir}/pmtime -%attr(755,root,root) %{_libdir}/pcp/bin/pmsnap +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmsnap %dir %{_sysconfdir}/pcp/pmsnap %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pcp/pmsnap/control %{_datadir}/pcp-gui @@ -1188,22 +1173,19 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pminfo # NOTE: some of them are compatibility symlinks; regular files are SONAMEs directly -%attr(755,root,root) %{_libdir}/libpcp.so.2 %attr(755,root,root) %{_libdir}/libpcp.so.3 -%attr(755,root,root) %{_libdir}/libpcp_gui.so.1 %attr(755,root,root) %{_libdir}/libpcp_gui.so.2 %attr(755,root,root) %{_libdir}/libpcp_import.so.1 %attr(755,root,root) %{_libdir}/libpcp_mmv.so.1 -%attr(755,root,root) %{_libdir}/libpcp_pmda.so.2 %attr(755,root,root) %{_libdir}/libpcp_pmda.so.3 %attr(755,root,root) %{_libdir}/libpcp_trace.so.2 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pcp.conf %{_sysconfdir}/pcp.env -%dir %{_libdir}/pcp -%dir %{_libdir}/pcp/bin -%attr(755,root,root) %{_libdir}/pcp/bin/newhelp -%attr(755,root,root) %{_libdir}/pcp/bin/pmcpp -%attr(755,root,root) %{_libdir}/pcp/bin/pmnsmerge +%dir %{_libexecdir}/pcp +%dir %{_libexecdir}/pcp/bin +%attr(755,root,root) %{_libexecdir}/pcp/bin/newhelp +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmcpp +%attr(755,root,root) %{_libexecdir}/pcp/bin/pmnsmerge %dir /var/lib/pcp %dir /var/lib/pcp/pmns %config(missingok) /var/lib/pcp/pmns/.NeedRebuild @@ -1226,7 +1208,6 @@ fi %{_mandir}/man1/pminfo.1* %{_mandir}/man1/pmnsmerge.1* %{_mandir}/man5/mmv.5* -%{_mandir}/man5/pcp-archive.5* %{_mandir}/man5/pcp.conf.5* %{_mandir}/man5/pcp.env.5* %{_mandir}/man5/pmieconf.5* @@ -1294,7 +1275,7 @@ fi %attr(755,root,root) %{py_sitedir}/cpmi.so %dir %{py_sitedir}/pcp %{py_sitedir}/pcp/*.py[co] -%{py_sitedir}/pcp-1.0-py*.egg-info +%{py_sitedir}/pcp-*-py*.egg-info %files -n python3-pcp %defattr(644,root,root,755) @@ -1306,7 +1287,7 @@ fi %dir %{py3_sitedir}/pcp %{py3_sitedir}/pcp/*.py %{py3_sitedir}/pcp/__pycache__ -%{py3_sitedir}/pcp-1.0-py*.egg-info +%{py3_sitedir}/pcp-*-py*.egg-info %files -n bash-completion-pcp %defattr(644,root,root,755) diff --git a/python-install.patch b/python-install.patch index ebaee31..b222467 100644 --- a/python-install.patch +++ b/python-install.patch @@ -1,13 +1,13 @@ ---- pcp-3.10.0/src/include/builddefs.in~ 2014-10-28 01:29:54.000000000 +0100 -+++ pcp-3.10.0/src/include/builddefs.in 2015-12-31 13:27:42.495614262 +0100 -@@ -555,13 +555,10 @@ +--- pcp-4.1.0/src/include/builddefs.in~ 2018-06-15 03:48:02.000000000 +0200 ++++ pcp-4.1.0/src/include/builddefs.in 2018-07-04 17:51:41.172261146 +0200 +@@ -693,13 +693,7 @@ SETUP_PY_BUILD_OPTIONS = --include-dirs= SETUP_PY_BUILD_OPTIONS += --library-dirs=$(TOPDIR)/src/libpcp/src:$(TOPDIR)/src/libpcp_pmda/src:$(TOPDIR)/src/libpcp_gui/src:$(TOPDIR)/src/libpcp_import/src:$(TOPDIR)/src/libpcp_mmv/src SETUP_PY_INSTALL_OPTIONS = --skip-build - SETUP_PY_INSTALL_OPTIONS += --root=$${DIST_ROOT-/} + SETUP_PY_INSTALL_OPTIONS += --root="$${DIST_ROOT-/}" -ifeq "$(PYTHON_PREFIX)" "/usr" - ifeq "$(PACKAGE_DISTRIBUTION)" "debian" - SETUP_PY_INSTALL_OPTIONS += --install-layout=deb - endif +-ifeq "$(PACKAGE_DISTRIBUTION)" "debian" +-SETUP_PY_INSTALL_OPTIONS += --install-layout=deb +-endif -else SETUP_PY_INSTALL_OPTIONS += --prefix=$(PYTHON_PREFIX) -endif diff --git a/systemd.patch b/systemd.patch deleted file mode 100644 index 6296207..0000000 --- a/systemd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pcp-3.10.0/configure.ac~ 2017-07-01 10:57:29.000000000 +0200 -+++ pcp-3.10.0/configure.ac 2017-07-01 11:11:40.955209598 +0200 -@@ -1216,7 +1216,7 @@ - fi - AC_SUBST(lib_for_regex) - --PKG_CHECK_MODULES([SYSTEMD], [libsystemd-journal], -+PKG_CHECK_MODULES([SYSTEMD], [libsystemd], - [pmda_systemd=true], [pmda_systemd=false]) - AC_SUBST(PMDA_SYSTEMD, $pmda_systemd) - -- 2.43.0