%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif Name: loggerhead Version: 1.18.1 Release: 1%{?dist} Summary: Web viewer for the Bazaar version control system Group: Development/Tools License: GPLv2+ URL: https://launchpad.net/loggerhead Source0: http://launchpad.net/loggerhead/1.18/%{version}/+download/loggerhead-%{version}.tar.gz Source1: loggerhead.conf Source2: README.mod_wsgi Source3: bazaar.conf Source4: loggerhead.wsgi BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-paste BuildRequires: python-paste-deploy # loggerhead has grown a test suite but it needs python-testtools #BuildRequires: python-nose #BuildRequires: python-testtools Requires: python-setuptools Requires: python-paste-deploy Requires: python-simpletal Requires: python-simplejson Requires: python-paste Requires: python-paste-deploy Requires: bzr %if 0%{?rhel} && 0%{?rhel} > 5 Requires: python-sqlite2 %endif %description Loggerhead is a WSGI app that provides a web interface to the Bazaar version control system. It can be used to navigate a branch history, view who changed lines in a file, look at patches, and perform searches. %prep %setup -q %build CFLAGS="%{optflags}" %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} # We'll add this in %%doc rm %{buildroot}%{_docdir}/loggerhead/loggerhead.conf.example # We're just going to put this in docs chmod 0644 loggerheadd # FHS Compliance: mkdir -p %{buildroot}/%{_datadir}/loggerhead mv %{buildroot}%{python_sitelib}/loggerhead/static %{buildroot}%{_datadir}/loggerhead ln -s %{_datadir}/loggerhead/static %{buildroot}%{python_sitelib}/loggerhead/static # These are deprecated in favour of serve-branches. No sense shipping unneeded stuff rm %{buildroot}/%{_bindir}/{start,stop}-loggerhead rm %{buildroot}/%{_mandir}/man1/{start,stop}-loggerhead* install -m 0644 -p %{SOURCE1} . install -m 0644 -p %{SOURCE2} . install -D -m 0644 -p %{SOURCE3} %{buildroot}/%{_sysconfdir}/loggerhead/bazaar.conf install -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/loggerhead.wsgi # Link the bazaar configs to apache's home dir mkdir -p %{buildroot}/%{_var}/www ln -s %{_sysconfdir}/loggerhead/ %{buildroot}%{_var}/www/.bazaar install -m 0700 -d %{buildroot}%{_var}/cache/loggerhead %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README NEWS COPYING.txt loggerheadd loggerhead.conf.example %doc loggerhead.conf README.mod_wsgi %{_bindir}/* %{_mandir}/man1/* %dir %{_sysconfdir}/loggerhead %config(noreplace) %{_sysconfdir}/loggerhead/bazaar.conf %{python_sitelib}/bzrlib/plugins/* %{python_sitelib}/loggerhead/ %if 0%{?fedora} || 0%{?rhel} > 5 %{python_sitelib}/*egg-info %endif %{_datadir}/loggerhead %{_var}/www/.bazaar %attr(-,apache,apache) %dir %{_var}/cache/loggerhead %changelog * Thu Mar 24 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.18.1-1 - New upstream release to fix CVE-2011-0728 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Jan 6 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.18-1 - Update to 1.18 * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.17-7 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Apr 15 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.17-6 - Set cache dir when used under mod_wsgi - Note about SELinux boolean that needs flipping in README.mod_wsgi - Require python-sqlite2 on EPEL5 so that caching occurs. * Tue Apr 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.17-5 - Apache will read etc_t just fine with SELinux on. Maybe this error is being generated by python-imaging-tk? * Sat Apr 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.17-4 - Compatibility with bzr-2.1 and bzr-2.2b1 - Properly label the loggerhead config files -- will ask dwalsh about the best way to do this. * Fri Apr 9 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.17-3 - Fix build on RHEL5 * Wed Apr 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.17-2 - Fix comments in review. - Fix a traceback for the download and diff ui pages. * Tue Apr 6 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.17-1 - Initial Fedora build