]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Now creates /var/lib/openstack-dashboard/secret-key in the postinst, and
authorThomas Goirand <thomas@goirand.fr>
Tue, 15 Oct 2013 05:38:13 +0000 (13:38 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 15 Oct 2013 05:38:13 +0000 (13:38 +0800)
 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

xenial/debian/changelog
xenial/debian/openstack-dashboard.postinst
xenial/debian/rules

index 8ae4cb881a8c177e69eff48c0cedb54191f2814c..12f67c6ee1b9999287997a9e0d5af374a51f0323 100644 (file)
@@ -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).
index 7912cf3a8a1e40d0a507213be0716bd5053fb5ac..8966866af2a277681da1ccf447476bf9221c6c44 100644 (file)
@@ -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#
index 0d068c3b00d584999bf47041f49bbc1c7409ee61..9e2a1c8aa3b1be4e1aa3cab0fe8bcb25094dd19f 100755 (executable)
@@ -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 \