Github Issue #4581 - Visually indicate unsupported StandaloneVMs (incl. TemplateVMs) in Qubes Manager

Github Issue #4581 - Visually indicate unsupported StandaloneVMs (incl. TemplateVMs) in Qubes Manager

Opened by @adw on Dec 7, 2018:

Users shouldn’t have to rely on seeing an announcement from me in order to know that they have to update something. The more of this external communication we can integrate into Qubes in a secure way, the more robust and self-sufficient the system will be.

The good old Qubes Manager is a relic from the past (from Qubes r3.2 days?). This nostalgic tool is still very useful and irreplaceable. We could give it some love. Unlike the new modern GUI tools which are written in PyGTK, Qubes Manager is written in PyQt 5.0

No worries. This small patch and a tombstone icon:

patch
diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py
index 608ccad..c4a6d17 100644
--- a/qubesmanager/qube_manager.py
+++ b/qubesmanager/qube_manager.py
@@ -102,6 +102,7 @@ class StateIconDelegate(QStyledItemDelegate):
                 "update" : QIcon(":/update-recommended.png"),
                 "outdated" : QIcon(":/outdated.png"),
                 "to-be-outdated" : QIcon(":/to-be-outdated.png"),
+                "eol": QIcon.fromTheme('qube-rip')
                 }
         self.outdatedTooltips = {
                 "update" : self.tr("Updates pending!"),
@@ -111,6 +112,9 @@ class StateIconDelegate(QStyledItemDelegate):
                 "to-be-outdated" : self.tr(
                     "The Template must be stopped before changes from its "
                     "current session can be picked up by this qube."),
+                "eol": self.tr(
+                    "The Template is End-of-Life. Please replace with an updated "
+                    "version or do an in place upgrade.")
                 }
 
     def sizeHint(self, option, index):
@@ -239,10 +243,16 @@ class VmInfo():
                     except exc.QubesDaemonAccessError:
                         pass
 
-            if self.vm.klass in {'TemplateVM', 'StandaloneVM'} and \
-                    manager_utils.get_feature(
+            if self.vm.klass in {'TemplateVM', 'StandaloneVM'}:
+                if manager_utils.get_feature(
                         self.vm, 'updates-available', False):
-                self.state['outdated'] = 'update'
+                    self.state['outdated'] = 'update'
+                elif manager_utils.get_feature(
+                        self.vm, 'os-eol', None):
+                    d = [int(x) for x in manager_utils.get_feature(self.vm, 'os-eol', '0-0-0').split('-')]
+                    eol = datetime(d[0], d[1], d[2])
+                    if datetime.now() > eol:
+                        self.state['outdated'] = 'eol'
         except exc.QubesDaemonAccessError:
             pass

And we will get this:

It should be noted that I manually added os-eol date feature for fedora-37-minimal and debian-11-minimal templates. However, the newer templates which are installed via Qubes Template Manager will carry their os-eol automatically.

So is this patch worth it? Or too little too late?

2 Likes

OK. The now closed issue #7818 should had been linked to this issue. The fix by Marmarta shows a popup like this:

Maybe the idea of showing a tombstone for EOL templates in Qube Manager is too much depressing and aggressive. In that case, something like this might be better:
image

This is one of the cases that the issue is more a UI/UX matter than a programming issue.

1 Like