From: Thomas Goirand Date: Tue, 13 Oct 2015 08:48:24 +0000 (+0000) Subject: Do not set /etc/.../local_settings.py as CONFFILES (Closes: #801543). X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=83bcc573b42d20bbc8f56ab76ae5ca2d6879a654;p=openstack-build%2Fhorizon-build.git Do not set /etc/.../local_settings.py as CONFFILES (Closes: #801543). Rewritten-From: 83edecc4cd085fefe2274873245b73c2cbf2b80f --- diff --git a/trusty/debian/changelog b/trusty/debian/changelog index 9410e8e..6e6e887 100644 --- a/trusty/debian/changelog +++ b/trusty/debian/changelog @@ -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 Tue, 13 Oct 2015 08:46:21 +0000 + horizon (2:8.0.0~rc2-1) experimental; urgency=medium * New upstream release. diff --git a/trusty/debian/openstack-dashboard.install b/trusty/debian/openstack-dashboard.install index b835c9d..369bff1 100644 --- a/trusty/debian/openstack-dashboard.install +++ b/trusty/debian/openstack-dashboard.install @@ -1,2 +1 @@ -etc/openstack-dashboard usr/share/openstack-dashboard diff --git a/trusty/debian/openstack-dashboard.postinst b/trusty/debian/openstack-dashboard.postinst index 3fbd521..db6f5d1 100644 --- a/trusty/debian/openstack-dashboard.postinst +++ b/trusty/debian/openstack-dashboard.postinst @@ -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 diff --git a/trusty/debian/openstack-dashboard.postrm b/trusty/debian/openstack-dashboard.postrm index e95a02c..d24be77 100644 --- a/trusty/debian/openstack-dashboard.postrm +++ b/trusty/debian/openstack-dashboard.postrm @@ -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 diff --git a/trusty/debian/rules b/trusty/debian/rules index c3d2cb4..decfb46 100755 --- a/trusty/debian/rules +++ b/trusty/debian/rules @@ -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/