[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#945592: buster-pu: package openstack-dashboard-apache/3:14.0.2-3



Control: tags -1 + moreinfo
Control: retitle -1 buster-pu: package horizon/3:14.0.2-3

On Wed, 2019-11-27 at 15:57 +0100, Michal Arbet wrote:
> Openstack-dashboard-apache package is used to configure apache2 to
> provide openstack-dashboard (horizon) and also configure openstack-
> dashboard's webroot.
> 
> As upstream moved WEBROOT variable from local_settings.py to
> defaults.py, it has to been overriden in /etc/openstack-
> dashboard/local_settings.d and openstack-dashboard-apache
> has to configure this variable and rebuild static files if needed.
> 
> This is now achieved by openstack-dashboard-apache which is calling
> trigger of openstack-dashboard when needed.

When did that change happen? Has the package been broken since before
the release?

So far as I can tell, the way this change is managed is not policy
compliant. /etc/openstack-dashboard/local_settings.d/* are conffiles
shipped by the package, which are then modified by the postinst script,
overwriting any local administrator changes.

As a side note, this:

+		CURRENT_WEBROOT=$(cat ${OS_WEBROOT_CONF_PATH}  | grep ^WEBROOT | sed -e 's/"*'\''*\ *//g' | awk -F '=' '{print $2}')

is a rather convoluted construction, for what appears to be equivalent
to

CURRENT_WEBROOT=$(sed -re "s/^WEBROOT *= *\"?([^\"]*)\"?$/\1/" ${OS_WEBROOT_CONF_PATH})

(and also inconsistent with the later change, which allows either
spaces or tabs. In fact, given that the intent seems to be just to
check if the current value is equivalent to the proposed one, replacing
that and the subsequent test with

if grep -Eq "^WEBROOT\s*=\s*\"?${WEBROOT}\"?$" ${OS_WEBROOT_CONF_PATH}; then

would seem to suffice.)

Regards,

Adam


Reply to: