From 3ddd68728689158ab809c5e36ef0aecb193fce2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 13 Feb 2018 17:05:42 +0100 Subject: [PATCH] Call qubes.PostInstall service to notify dom0 about all apps/features Update dom0 about all applications installed, not only desktop files for them. Update also supported features and other things advertised initially at template installation. Fixes QubesOS/qubes-issues#3579 --- archlinux/PKGBUILD.qubes-update-desktop-icons.hook | 4 ++-- debian/qubes-core-agent.postinst | 8 ++++---- misc/dnf-qubes-hooks.py | 5 ++--- post-install.d/README | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/archlinux/PKGBUILD.qubes-update-desktop-icons.hook b/archlinux/PKGBUILD.qubes-update-desktop-icons.hook index 0501566..c5fc945 100644 --- a/archlinux/PKGBUILD.qubes-update-desktop-icons.hook +++ b/archlinux/PKGBUILD.qubes-update-desktop-icons.hook @@ -6,6 +6,6 @@ Operation = Remove Target = usr/share/applications/*.desktop [Action] -Description = Updating the Qubes desktop file App Icons... +Description = Updating the Qubes desktop file App Icons and features... When = PostTransaction -Exec = /usr/lib/qubes/qubes-trigger-sync-appmenus.sh +Exec = /etc/qubes-rpc/qubes.PostInstall diff --git a/debian/qubes-core-agent.postinst b/debian/qubes-core-agent.postinst index 014535e..f06b9ba 100755 --- a/debian/qubes-core-agent.postinst +++ b/debian/qubes-core-agent.postinst @@ -181,8 +181,8 @@ case "${1}" in dconf update || true - # Update Qubes App Menus - /usr/lib/qubes/qubes-trigger-sync-appmenus.sh || true + # tell dom0 about installed updates (applications, features etc) + /etc/qubes-rpc/qubes.PostInstall || true ;; abort-upgrade|abort-remove|abort-deconfigure) @@ -194,8 +194,8 @@ case "${1}" in case "${trigger}" in /usr/share/applications) - debug "Updating Qubes App Menus..." - /usr/lib/qubes/qubes-trigger-sync-appmenus.sh || true + debug "Updating Qubes App Menus and advertising features..." + /etc/qubes-rpc/qubes.PostInstall || true ;; # Install overridden serial.conf init script diff --git a/misc/dnf-qubes-hooks.py b/misc/dnf-qubes-hooks.py index e9e8664..f9a8881 100644 --- a/misc/dnf-qubes-hooks.py +++ b/misc/dnf-qubes-hooks.py @@ -61,6 +61,5 @@ class QubesHooks(dnf.Plugin): str(len(updates)) ]) - if config.getboolean('main', 'sync-appmenus'): - self.log.info("Sending application list and icons to dom0") - subprocess.call(['/usr/lib/qubes/qubes-trigger-sync-appmenus.sh']) + self.log.info("Notifying dom0 about installed applications") + subprocess.call(['/etc/qubes-rpc/qubes.PostInstall']) diff --git a/post-install.d/README b/post-install.d/README index 4ceadc3..35d73e3 100644 --- a/post-install.d/README +++ b/post-install.d/README @@ -1,3 +1,3 @@ All executable files with `.sh` suffix in this directory will be executed as -root just after template installation. Template VM may not have access to the -network at this time yet. +root just after template installation or update. Template VM may +not have access to the network at this time yet.