Name: pbench-server Version: 0.69.10 Release: 1g5f0e3faf5 Summary: The pbench server bits License: GPLv3+ URL: http://github.com/distributed-systems-analysis/pbench Source0: pbench-server-%{version}.tar.gz Buildarch: noarch # NOTE: we add the "six" and "urllib3" Python 3.8 RPM requirements so that # we don't end up pip installing those modules in the /opt/pbench-server/lib # tree. Requires: python38 python38-six python38-urllib3 # policycoreutils for semanage and restorecon - used in pbench-server-activate-create-results-dir Requires: policycoreutils Requires: policycoreutils-python-utils Requires: npm # installdir has to agree with the definition of install-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 we omit # the initial / - it is added in every use below. IMO, that's more # readable since it appears in the middle of the path in all cases, # *except* in the 'files' section (and one instance in the 'post' # and 'postun' sections). %define installdir opt/pbench-server %define static html/static %define __python python3 %description The pbench server scripts. %prep %setup %build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{installdir} cp -a ./server/* %{buildroot}/%{installdir} mkdir -p %{buildroot}/%{installdir}/%{static} cp -a ./web-server/* %{buildroot}/%{installdir}/%{static} # for the npm install below mv %{buildroot}/%{installdir}/%{static}/package.json %{buildroot}/%{installdir} %post # Install python dependencies pip3 --no-cache-dir install --prefix=/%{installdir} -r /%{installdir}/requirements.txt > /%{installdir}/pip3-install.log # install node.js modules under the installation directory cd /%{installdir} rm -rf node_modules npm install # this only handles v0.3 # AFAIK, we don't need all the other modules that package.json includes. jslist="node_modules/d3/d3.min.js node_modules/d3-queue/build/d3-queue.min.js node_modules/save-svg-as-png/lib/saveSvgAsPng.js" # Copy them to the appropriate directory for v0.3. That # directory should exist already because of the `cp -a' # of the web-server stuff above, but add an explicit # mkdir just in case, although it should be a no-op. mkdir -p /%{installdir}/%{static}/js/v0.3 for x in ${jslist} ;do cp $x /%{installdir}/%{static}/js/v0.3 done # Finally, make sure the installation directory is entirely owned # by the pbench user. chown -R pbench.pbench /%{installdir} %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} fi %posttrans %files %defattr(644, pbench, pbench, 755) /%{installdir}/%{static}/VERSION /%{installdir}/SEQNO /%{installdir}/SHA1 /%{installdir}/VERSION /%{installdir}/package.json /%{installdir}/requirements.txt /%{installdir}/lib/config/pbench-server-default.cfg /%{installdir}/lib/config/pbench-server-satellite.cfg.example /%{installdir}/lib/config/pbench-server.cfg.example /%{installdir}/lib/crontab /%{installdir}/lib/mappings /%{installdir}/lib/settings /%{installdir}/lib/configtools/__init__.py /%{installdir}/lib/pbench/__init__.py /%{installdir}/lib/pbench/indexer.py /%{installdir}/lib/pbench/mock.py /%{installdir}/lib/pbench/process_tb.py /%{installdir}/lib/pbench/report.py /%{installdir}/lib/s3backup/__init__.py /%{installdir}/bin/pbench-base.sh %defattr(755, pbench, pbench, 755) /%{installdir}/bin/getconf.py /%{installdir}/bin/pbench-audit-server /%{installdir}/bin/pbench-audit-server.sh /%{installdir}/bin/pbench-backup-tarballs /%{installdir}/bin/pbench-backup-tarballs.py /%{installdir}/bin/pbench-base.py /%{installdir}/bin/pbench-check-tb-age /%{installdir}/bin/pbench-check-tb-age.py /%{installdir}/bin/pbench-clean-up-dangling-results-links /%{installdir}/bin/pbench-clean-up-dangling-results-links.sh /%{installdir}/bin/pbench-copy-sosreports /%{installdir}/bin/pbench-copy-sosreports.sh /%{installdir}/bin/pbench-cull-unpacked-tarballs /%{installdir}/bin/pbench-cull-unpacked-tarballs.py /%{installdir}/bin/pbench-dispatch /%{installdir}/bin/pbench-dispatch.sh /%{installdir}/bin/pbench-index /%{installdir}/bin/pbench-index.py /%{installdir}/bin/pbench-pp-status /%{installdir}/bin/pbench-reindex /%{installdir}/bin/pbench-reindex.py /%{installdir}/bin/pbench-remote-satellite-state-change /%{installdir}/bin/pbench-remote-sync-package-tarballs /%{installdir}/bin/pbench-report-status /%{installdir}/bin/pbench-report-status.py /%{installdir}/bin/pbench-satellite-cleanup /%{installdir}/bin/pbench-satellite-cleanup.sh /%{installdir}/bin/pbench-satellite-state-change /%{installdir}/bin/pbench-satellite-state-change.py /%{installdir}/bin/pbench-server-activate-create-crontab /%{installdir}/bin/pbench-server-prep-shim-002 /%{installdir}/bin/pbench-server-prep-shim-002.sh /%{installdir}/bin/pbench-server-put-shim /%{installdir}/bin/pbench-server-put-shim.py /%{installdir}/bin/pbench-server-set-result-state /%{installdir}/bin/pbench-sync-package-tarballs /%{installdir}/bin/pbench-sync-package-tarballs.sh /%{installdir}/bin/pbench-sync-satellite /%{installdir}/bin/pbench-sync-satellite.sh /%{installdir}/bin/pbench-tarball-stats /%{installdir}/bin/pbench-tarball-stats.py /%{installdir}/bin/pbench-trampoline /%{installdir}/bin/pbench-unpack-tarballs /%{installdir}/bin/pbench-unpack-tarballs.sh /%{installdir}/bin/pbench-verify-backup-tarballs /%{installdir}/bin/pbench-verify-backup-tarballs.py /%{installdir}/bin/pbench-verify-indexed /%{installdir}/bin/pbench-verify-indexed.py %defattr(644, pbench, pbench, 755) /%{installdir}/%{static}/css/v0.2/pbench_utils.css /%{installdir}/%{static}/css/v0.3/jschart.css /%{installdir}/%{static}/js/v0.2/app.js /%{installdir}/%{static}/js/v0.2/pbench_utils.js /%{installdir}/%{static}/js/v0.3/jschart.js %doc /%{installdir}/%{static}/css/v0.3/LICENSE.TXT /%{installdir}/%{static}/js/v0.3/LICENSE.TXT /%{installdir}/lib/pbench/AUTHORS.log_formatter /%{installdir}/lib/pbench/LICENSE.log_formatter /%{installdir}/lib/s3backup/README