Blob Blame History Raw
# https://bugzilla.redhat.com/show_bug.cgi?id=955781

%define modname datagrepper
%define eggname datagrepper

Name:           datagrepper
Version:        0.6.0
Release:        2%{?dist}
Summary:        A webapp to query fedmsg history

License:        GPLv2+
URL:            https://github.com/fedora-infra/datagrepper
Source0:        https://pypi.python.org/packages/source/d/%{name}/%{name}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-freezegun
BuildRequires:  python-nose

%if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires:  python-sqlalchemy0.7
%else
BuildRequires:  python-sqlalchemy
%endif

BuildRequires:  fedmsg
BuildRequires:  python-datanommer-models
BuildRequires:  python-docutils
BuildRequires:  python-dogpile-cache
BuildRequires:  python-flask
BuildRequires:  python-arrow
BuildRequires:  python-fedmsg-meta-fedora-infrastructure
BuildRequires:  python-pygal

%if 0%{?rhel} && 0%{?rhel} <= 6
Requires:  python-sqlalchemy0.7
%else
Requires:  python-sqlalchemy
%endif

Requires:  fedmsg >= 0.7.0
Requires:  python-datanommer-models >= 0.6.0
Requires:  python-docutils
Requires:  python-dogpile-cache
Requires:  python-flask
Requires:  python-arrow
Requires:  python-fedmsg-meta-fedora-infrastructure
Requires:  python-pygal


%if %{?rhel}%{!?rhel:0} == 7
%else
# This is temporarily patched out for rhel7
BuildRequires:  python-flask-sqlalchemy
Requires:       python-flask-sqlalchemy
%endif

%description
A webapp to retrieve historical information about messages on the fedmsg
bus.  It is a JSON api for the datanommer message store.

%prep
%setup -q

%if %{?rhel}%{!?rhel:0} <= 6
# Make sure that epel/rhel picks up the correct version of webob
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"sqlalchemy>=0.7\"]; import pkg_resources"}1' setup.py > setup.py.tmp
mv setup.py.tmp setup.py
%endif

%build
%{__python} setup.py build

%install
%{__python} setup.py install -O1 --skip-build \
    --install-data=%{_datadir} --root %{buildroot}

mkdir -p %{buildroot}%{_datadir}/%{modname}/apache/
install -m 644 apache/%{modname}.wsgi %{buildroot}%{_datadir}/%{modname}/apache/%{modname}.wsgi
install -m 644 apache/%{modname}.conf %{buildroot}%{_datadir}/%{modname}/apache/%{modname}.conf

mkdir -p %{buildroot}%{_sysconfdir}/%{modname}/
install -m 644 apache/%{modname}.cfg %{buildroot}%{_sysconfdir}/%{modname}/%{modname}.cfg

%check
%{__python} setup.py test

%files
%doc README.rst COPYING
%config(noreplace) %{_sysconfdir}/%{modname}/
%{_datadir}/%{modname}/
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{eggname}-%{version}-py%{python_version}.egg-info/

%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Apr 24 2015 Ralph Bean <rbean@redhat.com> - 0.6.0-1
- new version
- Removed lots of no-longer-needed deps.

* Tue Sep 09 2014 Ralph Bean <rbean@redhat.com> - 0.5.1-1
- Hide charts from users.  They are too slow on the full dataset.

* Mon Sep 08 2014 Ralph Bean <rbean@redhat.com> - 0.5.0-1
- Latest upstream.
- New dep on python-pygal.

* Wed Aug 06 2014 Ralph Bean <rbean@redhat.com> - 0.4.2-1
- Latest bugfix release with css and javascript fixes.
- Remove patch.
- Fix rhel6 conditionals?

* Thu Jul 10 2014 Ralph Bean <rbean@redhat.com> - 0.4.1-4
- Bump release.

* Tue Jul 08 2014 Ralph Bean <rbean@redhat.com> - 0.4.1-3
- Fix rhel conditionals for rhel7.
- Patch out flask-sqlalchemy for rhel7.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 02 2014 Ralph Bean <rbean@redhat.com> - 0.4.1-1
- Websockets and autoscrolling.
- Remove pygments patch.

* Wed Mar 19 2014 Ralph Bean <rbean@redhat.com> - 0.4.0-3
- Start running the test suite.

* Tue Mar 04 2014 Ralph Bean <rbean@redhat.com> - 0.4.0-2
- Patch some pygments stuff to support el6.

* Tue Mar 04 2014 Ralph Bean <rbean@redhat.com> - 0.4.0-1
- Fix widget css
- Added an extra-large size for message cards
- Default order is descending now.

* Fri Feb 21 2014 Ralph Bean <rbean@redhat.com> - 0.3.3-1
- New /raw api option to query for an arbitrary string
- New /raw api option to query for negative filters.
- New /widget.js self-expanding javascript widget.

* Sun Feb 09 2014 Ralph Bean <rbean@redhat.com> - 0.3.2-1
- Cosmetic fixes.

* Sun Feb 09 2014 Ralph Bean <rbean@redhat.com> - 0.3.1-1
- Frontend and docs improvements by charulagrl.

* Fri Jan 10 2014 Ralph Bean <rbean@redhat.com> - 0.3.0-1
- Message counter on the frontpage.
- Introduction of the HTML cards work by charulagrl.

* Fri Sep 27 2013 Ian Weller <iweller@redhat.com> - 0.2.1-1
- Update to upstream 0.2.1

* Wed Sep 18 2013 Ian Weller <iweller@redhat.com> - 0.2.0-1
- Update to upstream 0.2.0

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Jun 06 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.4-3
- Backport patch from commit 2f8c98b in upstream repo

* Fri May 17 2013 Ralph Bean <rbean@redhat.com> - 0.1.4-2
- Apply temporary sed statement to fix datagrepper.wsgi.

* Fri May 17 2013 Ralph Bean <rbean@redhat.com> - 0.1.4-1
- Latest upstream.
- Ability to request an order for your results.
- Ability to request metadata to be sent along with your results.
- Ability to request the last N items regardless of time.

* Mon May 13 2013 Ralph Bean <rbean@redhat.com> - 0.1.3-2
- Apply a patch to fix a spelling typo in the main file.

* Mon May 13 2013 Ralph Bean <rbean@redhat.com> - 0.1.3-1
- Fix to configurable base url.
- Support old docutils and code-block directive.
- Support a callback querystring argument to allow JSONP responses.

* Fri May 10 2013 Ralph Bean <rbean@redhat.com> - 0.1.2-1
- Added configurable base_url for docs.
- Fix timedelta.total_seconds for python2.6.

* Mon May 06 2013 Ian Weller <iweller@redhat.com> - 0.1.1-2
- Replace pyver macro definition with python_version

* Fri May 03 2013 Ian Weller <iweller@redhat.com> - 0.1.1-1
- Update to upstream 0.1.1 (adds license text)
- Fix python2-devel BR
- Mark config file as noreplace
- Remove useradd commands in post
- Install sample httpd configuration file
- Add version to requires on datanommer.models
- Remove python_sitelib macro definition
- Fix file permissions for config files

* Tue Apr 23 2013 Ian Weller <iweller@redhat.com> - 0.1-1
- Bump version number to 0.1 (0.0.1 never happened)
- Remove system executable macros
- Fix install location of apache/datagrepper.cfg

* Mon Apr 22 2013 Ralph Bean <rbean@redhat.com> - 0.0.1-1
- Initial packaging.