Hi,

I did a quick check for what's in Experimental, and it doesn't feel like
it's a lot of work to get things done.

I've attached the debdiff for a typical Horizon plugin, here Designate,
in the Experimental version (but the fix will be similar in Unstable),
as well as the debdiff for Horizon.

I tested upgrading from previous version. What happens is that the old
plugin files are staying in /etc/openstack-dashboard/enable, but they
can safely be ignored. The important bit is that it upgrades smoothly,
and the symlink in
/usr/lib/python3/dist-packages/openstack_dashboard/local/enable becomes
a folder, as expected, with the plugin files in there, that will be
removed when the plugin is removed (so really, what one would expect...).

As I tested it with success, and that the diff isn't big and simple to
understand, it is my point of view that it's worth trying to get these
fixes in Bullseye.

Here's the list of affected plugins, packaged with this mistake, in Debian:
- cloudkitty-dashboard
- designate-dashboard
- freezer-web-ui
- heat-dashboard
- ironic-ui
- magnum-ui
- manila-ui
- masakari-dashboard
- mistral-dashboard
- murano-dashboard
- neutron-vpnaas-dashboard
- octavia-dashboard
- sahara-dashboard
- senlin-dashboard
- trove-dashboard
- vitrage-dashboard
- watcher-dashboard
- zaqar-ui

Please let me know if you think I should upload such fixes before Bullseye.

Cheers,

Thomas Goirand (zigo)
diff -Nru designate-dashboard-12.0.0/debian/changelog 
designate-dashboard-12.0.0/debian/changelog
--- designate-dashboard-12.0.0/debian/changelog 2021-04-14 22:46:40.000000000 
+0200
+++ designate-dashboard-12.0.0/debian/changelog 2021-05-07 12:21:22.000000000 
+0200
@@ -1,3 +1,11 @@
+designate-dashboard (12.0.0-2) experimental; urgency=medium
+
+  * Package the enable folder in
+    /usr/lib/python3/dist-packages/openstack_dashboard/local/enabled.
+  * Add Breaks: python3-django-horizon (<< 3:19.2.0-2~).
+
+ -- Thomas Goirand <[email protected]>  Fri, 07 May 2021 12:21:22 +0200
+
 designate-dashboard (12.0.0-1) experimental; urgency=medium
 
   * New upstream release.
diff -Nru designate-dashboard-12.0.0/debian/control 
designate-dashboard-12.0.0/debian/control
--- designate-dashboard-12.0.0/debian/control   2021-04-14 22:46:40.000000000 
+0200
+++ designate-dashboard-12.0.0/debian/control   2021-05-07 12:21:22.000000000 
+0200
@@ -45,6 +45,8 @@
  python3-pkg-resources,
  ${misc:Depends},
  ${python3:Depends},
+Breaks:
+ python3-django-horizon (<< 3:19.2.0-2~),
 Conflicts:
  python-designate-dashboard,
 Description: OpenStack DNS as a Service - dashboard plugin
diff -Nru designate-dashboard-12.0.0/debian/rules 
designate-dashboard-12.0.0/debian/rules
--- designate-dashboard-12.0.0/debian/rules     2021-04-14 22:46:40.000000000 
+0200
+++ designate-dashboard-12.0.0/debian/rules     2021-05-07 12:21:22.000000000 
+0200
@@ -27,7 +27,8 @@
        install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard/enabled
 
        # Copy config enabled to openstack-dashboard enabled location
-       cp 
$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/designatedashboard/enabled/_[0-9]*.py
 $(CURDIR)/debian/tmp/etc/openstack-dashboard/enabled/
+       mkdir -p 
$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
+       cp 
$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/designatedashboard/enabled/_[0-9]*.py
 
$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
 
        dh_install
        dh_missing --fail-missing
diff -Nru horizon-19.2.0/debian/changelog horizon-19.2.0/debian/changelog
--- horizon-19.2.0/debian/changelog     2021-04-14 22:35:01.000000000 +0200
+++ horizon-19.2.0/debian/changelog     2021-05-07 11:09:15.000000000 +0200
@@ -1,3 +1,17 @@
+horizon (3:19.2.0-2) experimental; urgency=medium
+
+  * Do not use an enable folder in /etc, as this marks all files from plugins
+    as CONFFILE, meaning they aren't removed when plugins are removed, which
+    makes Horizon crash (Closes: #987904):
+    - In python3-django-horizon.preinst, transform the symlink
+      /usr/lib/python3/dist-packages/openstack_dashboard/local/enabled into a
+      folder.
+    - Remove the symlink creation from the openstack-dashboard.postinst.
+    - Add versioned Breaks: on all the Horizon plugins, as they now must push
+      the files into that folder instead of /etc.
+
+ -- Thomas Goirand <[email protected]>  Fri, 07 May 2021 11:09:15 +0200
+
 horizon (3:19.2.0-1) experimental; urgency=medium
 
   * New upstream release.
diff -Nru horizon-19.2.0/debian/control horizon-19.2.0/debian/control
--- horizon-19.2.0/debian/control       2021-04-14 22:35:01.000000000 +0200
+++ horizon-19.2.0/debian/control       2021-05-07 11:09:15.000000000 +0200
@@ -127,26 +127,22 @@
  memcached,
  openstack-dashboard-apache,
 Breaks:
- python-app-catalog-ui,
- python-designate-dashboard,
- python-ironic-ui,
- python-murano-dashboard,
- python-zaqar-ui,
- python3-cloudkitty-dashboard (<< 8.0.0-3~),
- python3-designate-dashboard (<< 7.0.0-2~),
- python3-heat-dashboard (<< 1.4.0-2~),
- python3-ironic-ui (<< 3.3.0-4~),
- python3-magnum-ui (<< 5.0.1-2~),
- python3-manila-ui (<< 2.16.0-2~),
- python3-mistral-dashboard (<< 7.0.1-2~),
- python3-murano-dashboard (<< 1:6.0.0-2~),
- python3-neutron-fwaas-dashboard (<< 1.5.0-3~),
- python3-neutron-vpnaas-dashboard (<< 1.4.0-2~),
- python3-octavia-dashboard (<< 2.0.0-3~),
- python3-sahara-dashboard (<< 9.0.1-1~),
- python3-senlin-dashboard (<< 0.9.0-3~),
- python3-trove-dashboard (<< 11.0.0-2~),
- python3-zaqar-ui (<< 5.0.0-2~),
+ python3-cloudkitty-dashboard (<< 12.0.0-3~),
+ python3-designate-dashboard (<< 12.0.0-2~),
+ python3-freezer-web-ui (<< 10.0.0-2~),
+ python3-heat-dashboard (<< 5.0.0-2~),
+ python3-ironic-ui (<< 4.3.0-2~),
+ python3-magnum-ui (<< 8.0.0-2~),
+ python3-manila-ui (<< 5.0.0-1~),
+ python3-masakari-dashboard (<< 4.0.0-2~),
+ python3-neutron-vpnaas-dashboard (<< 4.0.0-2~),
+ python3-octavia-dashboard (<< 7.0.0-2~),
+ python3-sahara-dashboard (<< 14.0.0-1~),
+ python3-senlin-dashboard (<< 3.0.0-1~),
+ python3-trove-dashboard (<< 16.0.0-2~),
+ python3-vitrage-dashboard (<< 3.3.0-2~),
+ python3-watcher-dashboard (<< 5.0.0-2~),
+ python3-zaqar-ui (<< 10.0.0-2~),
 Description: web application to control an OpenStack cloud
  The OpenStack Dashboard is a web application to control an OpenStack
  cloud. It connects to OpenStack services such as Nova, Swift, or Keystone
diff -Nru horizon-19.2.0/debian/openstack-dashboard.postinst 
horizon-19.2.0/debian/openstack-dashboard.postinst
--- horizon-19.2.0/debian/openstack-dashboard.postinst  2021-04-14 
22:35:01.000000000 +0200
+++ horizon-19.2.0/debian/openstack-dashboard.postinst  2021-05-07 
11:09:15.000000000 +0200
@@ -116,10 +116,6 @@
                ln -sf /etc/openstack-dashboard/policy 
/usr/lib/python3/dist-packages/openstack_dashboard/conf
        fi
 
-       if [ ! -L 
/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled ]; then
-               ln -sf /etc/openstack-dashboard/enabled 
/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
-       fi
-
        # Some dashboard plugins are not deleting their files under
        # /usr/share/openstack-dashboard/openstack_dashboard/{local,enabled}
        #
diff -Nru horizon-19.2.0/debian/python3-django-horizon.preinst 
horizon-19.2.0/debian/python3-django-horizon.preinst
--- horizon-19.2.0/debian/python3-django-horizon.preinst        1970-01-01 
01:00:00.000000000 +0100
+++ horizon-19.2.0/debian/python3-django-horizon.preinst        2021-05-07 
11:09:15.000000000 +0200
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "${1}" = "install" ] || [ "${1}" = "upgrade" ] ; then
+       if [ -L 
/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled ]; then
+               rm 
/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
+               mkdir -p 
/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
+       fi
+fi
+
+#DEBHELPER#

Reply via email to