From: Thomas Goirand Date: Tue, 15 Oct 2013 05:38:13 +0000 (+0800) Subject: Now creates /var/lib/openstack-dashboard/secret-key in the postinst, and X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6baa1a8b848165c792c0c422d13cf7eeef13b7bc;p=openstack-build%2Fhorizon-build.git Now creates /var/lib/openstack-dashboard/secret-key in the postinst, and sets this path as default in /etc/openstack-dashbaord/local_settings.py, instead of the path in /usr/share (Closes: #726373). Change-Id: I3bf3de5ba6710de7751174321b9e6702cc31ed8d Rewritten-From: 6fb60f8afa0bfe580be1c7793df21f6184013cf3 --- diff --git a/xenial/debian/changelog b/xenial/debian/changelog index 8ae4cb8..12f67c6 100644 --- a/xenial/debian/changelog +++ b/xenial/debian/changelog @@ -1,5 +1,8 @@ -horizon (2013.2~rc1-2) UNRELEASED; urgency=low +horizon (2013.2~rc1-2) experimental; urgency=low + * Now creates /var/lib/openstack-dashboard/secret-key in the postinst, and + sets this path as default in /etc/openstack-dashbaord/local_settings.py, + instead of the path in /usr/share (Closes: #726373). * Debconf translations updates: - Czech, thanks to Michal Šimůnek (Closes: #726124). - Danish, thanks to Joe Dalton (Closes: #725988). diff --git a/xenial/debian/openstack-dashboard.postinst b/xenial/debian/openstack-dashboard.postinst index 7912cf3..8966866 100644 --- a/xenial/debian/openstack-dashboard.postinst +++ b/xenial/debian/openstack-dashboard.postinst @@ -8,11 +8,13 @@ if [ "$1" = "configure" ] ; then --disabled-password \ --group horizon - mkdir -p /var/lib/openstack-dashboard/static/js - mkdir -p /var/lib/openstack-dashboard/static/css - chown www-data:www-data /var/lib/openstack-dashboard/static - chown www-data:www-data /var/lib/openstack-dashboard/static/css - chown www-data:www-data /var/lib/openstack-dashboard/static/js + mkdir -p /var/lib/openstack-dashboard/static/js + mkdir -p /var/lib/openstack-dashboard/static/css + mkdir -p /var/lib/openstack-dashboard/secret-key + chown www-data:www-data /var/lib/openstack-dashboard/static + chown www-data:www-data /var/lib/openstack-dashboard/static/css + chown www-data:www-data /var/lib/openstack-dashboard/static/js + chown www-data:www-data /var/lib/openstack-dashboard/secret-key fi #DEBHELPER# diff --git a/xenial/debian/rules b/xenial/debian/rules index 0d068c3..9e2a1c8 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -24,9 +24,7 @@ override_dh_auto_install: # Sets memcached by default in local_settings.py cp $(CURDIR)/openstack_dashboard/local/local_settings.py.example \ $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py - sed -i -e 's|^[ \t#]*CACHE_BACKEND[ \t#]*=.*|CACHE_BACKEND = "memcached://127.0.0.1:11211/"|' \ - $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py - sed -i -e 's|^[ \t#]*COMPRESS_OFFLINE[ \t#]*=.*|COMPRESS_OFFLINE = False|' \ + sed -i -e 's/SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH,/SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join("\/","var","lib","openstack-dashboard","secret-key",/' \ $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py cp $(CURDIR)/manage.py \