Name: pbench-agent Version: 0.69.10 Release: 2g5c06d9c49 Summary: The pbench agent CLI & default configuration. License: GPLv3+ URL: https://github.com/distributed-system-analysis/pbench Source0: pbench-agent-%{version}.tar.gz Buildarch: noarch %if 0%{?rhel} == 6 %define turbostatpkg cpupowerutils %else %define turbostatpkg kernel-tools %endif %if 0%{?rhel} == 7 Requires: scl-utils, rh-python36 %endif %if 0%{?rhel} == 8 || 0%{?fedora} >= 29 Requires: python3-pip %endif Requires: bzip2, tar, xz, screen Requires: perl, perl-JSON, perl-JSON-XS, perl-Time-HiRes, perl-Data-UUID Requires: net-tools, numactl, perf, psmisc, bc, sos, %{turbostatpkg} # The following are needed by UBI containers which are bare bones - most other # systems will probably already have them installed. Requires: ansible hostname iproute procps-ng iputils openssh-server openssh-clients rsync Obsoletes: pbench <= 0.34 Conflicts: pbench <= 0.34 # configtools is packaged with pbench-agent, so we specifically do NOT want the configtools # RPM installed. Conflicts: configtools Patch0: stockpile-shebang.patch %define installdir opt/pbench-agent %description The pbench "agent" harness %prep %setup %patch0 -p1 %build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{installdir} cp -a agent/* %{?buildroot}/%{installdir}/ %pre # this RPM conflicts with a configtools RPM, but we may have a Pypi # configtools installed: zap it. %if 0%{?rhel} == 7 scl enable rh-python36 -- bash -c 'if pip3 show configtools > /dev/null 2>&1 ;then pip3 uninstall -y configtools ;fi' %endif %if 0%{?rhel} == 8 || 0%{?fedora} >= 29 if pip3 show configtools > /dev/null 2>&1 ;then pip3 uninstall -y configtools ;fi %endif %post # link the pbench profile, so it'll automatically be sourced on login ln -sf /%{installdir}/profile /etc/profile.d/pbench-agent.sh %preun # if uninstalling, rather than updating, delete the link if [ $1 -eq 0 ] ;then rm -f /etc/profile.d/pbench-agent.sh fi %postun # if uninstalling, rather than updating, remove installation directory entirely if [ $1 -eq 0 ] ;then rm -rf /%{installdir} fi %posttrans %files %defattr(444,root,root,555) /%{installdir}/ansible /%{installdir}/config /%{installdir}/lib /%{installdir}/base /%{installdir}/VERSION /%{installdir}/SEQNO /%{installdir}/SHA1 /%{installdir}/profile %config(noreplace) %attr(0664,root,root) /%{installdir}/config/pbench-agent.cfg %defattr(555,root,root,555) /%{installdir}/util-scripts %attr(444,root,root) /%{installdir}/util-scripts/README /%{installdir}/tool-scripts %attr(444,root,root) /%{installdir}/tool-scripts/perf.README %attr(444,root,root) /%{installdir}/tool-scripts/README /%{installdir}/bench-scripts %attr(444,root,root) /%{installdir}/bench-scripts/pbench-fio.md %attr(444,root,root) /%{installdir}/bench-scripts/pbench-uperf.md %attr(444,root,root) /%{installdir}/bench-scripts/postprocess/BenchPostprocess.pm %attr(444,root,root) /%{installdir}/bench-scripts/templates/fio.job %attr(444,root,root) /%{installdir}/bench-scripts/templates/fio-shared-fs.job # stockpile %defattr(444,root,root,555) /%{installdir}/stockpile %attr(555,root,root) /%{installdir}/stockpile/import_roles.sh %attr(555,root,root) /%{installdir}/stockpile/roles/openshift-cluster-topology/files/openshift_config_scraper.py %attr(555,root,root) /%{installdir}/stockpile/roles/openstack_common/files/openstack-config-parser.py