%if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %global modname summershum Name: python-summershum Version: 0.1 Release: 1%{?dist} Summary: A fedmsg consumer that extracts and stores hashes of source files Group: Development/Libraries License: GPLv2+ URL: http://pypi.python.org/pypi/summershum Source0: http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: fedmsg BuildRequires: python-sqlalchemy Requires: fedmsg Requires: python-sqlalchemy %description A fedmsg consumer that extracts and stores hashes of source files. summershum is composed of two components: - A fedmsg consumer plugin that listens for ``org.fedoraproject.prod.git.lookaside.new`` messages. Whenever a contributor uploads a new source tarball to the lookaside cache, summershum will download that tarball, unpack it, and calculate the sha1 sum of every file in the tarball. Those hashes are then stored in a database to be queried later. - A cli tool ``summershum-cli`` that queries datagrepper for the fedmsg history. It then crawls through old lookaside messages to fill in data where it was missed. With the summershum database, we can then make some interesting queries in short time: - how many files have this hash sum in all of fedora? and for which packages ? - we can easily find what is bundling what and generate a programatic list - we could check the db in taskotron tests - we could check to see how many packages include the full GPL license - how many packages have that license but with the old FSF address %prep %setup -q -n %{modname}-%{version} # Remove bundled egg-info in case it exists rm -rf %{modname}.egg-info %build %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root=%{buildroot} %check # Eventually, the tests will be run this way, but not yet. #%%{__python2} setup.py test %{__python2} tests/__init__.py %files %doc README.rst LICENSE %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}* %{_bindir}/summershum-cli %changelog * Tue Feb 18 2014 Ralph Bean - 0.1-1 - initial package for Fedora