From 1841ba7878bc55c70a19816b4a69e152ff3a8113 Mon Sep 17 00:00:00 2001 From: Ludovic Bellier Date: Sat, 28 Nov 2020 23:53:42 +0100 Subject: [PATCH 1/3] upgrades-installed-check requires pacman-contrib for checkupdates --- archlinux/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD index bfe90e2..feeab33 100644 --- a/archlinux/PKGBUILD +++ b/archlinux/PKGBUILD @@ -61,7 +61,7 @@ package_qubes-vm-core() { gnome-packagekit imagemagick fakeroot notification-daemon dconf zenity qubes-libvchan qubes-db-vm haveged python-gobject python-dbus xdg-utils notification-daemon gawk sed procps-ng librsvg - socat + socat pacman-contrib ) optdepends=(gnome-keyring gnome-settings-daemon python-nautilus gpk-update-viewer qubes-vm-networking qubes-vm-keyring) install=PKGBUILD.install From 7faa707d26078517737facc14b451d5f46dbbd8b Mon Sep 17 00:00:00 2001 From: Ludovic Bellier Date: Sat, 28 Nov 2020 23:54:56 +0100 Subject: [PATCH 2/3] fix archlinux detection of available upgrades note: checkupdates return 2 when no updates are available (source: man page and source code) --- package-managers/upgrades-installed-check | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package-managers/upgrades-installed-check b/package-managers/upgrades-installed-check index 2222633..edd4a20 100755 --- a/package-managers/upgrades-installed-check +++ b/package-managers/upgrades-installed-check @@ -34,7 +34,8 @@ elif [ -e /etc/arch-release ]; then set -o pipefail checkupdates_output="$(checkupdates 2>&1)" exit_code="$?" - echo "$checkupdates_output" | grep -qF -- '->' && echo "false" || echo "true" + [ "$exit_code" -eq 2 ] && echo "true" && exit 0 + echo "false" elif [ -e /etc/gentoo-release ]; then ## Gentoo set -e From bba78d224bf7e3c16f038fce01a86d2e4b117db1 Mon Sep 17 00:00:00 2001 From: Ludovic Bellier Date: Tue, 1 Dec 2020 22:10:11 +0100 Subject: [PATCH 3/3] fix for ArchLinux: notify dom0 about installed updates The launch of the qubes-update-check service failed on ArchLinux, because the qubes-rpc uses the `service` command which isn't available for this OS. --- qubes-rpc/qubes.InstallUpdatesGUI | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qubes-rpc/qubes.InstallUpdatesGUI b/qubes-rpc/qubes.InstallUpdatesGUI index e01bace..952148b 100755 --- a/qubes-rpc/qubes.InstallUpdatesGUI +++ b/qubes-rpc/qubes.InstallUpdatesGUI @@ -20,4 +20,8 @@ fi xterm -title update -e su -s /bin/sh -l -c "$update_cmd; echo Done.; test -f /var/run/qubes/this-is-templatevm && { echo Press Enter to shutdown the template, or Ctrl-C to just close this window; read x && poweroff; } ;" # Notify dom0 about installed updates -su -s /bin/sh -c 'service qubes-update-check start' +if [ -e /etc/arch-release ]; then + su -s /bin/sh -c 'systemctl start qubes-update-check' +else + su -s /bin/sh -c 'service qubes-update-check start' +fi