%global with_compression 1
+
Name: python-django-horizon
-Version: 2014.1
-Release: 0.12.rc1%{?dist}
+Version: 2014.1.1
+Release: 1%{?dist}
Summary: Django application for talking to Openstack
Group: Development/Libraries
# Code in horizon/horizon/utils taken from django which is BSD
License: ASL 2.0 and BSD
URL: http://horizon.openstack.org/
-Source0: https://launchpad.net/horizon/icehouse/icehouse-rc1/+download/horizon-%{version}.rc1.tar.gz
+Source0: https://launchpad.net/horizon/icehouse/%{version}/+download/horizon-%{version}.tar.gz
Source1: openstack-dashboard.conf
Source2: openstack-dashboard-httpd-2.4.conf
# demo config for separate logging
Source4: openstack-dashboard-httpd-logging.conf
+# custom icons
+#Source10: rhfavicon.ico
+#Source11: rh-logo.png
+
#
-# patches_base=2014.1.rc1
+# patches_base=2014.1.1
#
Patch0001: 0001-Don-t-access-the-net-while-building-docs.patch
Patch0002: 0002-disable-debug-move-web-root.patch
Patch0006: 0006-move-SECRET_KEY-secret_key_store-to-tmp.patch
Patch0007: 0007-RCUE-navbar-and-login-screen.patch
Patch0008: 0008-Added-a-hook-for-redhat-openstack-access-plugin.patch
+Patch0009: 0009-fix-flake8-issues.patch
+Patch0010: 0010-remove-runtime-dep-to-python-pbr.patch
+Patch0011: 0011-Add-Change-password-link-to-the-RCUE-theme.patch
+Patch0012: 0012-Re-enable-offline-compression.patch
-#
-# BuildArch needs to be located below patches in the spec file. Don't ask!
-#
-
BuildArch: noarch
# Migrate to Django 15 (python-django)
Requires: pytz
Requires: python-lockfile
Requires: python-pbr
-Requires: python-six >= 1.5.2
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-d2to1
-BuildRequires: python-pbr >= 0.7.0
+BuildRequires: python-pbr >= 0.5.21
BuildRequires: python-lockfile
BuildRequires: python-eventlet
BuildRequires: git
-BuildRequires: python-six >= 1.4.1
# for checks:
%if 0%{?rhel} == 0
-BuildRequires: python-django-nose >= 1.2
+BuildRequires: python-django-nose
BuildRequires: python-coverage
BuildRequires: python-mox
BuildRequires: python-nose-exclude
BuildRequires: python-netaddr
BuildRequires: python-kombu
BuildRequires: python-anyjson
+BuildRequires: pytz
BuildRequires: python-iso8601
Requires: httpd
Requires: mod_wsgi
Requires: python-django-horizon >= %{version}
-Requires: python-django-openstack-auth >= 1.1.4
+Requires: python-django-openstack-auth >= 1.1.3
Requires: python-django-compressor >= 1.3
-Requires: python-django-appconf
-%if %{?with_compression} > 0
-Requires: python-lesscpy
+%if %{with_compression} > 0
+Requires: python-lesscpy
%endif
+Requires: python-django-appconf
Requires: python-glanceclient
Requires: python-keystoneclient >= 1:0.7.0
Requires: python-novaclient >= 1:2.15.0
Requires: python-oslo-config
Requires: python-eventlet
-BuildRequires: python-django-openstack-auth >= 1.1.4
+BuildRequires: python2-devel
+BuildRequires: python-django-openstack-auth >= 1.1.3
BuildRequires: python-django-compressor >= 1.3
BuildRequires: python-django-appconf
BuildRequires: python-lesscpy
BuildRequires: python-oslo-config
-BuildRequires: pytz
-
+BuildRequires: pytz
%description -n openstack-dashboard
Openstack Dashboard is a web user interface for Openstack. The package
provides a reference implementation using the Django Horizon project,
Group: Documentation
Requires: %{name} = %{version}-%{release}
-%if 0%{?rhel}==6
-BuildRequires: python-sphinx10
-%else
BuildRequires: python-sphinx >= 1.1.3
-%endif
# Doc building basically means we have to mirror Requires:
BuildRequires: python-dateutil
BuildRequires: python-glanceclient
-BuildRequires: python-keystoneclient
+BuildRequires: python-keystoneclient >= 1:0.7.0
BuildRequires: python-novaclient >= 1:2.15.0
BuildRequires: python-neutronclient
BuildRequires: python-cinderclient
%prep
%setup -q -n horizon-%{version}
-# Use git to manage patches.
-# http://rwmj.wordpress.com/2011/08/09/nice-rpm-git-patch-management-trick/
+
+# Use git to manage patches.
+# http://rwmj.wordpress.com/2011/08/09/nice-rpm-git-patch-management-trick/
git init
git config user.email "python-django-horizon-owner@fedoraproject.org"
git config user.name "python-django-horizon"
git commit -a -q -m "%{version} baseline"
git am %{patches}
+
# remove unnecessary .po files
find . -name "django*.po" -exec rm -f '{}' \;
# make doc build compatible with python-oslo-sphinx RPM
sed -i 's/oslosphinx/oslo.sphinx/' doc/source/conf.py
+# create images for custom theme
+#mkdir -p openstack_dashboard_theme/static/dashboard/img
+#cp %{SOURCE10} openstack_dashboard_theme/static/dashboard/img
+#cp %{SOURCE11} openstack_dashboard_theme/static/dashboard/img
+
# drop config snippet
cp -p %{SOURCE4} .
-%if 0%{?with_compression} > 0
-# set COMPRESS_OFFLINE=True
-sed -i 's:COMPRESS_OFFLINE = False:COMPRESS_OFFLINE = True:' openstack_dashboard/settings.py
-%else
-# set COMPRESS_OFFLINE=False
-sed -i 's:COMPRESS_OFFLINE = True:COMPRESS_OFFLINE = False:' openstack_dashboard/settings.py
-%endif
-
-
-
%build
%{__python} setup.py build
cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
# dirty hack to make SECRET_KEY work:
sed -i 's:^SECRET_KEY =.*:SECRET_KEY = "badcafe":' openstack_dashboard/local/local_settings.py
-%{__python} manage.py collectstatic --noinput
-# offline compression
-%if 0%{?with_compression} > 0
+%if %{with_compression} > 0
+%{__python} manage.py collectstatic --noinput
%{__python} manage.py compress
cp -a static/dashboard %{_buildir}
+%else
+sed -i 's:COMPRESS_OFFLINE = True:COMPRESS_OFFLINE = False:' openstack_dashboard/settings.py
%endif
-cp -a static/dashboard %{_buildir}
-
# build docs
export PYTHONPATH="$( pwd ):$PYTHONPATH"
-%if 0%{?rhel}==6
-sphinx-1.0-build -b html doc/source html
-%else
sphinx-build -b html doc/source html
-%endif
# undo hack
cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
# drop httpd-conf snippet
-%if 0%{?rhel} <7 && 0%{?fedora} <18
+%if 0%{?rhel} || 0%{?fedora} <18
install -m 0644 -D -p %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/openstack-dashboard.conf
%else
# httpd-2.4 changed the syntax
install -d -m 755 %{buildroot}%{_sharedstatedir}/openstack-dashboard
install -d -m 755 %{buildroot}%{_sysconfdir}/openstack-dashboard
-
# Copy everything to /usr/share
mv %{buildroot}%{python_sitelib}/openstack_dashboard \
%{buildroot}%{_datadir}/openstack-dashboard
rm -rf %{buildroot}%{python_sitelib}/openstack_dashboard
# move customization stuff to /usr/share
-#mv openstack_dashboard/dashboards/theme %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/
-#mv openstack_dashboard/enabled/_99_customization.py %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/enabled
-
+#mv openstack_dashboard_theme %{buildroot}%{_datadir}/openstack-dashboard
# Move config to /etc, symlink it back to /usr/share
mv %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.py.example %{buildroot}%{_sysconfdir}/openstack-dashboard/local_settings
%check
-# don't run tests on rhel
%if 0%{?rhel} == 0
sed -i 's:^SECRET_KEY =.*:SECRET_KEY = "badcafe":' openstack_dashboard/local/local_settings.py
-
-# until django-1.6 support for tests is enabled, disable tests
./run_tests.sh -N -P
%endif
%{_datadir}/openstack-dashboard/static
%{_datadir}/openstack-dashboard/openstack_dashboard/*.py*
%{_datadir}/openstack-dashboard/openstack_dashboard/api
-%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/admin
-%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/project
-%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/router
-%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/settings
-%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/__init__.py*
+%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards
%{_datadir}/openstack-dashboard/openstack_dashboard/enabled
-#%exclude %{_datadir}/openstack-dashboard/openstack_dashboard/enabled/_99_customization.py
%{_datadir}/openstack-dashboard/openstack_dashboard/local
%{_datadir}/openstack-dashboard/openstack_dashboard/openstack
%{_datadir}/openstack-dashboard/openstack_dashboard/static
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??_??
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??/LC_MESSAGES
-%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??_??/LC_MESSAGES
%dir %attr(0750, root, apache) %{_sysconfdir}/openstack-dashboard
%dir %attr(0750, apache, apache) %{_sharedstatedir}/openstack-dashboard
%dir %attr(0750, apache, apache) %{_var}/log/horizon
%config(noreplace) %{_sysconfdir}/httpd/conf.d/openstack-dashboard.conf
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/local_settings
-%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/cinder_policy.json
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/keystone_policy.json
-%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/nova_policy.json
+%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/cinder_policy.json
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/glance_policy.json
+%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/nova_policy.json
%files doc
%doc html
%files -n openstack-dashboard-theme
-
+#%{_datadir}/openstack-dashboard/openstack_dashboard_theme
%changelog
-* Fri Apr 04 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.12.rc1
-- rebase to horizon-2014.1.rc1
-- remove runtime requirement to mox (rhbz#1080326)
+* Tue Jun 10 2014 Matthias Runge <mrunge@redhat.com> - 2014.1.1-1
+- rebase to 2014.1.1
-* Wed Apr 02 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.11.b3
-- No images/javascript in horizon dashboard (rhbz#1081612)
-- skip selenium tests during build
-
-* Tue Apr 01 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.10.b3
-- Failed to create a tenant (rhbz#1082646)
-- add Red Hat Access to the upper right corner based on RCUE (rhbz#1069316)
-- lower keystoneclient requirement until rc-1 build
-
-* Fri Mar 28 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.9.b3
-- re-enable tests
-- increase requirements versions
-
-* Thu Mar 27 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.8.b3
-- disable tests until lp bug 1298332 is resolved
-
-* Thu Mar 27 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.7.b3
-- cleanup and re-enable tests
-
-* Wed Mar 26 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.6.b3
-- move theme to dashboards/theme
-
-* Tue Mar 25 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.5.b3
-- add dependency on python-mox
-
-* Thu Mar 13 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.4.b3
-- remove hard selenium requirement for tests
-
-* Fri Mar 07 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.3.b3
-- rebase to 2014.1.b3
-
-* Sun Feb 02 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.2b2
+* Tue Jan 28 2014 Matthias Runge <mrunge@redhat.com> - 2014.1-0.2b2
- rebase to 2014.1.b2
-- make compression conditional
-* Fri Dec 06 2013 Matthias Runge <mrunge@redhat.com> - 2014.1-0.1b1
+* Fri Dec 13 2013 Matthias Runge <mrunge@redhat.com> - 2014.1-0.1b1
- rebase to 2014.1.b1
+- make compression conditional
* Mon Dec 02 2013 Matthias Runge <mrunge@redhat.com> - 2013.2-4
- fixes CVE-2013-6406 (rhbz#1035913)