%define version 2.6.0.svn332 %define release 1%{?dist} # How should we handle Python? # - if 1, do it the "correct" way: install to the correct site_packages # directory (which introduces a dependency on the python version), add abi # dependency etc. This will require a per-release build. # - if 0, install to a hard-coded location, and allow release-independent # packages %define hardcore_python_packaging 1 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} # The behaviour of the rpm-build package for python files varies between # releases. Sometime in the FC4 timeframe it gained a file # /usr/lib/rpm/brp-python-bytecompile which generates pyo and pyc files for py # files, in a phase after the install. # This macro is needed to turn this off, for building on FC4/RHEL5 and later: %define byte_compiled_python 0 Name: rhts Summary: Automated software testing Version: %{version} Release: %{release} Group: QA License: GPL Source0: %{name}-%{version}.tar.bz2 # snapshot Buildroot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch BuildRequires: python-devel %if %{hardcore_python_packaging} Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]") %endif %description A system for developing automated tests %package python Summary: Python modules for test metadata Group: System Environment/Base Requires: python %description python This package contains Python modules for handling test metadata %package test-env Summary: Testing API Group: System Environment/Base Requires: expect Obsoletes: rhts-testhelpers Provides: rhts-testhelpers %description test-env This package contains components of the test system used when running tests, either on a developer's workstation, or within a lab. %package devel Summary: Testing kit Group: System Environment/Base Obsoletes: rhts-testhelpers-developer Provides: rhts-testhelpers-developer Requires: rhts-test-env = %{version}-%{release} Requires: rhts-python = %{version}-%{release} %description devel This package is intended for people creating and maintaining tests, and contains (or requires) the runtime components of the test system for installation on a workstation, along with development tools. %prep %setup -q -c %build [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; DESTDIR=$RPM_BUILD_ROOT make pushd python-modules CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build popd %install DESTDIR=$RPM_BUILD_ROOT make install-noarch %if %{hardcore_python_packaging} pushd python-modules %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %else cp python-modules/rhts/testinfo.py $RPM_BUILD_ROOT/usr/share/rhts/lib/ cp python-modules/rhts/__init__.py $RPM_BUILD_ROOT/usr/share/rhts/lib/ %endif %clean [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; %files python %if %{hardcore_python_packaging} %{python_sitelib}/rhts/*.py* %else /usr/share/rhts/lib/*.py* %endif %files test-env %defattr(-,root,root) /usr/bin/rhts-db-submit-result /usr/bin/rhts-environment.sh /usr/bin/rhts-run-simple-test /usr/bin/rhts-report-result /usr/bin/rhts-timed-test.sh /usr/bin/rhts-submit-log /usr/bin/rhts-sync-block /usr/bin/rhts-sync-set /usr/share/rhts/lib/rhts-make.include /mnt/scratchspace %attr(1777,root,root)/mnt/testarea /mnt/tests %files devel %defattr(-,root,root) /usr/bin/rhts-create-new-test /usr/bin/rhts-lint /usr/bin/rhts-run-package /usr/bin/rhts-mk-build-package /usr/bin/rhts-mk-generate-specfile /usr/bin/rhts-mk-get-current-tag /usr/bin/rhts-mk-get-next-tag /usr/bin/rhts-mk-get-test-package-name /usr/bin/rhts-mk-get-version-info /usr/bin/rhts-mk-tag-release /usr/bin/rhts-mk-test-import /usr/bin/rhts-mk-test-review %doc devel/doc/Makefile.template %doc devel/doc/runtest.sh.template %changelog * Wed Jan 24 2007 David Malcolm - 2.6.0.svn332-1 - 2.6.0.svn332 - reorg specfile to support concept of an upstream tarball separate from the specfile * Wed Jan 24 2007 David Malcolm - 2.6-31 - move python files into an rhts subdirectory as needed for setup.py - drop the repo files * Tue Jan 16 2007 Bill Peck - 2.6-30 - fix false postive avc message * Thu Jan 11 2007 Bill Peck - 2.6-29 - Fix testinfo.desc generaion. don't try and build it from every Makefile. * Wed Dec 13 2006 Bill Peck - 2.6-28 - return 1 if we fail to import the test * Wed Nov 29 2006 Bill Peck - 2.6-27 - Bump Scheduler API, send Version-Release to scheduler * Wed Nov 03 2006 Bill Peck - - Fixed rhts-submit-log with env variables * Wed Nov 01 2006 Bill Peck - 2.6-24 - Implemented API checking - submitting test rpms now tells the scheduler the name of the rpm. * Thu Oct 26 2006 Bill Peck - 2.6-23 - Fixed parsing in testinfo.py * Tue Oct 24 2006 Bill Peck - 2.6-22 - Add Kernel Tiers to rhtslint check * Mon Oct 23 2006 David Malcolm - 2.6-21 - Fix permissions on yum repo files, and replace rhts-tests.repo with tablecloth-tests.repo - Ensure that errors generating a specfile during a package build lead to immediate termination, rather than trying to continue and getting misleading errors later on. - Fix a typo bug in the parsing of testinfo.desc files where an Architectures field would fail if a Releases field was already defined * Fri Oct 20 2006 David Malcolm - 2.6-20 - shorten length of RPM names - add arch-specific build support - use cleaner templates in documentation (jpoelstra) - be stricter about version-release deps between subpackages * Mon Oct 16 2006 David Malcolm - 2.6-19 - add tools repo * Mon Oct 16 2006 David Malcolm - 2.6-18 - add dist tag to specfile; add SiteConfig parser * Fri Oct 13 2006 Bill Peck - 2.6-17 - rhtslint updates, owner is now optional, fixed rhel5, and added Fedora types * Tue Oct 10 2006 Bill Peck - 2.6-16 - fix rhts-db-submit-result to nor barf on undefined time parsing. * Wed Oct 4 2006 David Malcolm - 2.6-14 - 'make package' now generates specfile based on data in testinfo.desc files * Fri Sep 29 2006 David Malcolm - 2.6-13 - add rhts-test-repo subpackage * Fri Sep 8 2006 David Malcolm - 2.6-12 - add support for svn working copies * Thu Aug 03 2006 Bill Peck - 2.6-11 - small fixes to /avc reporting. * Fri Jul 28 2006 Bill Peck - 2.6-9 - fix /avc reporting for non selinux distros * Fri Jul 28 2006 Bill Peck - 2.6-8 - include Paul Sutherland checks for avc errors. - rhts-python package, dmalcolm broke out rhts-lint into a python class. * Fri Jul 14 2006 Bill Peck - 2.6-5 - Fix rhts-report-result to take negative scores * Mon Jul 10 2006 Bill Peck - 2.6-3 - fix global variables in rhts-sync-* scripts. * Thu Jun 29 2006 Bill Peck -2.6-0 - First public release