Name: pbench-server Version: 0.48 %define gdist g87190ca Release: 1%{?gdist}%{!?gdist:} Summary: The pbench server bits License: GPLv3+ URL: http://github.com/distributed-systems-analysis/pbench Source0: pbench-server-%{version}.tar.gz Buildarch: noarch # policycoreutils for semanage and restorecon - used in pbench-server-activate-create-results-dir # pbench-sysstat for sadf which is used by index-pbench Requires: configtools >= 0.3, configtools < 0.4, policycoreutils, pbench-sysstat %if 0%{?fedora} Requires: policycoreutils-python-utils, python3-elasticsearch %endif %if 0%{?rhel} # need python3 - install scl to get it # scl-utils is in the main repo, but the scl python3 # collection du jour is in the scl repo which # is assumed to have been added already with: # yum install yum-utils # yum-config-manager --enable rhel-server-rhscl-7-rpms # # we can't do that in the spec file, because of the yum lock, # so they have to be done beforehand. Requires: scl-utils, rh-python35, policycoreutils-python %endif # installdir has to agree with the definition of default-deploy-dir in # pbench-server.cfg, but we can't go out and pluck it from there, # because we don't know where the config file is. Note that for # readability, we omit the initial / - it is added in every use below # - IMO, that's better (i.e. more readable). %define installdir opt/pbench-server %description The pbench server scripts. %prep %setup %build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{installdir} install -m 755 -d %{buildroot}/%{installdir}/lib/config install -m 755 -d %{buildroot}/%{installdir}/lib/crontab install -m 755 -d %{buildroot}/%{installdir}/lib/mappings install -m 755 -d %{buildroot}/%{installdir}/lib/vos/analysis/lib install -m 755 -d %{buildroot}/%{installdir}/bin for x in `cat MANIFEST` do y=`dirname $x | sed 's/\/pbench//'` install -m 755 $x %{buildroot}/%{installdir}/$y done %pre %if 0%{?rhel} > 0 && 0%{?rhel} < 7 echo "Cannot install pbench server on a RHEL6 or earlier system" exit 1 %endif if adduser -M pbench 2>/dev/null ;then : ;else : ;fi %post chown -R pbench.pbench /%{installdir} %if 0%{?rhel} == 7 # install python3-elasticsearch scl enable rh-python35 pip install elasticsearch %endif %preun %postun # if uninstalling, rather than updating, remove everything if [ $1 -eq 0 ] ;then crontab=/%{installdir}/lib/crontab/crontab if [ -f $crontab ] ;then crontab -u pbench -r fi rm -rf /%{installdir} rm -rf /var/www/html/pbench-results-host-info.versioned fi %files %defattr(664,pbench,pbench,775) /%{installdir}/MANIFEST /%{installdir}/VERSION /%{installdir}/lib/config/pbench-server.cfg.example /%{installdir}/lib/config/pbench-index.cfg.example /%{installdir}/lib/crontab /%{installdir}/lib/mappings /%{installdir}/lib/vos/__init__.py %ghost /%{installdir}/lib/vos/__init__.pyc %ghost /%{installdir}/lib/vos/__init__.pyo /%{installdir}/lib/vos/analysis/__init__.py %ghost /%{installdir}/lib/vos/analysis/__init__.pyc %ghost /%{installdir}/lib/vos/analysis/__init__.pyo /%{installdir}/lib/vos/analysis/lib/__init__.py %ghost /%{installdir}/lib/vos/analysis/lib/__init__.pyc %ghost /%{installdir}/lib/vos/analysis/lib/__init__.pyo /%{installdir}/bin/pbench-base.sh %defattr(775,pbench,pbench,775) # /%{installdir}/bin/pbench-server-activate-copy-config-files /%{installdir}/bin/pbench-server-activate-create-crontab /%{installdir}/bin/pbench-server-activate-create-results-dir-structure /%{installdir}/bin/pbench-server-activate-setup-results-host-info /%{installdir}/bin/pbench-server-activate-start-httpd /%{installdir}/bin/pbench-server-activate-web-server /%{installdir}/bin/pbench-server-activate # /%{installdir}/bin/pbench-activate-server /%{installdir}/bin/pbench-server-config-activate /%{installdir}/bin/index-pbench /%{installdir}/bin/pbench-backup-tarballs /%{installdir}/bin/pbench-verify-backup-tarballs /%{installdir}/bin/pbench-clean-up-dangling-results-links /%{installdir}/bin/pbench-copy-sosreports /%{installdir}/bin/pbench-edit-prefixes /%{installdir}/bin/pbench-index /%{installdir}/bin/pbench-unpack-tarballs # /%{installdir}/bin/pbench-rsync-satellite # /%{installdir}/bin/pbench-rsync-satellite-process-work-queue /%{installdir}/bin/pbench-satellite-cleanup /%{installdir}/bin/pbench-satellite-state-change /%{installdir}/bin/job_pool.sh /%{installdir}/bin/pbench-dispatch /%{installdir}/bin/pbench-move-unpacked /%{installdir}/bin/pbench-sync-package-tarballs /%{installdir}/bin/pbench-sync-satellite %doc