]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Do not set /etc/.../local_settings.py as CONFFILES (Closes: #801543).
authorThomas Goirand <thomas@goirand.fr>
Tue, 13 Oct 2015 08:48:24 +0000 (08:48 +0000)
committerThomas Goirand <thomas@goirand.fr>
Tue, 13 Oct 2015 08:48:24 +0000 (08:48 +0000)
Rewritten-From: 83edecc4cd085fefe2274873245b73c2cbf2b80f

trusty/debian/changelog
trusty/debian/openstack-dashboard.install
trusty/debian/openstack-dashboard.postinst
trusty/debian/openstack-dashboard.postrm
trusty/debian/rules

index 9410e8ea9b7793c7c2e1a77fc54cc709f97d9874..6e6e887fc821a4d4b55c05f64fd0a5c86e8d5e25 100644 (file)
@@ -1,3 +1,9 @@
+horizon (2:8.0.0~rc2-2) experimental; urgency=medium
+
+  * Do not set /etc/.../local_settings.py as CONFFILES (Closes: #801543).
+
+ -- Thomas Goirand <zigo@debian.org>  Tue, 13 Oct 2015 08:46:21 +0000
+
 horizon (2:8.0.0~rc2-1) experimental; urgency=medium
 
   * New upstream release.
index b835c9d75022cbb9260e127d6b669e60691bb87b..369bff1c0a516208c784082ab4116b99162ce4d3 100644 (file)
@@ -1,2 +1 @@
-etc/openstack-dashboard
 usr/share/openstack-dashboard
index 3fbd521dc7cd1a6d10b4c29a7f41927d5d608efe..db6f5d12bae4b44609f93e551cf1a30383e81c42 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+
 set -e
 
 if [ "$1" = "configure" ] ; then
@@ -16,7 +17,12 @@ if [ "$1" = "configure" ] ; then
        chown www-data:www-data /var/lib/openstack-dashboard/static/js
        chown www-data:www-data /var/lib/openstack-dashboard/secret-key
 
-    # Compress the JS and CSS with python-compressor and python-lesscpy
+       mkdir -p /etc/openstack-dashboard
+       if ! [ -f /etc/openstack-dashboard/local_settings.py ] ; then
+               cp /usr/share/openstack-dashboard/local_settings.py /etc/openstack-dashboard/local_settings.py
+       fi
+
+       # Compress the JS and CSS with python-compressor and python-lesscpy
        /usr/share/openstack-dashboard/manage.py compress --force
        rm /var/lib/openstack-dashboard/secret-key/.secret_key_store
        chown -R www-data /var/lib/openstack-dashboard/secret-key
index e95a02c79dadff5323a089badc67f76958ff080b..d24be7748036876c270a8bbd5bc6bd1e6aa97416 100644 (file)
@@ -3,6 +3,8 @@
 set -e
 
 if [ "${1}" = "purge" ] ; then
+       rm -f /etc/openstack-dashboard/local_settings.py
+       rmdir --ignore-fail-on-non-empty /etc/openstack-dashboard || true
        rm -rf /var/lib/openstack-dashboard
        rm -rf /var/lib/horizon
        rm -rf /usr/share/openstack-dashboard
index c3d2cb4c80b17b43e66202b97453abf440b5c9fa..decfb46d1ac2862b254245529900822df6a96228 100755 (executable)
@@ -22,16 +22,13 @@ override_dh_auto_install:
        done
 
        install -d -m 755  $(CURDIR)/debian/tmp/usr/share/openstack-dashboard
-       install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard
 
        cp -a $(CURDIR)/openstack_dashboard/ $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/
 
        # 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/os.path.join(LOCAL_PATH,/os.path.join("\/","var","lib","openstack-dashboard","secret-key",/' \
-               $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py
-       echo "COMPRESS_OFFLINE=True" >> $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py
+       cp $(CURDIR)/openstack_dashboard/local/local_settings.py.example                                                $(CURDIR)/debian/openstack-dashboard/usr/share/openstack-dashboard/local_settings.py
+       sed -i -e 's/os.path.join(LOCAL_PATH,/os.path.join("\/","var","lib","openstack-dashboard","secret-key",/'       $(CURDIR)/debian/openstack-dashboard/usr/share/openstack-dashboard/local_settings.py
+       echo "COMPRESS_OFFLINE=True" >>                                                                                 $(CURDIR)/debian/openstack-dashboard/usr/share/openstack-dashboard/local_settings.py
 
        cp $(CURDIR)/manage.py \
                $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/