build: rpms and configure for redis, nutcracker, bind2 PMDAs
[pcp.git] / build / rpm / pcp.spec.in
blob7574ed64f50949f4dd5d1d1b5d9a380c0bee31d7
1 Summary: System-level performance monitoring and performance management
2 Name: @package_name@
3 Version: @package_version@
4 Release: @package_release@@package_sgirelease@
5 License: GPLv2+ and LGPLv2.1+ and CC-BY
6 URL: http://www.pcp.io
7 Group: Applications/System
8 Source: @package_name@-@package_version@.src.tar.gz
9 BuildRoot: @build_root@
10 Distribution: @package_distribution@
11 BuildRequires: procps bison flex
12 BuildRequires: ncurses-devel
13 BuildRequires: readline-devel
14 %if 0%{?sles_version} == 11
15 # rpmbuild is in the rpm (not rpm-build) package for SLES11
16 %else
17 BuildRequires: rpm-build
18 %endif
19 %if "@enable_avahi@" == "true"
20 BuildRequires: avahi-devel
21 %endif
22 BuildRequires: zlib-devel
23 %if "@enable_secure@" == "true"
24 %if "%{_vendor}" == "suse"
25 BuildRequires: mozilla-nss-devel
26 %else
27 BuildRequires: nss-devel
28 %endif
29 %if "%{_vendor}" == "mandriva"
30 BuildRequires: %{_lib}sasl-devel
31 %else
32 BuildRequires: cyrus-sasl-devel
33 %endif
34 %endif
35 %if "@enable_probes@" == "true"
36 BuildRequires: systemtap-sdt-devel
37 %endif
38 %if "@enable_qt@" == "true" || "@enable_webapi@" == "true"
39 BuildRequires: gcc-c++
40 %endif
41 %if "@enable_qt@" == "true"
42 %if "%{_vendor}" == "suse"
43 BuildRequires: qt-devel >= 4.4
44 %else
45 BuildRequires: qt4-devel >= 4.4
46 %endif
47 %endif
48 %if "%{_vendor}" == "redhat"
49 BuildRequires: initscripts man /bin/hostname
50 %endif
51 %if "@pmda_rpm@" == "true"
52 BuildRequires: rpm-devel
53 %endif
54 %if "@pmda_papi@" == "true"
55 BuildRequires: papi-devel
56 %endif
57 %if "@pmda_perfevent@" == "true"
58 BuildRequires: libpfm-devel >= 4
59 %endif
60 %if "@pmda_systemd@" == "true"
61 BuildRequires: systemd-devel
62 %endif
63 %if "@have_cairo@" == "true"
64 BuildRequires: cairo-devel
65 %endif
66 %if "@have_libmicrohttpd@" == "true"
67 BuildRequires: libmicrohttpd-devel
68 %endif
70 # prevent conflicting SGI package installation
71 Conflicts: pcp-pro < 2.2
73 # prevent conflicting binary and man page install for pcp(1)
74 Conflicts: librapi
76 # Utilities used indirectly e.g. by scripts we install
77 Requires: bash gawk sed grep fileutils findutils
78 # which(1) comes from different places
79 %if 0%{?suse_version} >= 1100
80 Requires: util-linux
81 %else
82 Requires: which
83 %endif
84 %if "%{_vendor}" == "suse"
85 Requires: sysconfig util-linux
86 %global _rcdir /etc/init.d
87 %else
88 Requires: initscripts
89 %global _rcdir /etc/rc.d/init.d
90 %endif
91 %if "@enable_systemd@" == "true"
92 %global _configure_rcdir %{nil}
93 %else
94 %global _configure_rcdir --with-rcdir=%{_rcdir}
95 %endif
96 %global _tmpdir %{_localstatedir}/lib/pcp/tmp
98 # There is a problem here ... some distros are resisting adding more
99 # repackaged perl-Foo-Bar rpms, but the default find-requires script
100 # will turn all perl module we use into rpm package Requires clauses.
102 # The fix is to over-ride the default find-requires script and strip
103 # out the dodgey perl modules that don't have official rpms, based
104 # on the distro ... see the filter-requires script in this directory
106 # Recipe is a refinement of the one described at
107 # http://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies#Disabling_dependency_auto-generation
109 # override the default automatic requires/provides generation
110 %define _use_internal_dependency_generator 0
111 # remember the real find-requires path (%%global avoids recursive %%define)
112 # macros below
113 %global __find_requires_save %{__find_requires}
114 # slip our filter into place
115 %define __find_requires %{_builddir}/%{?buildsubdir}/build/rpm/filter-requires -v %{_vendor} -f 0%{?fedora} -r 0%{?rhel} %{__find_requires_save}
117 %global pmda_remove() %{expand:
118 if [ "%1" -eq 0 ]
119 then
120 PCP_PMDAS_DIR=@pcp_pmdas_dir@
121 PCP_ETC_DIR=@pcp_etc_dir@
122 if [ -f "$PCP_ETC_DIR/pcp/pmcd/pmcd.conf" ] && [ -f "$PCP_PMDAS_DIR/%2/domain.h" ]
123 then
124 (cd $PCP_PMDAS_DIR/%2/ && ./Remove >/dev/null 2>&1)
129 Requires: pcp-libs = @package_version@
130 Obsoletes: pcp-gui-debuginfo
131 Obsoletes: pcp-compat
133 %description
134 Performance Co-Pilot (PCP) provides a framework and services to support
135 system-level performance monitoring and performance management.
137 The PCP open source release provides a unifying abstraction for all of
138 the interesting performance data in a system, and allows client
139 applications to easily retrieve and process any subset of that data.
142 # pcp-conf
144 %package conf
145 License: LGPLv2.1+
146 Group: System Environment/Libraries
147 Summary: Performance Co-Pilot run-time configuration
148 URL: http://www.pcp.io
150 # http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages"
151 Conflicts: pcp-libs < 3.9
153 %description conf
154 Performance Co-Pilot (PCP) run-time configuration
157 # pcp-libs
159 %package libs
160 License: LGPLv2.1+
161 Group: System Environment/Libraries
162 Summary: Performance Co-Pilot run-time libraries
163 URL: http://www.pcp.io
164 Requires: pcp-conf = @package_version@
165 Obsoletes: pcp < 3.0
167 %description libs
168 Performance Co-Pilot (PCP) run-time libraries
171 # pcp-libs-devel
173 %package libs-devel
174 License: GPLv2+ and LGPLv2.1+
175 Group: Development/Libraries
176 Summary: Performance Co-Pilot (PCP) development headers
177 URL: http://www.pcp.io
178 #Requires: pcp = @package_version@
179 #Requires: pcp-libs = @package_version@
180 #Requires: pcp-devel = @package_version@
182 %description libs-devel
183 Performance Co-Pilot (PCP) headers for development.
186 # pcp-devel
188 %package devel
189 License: GPLv2+ and LGPLv2.1+
190 Group: Development/Libraries
191 Summary: Performance Co-Pilot (PCP) development tools and documentation
192 URL: http://www.pcp.io
193 Requires: pcp = @package_version@
194 Requires: pcp-libs = @package_version@
195 Requires: pcp-libs-devel = @package_version@
197 %description devel
198 Performance Co-Pilot (PCP) documentation and tools for development.
201 # pcp-testsuite
203 %package testsuite
204 License: GPLv2+
205 Group: Development/Libraries
206 Summary: Performance Co-Pilot (PCP) test suite
207 URL: http://www.pcp.io
208 Requires: pcp = @package_version@
209 Requires: pcp-libs = @package_version@
210 Requires: pcp-libs-devel = @package_version@
211 Requires: pcp-devel = @package_version@
212 Obsoletes: pcp-gui-testsuite
214 %description testsuite
215 Quality assurance test suite for Performance Co-Pilot (PCP).
217 %if "@enable_manager@" == "true"
219 # pcp-manager
221 %package manager
222 License: GPLv2+
223 Group: Applications/System
224 Summary: Performance Co-Pilot (PCP) manager daemon
225 URL: http://www.pcp.io
226 Requires: pcp = @package_version@ pcp-libs = @package_version@
228 %description manager
229 An optional daemon (pmmgr) that manages a collection of pmlogger and
230 pmie daemons, for a set of discovered local and remote hosts running
231 the performance metrics collection daemon (pmcd). It ensures these
232 daemons are running when appropriate, and manages their log rotation
233 needs. It is an alternative to the cron-based pmlogger/pmie service
234 scripts.
235 %endif
237 %if "@enable_webapi@" == "true"
239 # pcp-webapi
241 %package webapi
242 License: GPLv2+
243 Group: Applications/System
244 Summary: Performance Co-Pilot (PCP) web API service
245 URL: http://www.pcp.io
246 Requires: pcp-libs = @package_version@
248 %description webapi
249 Provides a daemon (pmwebd) that binds a large subset of the Performance
250 Co-Pilot (PCP) client API (PMAPI) to RESTful web applications using the
251 HTTP (PMWEBAPI) protocol.
252 %endif
254 %if "@have_webjs@" == "true"
256 # pcp-webjs
258 %package webjs
259 License: ASL2.0 and MIT and CC-BY
260 Group: Applications/Internet
261 %if @rpm_version@ >= 4060000
262 BuildArch: noarch
263 %endif
264 Requires: pcp-webapp-graphite pcp-webapp-grafana pcp-webapp-vector
265 Summary: Performance Co-Pilot (PCP) web applications
266 URL: http://www.pcp.io
268 %description webjs
269 Javascript web application content for the Performance Co-Pilot (PCP)
270 web service.
271 %endif
273 %if "@have_vector@" == "true" || "@have_webjs@" == "true"
274 %package webapp-vector
275 License: ASL2.0
276 Group: Applications/Internet
277 %if 0%{?rhel} == 0 || 0%{?rhel} > 5
278 BuildArch: noarch
279 %endif
280 Summary: Vector web application for Performance Co-Pilot (PCP)
281 URL: https://github.com/Netflix/vector
283 %description webapp-vector
284 Vector web application for the Performance Co-Pilot (PCP).
285 %endif
287 %if "@have_webjs@" == "true"
288 %package webapp-grafana
289 License: ASL2.0
290 Group: Applications/Internet
291 Conflicts: pcp-webjs < 3.10.4
292 %if 0%{?rhel} == 0 || 0%{?rhel} > 5
293 BuildArch: noarch
294 %endif
295 Summary: Grafana web application for Performance Co-Pilot (PCP)
296 URL: https://grafana.org
298 %description webapp-grafana
299 Grafana is an open source, feature rich metrics dashboard and graph
300 editor. This package provides a Grafana that uses the Performance
301 Co-Pilot (PCP) as the data repository. Other Grafana backends are
302 not used.
304 Grafana can render time series dashboards at the browser via flot.js
305 (more interactive, slower, for beefy browsers) or alternately at the
306 server via png (less interactive, faster).
307 %endif
309 %if "@have_webjs@" == "true"
310 %package webapp-graphite
311 License: ASL2.0
312 Group: Applications/Internet
313 Conflicts: pcp-webjs < 3.10.4
314 %if 0%{?rhel} == 0 || 0%{?rhel} > 5
315 BuildArch: noarch
316 %endif
317 Summary: Graphite web application for Performance Co-Pilot (PCP)
318 URL: http://graphite.readthedocs.org
320 %description webapp-graphite
321 Graphite is a highly scalable real-time graphing system. This package
322 provides a graphite version that uses the Performance Co-Pilot (PCP)
323 as the data repository, and Graphites web interface renders it. The
324 Carbon and Whisper subsystems of Graphite are not included nor used.
325 %endif
328 # perl-PCP-PMDA. This is the PCP agent perl binding.
330 %package -n perl-PCP-PMDA
331 License: GPLv2+
332 Group: Development/Languages
333 Summary: Performance Co-Pilot (PCP) Perl bindings and documentation
334 URL: http://www.pcp.io
335 BuildRequires: perl(ExtUtils::MakeMaker)
336 Requires: pcp-libs = @package_version@
337 Requires: perl
339 %description -n perl-PCP-PMDA
340 The PCP::PMDA Perl module contains the language bindings for
341 building Performance Metric Domain Agents (PMDAs) using Perl.
342 Each PMDA exports performance data for one specific domain, for
343 example the operating system kernel, Cisco routers, a database,
344 an application, etc.
347 # perl-PCP-MMV
349 %package -n perl-PCP-MMV
350 License: GPLv2+
351 Group: Development/Libraries
352 Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values
353 URL: http://www.pcp.io
354 Requires: pcp = @package_version@
356 %description -n perl-PCP-MMV
357 The PCP::MMV module contains the Perl language bindings for
358 building scripts instrumented with the Performance Co-Pilot
359 (PCP) Memory Mapped Value (MMV) mechanism.
360 This mechanism allows arbitrary values to be exported from an
361 instrumented script into the PCP infrastructure for monitoring
362 and analysis with pmchart, pmie, pmlogger and other PCP tools.
365 # perl-PCP-LogImport
367 %package -n perl-PCP-LogImport
368 License: GPLv2+
369 Group: Development/Libraries
370 Summary: Performance Co-Pilot (PCP) Perl bindings for importing external data into PCP archives
371 URL: http://www.pcp.io
372 Requires: pcp = @package_version@
374 %description -n perl-PCP-LogImport
375 The PCP::LogImport module contains the Perl language bindings for
376 importing data in various 3rd party formats into PCP archives so
377 they can be replayed with standard PCP monitoring tools.
380 # perl-PCP-LogSummary
382 %package -n perl-PCP-LogSummary
383 License: GPLv2+
384 Group: Development/Languages
385 Summary: Performance Co-Pilot (PCP) Perl bindings for post-processing output of pmlogsummary
386 URL: http://www.pcp.io
387 Requires: pcp = @package_version@
389 %description -n perl-PCP-LogSummary
390 The PCP::LogSummary module provides a Perl module for using the
391 statistical summary data produced by the Performance Co-Pilot
392 pmlogsummary utility. This utility produces various averages,
393 minima, maxima, and other calculations based on the performance
394 data stored in a PCP archive. The Perl interface is ideal for
395 exporting this data into third-party tools (e.g. spreadsheets).
398 # pcp-import-sar2pcp
400 %package import-sar2pcp
401 License: LGPLv2+
402 Group: Applications/System
403 Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs
404 URL: http://www.pcp.io
405 Requires: pcp-libs = @package_version@ perl-PCP-LogImport = @package_version@ sysstat
406 %if "%{_vendor}" == "suse"
407 %else
408 Requires: perl(XML::TokeParser)
409 %endif
412 %description import-sar2pcp
413 Performance Co-Pilot (PCP) front-end tools for importing sar data
414 into standard PCP archive logs for replay with any PCP monitoring tool.
417 # pcp-import-iostat2pcp
419 %package import-iostat2pcp
420 License: LGPLv2+
421 Group: Applications/System
422 Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs
423 URL: http://www.pcp.io
424 Requires: pcp-libs = @package_version@ perl-PCP-LogImport = @package_version@ sysstat
426 %description import-iostat2pcp
427 Performance Co-Pilot (PCP) front-end tools for importing iostat data
428 into standard PCP archive logs for replay with any PCP monitoring tool.
431 # pcp-import-sheet2pcp
433 %package import-sheet2pcp
434 License: LGPLv2+
435 Group: Applications/System
436 Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs
437 URL: http://www.pcp.io
438 Requires: pcp-libs = @package_version@ perl-PCP-LogImport = @package_version@
439 %if "%{_vendor}" == "suse"
440 %else
441 Requires: perl(XML::TokeParser)
442 %endif
444 %description import-sheet2pcp
445 Performance Co-Pilot (PCP) front-end tools for importing spreadsheet data
446 into standard PCP archive logs for replay with any PCP monitoring tool.
449 # pcp-import-mrtg2pcp
451 %package import-mrtg2pcp
452 License: LGPLv2+
453 Group: Applications/System
454 Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs
455 URL: http://www.pcp.io
456 Requires: pcp-libs = @package_version@ perl-PCP-LogImport = @package_version@
458 %description import-mrtg2pcp
459 Performance Co-Pilot (PCP) front-end tools for importing MTRG data
460 into standard PCP archive logs for replay with any PCP monitoring tool.
463 # pcp-import-ganglia2pcp
465 %package import-ganglia2pcp
466 License: LGPLv2+
467 Group: Applications/System
468 Summary: Performance Co-Pilot tools for importing ganglia data into PCP archive logs
469 URL: http://www.pcp.io
470 Requires: pcp-libs = @package_version@ perl-PCP-LogImport = @package_version@
472 %description import-ganglia2pcp
473 Performance Co-Pilot (PCP) front-end tools for importing ganglia data
474 into standard PCP archive logs for replay with any PCP monitoring tool.
477 # pcp-import-collectl2pcp
479 %package import-collectl2pcp
480 License: LGPLv2+
481 Group: Applications/System
482 Summary: Performance Co-Pilot tools for importing collectl log files into PCP archive logs
483 URL: http://www.pcp.io
484 Requires: pcp-libs = %{version}-%{release}
486 %description import-collectl2pcp
487 Performance Co-Pilot (PCP) front-end tools for importing collectl data
488 into standard PCP archive logs for replay with any PCP monitoring tool.
491 # pcp-export-zabbix-agent
493 %package export-zabbix-agent
494 License: GPLv2+
495 Group: Applications/System
496 Summary: Module for exporting PCP metrics to Zabbix agent
497 URL: http://www.pcp.io
498 Requires: pcp-libs = %{version}-%{release}
500 %description export-zabbix-agent
501 Performance Co-Pilot (PCP) module for exporting metrics from PCP to
502 Zabbix via the Zabbix agent - see zbxpcp(3) for further details.
504 %if "@have_python@" == "true"
506 # pcp-export-pcp2graphite
508 %package export-pcp2graphite
509 License: GPLv2+
510 Group: Applications/System
511 Summary: Performance Co-Pilot tools for exporting PCP metrics to Graphite
512 URL: http://www.pcp.io
513 Requires: pcp-libs >= %{version}-%{release}
514 %if "@enable_python3@" == "true"
515 Requires: python3-pcp = @package_version@
516 %else
517 Requires: python-pcp = @package_version@
518 %endif
520 %description export-pcp2graphite
521 Performance Co-Pilot (PCP) front-end tools for exporting metric values
522 to graphite (http://graphite.readthedocs.org).
525 # pcp-export-pcp2influxdb
527 %package export-pcp2influxdb
528 License: GPLv2+
529 Group: Applications/System
530 Summary: Performance Co-Pilot tools for exporting PCP metrics to InfluxDB
531 URL: http://www.pcp.io
532 Requires: pcp-libs >= %{version}-%{release}
533 %if "@enable_python3@" == "true"
534 Requires: python3-pcp = @package_version@
535 Requires: python3-requests
536 %else
537 Requires: python-pcp = @package_version@
538 Requires: python-requests
539 %endif
541 %description export-pcp2influxdb
542 Performance Co-Pilot (PCP) front-end tools for exporting metric values
543 to InfluxDB (https://influxdata.com/time-series-platform/influxdb).
544 %endif
546 %if "@enable_python2@" == "true"
548 # python-pcp. This is the PCP library bindings for python.
550 %package -n python-pcp
551 License: GPLv2+
552 Group: Development/Libraries
553 Summary: Performance Co-Pilot (PCP) Python bindings and documentation
554 URL: http://www.pcp.io
555 BuildRequires: python-devel
556 %if "%{_vendor}" == "redhat" && 0%{?rhel} <= 5
557 Requires: python-ctypes
558 %endif
559 Requires: pcp-libs = @package_version@
560 Requires: python
562 %description -n python-pcp
563 This python PCP module contains the language bindings for
564 Performance Metric API (PMAPI) monitor tools and Performance
565 Metric Domain Agents (PMDA) collector tools written in Python.
566 %endif
568 %if "@enable_python3@" == "true"
570 # python3-pcp. This is the PCP library bindings for python.
572 %package -n python3-pcp
573 License: GPLv2+
574 Group: Development/Libraries
575 Summary: Performance Co-Pilot (PCP) Python3 bindings and documentation
576 URL: http://www.pcp.io
577 BuildRequires: python3-devel
578 Requires: pcp-libs = @package_version@
579 Requires: python3
581 %description -n python3-pcp
582 This python PCP module contains the language bindings for
583 Performance Metric API (PMAPI) monitor tools and Performance
584 Metric Domain Agent (PMDA) collector tools written in Python3.
585 %endif
587 %if "@have_python@" == "true"
589 # pcp-system-tools
591 %package -n pcp-system-tools
592 License: GPLv2+
593 Group: Development/Libraries
594 Summary: Performance Co-Pilot (PCP) System and Monitoring Tools
595 URL: http://www.pcp.io
596 %if "@enable_python3@" == "true"
597 Requires: python3-pcp = @package_version@
598 %endif
599 %if "@enable_python2@" == "true"
600 Requires: python-pcp = @package_version@
601 %endif
602 %description -n pcp-system-tools
603 This PCP module contains additional system monitoring tools written
604 in python.
605 %endif #pcp-system-tools
607 %if "@enable_qt@" == "true"
609 # pcp-gui package for Qt tools
611 %package -n pcp-gui
612 License: GPLv2+ and LGPLv2+ and LGPLv2+ with exceptions
613 Group: Applications/System
614 Summary: Visualization tools for the Performance Co-Pilot toolkit
615 URL: http://www.pcp.io
616 Requires: pcp-libs = %{version}-%{release}
618 %description -n pcp-gui
619 Visualization tools for the Performance Co-Pilot toolkit.
620 The pcp-gui package primarily includes visualization tools for
621 monitoring systems using live and archived Performance Co-Pilot
622 (PCP) sources.
623 %endif
626 # pcp-doc package
628 %package -n pcp-doc
629 License: GPLv2+ and CC-BY
630 Group: Documentation
631 # BuildArch: requires rpm 4.6 or later ... ./get_rpm_vesion maps version
632 # 4.6.2.3 to the 7-digit "number" 4060203
633 %if @rpm_version@ >= 4060000
634 BuildArch: noarch
635 %endif
636 Summary: Documentation and tutorial for the Performance Co-Pilot
637 URL: http://www.pcp.io
639 %description -n pcp-doc
640 Documentation and tutorial for the Performance Co-Pilot
641 Performance Co-Pilot (PCP) provides a framework and services to support
642 system-level performance monitoring and performance management.
644 The pcp-doc package provides useful information on using and
645 configuring the Performance Co-Pilot (PCP) toolkit for system
646 level performance management. It includes tutorials, HOWTOs,
647 and other detailed documentation about the internals of core
648 PCP utilities and daemons, and the PCP graphical tools.
650 %if "@pmda_papi@" == "true"
652 # pcp-pmda-papi
654 %package pmda-papi
655 License: GPLv2+
656 Group: Applications/System
657 Summary: Performance Co-Pilot (PCP) metrics for Performance API and hardware counters
658 URL: http://www.pcp.io
659 Requires: pcp-libs = %{version}-%{release}
660 BuildRequires: papi-devel
662 %description pmda-papi
663 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
664 collecting hardware counters statistics through PAPI (Perforamance API).
665 #end pcp-pmda-papi
666 %endif
668 %if "@pmda_infiniband@" == "true"
670 # pcp-pmda-infiniband
672 %package pmda-infiniband
673 License: GPLv2+
674 Group: Applications/System
675 Summary: Performance Co-Pilot (PCP) metrics for Infiniband HCAs and switches
676 URL: http://www.pcp.io
677 Requires: pcp-libs = @package_version@
678 %if "%{_vendor}" == "suse"
679 %if 0%{suse_version} >= 1110
680 Requires: libibmad5 >= 1.1.7 libibumad3 >= 1.1.7
681 %else
682 Requires: libibmad1 >= 1.1.7 libibumad1 >= 1.1.7
683 %endif
684 %else
685 Requires: libibmad >= 1.1.7 libibumad >= 1.1.7
686 %endif
687 BuildRequires: libibmad-devel >= 1.1.7 libibumad-devel >= 1.1.7
689 %description pmda-infiniband
690 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
691 collecting Infiniband statistics. By default, it monitors the local HCAs
692 but can also be configured to monitor remote GUIDs such as IB switches.
693 #end pcp-pmda-infiniband
694 %endif
696 %if "@pmda_perfevent@" == "true"
698 # pcp-pmda-perfevent
700 %package pmda-perfevent
701 License: GPLv2+
702 Group: Applications/System
703 Summary: Performance Co-Pilot (PCP) metrics for hardware counters
704 URL: http://www.pcp.io
705 %if "%{_vendor}" == "suse"
706 Requires: libpfm4 >= 4.4
707 %else
708 Requires: libpfm >= 4.4
709 %endif
710 BuildRequires: libpfm-devel >= 4.4
712 %description pmda-perfevent
713 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
714 collecting hardware counters statistics through libpfm.
715 #end pcp-pmda-perfevent
716 %endif
718 %if "@pmda_activemq@" == "true"
720 # pcp-pmda-activemq
722 %package pmda-activemq
723 License: GPLv2+
724 Group: Applications/System
725 Summary: Performance Co-Pilot (PCP) metrics for ActiveMQ
726 URL: http://www.pcp.io
727 Requires: perl-PCP-PMDA = @package_version@
728 Requires: perl(LWP::UserAgent)
730 %description pmda-activemq
731 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
732 collecting metrics about the ActiveMQ message broker.
733 #end pcp-pmda-activemq
734 %endif
736 %if "@pmda_bind2@" == "true"
738 # pcp-pmda-bind2
740 %package pmda-bind2
741 License: GPLv2+
742 Group: Applications/System
743 Summary: Performance Co-Pilot (PCP) metrics for ActiveMQ
744 URL: http://www.pcp.io
745 Requires: perl-PCP-PMDA = @package_version@
746 Requires: perl(LWP::UserAgent)
747 Requires: perl(XML::LibXML)
749 %description pmda-bind2
750 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
751 collecting metrics from BIND (Berkeley Internet Name Domain).
752 #end pcp-pmda-bind2
753 %endif
756 # pcp-pmda-redis
758 %package pmda-redis
759 License: GPLv2+
760 Group: Applications/System
761 Summary: Performance Co-Pilot (PCP) metrics for Redis
762 URL: http://www.pcp.io
763 Requires: perl-PCP-PMDA = @package_version@
765 %description pmda-redis
766 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
767 collecting metrics from Redis servers (redis.io).
768 #end pcp-pmda-redis
770 %if "@pmda_nutcracker@" == "true"
772 # pcp-pmda-nutcracker
774 %package pmda-nutcracker
775 License: GPLv2+
776 Group: Applications/System
777 Summary: Performance Co-Pilot (PCP) metrics for NutCracker (TwemCache)
778 URL: http://www.pcp.io
779 Requires: perl-PCP-PMDA = @package_version@
780 Requires: perl(YAML::XS::LibYAML)
781 Requires: perl(JSON)
783 %description pmda-nutcracker
784 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
785 collecting metrics from NutCracker (TwemCache).
786 #end pcp-pmda-nutcracker
787 %endif
790 # pcp-pmda-bonding
792 %package pmda-bonding
793 License: GPLv2+
794 Group: Applications/System
795 Summary: Performance Co-Pilot (PCP) metrics for Bonded network interfaces
796 URL: http://www.pcp.io
797 Requires: perl-PCP-PMDA = @package_version@
799 %description pmda-bonding
800 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
801 collecting metrics about bonded network interfaces.
802 #end pcp-pmda-bonding
805 # pcp-pmda-dbping
807 %package pmda-dbping
808 License: GPLv2+
809 Group: Applications/System
810 Summary: Performance Co-Pilot (PCP) metrics for Database response times and Availablility
811 URL: http://www.pcp.io
812 Requires: perl-PCP-PMDA = @package_version@
814 %description pmda-dbping
815 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
816 collecting metrics about the Database response times and Availablility.
817 #end pcp-pmda-dbping
820 # pcp-pmda-ds389
822 %package pmda-ds389
823 License: GPLv2+
824 Group: Applications/System
825 Summary: Performance Co-Pilot (PCP) metrics for 389 Directory Servers
826 URL: http://www.pcp.io
827 Requires: perl-PCP-PMDA = @package_version@
828 %if "%{_vendor}" == "suse"
829 Requires: perl-ldap
830 %else
831 Requires: perl-LDAP
832 %endif
834 %description pmda-ds389
835 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
836 collecting metrics about a 389 Directory Server.
837 #end pcp-pmda-ds389
840 # pcp-pmda-ds389log
842 %package pmda-ds389log
843 License: GPLv2+
844 Group: Applications/System
845 Summary: Performance Co-Pilot (PCP) metrics for 389 Directory Server Loggers
846 URL: http://www.pcp.io
847 Requires: perl-PCP-PMDA = @package_version@
848 Requires: perl-Date-Manip
850 %description pmda-ds389log
851 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
852 collecting metrics from a 389 Directory Server log.
853 #end pcp-pmda-ds389log
855 %if "@pmda_elasticsearch@" == "true"
857 # pcp-pmda-elasticsearch
859 %package pmda-elasticsearch
860 License: GPLv2+
861 Group: Applications/System
862 Summary: Performance Co-Pilot (PCP) metrics for Elasticsearch
863 URL: http://www.pcp.io
864 Requires: perl-PCP-PMDA = @package_version@
865 Requires: perl(LWP::UserAgent)
867 %description pmda-elasticsearch
868 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
869 collecting metrics about Elasticsearch.
870 #end pcp-pmda-elasticsearch
871 %endif
874 # pcp-pmda-gpfs
876 %package pmda-gpfs
877 License: GPLv2+
878 Group: Applications/System
879 Summary: Performance Co-Pilot (PCP) metrics for GPFS Filesystem
880 URL: http://www.pcp.io
881 Requires: perl-PCP-PMDA = @package_version@
883 %description pmda-gpfs
884 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
885 collecting metrics about the GPFS filesystem.
886 #end pcp-pmda-gpfs
889 # pcp-pmda-gpsd
891 %package pmda-gpsd
892 License: GPLv2+
893 Group: Applications/System
894 Summary: Performance Co-Pilot (PCP) metrics for a GPS Daemon
895 URL: http://www.pcp.io
896 Requires: perl-PCP-PMDA = @package_version@
898 %description pmda-gpsd
899 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
900 collecting metrics about a GPS Daemon.
901 #end pcp-pmda-gpsd
904 # pcp-pmda-kvm
906 %package pmda-kvm
907 License: GPLv2+
908 Group: Applications/System
909 Summary: Performance Co-Pilot (PCP) metrics for KVM
910 URL: http://www.pcp.io
911 Requires: perl-PCP-PMDA = @package_version@
913 %description pmda-kvm
914 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
915 collecting metrics about the Kernel based Virtual Machine.
916 #end pcp-pmda-kvm
919 # pcp-pmda-lustre
921 %package pmda-lustre
922 License: GPLv2+
923 Group: Applications/System
924 Summary: Performance Co-Pilot (PCP) metrics for the Lustre Filesytem
925 URL: http://www.pcp.io
926 Requires: perl-PCP-PMDA = @package_version@
928 %description pmda-lustre
929 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
930 collecting metrics about the Lustre Filesystem.
931 #end pcp-pmda-lustre
934 # pcp-pmda-lustrecomm
936 %package pmda-lustrecomm
937 License: GPLv2+
938 Group: Applications/System
939 Summary: Performance Co-Pilot (PCP) metrics for the Lustre Filesytem Comms
940 URL: http://www.pcp.io
942 %description pmda-lustrecomm
943 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
944 collecting metrics about the Lustre Filesystem Comms.
945 #end pcp-pmda-lustrecomm
948 # pcp-pmda-memcache
950 %package pmda-memcache
951 License: GPLv2+
952 Group: Applications/System
953 Summary: Performance Co-Pilot (PCP) metrics for Memcached
954 URL: http://www.pcp.io
955 Requires: perl-PCP-PMDA = @package_version@
957 %description pmda-memcache
958 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
959 collecting metrics about Memcached.
960 #end pcp-pmda-memcache
962 %if "@pmda_mysql@" == "true"
964 # pcp-pmda-mysql
966 %package pmda-mysql
967 License: GPLv2+
968 Group: Applications/System
969 Summary: Performance Co-Pilot (PCP) metrics for MySQL
970 URL: http://www.pcp.io
971 Requires: perl-PCP-PMDA = @package_version@
972 Requires: perl(DBI)
973 Requires: perl(DBD::mysql)
975 %description pmda-mysql
976 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
977 collecting metrics about the MySQL database.
978 #end pcp-pmda-mysql
979 %endif
982 # pcp-pmda-named
984 %package pmda-named
985 License: GPLv2+
986 Group: Applications/System
987 Summary: Performance Co-Pilot (PCP) metrics for Named
988 URL: http://www.pcp.io
989 Requires: perl-PCP-PMDA = @package_version@
991 %description pmda-named
992 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
993 collecting metrics about the Named nameserver.
994 #end pcp-pmda-named
996 # pcp-pmda-netfilter
998 %package pmda-netfilter
999 License: GPLv2+
1000 Group: Applications/System
1001 Summary: Performance Co-Pilot (PCP) metrics for Netfilter framework
1002 URL: http://www.pcp.io
1003 Requires: perl-PCP-PMDA = @package_version@
1005 %description pmda-netfilter
1006 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1007 collecting metrics about the Netfilter packet filtering framework.
1008 #end pcp-pmda-netfilter
1011 # pcp-pmda-news
1013 %package pmda-news
1014 License: GPLv2+
1015 Group: Applications/System
1016 Summary: Performance Co-Pilot (PCP) metrics for Usenet News
1017 URL: http://www.pcp.io
1018 Requires: perl-PCP-PMDA = @package_version@
1020 %description pmda-news
1021 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1022 collecting metrics about Usenet News.
1023 #end pcp-pmda-news
1025 %if "@pmda_nginx@" == "true"
1027 # pcp-pmda-nginx
1029 %package pmda-nginx
1030 License: GPLv2+
1031 Group: Applications/System
1032 Summary: Performance Co-Pilot (PCP) metrics for the Nginx Webserver
1033 URL: http://www.pcp.io
1034 Requires: perl-PCP-PMDA = @package_version@
1035 Requires: perl(LWP::UserAgent)
1037 %description pmda-nginx
1038 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1039 collecting metrics about the Nginx Webserver.
1040 #end pcp-pmda-nginx
1041 %endif
1044 # pcp-pmda-nfsclient
1046 %package pmda-nfsclient
1047 License: GPLv2+
1048 Group: Applications/System
1049 Summary: Performance Co-Pilot (PCP) metrics for NFS Clients
1050 URL: http://www.pcp.io
1051 Requires: perl-PCP-PMDA = @package_version@
1053 %description pmda-nfsclient
1054 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1055 collecting metrics for NFS Clients.
1056 #end pcp-pmda-nfsclient
1059 # pcp-pmda-pdns
1061 %package pmda-pdns
1062 License: GPLv2+
1063 Group: Applications/System
1064 Summary: Performance Co-Pilot (PCP) metrics for PowerDNS
1065 URL: http://www.pcp.io
1066 Requires: perl-PCP-PMDA = @package_version@
1068 %description pmda-pdns
1069 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1070 collecting metrics about the PowerDNS.
1071 #end pcp-pmda-pdns
1073 %if "@pmda_postfix@" == "true"
1075 # pcp-pmda-postfix
1077 %package pmda-postfix
1078 License: GPLv2+
1079 Group: Applications/System
1080 Summary: Performance Co-Pilot (PCP) metrics for the Postfix (MTA)
1081 URL: http://www.pcp.io
1082 Requires: perl-PCP-PMDA = @package_version@
1083 %if 0%{?fedora} > 16 || 0%{?rhel} > 5
1084 Requires: postfix-perl-scripts
1085 %endif
1086 %if 0%{?rhel} <= 5
1087 Requires: postfix
1088 %endif
1089 %if "%{_vendor}" == "suse"
1090 Requires: postfix-doc
1091 %endif
1093 %description pmda-postfix
1094 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1095 collecting metrics about the Postfix (MTA).
1096 #end pcp-pmda-postfix
1097 %endif
1099 %if "@pmda_postgresql@" == "true"
1101 # pcp-pmda-postgresql
1103 %package pmda-postgresql
1104 License: GPLv2+
1105 Group: Applications/System
1106 Summary: Performance Co-Pilot (PCP) metrics for PostgreSQL
1107 URL: http://www.pcp.io
1108 Requires: perl-PCP-PMDA = @package_version@
1109 Requires: perl(DBI)
1110 Requires: perl(DBD::Pg)
1112 %description pmda-postgresql
1113 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1114 collecting metrics about the PostgreSQL database.
1115 #end pcp-pmda-postgresql
1116 %endif
1118 %if "@pmda_oracle@" == "true"
1120 # pcp-pmda-oracle
1122 %package pmda-oracle
1123 License: GPLv2+
1124 Group: Applications/System
1125 Summary: Performance Co-Pilot (PCP) metrics for Oracle
1126 URL: http://www.pcp.io
1127 Requires: perl-PCP-PMDA = @package_version@
1128 Requires: perl(DBI)
1130 %description pmda-oracle
1131 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1132 collecting metrics about the Oracle database.
1133 #end pcp-pmda-oracle
1134 %endif
1137 # pcp-pmda-rsyslog
1139 %package pmda-rsyslog
1140 License: GPLv2+
1141 Group: Applications/System
1142 Summary: Performance Co-Pilot (PCP) metrics for Rsyslog
1143 URL: http://www.pcp.io
1144 Requires: perl-PCP-PMDA = @package_version@
1146 %description pmda-rsyslog
1147 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1148 collecting metrics about Rsyslog.
1149 #end pcp-pmda-rsyslog
1152 # pcp-pmda-samba
1154 %package pmda-samba
1155 License: GPLv2+
1156 Group: Applications/System
1157 Summary: Performance Co-Pilot (PCP) metrics for Samba
1158 URL: http://www.pcp.io
1159 Requires: perl-PCP-PMDA = @package_version@
1161 %description pmda-samba
1162 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1163 collecting metrics about Samba.
1164 #end pcp-pmda-samba
1167 # pcp-pmda-slurm
1169 %package pmda-slurm
1170 License: GPLv2+
1171 Group: Applications/System
1172 Summary: Performance Co-Pilot (PCP) metrics for NFS Clients
1173 URL: http://www.pcp.io
1174 Requires: perl-PCP-PMDA = @package_version@
1176 %description pmda-slurm
1177 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1178 collecting metrics from the SLURM Workload Manager.
1179 #end pcp-pmda-slurm
1181 %if "@pmda_snmp@" == "true"
1183 # pcp-pmda-snmp
1185 %package pmda-snmp
1186 License: GPLv2+
1187 Group: Applications/System
1188 Summary: Performance Co-Pilot (PCP) metrics for Simple Network Management Protocol
1189 URL: http://www.pcp.io
1190 Requires: perl-PCP-PMDA = @package_version@
1191 Requires: perl(Net::SNMP)
1193 %description pmda-snmp
1194 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1195 collecting metrics about SNMP.
1196 #end pcp-pmda-snmp
1197 %endif
1200 # pcp-pmda-vmware
1202 %package pmda-vmware
1203 License: GPLv2+
1204 Group: Applications/System
1205 Summary: Performance Co-Pilot (PCP) metrics for VMware
1206 URL: http://www.pcp.io
1207 Requires: perl-PCP-PMDA = @package_version@
1209 %description pmda-vmware
1210 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1211 collecting metrics for VMware.
1212 #end pcp-pmda-vmware
1215 # pcp-pmda-zimbra
1217 %package pmda-zimbra
1218 License: GPLv2+
1219 Group: Applications/System
1220 Summary: Performance Co-Pilot (PCP) metrics for Zimbra
1221 URL: http://www.pcp.io
1222 Requires: perl-PCP-PMDA = @package_version@
1224 %description pmda-zimbra
1225 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1226 collecting metrics about Zimbra.
1227 #end pcp-pmda-zimbra
1230 # pcp-pmda-dm
1232 %package pmda-dm
1233 License: GPLv2+
1234 Group: Applications/System
1235 Summary: Performance Co-Pilot (PCP) metrics for the Device Mapper Cache and Thin Client
1236 URL: http://www.pcp.io
1237 Requires: pcp-libs = @package_version@
1238 %description pmda-dm
1239 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1240 collecting metrics about the Device Mapper Cache and Thin Client.
1241 # end pcp-pmda-dm
1243 %if "@have_python@" == "true"
1245 # pcp-pmda-gluster
1247 %package pmda-gluster
1248 License: GPLv2+
1249 Group: Applications/System
1250 Summary: Performance Co-Pilot (PCP) metrics for the Gluster filesystem
1251 URL: http://www.pcp.io
1252 %if "@enable_python3@" == "true"
1253 Requires: python3-pcp
1254 %else
1255 Requires: python-pcp
1256 %endif
1257 %description pmda-gluster
1258 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1259 collecting metrics about the gluster filesystem.
1260 # end pcp-pmda-gluster
1263 # pcp-pmda-zswap
1265 %package pmda-zswap
1266 License: GPLv2+
1267 Group: Applications/System
1268 Summary: Performance Co-Pilot (PCP) metrics for compressed swap
1269 URL: http://www.pcp.io
1270 %if "@enable_python3@" == "true"
1271 Requires: python3-pcp
1272 %else
1273 Requires: python-pcp
1274 %endif
1275 %description pmda-zswap
1276 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1277 collecting metrics about compressed swap.
1278 # end pcp-pmda-zswap
1281 # pcp-pmda-unbound
1283 %package pmda-unbound
1284 License: GPLv2+
1285 Group: Applications/System
1286 Summary: Performance Co-Pilot (PCP) metrics for the Unbound DNS Resolver
1287 URL: http://www.pcp.io
1288 %if "@enable_python3@" == "true"
1289 Requires: python3-pcp
1290 %else
1291 Requires: python-pcp
1292 %endif
1293 %description pmda-unbound
1294 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1295 collecting metrics about the Unbound DNS Resolver.
1296 # end pcp-pmda-unbound
1299 # pcp-pmda-mic
1301 %package pmda-mic
1302 License: GPLv2+
1303 Group: Applications/System
1304 Summary: Performance Co-Pilot (PCP) metrics for Intel MIC cards
1305 URL: http://www.pcp.io
1306 %if "@enable_python3@" == "true"
1307 Requires: python3-pcp
1308 %else
1309 Requires: python-pcp
1310 %endif
1311 %description pmda-mic
1312 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1313 collecting metrics about Intel MIC cards.
1314 # end pcp-pmda-mic
1315 %endif
1317 %if "@pmda_libvirt@" == "true"
1319 # pcp-pmda-libvirt
1321 %package pmda-libvirt
1322 License: GPLv2+
1323 Group: Applications/System
1324 Summary: Performance Co-Pilot (PCP) metrics from libvirt virtualisation
1325 URL: http://www.pcp.io
1326 Requires: pcp-libs = @package_version@
1327 %if "@enable_python3@" == "true"
1328 Requires: python3-pcp
1329 %if "%{_vendor}" == "suse"
1330 Requires: libvirt-python python-lxml
1331 %else
1332 Requires: libvirt-python3 python3-lxml
1333 %endif
1334 %else
1335 Requires: libvirt-python python-lxml
1336 Requires: python-pcp
1337 %endif
1339 %description pmda-libvirt
1340 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1341 extracting virtualisation statistics from libvirt about behaviour of guest
1342 and hypervisor machines.
1343 #end pcp-pmda-libvirt
1344 %endif
1346 %if "@pmda_json@" == "true"
1348 # pcp-pmda-json
1350 %package pmda-json
1351 License: GPLv2+
1352 Group: Applications/System
1353 Summary: Performance Co-Pilot (PCP) metrics for JSON data
1354 URL: http://www.pcp.io
1355 %if "@enable_python3@" == "true"
1356 Requires: python3-pcp
1357 %if "%{_vendor}" == "suse"
1358 Requires: python-jsonpointer
1359 %else
1360 Requires: python3-jsonpointer
1361 %endif
1362 Requires: python3-six
1363 %else
1364 Requires: python-pcp
1365 Requires: python-jsonpointer
1366 Requires: python-six
1367 %endif
1368 %description pmda-json
1369 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1370 collecting metrics output in JSON.
1371 # end pcp-pmda-json
1372 %endif
1375 # C pmdas
1376 # pcp-pmda-apache
1378 %package pmda-apache
1379 License: GPLv2+
1380 Group: Applications/System
1381 Summary: Performance Co-Pilot (PCP) metrics for the Apache webserver
1382 URL: http://www.pcp.io
1383 Requires: pcp-libs = @package_version@
1384 %description pmda-apache
1385 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1386 collecting metrics about the Apache webserver.
1387 # end pcp-pmda-apache
1390 # pcp-pmda-bash
1392 %package pmda-bash
1393 License: GPLv2+
1394 Group: Applications/System
1395 Summary: Performance Co-Pilot (PCP) metrics for the Bash shell
1396 URL: http://www.pcp.io
1397 Requires: pcp-libs = @package_version@
1398 %description pmda-bash
1399 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1400 collecting metrics about the Bash shell.
1401 # end pcp-pmda-bash
1404 # pcp-pmda-cifs
1406 %package pmda-cifs
1407 License: GPLv2+
1408 Group: Applications/System
1409 Summary: Performance Co-Pilot (PCP) metrics for the Cifs shell
1410 URL: http://www.pcp.io
1411 Requires: pcp-libs = @package_version@
1412 %description pmda-cifs
1413 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1414 collecting metrics about the Common Internet Filesytem.
1415 # end pcp-pmda-cifs
1418 # pcp-pmda-cisco
1420 %package pmda-cisco
1421 License: GPLv2+
1422 Group: Applications/System
1423 Summary: Performance Co-Pilot (PCP) metrics for the Cisco shell
1424 URL: http://www.pcp.io
1425 Requires: pcp-libs = @package_version@
1426 %description pmda-cisco
1427 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1428 collecting metrics about Cisco routers.
1429 # end pcp-pmda-cisco
1432 # pcp-pmda-gfs2
1434 %package pmda-gfs2
1435 License: GPLv2+
1436 Group: Applications/System
1437 Summary: Performance Co-Pilot (PCP) metrics for the Gfs2 shell
1438 URL: http://www.pcp.io
1439 Requires: pcp-libs = @package_version@
1440 %description pmda-gfs2
1441 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1442 collecting metrics about the Global Filesystem v2.
1443 # end pcp-pmda-gfs2
1446 # pcp-pmda-lmsensors
1448 %package pmda-lmsensors
1449 License: GPLv2+
1450 Group: Applications/System
1451 Summary: Performance Co-Pilot (PCP) metrics for the Lmsensors shell
1452 URL: http://www.pcp.io
1453 Requires: pcp-libs = @package_version@
1454 %description pmda-lmsensors
1455 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1456 collecting metrics about the Linux hardware monitoring sensors.
1457 # end pcp-pmda-lmsensors
1460 # pcp-pmda-logger
1462 %package pmda-logger
1463 License: GPLv2+
1464 Group: Applications/System
1465 Summary: Performance Co-Pilot (PCP) metrics from arbitrary log files
1466 URL: http://www.pcp.io
1467 Requires: pcp-libs = @package_version@
1468 %description pmda-logger
1469 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1470 collecting metrics from a specified set of log files (or pipes). The PMDA
1471 supports both sampled and event-style metrics.
1472 # end pcp-pmda-logger
1475 # pcp-pmda-mailq
1477 %package pmda-mailq
1478 License: GPLv2+
1479 Group: Applications/System
1480 Summary: Performance Co-Pilot (PCP) metrics for the Mailq shell
1481 URL: http://www.pcp.io
1482 Requires: pcp-libs = @package_version@
1483 %description pmda-mailq
1484 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1485 collecting metrics about email queues managed by sendmail.
1486 # end pcp-pmda-mailq
1489 # pcp-pmda-mounts
1491 %package pmda-mounts
1492 License: GPLv2+
1493 Group: Applications/System
1494 Summary: Performance Co-Pilot (PCP) metrics for the Mounts shell
1495 URL: http://www.pcp.io
1496 Requires: pcp-libs = @package_version@
1497 %description pmda-mounts
1498 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1499 collecting metrics about filesystem mounts.
1500 # end pcp-pmda-mounts
1503 # pcp-pmda-nvidia-gpu
1505 %package pmda-nvidia-gpu
1506 License: GPLv2+
1507 Group: Applications/System
1508 Summary: Performance Co-Pilot (PCP) metrics for the Nvidia shell
1509 URL: http://www.pcp.io
1510 Requires: pcp-libs = @package_version@
1511 %description pmda-nvidia-gpu
1512 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1513 collecting metrics about the Nvidia gpu metrics.
1514 # end pcp-pmda-nvidia-gpu
1517 # pcp-pmda-roomtemp
1519 %package pmda-roomtemp
1520 License: GPLv2+
1521 Group: Applications/System
1522 Summary: Performance Co-Pilot (PCP) metrics for the Roomtemp shell
1523 URL: http://www.pcp.io
1524 Requires: pcp = @package_version@
1525 %description pmda-roomtemp
1526 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1527 collecting metrics about the Room temperature metrics.
1528 # end pcp-pmda-roomtemp
1530 %if "@pmda_rpm@" == "true"
1532 # pcp-pmda-rpm
1534 %package pmda-rpm
1535 License: GPLv2+
1536 Group: Applications/System
1537 Summary: Performance Co-Pilot (PCP) metrics for the Rpm shell
1538 URL: http://www.pcp.io
1539 Requires: pcp = @package_version@
1540 %description pmda-rpm
1541 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1542 collecting metrics about the rpms.
1543 %endif
1544 # end pcp-pmda-rpm
1548 # pcp-pmda-sendmail
1550 %package pmda-sendmail
1551 License: GPLv2+
1552 Group: Applications/System
1553 Summary: Performance Co-Pilot (PCP) metrics for the Sendmail shell
1554 URL: http://www.pcp.io
1555 Requires: pcp = @package_version@
1556 %description pmda-sendmail
1557 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1558 collecting metrics about Sendmail traffic metrics.
1559 # end pcp-pmda-sendmail
1562 # pcp-pmda-shping
1564 %package pmda-shping
1565 License: GPLv2+
1566 Group: Applications/System
1567 Summary: Performance Co-Pilot (PCP) metrics for the Shping shell
1568 URL: http://www.pcp.io
1569 Requires: pcp-libs = @package_version@
1570 %description pmda-shping
1571 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1572 collecting metrics about quality of service and response time measurements of
1573 arbitrary shell commands.
1574 # end pcp-pmda-shping
1577 # pcp-pmda-summary
1579 %package pmda-summary
1580 License: GPLv2+
1581 Group: Applications/System
1582 Summary: Performance Co-Pilot (PCP) metrics for the Summary shell
1583 URL: http://www.pcp.io
1584 Requires: pcp = @package_version@
1585 %description pmda-summary
1586 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1587 collecting metrics about other installed pmdas.
1588 # end pcp-pmda-summary
1590 %if "@pmda_systemd@" == "true"
1592 # pcp-pmda-systemd
1594 %package pmda-systemd
1595 License: GPLv2+
1596 Group: Applications/System
1597 Summary: Performance Co-Pilot (PCP) metrics for the Systemd shell
1598 URL: http://www.pcp.io
1599 Requires: pcp-libs = @package_version@
1600 %description pmda-systemd
1601 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1602 collecting metrics about the Systemd shell.
1603 # end pcp-pmda-systemd
1604 %endif
1607 # pcp-pmda-trace
1609 %package pmda-trace
1610 License: GPLv2+
1611 Group: Applications/System
1612 Summary: Performance Co-Pilot (PCP) metrics for the Trace shell
1613 URL: http://www.pcp.io
1614 Requires: pcp-libs = @package_version@
1615 %description pmda-trace
1616 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1617 collecting metrics about transaction performance metrics from applications.
1618 # end pcp-pmda-trace
1621 # pcp-pmda-weblog
1623 %package pmda-weblog
1624 License: GPLv2+
1625 Group: Applications/System
1626 Summary: Performance Co-Pilot (PCP) metrics for the Weblog shell
1627 URL: http://www.pcp.io
1628 Requires: pcp = @package_version@
1629 %description pmda-weblog
1630 This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1631 collecting metrics about web server logs.
1632 # end pcp-pmda-weblog
1633 # end C pmdas
1635 # pcp-collector metapackage
1636 %package collector
1637 License: GPLv2+
1638 Group: Applications/System
1639 Summary: Performance Co-Pilot (PCP) Collection meta Package
1640 URL: http://www.pcp.io
1641 Requires: pcp-pmda-bonding pcp-pmda-dbping pcp-pmda-ds389 pcp-pmda-ds389log
1642 Requires: pcp-pmda-gpfs pcp-pmda-gpsd pcp-pmda-kvm pcp-pmda-lustre
1643 Requires: pcp-pmda-memcache pcp-pmda-named pcp-pmda-netfilter pcp-pmda-news
1644 Requires: pcp-pmda-nfsclient pcp-pmda-pdns
1645 Requires: pcp-pmda-samba pcp-pmda-slurm pcp-pmda-vmware pcp-pmda-zimbra
1646 Requires: pcp-pmda-apache pcp-pmda-bash pcp-pmda-cisco pcp-pmda-dm pcp-pmda-gfs2
1647 Requires: pcp-pmda-lmsensors pcp-pmda-logger pcp-pmda-mailq pcp-pmda-mounts
1648 Requires: pcp-pmda-nvidia-gpu pcp-pmda-roomtemp pcp-pmda-sendmail pcp-pmda-shping
1649 Requires: pcp-pmda-lustrecomm pcp-pmda-redis
1650 %if "@have_python@" == "true"
1651 Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic
1652 %endif
1653 %if "@pmda_json@" == "true"
1654 Requires: pcp-pmda-json
1655 %endif
1656 %if "@pmda_libvirt@" == "true"
1657 Requires: pcp-pmda-libvirt
1658 %endif
1659 %if "@pmda_rpm@" == "true"
1660 Requires: pcp-pmda-rpm
1661 %endif
1662 %if "@pmda_snmp@" == "true"
1663 Requires: pcp-pmda-snmp
1664 %endif
1665 %if "@pmda_mysql@" == "true"
1666 Requires: pcp-pmda-mysql
1667 %endif
1668 %if "@pmda_oracle@" == "true"
1669 Requires: pcp-pmda-oracle
1670 %endif
1671 %if "@pmda_postgresql@" == "true"
1672 Requires: pcp-pmda-postgresql
1673 %endif
1674 %if "@pmda_nginx@" == "true"
1675 Requires: pcp-pmda-nginx
1676 %endif
1677 %if "@pmda_activemq@" == "true"
1678 Requires: pcp-pmda-activemq
1679 %endif
1680 %if "@pmda_bind2@" == "true"
1681 Requires: pcp-pmda-bind2
1682 %endif
1683 %if "@pmda_nutcracker@" == "true"
1684 Requires: pcp-pmda-nutcracker
1685 %endif
1686 %if "@pmda_elasticsearch@" == "true"
1687 Requires: pcp-pmda-elasticsearch
1688 %endif
1689 %if "@pmda_postfix@" == "true"
1690 Requires: pcp-pmda-postfix
1691 %endif
1692 Requires: pcp-pmda-summary pcp-pmda-trace pcp-pmda-weblog
1693 %description collector
1694 This meta-package installs the PCP metric collection dependencies. This
1695 includes the vast majority of packages used to collect PCP metrics. The
1696 pcp-collector package also automatically enables and starts the pmcd and
1697 pmlogger services.
1698 # collector
1700 # pcp-monitor metapackage
1701 %package monitor
1702 License: GPLv2+
1703 Group: Applications/System
1704 Summary: Performance Co-Pilot (PCP) Monitoring meta Package
1705 URL: http://www.pcp.io
1706 %if "@enable_webapi@" == "true"
1707 Requires: pcp-webapi
1708 %endif
1709 %if "@have_python@" == "true"
1710 Requires: pcp-system-tools
1711 %endif
1712 %if "@enable_qt@" == "true"
1713 Requires: pcp-gui
1714 %endif
1715 %description monitor
1716 This meta-package contains the PCP performance monitoring dependencies. This
1717 includes a large number of packages for analysing PCP metrics in various ways.
1718 # monitor
1720 %prep
1721 %setup -q
1723 %clean
1724 [ ! -z "$DIST_ROOT" ] && rm -rf $DIST_ROOT
1725 rm -Rf $RPM_BUILD_ROOT
1727 %build
1728 %configure @package_configure@ %{_configure_rcdir}
1729 @make@ %{?_smp_mflags} default_pcp
1731 %install
1732 rm -Rf $RPM_BUILD_ROOT
1733 NO_CHOWN=true
1734 BACKDIR=`pwd`;
1735 DIST_ROOT=$RPM_BUILD_ROOT
1736 WEBAPP_ROOT=${RPM_BUILD_ROOT}@pcp_share_dir@/webapps
1737 DIST_MANIFEST=`pwd`/install.manifest
1738 export NO_CHOWN DIST_ROOT DIST_MANIFEST
1739 rm -f $DIST_MANIFEST
1740 @make@ install_pcp
1741 %if "@have_webjs@" == "true"
1742 rm -fr $WEBAPP_ROOT && mkdir -p -m 755 $WEBAPP_ROOT
1743 tar -xz -C $WEBAPP_ROOT -f $BACKDIR/../build/tar/webjs.tar.gz
1744 sed -i -e 's/vector [0-9]\.[0-9]*\.[0-9]*/vector/g' $WEBAPP_ROOT/index.html
1745 %endif
1746 %if "@have_vector@" == "true"
1747 rm -fr $WEBAPP_ROOT/vector && mkdir -p -m 755 $WEBAPP_ROOT/vector
1748 tar -xz -C $WEBAPP_ROOT/vector -f $BACKDIR/../build/tar/vector.tar.gz
1749 %endif
1751 PCP_CONF=$BACKDIR/src/include/pcp.conf
1752 export PCP_CONF
1753 . $BACKDIR/src/include/pcp.env
1754 CFGFILELIST=`ls -1 $BACKDIR/debian/pcp-conf.{install,dirs}`
1755 LIBFILELIST=`ls -1 $BACKDIR/debian/lib*.{install,dirs} | fgrep -v -- -dev.`
1756 DEVFILELIST=`ls -1 $BACKDIR/debian/lib*-dev.{install,dirs}`
1759 # Package split: pcp{-conf,-libs,-libs-devel,-webapi,-manager,-testsuite,
1760 # -import-*,-export-*} ...
1761 # The above list is ordered by file selection; files for each package are
1762 # removed from a global set, then the base package catches all remaining.
1763 sed -e 's/^/\//' $CFGFILELIST >cfg_files
1764 sed -e 's/^/\//' $LIBFILELIST >libs_files
1765 sed -e 's/^/\//' $DEVFILELIST >dev_files
1766 grep "\.h$" $DEVFILELIST | cut -f2 -d":" >lib_devel_files
1767 grep "\.so$" $DEVFILELIST | cut -f2 -d":" >>lib_devel_files
1768 grep "\.a$" $DEVFILELIST | cut -f2 -d":" >>lib_devel_files
1769 sed -i -e 's/^/\//' lib_devel_files
1770 sed -i '/.h$/d' dev_files
1771 sed -i '/.so$/d' dev_files
1772 sed -i '/.a$/d' dev_files
1774 %ifarch x86_64 ppc64 ppc64le aarch64 s390x
1775 sed -i -e 's/usr\/lib\//usr\/lib64\//' libs_files
1776 sed -i -e 's/usr\/lib\//usr\/lib64\//' dev_files
1777 sed -i -e 's/usr\/lib\//usr\/lib64\//' lib_devel_files
1778 %endif
1779 %ifarch ia64
1780 %if "%{_vendor}" != "suse"
1781 sed -i -e 's/usr\/lib\//usr\/lib64\//' libs_files
1782 sed -i -e 's/usr\/lib\//usr\/lib64\//' dev_files
1783 sed -i -e 's/usr\/lib\//usr\/lib64\//' lib_devel_files
1784 %endif
1785 %endif
1788 # some special cases for devel
1789 awk '{print $NF}' $DIST_MANIFEST |\
1790 egrep 'pcp\/(examples|demos)|pmdas\/(sample|simple|trivial|txmon)|bin/(pmdbg|pmclient|pmerr|genpmda)' >>dev_files
1793 # Patterns for files to be marked %config(noreplace).
1794 # Note: /etc/pcp.{conf,env,sh} are %config but not noreplace
1795 # and are treated specially below.
1796 cat >conf_files <<EOF
1797 etc/sysconfig/pmcd
1798 etc/sysconfig/pmproxy
1799 etc/sysconfig/pmlogger
1800 etc/cron.d/pcp-pmie
1801 etc/cron.d/pcp-pmlogger
1802 pmcd/pmcd.conf
1803 pmcd/pmcd.options
1804 pmcd/rc.local
1805 pmie/control
1806 pmie/stomp
1807 pmlogger/control
1808 pmproxy/pmproxy.options
1810 %if "@enable_manager@" == "true"
1811 cat >>conf_files <<MGREOF
1812 etc/pcp/pmmgr
1813 MGREOF
1814 %endif
1815 %if "@enable_webapi@" == "true"
1816 cat >>conf_files <<WEBEOF
1817 pmwebd/pmwebd.options
1818 WEBEOF
1819 %endif
1820 %if "@enable_qt@" == "true"
1821 cat >>conf_files <<GUIEOF
1822 pmsnap/control
1823 pmsnap/crontab
1824 GUIEOF
1825 %endif
1826 %if "@pmda_perfevent@" == "true"
1827 cat >>conf_files <<PFMEOF
1828 perfevent/perfevent.conf
1829 PFMEOF
1830 %endif
1833 # Files for the various subpackages. We use these subpackages
1834 # to isolate the (somewhat exotic) dependencies for these tools.
1835 # Likewise, for the pcp-pmda and pcp-testsuite subpackages.
1836 awk '{print $NF}' $DIST_MANIFEST | egrep 'pcp-doc|man.*\.[1-9].*' | egrep -v 'out' >docs_files
1837 awk '{print $NF}' $DIST_MANIFEST | egrep 'tutorials' >>docs_files
1838 awk '{print $NF}' $DIST_MANIFEST | egrep 'testsuite|etc/systemd/system' >testsuite_files
1839 %if "@enable_qt@" == "true"
1840 PCP_GUI='pmchart|pmconfirm|pmdumptext|pmmessage|pmquery|pmsnap|pmtime'
1841 awk '{print $NF}' $DIST_MANIFEST | egrep "$PCP_GUI|applications|pixmaps" | egrep -v '/pcp-doc/|/man/|pmtime.h' > gui_files
1842 %endif
1843 %if "@enable_webapi@" == "true"
1844 awk '{print $NF}' $DIST_MANIFEST | egrep 'pmwebd|webapps|PMWEBAPI' | \
1845 egrep -v 'testsuite|etc/systemd/system' >webapi_files
1846 %endif
1847 %if "@enable_manager@" == "true"
1848 awk '{print $NF}' $DIST_MANIFEST | egrep 'pmmgr' | \
1849 egrep -v 'testsuite|etc/systemd/system' >manager_files
1850 %endif
1851 awk '{print $NF}' $DIST_MANIFEST | egrep 'sar2pcp' >import_sar2pcp_files
1852 awk '{print $NF}' $DIST_MANIFEST | egrep 'iostat2pcp' >import_iostat2pcp_files
1853 awk '{print $NF}' $DIST_MANIFEST | egrep 'sheet2pcp' >import_sheet2pcp_files
1854 awk '{print $NF}' $DIST_MANIFEST | egrep 'mrtg2pcp' >import_mrtg2pcp_files
1855 awk '{print $NF}' $DIST_MANIFEST | egrep 'ganglia2pcp' >import_ganglia2pcp_files
1856 awk '{print $NF}' $DIST_MANIFEST | egrep 'collectl2pcp' >import_collectl2pcp_files
1857 %if "@have_python@" == "true"
1858 awk '{print $NF}' $DIST_MANIFEST | egrep 'pcp2graphite' >export_pcp2graphite_files
1859 awk '{print $NF}' $DIST_MANIFEST | egrep 'pcp2influxdb' >export_pcp2influxdb_files
1860 %endif
1861 awk '{print $NF}' $DIST_MANIFEST | egrep 'zabbix|zbxpcp' >export_zabbix_agent_files
1862 %if "@pmda_infiniband@" == "true"
1863 awk '{print $NF}' $DIST_MANIFEST | egrep 'infiniband|pmdaib|pmdas/ib' >pmda_infiniband_files
1864 %endif
1865 %if "@pmda_papi@" == "true"
1866 awk '{print $NF}' $DIST_MANIFEST | egrep 'pmdas/papi' >pmda_papi_files
1867 %endif
1868 %if "@pmda_perfevent@" == "true"
1869 awk '{print $NF}' $DIST_MANIFEST | egrep 'perfevent|perfalloc.1' > pmda_perfevent_files
1870 %endif
1871 %if "@pmda_systemd@" == "true"
1872 awk '{print $NF}' $DIST_MANIFEST | grep 'pmdas/systemd' > pmda_systemd_files
1873 %endif
1875 %if "@pmda_activemq@" == "true"
1876 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/activemq' > pmda_activemq_files
1877 %endif
1878 %if "@pmda_bind2@" == "true"
1879 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/bind2' > pmda_bind2_files
1880 %endif
1881 %if "@pmda_nutcracker@" == "true"
1882 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/nutcracker' > pmda_nutcracker_files
1883 %endif
1884 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/redis' > pmda_redis_files
1885 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/bonding' > pmda_bonding_files
1886 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/dbping' > pmda_dbping_files
1887 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/ds389log' > pmda_ds389log_files
1888 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/ds389' > pmda_ds389_files
1889 %if "@pmda_elasticsearch@" == "true"
1890 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/elasticsearch' > pmda_elasticsearch_files
1891 %endif
1892 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/gpfs' > pmda_gpfs_files
1893 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/gpsd' > pmda_gpsd_files
1894 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/kvm' > pmda_kvm_files
1895 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/lustrecomm' > pmda_lustrecomm_files
1896 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/lustre' > pmda_lustre_files
1897 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/memcache' > pmda_memcache_files
1898 %if "@pmda_mysql@" == "true"
1899 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/mysql' > pmda_mysql_files
1900 %endif
1901 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/named' > pmda_named_files
1902 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/netfilter' > pmda_netfilter_files
1903 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/news' > pmda_news_files
1904 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/nfsclient' > pmda_nfsclient_files
1905 %if "@pmda_nginx@" == "true"
1906 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/nginx' > pmda_nginx_files
1907 %endif
1908 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/pdns' > pmda_pdns_files
1909 %if "@pmda_postfix@" == "true"
1910 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/postfix' > pmda_postfix_files
1911 %endif
1912 %if "@pmda_postgresql@" == "true"
1913 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/postgresql' > pmda_postgresql_files
1914 %endif
1915 %if "@pmda_oracle@" == "true"
1916 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/oracle' > pmda_oracle_files
1917 %endif
1918 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/rsyslog' > pmda_rsyslog_files
1919 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/samba' > pmda_samba_files
1920 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/slurm' > pmda_slurm_files
1921 %if "@pmda_snmp@" == "true"
1922 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/snmp' > pmda_snmp_files
1923 %endif
1924 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/vmware' > pmda_vmware_files
1925 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/zimbra' > pmda_zimbra_files
1926 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/dm' > pmda_dm_files
1927 %if "@pmda_json@" == "true"
1928 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/json' > pmda_json_files
1929 %endif
1930 %if "@pmda_libvirt@" == "true"
1931 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/libvirt' > pmda_libvirt_files
1932 %endif
1933 %if "@have_python@" == "true"
1934 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/gluster' > pmda_gluster_files
1935 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/zswap' > pmda_zswap_files
1936 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/unbound' > pmda_unbound_files
1937 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/mic' > pmda_mic_files
1938 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pcp-|pmatop|pmcollectl|pmiostat|pmrep' |\
1939 egrep -e 'atop|collectl|dmcache|free|iostat|mpstat|numastat|pidstat|verify|uptime|shping|pmrep' | \
1940 egrep -v 'testsuite|pmlogconf|pmieconf' \
1941 > system_tools_files
1942 %endif
1943 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/apache' > pmda_apache_files
1944 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/bash' > pmda_bash_files
1945 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/cifs' > pmda_cifs_files
1946 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/cisco' > pmda_cisco_files
1947 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/gfs2' > pmda_gfs2_files
1948 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/lmsensors' > pmda_lmsensors_files
1949 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/logger' > pmda_logger_files
1950 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/mailq' > pmda_mailq_files
1951 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/mounts' > pmda_mounts_files
1952 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/nvidia' > pmda_nvidia_files
1953 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/roomtemp' > pmda_roomtemp_files
1954 %if "@pmda_rpm@" == "true"
1955 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/rpm' > pmda_rpm_files
1956 %endif
1957 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/sendmail' > pmda_sendmail_files
1958 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/shping' > pmda_shping_files
1959 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/summary' > pmda_summary_files
1960 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/trace' > pmda_trace_files
1961 awk '{print $NF}' $DIST_MANIFEST | egrep -e 'pmdas/weblog' > pmda_weblog_files
1963 touch gui_files webapi_files manager_files pmda_infiniband_files pmda_papi_files \
1964 pmda_perfevent_files pmda_bonding_files pmda_dbping_files \
1965 pmda_ds389_files pmda_ds389log_files pmda_gpfs_files \
1966 pmda_gpsd_files pmda_kvm_files pmda_lustre_files pmda_lustrecomm_files \
1967 pmda_memcache_files pmda_named_files pmda_redis_files \
1968 pmda_netfilter_files pmda_news_files pmda_nfsclient_files \
1969 pmda_pdns_files \
1970 pmda_rsyslog_files pmda_samba_files pmda_slurm_files \
1971 pmda_vmware_files pmda_zimbra_files pmda_apache_files pmda_bash_files \
1972 pmda_cifs_files pmda_cisco_files pmda_gfs2_files \
1973 pmda_lmsensors_files pmda_logger_files \
1974 pmda_mailq_files pmda_mounts_files pmda_nvidia_files pmda_roomtemp_files \
1975 pmda_rpm_files pmda_sendmail_files pmda_shping_files pmda_summary_files \
1976 pmda_trace_files pmda_weblog_files pmda_dm_files pmda_systemd_files
1978 %if "@have_python@" == "true"
1979 touch pmda_gluster_files pmda_zswap_files pmda_unbound_files \
1980 pmda_mic_files system_tools_files
1981 %endif
1982 %if "@pmda_json@" == "true"
1983 touch pmda_json_files
1984 %endif
1985 %if "@pmda_libvirt@" == "true"
1986 touch pmda_libvirt_files
1987 %endif
1988 %if "@pmda_snmp@" == "true"
1989 touch pmda_snmp_files
1990 %endif
1991 %if "@pmda_mysql@" == "true"
1992 touch pmda_mysql_files
1993 %endif
1994 %if "@pmda_nginx@" == "true"
1995 touch pmda_nginx_files
1996 %endif
1997 %if "@pmda_activemq@" == "true"
1998 touch pmda_activemq_files
1999 %endif
2000 %if "@pmda_bind2@" == "true"
2001 touch pmda_bind2_files
2002 %endif
2003 %if "@pmda_nutcracker@" == "true"
2004 touch pmda_nutcracker_files
2005 %endif
2006 %if "@pmda_postgresql@" == "true"
2007 touch pmda_postgresql_files
2008 %endif
2009 %if "@pmda_oracle@" == "true"
2010 touch pmda_oracle_files
2011 %endif
2012 %if "@pmda_elasticsearch@" == "true"
2013 touch pmda_elasticsearch_files
2014 %endif
2015 %if "@pmda_postfix@" == "true"
2016 touch pmda_postfix_files
2017 %endif
2019 rm -f *_files.rpm
2020 sort -u $DIST_MANIFEST | $PCP_AWK_PROG '
2021 BEGIN {
2022 while( getline < "cfg_files") cfg[$0]=1;
2023 while( getline < "gui_files") gui[$0]=1;
2024 while( getline < "docs_files") doc[$0]=1;
2025 while( getline < "libs_files") lib[$0]=1;
2026 while( getline < "dev_files") dev[$0]=1;
2027 while( getline < "lib_devel_files") libdev[$0]=1;
2028 while( getline < "webapi_files") webapi[$0]=1;
2029 while( getline < "manager_files") manager[$0]=1;
2030 while( getline < "testsuite_files") testsuite[$0]=1;
2031 while( getline < "pmda_infiniband_files") pmda_infiniband[$0]=1;
2032 while( getline < "pmda_papi_files") pmda_papi[$0]=1;
2033 while( getline < "pmda_perfevent_files") pmda_perfevent[$0]=1;
2034 %if "@pmda_activemq@" == "true"
2035 while( getline < "pmda_activemq_files") pmda_activemq[$0]=1;
2036 %endif
2037 %if "@pmda_bind2@" == "true"
2038 while( getline < "pmda_bind2_files") pmda_bind2[$0]=1;
2039 %endif
2040 %if "@pmda_nutcracker@" == "true"
2041 while( getline < "pmda_nutcracker_files") pmda_nutcracker[$0]=1;
2042 %endif
2043 while( getline < "pmda_redis_files") pmda_redis[$0]=1;
2044 while( getline < "pmda_bonding_files") pmda_bonding[$0]=1;
2045 while( getline < "pmda_dbping_files") pmda_dbping[$0]=1;
2046 while( getline < "pmda_ds389log_files") pmda_ds389log[$0]=1;
2047 while( getline < "pmda_ds389_files") pmda_ds389[$0]=1;
2048 %if "@pmda_elasticsearch@" == "true"
2049 while( getline < "pmda_elasticsearch_files") pmda_elasticsearch[$0]=1;
2050 %endif
2051 while( getline < "pmda_gpfs_files") pmda_gpfs[$0]=1;
2052 while( getline < "pmda_gpsd_files") pmda_gpsd[$0]=1;
2053 while( getline < "pmda_kvm_files") pmda_kvm[$0]=1;
2054 while( getline < "pmda_lustrecomm_files") pmda_lustrecomm[$0]=1;
2055 while( getline < "pmda_lustre_files") pmda_lustre[$0]=1;
2056 while( getline < "pmda_memcache_files") pmda_memcache[$0]=1;
2057 %if "@pmda_mysql@" == "true"
2058 while( getline < "pmda_mysql_files") pmda_mysql[$0]=1;
2059 %endif
2060 while( getline < "pmda_named_files") pmda_named[$0]=1;
2061 while( getline < "pmda_netfilter_files") pmda_netfilter[$0]=1;
2062 while( getline < "pmda_news_files") pmda_news[$0]=1;
2063 while( getline < "pmda_nfsclient_files") pmda_nfsclient[$0]=1;
2064 %if "@pmda_nginx@" == "true"
2065 while( getline < "pmda_nginx_files") pmda_nginx[$0]=1;
2066 %endif
2067 while( getline < "pmda_pdns_files") pmda_pdns[$0]=1;
2068 %if "@pmda_postfix@" == "true"
2069 while( getline < "pmda_postfix_files") pmda_postfix[$0]=1;
2070 %endif
2071 %if "@pmda_postgresql@" == "true"
2072 while( getline < "pmda_postgresql_files") pmda_postgresql[$0]=1;
2073 %endif
2074 %if "@pmda_oracle@" == "true"
2075 while( getline < "pmda_oracle_files") pmda_oracle[$0]=1;
2076 %endif
2077 while( getline < "pmda_rsyslog_files") pmda_rsyslog[$0]=1;
2078 while( getline < "pmda_samba_files") pmda_samba[$0]=1;
2079 while( getline < "pmda_slurm_files") pmda_slurm[$0]=1;
2080 %if "@pmda_snmp@" == "true"
2081 while( getline < "pmda_snmp_files") pmda_snmp[$0]=1;
2082 %endif
2083 while( getline < "pmda_vmware_files") pmda_vmware[$0]=1;
2084 while( getline < "pmda_zimbra_files") pmda_zimbra[$0]=1;
2085 while( getline < "pmda_dm_files") pmda_dm[$0]=1;
2086 %if "@have_python@" == "true"
2087 while( getline < "system_tools_files") system_tools[$0]=1;
2088 while( getline < "pmda_gluster_files") pmda_gluster[$0]=1;
2089 while( getline < "pmda_zswap_files") pmda_zswap[$0]=1;
2090 while( getline < "pmda_unbound_files") pmda_unbound[$0]=1;
2091 while( getline < "pmda_mic_files") pmda_mic[$0]=1;
2092 while( getline < "export_pcp2graphite_files") export_pcp2graphite[$0]=1;
2093 while( getline < "export_pcp2influxdb_files") export_pcp2influxdb[$0]=1;
2094 %endif
2095 while( getline < "export_zabbix_agent_files") export_zabbix_agent[$0]=1;
2096 %if "@pmda_json@" == "true"
2097 while( getline < "pmda_json_files") pmda_json[$0]=1;
2098 %endif
2099 %if "@pmda_libvirt@" == "true"
2100 while( getline < "pmda_libvirt_files") pmda_libvirt[$0]=1;
2101 %endif
2102 while( getline < "pmda_apache_files") pmda_apache[$0]=1;
2103 while( getline < "pmda_bash_files") pmda_bash[$0]=1;
2104 while( getline < "pmda_cifs_files") pmda_cifs[$0]=1;
2105 while( getline < "pmda_cisco_files") pmda_cisco[$0]=1;
2106 while( getline < "pmda_gfs2_files") pmda_gfs2[$0]=1;
2107 while( getline < "pmda_lmsensors_files") pmda_lmsensors[$0]=1;
2108 while( getline < "pmda_logger_files") pmda_logger[$0]=1;
2109 while( getline < "pmda_mailq_files") pmda_mailq[$0]=1;
2110 while( getline < "pmda_mounts_files") pmda_mounts[$0]=1;
2111 while( getline < "pmda_nvidia_files") pmda_nvidia[$0]=1;
2112 while( getline < "pmda_roomtemp_files") pmda_roomtemp[$0]=1;
2113 while( getline < "pmda_rpm_files") pmda_rpm[$0]=1;
2114 while( getline < "pmda_sendmail_files") pmda_sendmail[$0]=1;
2115 while( getline < "pmda_shping_files") pmda_shping[$0]=1;
2116 while( getline < "pmda_summary_files") pmda_summary[$0]=1;
2117 while( getline < "pmda_systemd_files") pmda_systemd[$0]=1;
2118 while( getline < "pmda_trace_files") pmda_trace[$0]=1;
2119 while( getline < "pmda_weblog_files") pmda_weblog[$0]=1;
2120 while( getline < "import_sar2pcp_files") import_sar2pcp[$0]=1;
2121 while( getline < "import_iostat2pcp_files") import_iostat2pcp[$0]=1;
2122 while( getline < "import_sheet2pcp_files") import_sheet2pcp[$0]=1;
2123 while( getline < "import_mrtg2pcp_files") import_mrtg2pcp[$0]=1;
2124 while( getline < "import_ganglia2pcp_files") import_ganglia2pcp[$0]=1;
2125 while( getline < "import_collectl2pcp_files") import_collectl2pcp[$0]=1;
2126 while( getline < "conf_files") conf[nconf++]=$0;
2129 if (cfg[$NF]) f="cfg_files.rpm";
2130 else if (gui[$NF]) f="gui_files.rpm";
2131 else if (doc[$NF]) f="docs_files.rpm";
2132 else if (lib[$NF]) f="libs_files.rpm";
2133 else if (dev[$NF]) f="dev_files.rpm";
2134 else if (libdev[$NF]) f="lib_devel_files.rpm";
2135 else if (webapi[$NF]) f="webapi_files.rpm";
2136 else if (manager[$NF]) f="manager_files.rpm";
2137 else if (testsuite[$NF]) f="testsuite_files.rpm";
2138 else if (pmda_infiniband[$NF]) f="pmda_infiniband_files.rpm";
2139 else if (pmda_papi[$NF]) f="pmda_papi_files.rpm";
2140 else if (pmda_perfevent[$NF]) f="pmda_perfevent_files.rpm";
2141 %if "@pmda_activemq@" == "true"
2142 else if (pmda_activemq[$NF]) f="pmda_activemq_files.rpm";
2143 %endif
2144 %if "@pmda_bind2@" == "true"
2145 else if (pmda_bind2[$NF]) f="pmda_bind2_files.rpm";
2146 %endif
2147 %if "@pmda_nutcracker@" == "true"
2148 else if (pmda_nutcracker[$NF]) f="pmda_nutcracker_files.rpm";
2149 %endif
2150 else if (pmda_redis[$NF]) f="pmda_redis_files.rpm";
2151 else if (pmda_bonding[$NF]) f="pmda_bonding_files.rpm";
2152 else if (pmda_dbping[$NF]) f="pmda_dbping_files.rpm";
2153 else if (pmda_ds389log[$NF]) f="pmda_ds389log_files.rpm";
2154 else if (pmda_ds389[$NF]) f="pmda_ds389_files.rpm";
2155 %if "@pmda_elasticsearch@" == "true"
2156 else if (pmda_elasticsearch[$NF]) f="pmda_elasticsearch_files.rpm";
2157 %endif
2158 else if (pmda_gpfs[$NF]) f="pmda_gpfs_files.rpm";
2159 else if (pmda_gpsd[$NF]) f="pmda_gpsd_files.rpm";
2160 else if (pmda_kvm[$NF]) f="pmda_kvm_files.rpm";
2161 else if (pmda_lustrecomm[$NF]) f="pmda_lustrecomm_files.rpm";
2162 else if (pmda_lustre[$NF]) f="pmda_lustre_files.rpm";
2163 else if (pmda_memcache[$NF]) f="pmda_memcache_files.rpm";
2164 %if "@pmda_mysql@" == "true"
2165 else if (pmda_mysql[$NF]) f="pmda_mysql_files.rpm";
2166 %endif
2167 else if (pmda_named[$NF]) f="pmda_named_files.rpm";
2168 else if (pmda_netfilter[$NF]) f="pmda_netfilter_files.rpm";
2169 else if (pmda_news[$NF]) f="pmda_news_files.rpm";
2170 else if (pmda_nfsclient[$NF]) f="pmda_nfsclient_files.rpm";
2171 %if "@pmda_nginx@" == "true"
2172 else if (pmda_nginx[$NF]) f="pmda_nginx_files.rpm";
2173 %endif
2174 else if (pmda_pdns[$NF]) f="pmda_pdns_files.rpm";
2175 %if "@pmda_postfix@" == "true"
2176 else if (pmda_postfix[$NF]) f="pmda_postfix_files.rpm";
2177 %endif
2178 %if "@pmda_postgresql@" == "true"
2179 else if (pmda_postgresql[$NF]) f="pmda_postgresql_files.rpm";
2180 %endif
2181 %if "@pmda_oracle@" == "true"
2182 else if (pmda_oracle[$NF]) f="pmda_oracle_files.rpm";
2183 %endif
2184 else if (pmda_rsyslog[$NF]) f="pmda_rsyslog_files.rpm";
2185 else if (pmda_samba[$NF]) f="pmda_samba_files.rpm";
2186 else if (pmda_slurm[$NF]) f="pmda_slurm_files.rpm";
2187 %if "@pmda_snmp@" == "true"
2188 else if (pmda_snmp[$NF]) f="pmda_snmp_files.rpm";
2189 %endif
2190 else if (pmda_vmware[$NF]) f="pmda_vmware_files.rpm";
2191 else if (pmda_zimbra[$NF]) f="pmda_zimbra_files.rpm";
2192 else if (pmda_dm[$NF]) f="pmda_dm_files.rpm";
2193 %if "@have_python@" == "true"
2194 else if (system_tools[$NF]) f="system_tools_files.rpm";
2195 else if (pmda_gluster[$NF]) f="pmda_gluster_files.rpm";
2196 else if (pmda_zswap[$NF]) f="pmda_zswap_files.rpm";
2197 else if (pmda_unbound[$NF]) f="pmda_unbound_files.rpm";
2198 else if (pmda_mic[$NF]) f="pmda_mic_files.rpm";
2199 else if (export_pcp2graphite[$NF]) f="export_pcp2graphite_files.rpm";
2200 else if (export_pcp2influxdb[$NF]) f="export_pcp2influxdb_files.rpm";
2201 %endif
2202 else if (export_zabbix_agent[$NF]) f="export_zabbix_agent_files.rpm";
2203 %if "@pmda_json@" == "true"
2204 else if (pmda_json[$NF]) f="pmda_json_files.rpm";
2205 %endif
2206 %if "@pmda_libvirt@" == "true"
2207 else if (pmda_libvirt[$NF]) f="pmda_libvirt_files.rpm";
2208 %endif
2209 else if (pmda_apache[$NF]) f="pmda_apache_files.rpm";
2210 else if (pmda_bash[$NF]) f="pmda_bash_files.rpm";
2211 else if (pmda_cifs[$NF]) f="pmda_cifs_files.rpm";
2212 else if (pmda_cisco[$NF]) f="pmda_cisco_files.rpm";
2213 else if (pmda_gfs2[$NF]) f="pmda_gfs2_files.rpm";
2214 else if (pmda_lmsensors[$NF]) f="pmda_lmsensors_files.rpm";
2215 else if (pmda_logger[$NF]) f="pmda_logger_files.rpm";
2216 else if (pmda_mailq[$NF]) f="pmda_mailq_files.rpm";
2217 else if (pmda_mounts[$NF]) f="pmda_mounts_files.rpm";
2218 else if (pmda_nvidia[$NF]) f="pmda_nvidia_files.rpm";
2219 else if (pmda_roomtemp[$NF]) f="pmda_roomtemp_files.rpm";
2220 else if (pmda_rpm[$NF]) f="pmda_rpm_files.rpm";
2221 else if (pmda_sendmail[$NF]) f="pmda_sendmail_files.rpm";
2222 else if (pmda_shping[$NF]) f="pmda_shping_files.rpm";
2223 else if (pmda_summary[$NF]) f="pmda_summary_files.rpm";
2224 else if (pmda_systemd[$NF]) f="pmda_systemd_files.rpm";
2225 else if (pmda_trace[$NF]) f="pmda_trace_files.rpm";
2226 else if (pmda_weblog[$NF]) f="pmda_weblog_files.rpm";
2227 else if (import_sar2pcp[$NF]) f="import_sar2pcp_files.rpm";
2228 else if (import_iostat2pcp[$NF]) f="import_iostat2pcp_files.rpm";
2229 else if (import_sheet2pcp[$NF]) f="import_sheet2pcp_files.rpm";
2230 else if (import_mrtg2pcp[$NF]) f="import_mrtg2pcp_files.rpm";
2231 else if (import_ganglia2pcp[$NF]) f="import_ganglia2pcp_files.rpm";
2232 else if (import_collectl2pcp[$NF]) f="import_collectl2pcp_files.rpm";
2233 else f="base_files.rpm"
2235 $1 == "d" {
2236 if (match ($5, "'$PCP_RUN_DIR'")) {
2237 printf ("%%%%ghost %s\n", $5) >> f;
2239 printf ("%%%%dir %%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $5) >> f
2241 $1 == "f" && $6 ~ "etc/pcp.conf" { printf ("%%%%config ") >> f; }
2242 $1 == "f" && $6 ~ "etc/pcp.env" { printf ("%%%%config ") >> f; }
2243 $1 == "f" && $6 ~ "etc/pcp.sh" { printf ("%%%%config ") >> f; }
2244 $1 == "f" {
2245 for (i=0; i < nconf; i++) {
2246 if ($6 ~ conf[i]) {
2247 if ($6 ~ "pmmgr") {
2248 printf ("%%%%config(noreplace,missingok) ") >> f;
2249 } else {
2250 printf ("%%%%config(noreplace) ") >> f;
2252 break;
2255 if (match ($6, "'$PCP_MAN_DIR'") || match ($6, "'$PCP_DOC_DIR'")) {
2256 printf ("%%%%doc ") >> f;
2258 printf ("%%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $6) >> f
2260 $1 == "l" { print $3 >> f }'
2262 %pre testsuite
2263 test -d @pcp_var_dir@/testsuite || mkdir -p -m 755 @pcp_var_dir@/testsuite
2264 getent group pcpqa >/dev/null || groupadd -r pcpqa
2265 getent passwd pcpqa >/dev/null || \
2266 useradd -c "PCP Quality Assurance" -g pcpqa -d @pcp_var_dir@/testsuite -M -r -s /bin/bash pcpqa 2>/dev/null
2267 chown -R pcpqa:pcpqa @pcp_var_dir@/testsuite 2>/dev/null
2268 exit 0
2270 %post testsuite
2271 chown -R pcpqa:pcpqa @pcp_var_dir@/testsuite 2>/dev/null
2273 %pre
2274 getent group pcp >/dev/null || groupadd -r pcp
2275 getent passwd pcp >/dev/null || \
2276 useradd -c "Performance Co-Pilot" -g pcp -d @pcp_var_dir@ -M -r -s /sbin/nologin pcp
2277 # new directories; they should match /etc/pcp.conf settings after install
2278 PCP_CONFIG_DIR=@pcp_var_dir@/config
2279 PCP_SYSCONF_DIR=@pcp_sysconf_dir@
2280 PCP_LOG_DIR=@pcp_log_dir@
2281 PCP_ETC_DIR=@pcp_etc_dir@
2283 # transition pmdadmcache over to pmdadm (device mapper)
2284 PCP_PMCDCONF_PATH=@pcp_pmcdconf_path@
2285 PCP_PMDAS_DIR=@pcp_pmdas_dir@
2286 if grep -q ^dmcache "$PCP_PMCDCONF_PATH" 2>/dev/null
2287 then
2288 mkdir -p -m 755 "$PCP_PMDAS_DIR/dm"
2289 touch "$PCP_PMDAS_DIR/dm/.NeedInstall"
2290 touch "$PCP_PMDAS_DIR/dmcache/.NeedRemove"
2293 # rename crontab files to align with current Fedora packaging guidelines
2294 for crontab in pmlogger pmie
2296 test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue
2297 mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab"
2298 done
2299 # produce a script to run post-install to move configs to their new homes
2300 save_configs_script()
2302 _new="$1"
2303 shift
2304 for _dir
2306 [ "$_dir" = "$_new" ] && continue
2307 if [ -d "$_dir" ]
2308 then
2309 ( cd "$_dir" ; find . -maxdepth 1 -type f ) | sed -e 's/^\.\///' \
2310 | while read _file
2312 [ "$_file" = "control" ] && continue
2313 _want=true
2314 if [ -f "$_new/$_file" ]
2315 then
2316 # file exists in both directories, pick the more
2317 # recently modified one
2318 _try=`find "$_dir/$_file" -newer "$_new/$_file" -print`
2319 [ -n "$_try" ] || _want=false
2321 $_want && echo cp -p "$_dir/$_file" "$_new/$_file"
2322 done
2324 done
2326 # migrate and clean configs if we have had a previous in-use installation
2327 [ -d "$PCP_LOG_DIR" ] || exit 0 # no configuration file upgrades required
2328 rm -f "$PCP_LOG_DIR/configs.sh"
2329 for daemon in pmie pmlogger
2331 save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_CONFIG_DIR/$daemon" \
2332 "$PCP_SYSCONF_DIR/$daemon"
2333 done
2334 for daemon in pmcd pmproxy
2336 save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_SYSCONF_DIR/$daemon"\
2337 "$PCP_CONFIG_DIR/$daemon" /etc/$daemon
2338 done
2339 exit 0
2341 %if "@enable_webapi@" == "true"
2342 %preun webapi
2343 if [ "$1" -eq 0 ]
2344 then
2345 %if "@enable_systemd@" == "true"
2346 systemctl --no-reload disable pmwebd.service >/dev/null 2>&1
2347 systemctl stop pmwebd.service >/dev/null 2>&1
2348 %else
2349 /sbin/service pmwebd stop >/dev/null 2>&1
2350 /sbin/chkconfig --del pmwebd >/dev/null 2>&1
2351 %endif
2354 %post webapi
2355 chown -R pcp:pcp "$PCP_LOG_DIR/pmwebd" 2>/dev/null
2356 %if "@enable_systemd@" == "true"
2357 systemctl condrestart pmwebd.service >/dev/null 2>&1
2358 %else
2359 /sbin/chkconfig --add pmwebd >/dev/null 2>&1 && \
2360 /sbin/service pmwebd condrestart
2361 %endif
2362 %endif
2364 %if "@enable_manager@" == "true"
2365 %preun manager
2366 if [ "$1" -eq 0 ]
2367 then
2368 %if "@enable_systemd@" == "true"
2369 systemctl --no-reload disable pmmgr.service >/dev/null 2>&1
2370 systemctl stop pmmgr.service >/dev/null 2>&1
2371 %else
2372 /sbin/service pmmgr stop >/dev/null 2>&1
2373 /sbin/chkconfig --del pmmgr >/dev/null 2>&1
2374 %endif
2377 %post manager
2378 chown -R pcp:pcp "$PCP_LOG_DIR/pmmgr" 2>/dev/null
2379 %if "@enable_systemd@" == "true"
2380 systemctl condrestart pmmgr.service >/dev/null 2>&1
2381 %else
2382 /sbin/chkconfig --add pmmgr >/dev/null 2>&1
2383 /sbin/service pmmgr condrestart
2384 %endif
2385 %endif
2387 %post collector
2388 %if "@enable_systemd@" == "true"
2389 systemctl restart pmcd >/dev/null 2>&1
2390 systemctl restart pmlogger >/dev/null 2>&1
2391 systemctl enable pmcd >/dev/null 2>&1
2392 systemctl enable pmlogger >/dev/null 2>&1
2393 %else
2394 /sbin/chkconfig --add pmcd >/dev/null 2>&1
2395 /sbin/chkconfig --add pmlogger >/dev/null 2>&1
2396 /sbin/service pmcd condrestart
2397 /sbin/service pmlogger condrestart
2398 %endif
2400 %if "@pmda_rpm@" == "true"
2401 %preun pmda-rpm
2402 %{pmda_remove "$1" "rpm"}
2403 %endif #preun pmda-rpm
2405 %if "@pmda_papi@" == "true"
2406 %preun pmda-papi
2407 %{pmda_remove "$1" "papi"}
2408 %endif #preun pmda-papi
2410 %if "@pmda_systemd@" == "true"
2411 %preun pmda-systemd
2412 %{pmda_remove "$1" "systemd"}
2413 %endif #preun pmda-systemd
2415 %if "@pmda_infiniband@" == "true"
2416 %preun pmda-infiniband
2417 %{pmda_remove "$1" "infiniband"}
2418 %endif #preun pmda-infiniband
2420 %if "@pmda_perfevent@" == "true"
2421 %preun pmda-perfevent
2422 %{pmda_remove "$1" "perfevent"}
2423 %endif #preun pmda-perfevent
2425 %if "@pmda_json@" == "true"
2426 %preun pmda-json
2427 %{pmda_remove "$1" "json"}
2428 %endif #preun pmda-json
2430 %if "@pmda_libvirt@" == "true"
2431 %preun pmda-libvirt
2432 %{pmda_remove "$1" "libvirt"}
2433 %endif #preun pmda-libvirt
2435 %if "@pmda_nginx@" == "true"
2436 %preun pmda-nginx
2437 %{pmda_remove "$1" "nginx"}
2438 %endif #preun pmda-nginx
2440 %if "@pmda_oracle@" == "true"
2441 %preun pmda-oracle
2442 %{pmda_remove "$1" "oracle"}
2443 %endif #preun pmda-oracle
2445 %if "@pmda_postgresql@" == "true"
2446 %preun pmda-postgresql
2447 %{pmda_remove "$1" "postgresql"}
2448 %endif #preun pmda-postgresql
2450 %if "@pmda_postfix@" == "true"
2451 %preun pmda-postfix
2452 %{pmda_remove "$1" "postfix"}
2453 %endif #preun pmda-postfix
2455 %if "@pmda_elasticsearch@" == "true"
2456 %preun pmda-elasticsearch
2457 %{pmda_remove "$1" "elasticsearch"}
2458 %endif #preun pmda-elasticsearch
2460 %if "@pmda_snmp@" == "true"
2461 %preun pmda-snmp
2462 %{pmda_remove "$1" "snmp"}
2463 %endif #preun pmda-snmp
2465 %if "@pmda_mysql@" == "true"
2466 %preun pmda-mysql
2467 %{pmda_remove "$1" "mysql"}
2468 %endif #preun pmda-mysql
2470 %if "@pmda_activemq@" == "true"
2471 %preun pmda-activemq
2472 %{pmda_remove "$1" "activemq"}
2473 %endif #preun pmda-activemq
2475 %if "@pmda_bind2@" == "true"
2476 %preun pmda-bind2
2477 %{pmda_remove "$1" "bind2"}
2478 %endif #preun pmda-bind2
2480 %if "@pmda_nutcracker@" == "true"
2481 %preun pmda-nutcracker
2482 %{pmda_remove "$1" "nutcracker"}
2483 %endif #preun pmda-nutcracker
2485 %preun pmda-redis
2486 %{pmda_remove "$1" "redis"}
2488 %preun pmda-bonding
2489 %{pmda_remove "$1" "bonding"}
2491 %preun pmda-dbping
2492 %{pmda_remove "$1" "dbping"}
2494 %preun pmda-ds389
2495 %{pmda_remove "$1" "ds389"}
2497 %preun pmda-ds389log
2498 %{pmda_remove "$1" "ds389log"}
2500 %preun pmda-gpfs
2501 %{pmda_remove "$1" "gpfs"}
2503 %preun pmda-gpsd
2504 %{pmda_remove "$1" "gpsd"}
2506 %preun pmda-kvm
2507 %{pmda_remove "$1" "kvm"}
2509 %preun pmda-lustre
2510 %{pmda_remove "$1" "lustre"}
2512 %preun pmda-lustrecomm
2513 %{pmda_remove "$1" "lustrecomm"}
2515 %preun pmda-memcache
2516 %{pmda_remove "$1" "memcache"}
2518 %preun pmda-named
2519 %{pmda_remove "$1" "named"}
2521 %preun pmda-netfilter
2522 %{pmda_remove "$1" "netfilter"}
2524 %preun pmda-news
2525 %{pmda_remove "$1" "news"}
2527 %preun pmda-nfsclient
2528 %{pmda_remove "$1" "nfsclient"}
2530 %preun pmda-pdns
2531 %{pmda_remove "$1" "pdns"}
2533 %preun pmda-rsyslog
2534 %{pmda_remove "$1" "rsyslog"}
2536 %preun pmda-samba
2537 %{pmda_remove "$1" "samba"}
2539 %preun pmda-vmware
2540 %{pmda_remove "$1" "vmware"}
2542 %preun pmda-zimbra
2543 %{pmda_remove "$1" "zimbra"}
2545 %preun pmda-dm
2546 %{pmda_remove "$1" "dm"}
2548 %if "@have_python@" == "true"
2549 %preun pmda-gluster
2550 %{pmda_remove "$1" "gluster"}
2552 %preun pmda-zswap
2553 %{pmda_remove "$1" "zswap"}
2555 %preun pmda-unbound
2556 %{pmda_remove "$1" "unbound"}
2558 %preun pmda-mic
2559 %{pmda_remove "$1" "mic"}
2560 %endif #@have_python@
2562 %preun pmda-apache
2563 %{pmda_remove "$1" "apache"}
2565 %preun pmda-bash
2566 %{pmda_remove "$1" "bash"}
2568 %preun pmda-cifs
2569 %{pmda_remove "$1" "cifs"}
2571 %preun pmda-cisco
2572 %{pmda_remove "$1" "cisco"}
2574 %preun pmda-gfs2
2575 %{pmda_remove "$1" "gfs2"}
2577 %preun pmda-lmsensors
2578 %{pmda_remove "$1" "lmsensors"}
2580 %preun pmda-logger
2581 %{pmda_remove "$1" "logger"}
2583 %preun pmda-mailq
2584 %{pmda_remove "$1" "mailq"}
2586 %preun pmda-mounts
2587 %{pmda_remove "$1" "mounts"}
2589 %preun pmda-nvidia-gpu
2590 %{pmda_remove "$1" "nvidia"}
2592 %preun pmda-roomtemp
2593 %{pmda_remove "$1" "roomtemp"}
2595 %preun pmda-sendmail
2596 %{pmda_remove "$1" "sendmail"}
2598 %preun pmda-shping
2599 %{pmda_remove "$1" "shping"}
2601 %preun pmda-summary
2602 %{pmda_remove "$1" "summary"}
2604 %preun pmda-trace
2605 %{pmda_remove "$1" "trace"}
2607 %preun pmda-weblog
2608 %{pmda_remove "$1" "weblog"}
2610 %preun
2611 if [ "$1" -eq 0 ]
2612 then
2613 # stop daemons before erasing the package
2614 %if "@enable_systemd@" == "true"
2615 systemctl --no-reload disable pmlogger.service >/dev/null 2>&1
2616 systemctl --no-reload disable pmie.service >/dev/null 2>&1
2617 systemctl --no-reload disable pmproxy.service >/dev/null 2>&1
2618 systemctl --no-reload disable pmcd.service >/dev/null 2>&1
2620 systemctl stop pmlogger.service >/dev/null 2>&1
2621 systemctl stop pmie.service >/dev/null 2>&1
2622 systemctl stop pmproxy.service >/dev/null 2>&1
2623 systemctl stop pmcd.service >/dev/null 2>&1
2624 %else
2625 /sbin/service pmlogger stop >/dev/null 2>&1
2626 /sbin/service pmie stop >/dev/null 2>&1
2627 /sbin/service pmproxy stop >/dev/null 2>&1
2628 /sbin/service pmcd stop >/dev/null 2>&1
2630 /sbin/chkconfig --del pcp >/dev/null 2>&1
2631 /sbin/chkconfig --del pmcd >/dev/null 2>&1
2632 /sbin/chkconfig --del pmlogger >/dev/null 2>&1
2633 /sbin/chkconfig --del pmie >/dev/null 2>&1
2634 /sbin/chkconfig --del pmproxy >/dev/null 2>&1
2635 %endif
2636 # cleanup namespace state/flag, may still exist
2637 PCP_PMNS_DIR=@pcp_var_dir@/pmns
2638 rm -f "$PCP_PMNS_DIR/.NeedRebuild" >/dev/null 2>&1
2641 %post
2642 PCP_PMNS_DIR=@pcp_var_dir@/pmns
2643 PCP_LOG_DIR=@pcp_log_dir@
2644 # restore saved configs, if any
2645 test -s "$PCP_LOG_DIR/configs.sh" && source "$PCP_LOG_DIR/configs.sh"
2646 rm -f $PCP_LOG_DIR/configs.sh
2648 # migrate old to new temp dir locations within the same filesystem)
2649 migrate_tempdirs()
2651 _sub="$1"
2652 _new_tmp_dir=%{_tmpdir}
2653 _old_tmp_dir=%{_localstatedir}/tmp
2655 for d in "$_old_tmp_dir/$_sub" ; do
2656 test -d "$d" -a -k "$d" || continue
2657 cd "$d" || continue
2658 for f in * ; do
2659 [ "$f" != "*" ] || continue
2660 source="$d/$f"
2661 target="$_new_tmp_dir/$_sub/$f"
2662 [ "$source" != "$target" ] || continue
2663 [ -f "$target" ] || mv -fu "$source" "$target"
2664 done
2665 cd && rmdir "$d" 2>/dev/null
2666 done
2668 for daemon in mmv pmdabash pmie pmlogger
2670 migrate_tempdirs $daemon
2671 done
2672 chown -R pcp:pcp "$PCP_LOG_DIR/pmcd" 2>/dev/null
2673 chown -R pcp:pcp "$PCP_LOG_DIR/pmlogger" 2>/dev/null
2674 chown -R pcp:pcp "$PCP_LOG_DIR/pmie" 2>/dev/null
2675 chown -R pcp:pcp "$PCP_LOG_DIR/pmproxy" 2>/dev/null
2676 touch "$PCP_PMNS_DIR/.NeedRebuild"
2677 chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
2678 %if "@enable_systemd@" == "true"
2679 systemctl condrestart pmcd.service >/dev/null 2>&1
2680 systemctl condrestart pmlogger.service >/dev/null 2>&1
2681 systemctl condrestart pmie.service >/dev/null 2>&1
2682 systemctl condrestart pmproxy.service >/dev/null 2>&1
2683 %else
2684 /sbin/chkconfig --add pmcd >/dev/null 2>&1
2685 /sbin/service pmcd condrestart
2686 /sbin/chkconfig --add pmlogger >/dev/null 2>&1
2687 /sbin/service pmlogger condrestart
2688 /sbin/chkconfig --add pmie >/dev/null 2>&1
2689 /sbin/service pmie condrestart
2690 /sbin/chkconfig --add pmproxy >/dev/null 2>&1
2691 /sbin/service pmproxy condrestart
2692 %endif
2694 cd $PCP_PMNS_DIR && ./Rebuild -s && rm -f .NeedRebuild
2697 %post libs -p /sbin/ldconfig
2698 %postun libs -p /sbin/ldconfig
2700 %files -f base_files.rpm
2702 %files conf -f cfg_files.rpm
2704 %files libs -f libs_files.rpm
2706 %files libs-devel -f lib_devel_files.rpm
2708 %files devel -f dev_files.rpm
2710 %files doc -f docs_files.rpm
2712 %if "@enable_qt@" == "true"
2713 %files gui -f gui_files.rpm
2714 %endif
2716 %if "@enable_webapi@" == "true"
2717 %files webapi -f webapi_files.rpm
2718 %endif
2720 %if "@enable_manager@" == "true"
2721 %files manager -f manager_files.rpm
2722 %endif
2724 %if "@have_webjs@" == "true"
2725 %files webjs
2726 # duplicate directories from pcp and pcp-webapi, but rpm copes with that.
2727 %dir @pcp_share_dir@
2728 %dir @pcp_share_dir@/webapps
2729 @pcp_share_dir@/webapps/*.png
2730 @pcp_share_dir@/webapps/*.ico
2731 @pcp_share_dir@/webapps/*.html
2732 @pcp_share_dir@/webapps/*.txt
2733 @pcp_share_dir@/webapps/blinkenlights
2735 %files webapp-grafana
2736 %dir @pcp_share_dir@
2737 %dir @pcp_share_dir@/webapps
2738 @pcp_share_dir@/webapps/grafana
2740 %files webapp-graphite
2741 %dir @pcp_share_dir@
2742 %dir @pcp_share_dir@/webapps
2743 @pcp_share_dir@/webapps/graphite
2744 %endif
2746 %if "@have_vector@" == "true" || "@have_webjs@" == "true"
2747 %files webapp-vector
2748 %dir @pcp_share_dir@
2749 %dir @pcp_share_dir@/webapps
2750 @pcp_share_dir@/webapps/vector
2751 %endif
2753 %files testsuite -f testsuite_files.rpm
2754 %defattr(-,pcpqa,pcpqa)
2756 %if "@pmda_papi@" == "true"
2757 %files pmda-papi -f pmda_papi_files.rpm
2758 %endif
2760 %if "@pmda_infiniband@" == "true"
2761 %files pmda-infiniband -f pmda_infiniband_files.rpm
2762 %endif
2764 %if "@pmda_perfevent@" == "true"
2765 %files pmda-perfevent -f pmda_perfevent_files.rpm
2766 %endif
2768 %if "@pmda_activemq@" == "true"
2769 %files pmda-activemq -f pmda_activemq_files.rpm
2770 %endif
2772 %if "@pmda_bind2@" == "true"
2773 %files pmda-bind2 -f pmda_bind2_files.rpm
2774 %endif
2776 %if "@pmda_nutcracker@" == "true"
2777 %files pmda-nutcracker -f pmda_nutcracker_files.rpm
2778 %endif
2780 %files pmda-redis -f pmda_redis_files.rpm
2782 %files pmda-bonding -f pmda_bonding_files.rpm
2784 %files pmda-dbping -f pmda_dbping_files.rpm
2786 %files pmda-ds389log -f pmda_ds389log_files.rpm
2788 %files pmda-ds389 -f pmda_ds389_files.rpm
2790 %if "@pmda_elasticsearch@" == "true"
2791 %files pmda-elasticsearch -f pmda_elasticsearch_files.rpm
2792 %endif
2794 %files pmda-gpfs -f pmda_gpfs_files.rpm
2796 %files pmda-gpsd -f pmda_gpsd_files.rpm
2798 %files pmda-kvm -f pmda_kvm_files.rpm
2800 %files pmda-lustre -f pmda_lustre_files.rpm
2802 %files pmda-lustrecomm -f pmda_lustrecomm_files.rpm
2804 %files pmda-memcache -f pmda_memcache_files.rpm
2806 %if "@pmda_mysql@" == "true"
2807 %files pmda-mysql -f pmda_mysql_files.rpm
2808 %endif
2810 %files pmda-named -f pmda_named_files.rpm
2812 %files pmda-netfilter -f pmda_netfilter_files.rpm
2814 %files pmda-news -f pmda_news_files.rpm
2816 %if "@pmda_nginx@" == "true"
2817 %files pmda-nginx -f pmda_nginx_files.rpm
2818 %endif
2820 %files pmda-nfsclient -f pmda_nfsclient_files.rpm
2822 %files pmda-pdns -f pmda_pdns_files.rpm
2824 %if "@pmda_postfix@" == "true"
2825 %files pmda-postfix -f pmda_postfix_files.rpm
2826 %endif
2828 %if "@pmda_postgresql@" == "true"
2829 %files pmda-postgresql -f pmda_postgresql_files.rpm
2830 %endif
2832 %if "@pmda_oracle@" == "true"
2833 %files pmda-oracle -f pmda_oracle_files.rpm
2834 %endif
2836 %files pmda-rsyslog -f pmda_rsyslog_files.rpm
2838 %files pmda-samba -f pmda_samba_files.rpm
2840 %files pmda-slurm -f pmda_slurm_files.rpm
2842 %if "@pmda_snmp@" == "true"
2843 %files pmda-snmp -f pmda_snmp_files.rpm
2844 %endif
2846 %files pmda-vmware -f pmda_vmware_files.rpm
2848 %files pmda-zimbra -f pmda_zimbra_files.rpm
2850 %files pmda-dm -f pmda_dm_files.rpm
2852 %if "@have_python@" == "true"
2853 %files pmda-gluster -f pmda_gluster_files.rpm
2855 %files pmda-zswap -f pmda_zswap_files.rpm
2857 %files pmda-unbound -f pmda_unbound_files.rpm
2859 %files pmda-mic -f pmda_mic_files.rpm
2861 %files export-pcp2graphite -f export_pcp2graphite_files.rpm
2863 %files export-pcp2influxdb -f export_pcp2influxdb_files.rpm
2864 %endif
2866 %files export-zabbix-agent -f export_zabbix_agent_files.rpm
2868 %if "@pmda_json@" == "true"
2869 %files pmda-json -f pmda_json_files.rpm
2870 %endif
2872 %if "@pmda_libvirt@" == "true"
2873 %files pmda-libvirt -f pmda_libvirt_files.rpm
2874 %endif
2876 %files pmda-apache -f pmda_apache_files.rpm
2878 %files pmda-bash -f pmda_bash_files.rpm
2880 %files pmda-cifs -f pmda_cifs_files.rpm
2882 %files pmda-cisco -f pmda_cisco_files.rpm
2884 %files pmda-gfs2 -f pmda_gfs2_files.rpm
2886 %files pmda-lmsensors -f pmda_lmsensors_files.rpm
2888 %files pmda-logger -f pmda_logger_files.rpm
2890 %files pmda-mailq -f pmda_mailq_files.rpm
2892 %files pmda-mounts -f pmda_mounts_files.rpm
2894 %files pmda-nvidia-gpu -f pmda_nvidia_files.rpm
2896 %files pmda-roomtemp -f pmda_roomtemp_files.rpm
2898 %if "@pmda_rpm@" == "true"
2899 %files pmda-rpm -f pmda_rpm_files.rpm
2900 %endif
2902 %files pmda-sendmail -f pmda_sendmail_files.rpm
2904 %files pmda-shping -f pmda_shping_files.rpm
2906 %files pmda-summary -f pmda_summary_files.rpm
2908 %if "@pmda_systemd@" == "true"
2909 %files pmda-systemd -f pmda_systemd_files.rpm
2910 %endif
2912 %files pmda-trace -f pmda_trace_files.rpm
2914 %files pmda-weblog -f pmda_weblog_files.rpm
2916 %files import-sar2pcp -f import_sar2pcp_files.rpm
2918 %files import-iostat2pcp -f import_iostat2pcp_files.rpm
2920 %files import-sheet2pcp -f import_sheet2pcp_files.rpm
2922 %files import-mrtg2pcp -f import_mrtg2pcp_files.rpm
2924 %files import-ganglia2pcp -f import_ganglia2pcp_files.rpm
2926 %files import-collectl2pcp -f import_collectl2pcp_files.rpm
2928 %files -n perl-PCP-PMDA -f perl-pcp-pmda.list
2930 %files -n perl-PCP-MMV -f perl-pcp-mmv.list
2932 %files -n perl-PCP-LogImport -f perl-pcp-logimport.list
2934 %files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list
2936 %if "@enable_python2@" == "true"
2937 %files -n python-pcp -f python-pcp.list.rpm
2938 %endif
2940 %if "@enable_python3@" == "true"
2941 %files -n python3-pcp -f python3-pcp.list.rpm
2942 %endif
2944 %if "@have_python@" == "true"
2945 %files -n pcp-system-tools -f system_tools_files.rpm
2946 %endif
2948 %files -n pcp-collector
2950 %files -n pcp-monitor