From 13c9149b6cd6f10a31ee7489a9b5ab4fa6b1e8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Nov 2015 05:28:47 +0100 Subject: [PATCH] Use improved update-notify script also in Fedora Among other things this also fixes build failure - those scripts were installed but not listed in spec file. Actual check doesn't perform 'apt-get update', so do that when running "standalone" (not as a hook from 'apt-get'). QubesOS/qubes-issues#1066 --- rpm_spec/core-vm.spec | 2 ++ vm-systemd/qubes-update-check.service | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 1d664c3..277ede8 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -377,6 +377,8 @@ rm -f %{name}-%{version} /usr/lib/qubes/close-window /usr/lib/qubes/xdg-icon /usr/lib/qubes/update-proxy-configs +/usr/lib/qubes/upgrades-installed-check +/usr/lib/qubes/upgrades-status-notify /usr/lib/yum-plugins/yum-qubes-hooks.py* /usr/lib/python2.7/site-packages/dnf-plugins/qubes-hooks.py* /usr/lib/dracut/dracut.conf.d/30-qubes.conf diff --git a/vm-systemd/qubes-update-check.service b/vm-systemd/qubes-update-check.service index 2893750..c3fbe21 100644 --- a/vm-systemd/qubes-update-check.service +++ b/vm-systemd/qubes-update-check.service @@ -5,4 +5,5 @@ After=qubes-qrexec-agent.service [Service] Type=oneshot -ExecStart=/usr/lib/qubes/qrexec-client-vm dom0 qubes.NotifyUpdates /bin/sh -c 'if [ -e /etc/system-release ]; then yum -q check-update >/dev/null; [ $? -eq 100 ] && echo 1 || echo 0; else apt-get -q update > /dev/null; apt-get -s upgrade | awk "/^Inst/{ print $2 }" | [ $(wc -L) -eq 0 ] && echo 0 || echo 1; fi' +ExecStart=/bin/sh -c 'if [ -e /etc/debian_version ]; then apt-get -q update; fi' +ExecStart=/usr/lib/qubes/upgrades-status-notify