QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
536 stars 48 forks source link

Dom0 updates GUI fixes #824

Closed marmarek closed 9 years ago

marmarek commented 9 years ago

Reported by joanna on 17 Apr 2014 16:45 UTC Updating Dom0 via GUI doesn't seem to work. I just (fresh rc1 after upgrade) got an info about udpdates pending for Dom0 (strange notification that differs from all other tray notifcations we use -- this one was in a top right corner of the screen, not next to tray), clicked a button to install them, then got a progress window from friewallvm that downloads are being downloaded, went to make myself a cofee, but when returned there was no more updates downloading window, nor any other trace of the updates :) Double checked yum history and it showed nothing was installed (nor tried to be installed) in Dom0.

I shall add that installing updates in Dom0 via cmd line works just fine.

And can we please use the standard tray notification like for all other thing? It's fine if there will be no button called "Do default action" and the user would need to click on the button in Qubes Manager.

Migrated-From: https://wiki.qubes-os.org/ticket/824

marmarek commented 9 years ago

Modified by marmarek on 6 May 2014 02:21 UTC

marmarek commented 9 years ago

Comment by marmarek on 12 May 2014 19:32 UTC http://git.qubes-os.org/?p=marmarek/core-admin-linux.git;a=commit;h=c74ac8758272543d8e084123312f829904815bf5

marmarek commented 9 years ago

Comment by joanna on 4 Jun 2014 10:01 UTC Still non-standard tray notification, can we please unify the UX -- see attach.

marmarek commented 9 years ago

Modified by joanna on 4 Jun 2014 10:02 UTC

marmarek commented 9 years ago

Comment by marmarek on 4 Jun 2014 10:48 UTC I don't see what non-standard in this notification is. Perhaps you mean lack of icon? What icon do you want to put there?

marmarek commented 9 years ago

Comment by joanna on 8 Jun 2014 09:39 UTC This is not part of the tray notifications, it's some other form of notifications, at least on KDE.

Plus, and more importantly, the Dom0 updates still don't work when invoked by GUI :/ I can see the "Downloading updates dialog", but after it completes nothing happens.

marmarek commented 9 years ago

Comment by marmarek on 8 Jun 2014 10:39 UTC Ah, of course, you're using KDE... This notification looks like Xfce one. Background:

  1. KDE handles notifications by applet added to panel. That applet when exists registers itself in session D-Bus to handle notification requests. But if that applet isn't on panel, notifications are not handled at all (at least by KDE).
  2. Xfce (xfce4-notifyd) registers D-Bus service, which is started on demand when any application want to send notify (and no other notification daemon is running).

I suspect, process started from cron (this is where our dom0 update check is running) doesn't have access to KDE session D-Bus so cannot send notification to KDE and triggers new notification daemon (Xfce one in this case). Ok, so we need to check for updates in user session context (or at least connect to the same D-Bus daemon...).

marmarek commented 9 years ago

Comment by marmarek on 8 Jun 2014 15:53 UTC Regarding dom0 update not showing anything: gpk-update-viewer was not installed. But in the meantime !PackageKit even more broken than before and no longer can be configured to ignore network state. If it detects no network connection, it will simply abort some of commands (without a try), regardless of fact that all repositories are local (!file:///...). They call it "a feature". BTW the only commits touching configuration file are removing configuration options, not added a single one. It looks like "we know better what you want" approach.

This makes gpk-update-viewer totally unusable - when it is started, it will welcome you with message "No updates available; No network connection was detected.", while listing available updates under that window. When you click "OK" on that message (actually two of them), you can click "install updates", but it will fail with "Operation was cancelled". Also when gpk-update-viewer was started once, one of its two processes (for what?) isn't terminated when you close the window, blocking further gpk-update-viewer calls.

KDE !PackageKit frontend (apper) is slightly better - installing updates works just fine, only button "Check for new Updates" throws an error. But it pulls a lot of dependencies (almost whole KDE) on Xfce-only systems.

I'm evaluating another frontend - yumex, which do not use !PackageKit at all. Looks to not have that stupid problem (there is a message about lack of !NetworkManager, but do not block any action because of that). The only inconvenience is that you need to select which update to install - so two clicks ("select all" + "apply"), instead of one. Can you install it and say what you think?

marmarek commented 9 years ago

Comment by joanna on 9 Jun 2014 10:16 UTC Doesn't sound much like a problem to me. But...:

[~](joanna@dom0)$ yumex 
12:15:11 : INFO - Using config file : /home/joanna/.config/yumex/yumex.conf
12:15:11 : INFO - Using config file : /home/joanna/.config/yumex/yumex.conf
(<class 'dbus.exceptions.DBusException'>, DBusException('The name org.freedesktop.NetworkManager was not provided by any .service files',), <traceback object at 0x2cba0e0>)
(<class 'dbus.exceptions.DBusException'>, DBusException('The name org.freedesktop.NetworkManager was not provided by any .service files',), <traceback object at 0x2cbb638>)
12:15:11 : INFO - Can't detect the network connection state
(<class 'dbus.exceptions.DBusException'>, DBusException('The name org.freedesktop.NetworkManager was not provided by any .service files',), <traceback object at 0x2cbc950>)
12:15:11 : INFO - Starting yum child process
12:15:12 : INFO - YUM: Yum Version : 3.4.3
12:15:12 : INFO - YUM: Traceback (most recent call last):
12:15:12 : INFO - YUM:   File "/usr/share/yumex/yum_childtask.py", line 63, in <module>
12:15:12 : INFO - YUM:     my = YumServer(debuglevel, plugins, offline, repos, yum_conf)
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yumexbackend/yum_server.py", line 207, in __init__
12:15:12 : INFO - YUM:     self.yumbase # init the YumBase attribute
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yumexbackend/yum_server.py", line 230, in yumbase
12:15:12 : INFO - YUM:     yumbase.setCacheDir()
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 6651, in setCacheDir
12:15:12 : INFO - YUM:     cachedir += varReplace(suffix, self.conf.yumvar)
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1075, in <lambda>
12:15:12 : INFO - YUM:     conf = property(fget=lambda self: self._getConfig(),
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 344, in _getConfig
12:15:12 : INFO - YUM:     startupconf = config.readStartupConfig(fn, root, releasever)
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yum/config.py", line 1060, in readStartupConfig
12:15:12 : INFO - YUM:     startupconf.uuid = get_uuid(uuidfile)
12:15:12 : INFO - YUM:   File "/usr/lib/python2.7/site-packages/yum/misc.py", line 1086, in get_uuid
12:15:12 : INFO - YUM:     return open(savepath, 'r').read()
12:15:12 : INFO - YUM: IOError: [13](Errno) Permission denied: '///var/lib/yum/uuid'
12:15:12 : ERROR - exitcode from backend : 1
12:15:12 : ERROR - ERROR: Backend Launcher ended unexpected
12:15:19 : INFO - yum backend process is ended
12:15:19 : INFO - yum backend process is ended
marmarek commented 9 years ago

Comment by marmarek on 9 Jun 2014 22:14 UTC Strange, /var/lib/yum/uuid has 644 on my system. Also rpm reports that as original file permissions (check rpm -V yum).

marmarek commented 9 years ago

Comment by marmarek on 9 Jun 2014 23:17 UTC Regarding tray notification - I gave up with getting D-Bus address in that script, moved tray notification to qubes-manager (which already handles notifications about block devices and clipboard).

marmarek commented 9 years ago

Comment by marmarek on 27 Jun 2014 00:02 UTC Perhaps we can use 'apper' on KDE, and yumex on others DE (Xfce only for now)? This however isn't easy to implement as an update - as rpm do not have conditional dependencies, it will require to modify comps file (qubes-release package and a copy of it in yum repo).

marmarek commented 9 years ago

Comment by joanna on 30 Jun 2014 11:36 UTC Shall we "fix" it by disabling the Dom0 update button in the manager?

marmarek commented 9 years ago

Comment by marmarek on 30 Jun 2014 12:49 UTC I've already commited a fix based on what I said. It uses apper/yumex/gpk-update-viewer (whichever is present) or ask for install one of those. http://git.qubes-os.org/?p=marmarek/core-admin-linux.git;a=commit;h=8627ef9a803c03341157737d976f39aa20a3f9f3

I've also added it to comps file for new installs: http://git.qubes-os.org/?p=marmarek/installer-qubes-os.git;a=commit;h=71e0f8a9bbf68feb8eb4306d3f4442a9031dfc03

Surprisingly it also works during updates, but not sure what exactly steps was necessary for it (most likely still need to update comps file in yum repo).