Skip to content

Commit

Permalink
pacman hook to notify dom0 about successful upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed May 16, 2024
1 parent 9559f34 commit 486a36a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions archlinux/PKGBUILD.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ package_qubes-vm-core() {
mkdir -p "${pkgdir}/usr/share/libalpm/hooks/"
install -m 644 "archlinux/PKGBUILD.qubes-update-desktop-icons.hook" "${pkgdir}/usr/share/libalpm/hooks/qubes-update-desktop-icons.hook"

# Install pacman hook to notify dom0 about successful upgrade
install -m 644 "archlinux/PKGBUILD.qubes-post-upgrade.hook" "${pkgdir}/usr/share/libalpm/hooks/qubes-post-upgrade.hook"

# Install pacman.d drop-ins (at least 1 drop-in must be installed or pacman will fail)
mkdir -p -m 0755 "${pkgdir}/etc/pacman.d"
install -m 644 "archlinux/PKGBUILD-qubes-pacman-options.conf" "${pkgdir}/etc/pacman.d/10-qubes-options.conf"
Expand Down
10 changes: 10 additions & 0 deletions archlinux/PKGBUILD.qubes-post-upgrade.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Trigger]
Operation = Upgrade
Type = Path
Target = *

[Action]
Description = Notifying dom0 about successful upgrade...
Depends = qubes-vm-qrexec
When = PostTransaction
Exec = /usr/lib/qubes/qrexec-client-vm dom0 qubes.NotifyUpdates /bin/sh -c 'echo 0'

0 comments on commit 486a36a

Please sign in to comment.