[python-django-horizon/f17] Update to essex final release Package manage.py (bz 808219) Properly access all needed javascript (b

Cole Robinson crobinso at fedoraproject.org
Mon Apr 9 23:08:54 UTC 2012


commit 9f652bb88423adcabb88e9c4893a149ce2819518
Author: Cole Robinson <crobinso at redhat.com>
Date:   Mon Apr 9 18:40:54 2012 -0400

    Update to essex final release Package manage.py (bz 808219) Properly access all needed javascript (bz 807567)

 .gitignore                                   |    1 +
 openstack-dashboard.conf                     |    2 +-
 python-django-horizon-default-db.patch       |   19 +++++++++++
 python-django-horizon-disable-debug.patch    |   12 +++++++
 python-django-horizon-no-dashboard-app.patch |   11 -------
 python-django-horizon.spec                   |   42 +++++++++++++++++--------
 sources                                      |    2 +-
 7 files changed, 62 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 37d6012..eb7fa05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /horizon-2012.1~e3.tar.gz
 /horizon-2012.1~rc1~20120304.1447.tar.gz
+/horizon-2012.1.tar.gz
diff --git a/openstack-dashboard.conf b/openstack-dashboard.conf
index 0278612..1bfa48f 100644
--- a/openstack-dashboard.conf
+++ b/openstack-dashboard.conf
@@ -3,7 +3,7 @@ WSGIProcessGroup dashboard
 WSGISocketPrefix run/wsgi
 
 WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
-Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static
+Alias /static /usr/share/openstack-dashboard/static
 
 <Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
   Order allow,deny
diff --git a/python-django-horizon-default-db.patch b/python-django-horizon-default-db.patch
new file mode 100644
index 0000000..89a9e84
--- /dev/null
+++ b/python-django-horizon-default-db.patch
@@ -0,0 +1,19 @@
+diff -rup foo/openstack_dashboard/local/local_settings.py.example horizon-2012.1/openstack_dashboard/local/local_settings.py.example
+--- foo/openstack_dashboard/local/local_settings.py.example	2012-04-09 11:33:05.234521644 -0400
++++ horizon-2012.1/openstack_dashboard/local/local_settings.py.example	2012-04-09 11:28:21.849381838 -0400
+@@ -20,6 +20,15 @@ SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rG
+ 
+ LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
+ 
++# FIXME: We need to change this to mysql, instead of sqlite.
++DATABASES = {
++    'default': {
++        'ENGINE': 'django.db.backends.sqlite3',
++        'NAME': '/var/lib/openstack-dashboard/dashboard_openstack.sqlite3',
++        'TEST_NAME': os.path.join(LOCAL_PATH, 'test.sqlite3'),
++    },
++}
++
+ # We recommend you use memcached for development; otherwise after every reload
+ # of the django development server, you will have to login again. To use
+ # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/'
diff --git a/python-django-horizon-disable-debug.patch b/python-django-horizon-disable-debug.patch
new file mode 100644
index 0000000..8b0d725
--- /dev/null
+++ b/python-django-horizon-disable-debug.patch
@@ -0,0 +1,12 @@
+diff -rup horizon-2012.1/openstack_dashboard/local/local_settings.py.example foo/openstack_dashboard/local/local_settings.py.example
+--- horizon-2012.1/openstack_dashboard/local/local_settings.py.example	2012-04-09 17:58:40.379315191 -0400
++++ foo/openstack_dashboard/local/local_settings.py.example	2012-04-09 18:05:17.874910587 -0400
+@@ -2,7 +2,7 @@ import os
+ 
+ from django.utils.translation import ugettext_lazy as _
+ 
+-DEBUG = True
++DEBUG = False
+ TEMPLATE_DEBUG = DEBUG
+ PROD = False
+ USE_SSL = False
diff --git a/python-django-horizon.spec b/python-django-horizon.spec
index 8c830ce..273b636 100644
--- a/python-django-horizon.spec
+++ b/python-django-horizon.spec
@@ -8,10 +8,10 @@
 %global git_revno 1447
 %global snaptag ~%{release_letter}%{milestone}~%{snapdate}.%{git_revno}
 
-
 Name:       python-django-horizon
 Version:    2012.1
-Release:    0.1.%{release_letter}%{milestone}%{?dist}
+Release:    1%{?dist}
+#Release:    0.1.%{?release_letter}%{milestone}%{?dist}
 Summary:    Django application for talking to Openstack
 
 Group:      Development/Libraries
@@ -20,12 +20,13 @@ License:    ASL 2.0 and BSD
 URL:        http://horizon.openstack.org
 BuildArch:  noarch
 
-#Source0:    http://launchpad.net/horizon/%{release_name}/%{release_name}-%{milestone}/+download/horizon-%{version}~%{release_letter}%{milestone}.tar.gz
-Source0:    http://horizon.openstack.org/tarballs/horizon-%{version}%{snaptag}.tar.gz
+Source0:    http://launchpad.net/horizon/%{release_name}/+download/horizon-%{version}.tar.gz
+#Source0:    http://launchpad.net/horizon/%{release_name}/%{release_name}-%{milestone}/+download/horizon-%{version}~%{?release_letter}%{milestone}.tar.gz
+#Source0:    http://horizon.openstack.org/tarballs/horizon-%{version}%{snaptag}.tar.gz
 Source1:    openstack-dashboard.conf
 
-# We don't install dashboard in python sitelib, handle the fallout
-Patch1:     %{name}-no-dashboard-app.patch
+Patch1:     %{name}-disable-debug.patch
+Patch2:     %{name}-default-db.patch
 
 Requires:   Django >= 1.3.0
 Requires:   openstack-glance >= 2012.1
@@ -71,7 +72,7 @@ Group:      Documentation
 
 Requires:   %{name} = %{version}-%{release}
 
-BuildRequires: python-sphinx
+BuildRequires: python-sphinx >= 1.1.3
 
 # Doc building basically means we have to mirror Requires:
 BuildRequires: openstack-glance
@@ -104,25 +105,33 @@ sphinx-build -b html docs/source html
 # Fix hidden-file-or-dir warnings
 rm -fr html/.doctrees html/.buildinfo
 
-install -d -m 755 %{buildroot}%{_sysconfdir}/openstack-dashboard
 install -d -m 755 %{buildroot}%{_datadir}/openstack-dashboard
+install -d -m 755 %{buildroot}%{_sharedstatedir}/openstack-dashboard
+install -d -m 755 %{buildroot}%{_sysconfdir}/openstack-dashboard
 
-cp openstack_dashboard/local/local_settings.py.example \
-   %{buildroot}%{_sysconfdir}/openstack-dashboard/local_settings
-ln -s %{_sysconfdir}/openstack-dashboard/local_settings \
-      %{buildroot}%{python_sitelib}/openstack_dashboard/local/local_settings.py
-
+# Copy everything to /usr/share
 mv %{buildroot}%{python_sitelib}/openstack_dashboard \
    %{buildroot}%{_datadir}/openstack-dashboard
+mv manage.py %{buildroot}%{_datadir}/openstack-dashboard
 rm -rf %{buildroot}%{python_sitelib}/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
+ln -s %{_sysconfdir}/openstack-dashboard/local_settings %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.py
+
+
+%post -n openstack-dashboard
+python %{_datadir}/openstack-dashboard/manage.py syncdb >/dev/null 2>&1 || :
+python %{_datadir}/openstack-dashboard/manage.py collectstatic --noinput >/dev/null 2>&1 || :
+
 %files
 %{python_sitelib}/horizon
 %{python_sitelib}/*.egg-info
 
-
 %files -n openstack-dashboard
 %{_datadir}/openstack-dashboard/
+%{_sharedstatedir}/openstack-dashboard
+%{_sysconfdir}/openstack-dashboard
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/openstack-dashboard.conf
 %config(noreplace) %{_sysconfdir}/openstack-dashboard/local_settings
 
@@ -130,6 +139,11 @@ rm -rf %{buildroot}%{python_sitelib}/openstack_dashboard
 %doc html
 
 %changelog
+* Mon Apr 09 2012 Cole Robinson <crobinso at redhat.com> - 2012.1-1
+- Update to essex final release
+- Package manage.py (bz 808219)
+- Properly access all needed javascript (bz 807567)
+
 * Sat Mar 03 2012 Cole Robinson <crobinso at redhat.com> - 2012.1-0.1.rc1
 - Update to rc1 snapshot
 - Drop no longer needed packages
diff --git a/sources b/sources
index c1bb498..774f118 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-afcfadc5a5e9a5282f44d51e25e6da96  horizon-2012.1~rc1~20120304.1447.tar.gz
+24306c7953fc2c4d1fb36951b61443c9  horizon-2012.1.tar.gz


More information about the scm-commits mailing list