Skip to content

Document behavior of /etc/qubes-rpc/qubes.PostInstall in Debian qubes #10456

@Euwiiwueir

Description

@Euwiiwueir

How to file a helpful issue

Qubes OS release

4.2, probably 4.3

Brief summary

See post on forum: https://forum.qubes-os.org/t/how-can-i-execute-a-script-after-each-update/25904/9

On Fedora after a successful dnf install or dnf remove a hook runs /etc/qubes-rpc/qubes.PostInstall which executes each *.sh script in /etc/qubes/post-install.d/. I think the same is intended to happen on Debian- a dpkg hook locally runs the rpc. But it appears to not be implemented, or only implemented for the qubes-core-agent package (based on a brief grep of outdated repos).

Steps to reproduce

Using a clean clone of debian-13-minimal:

root@testvm:~# cat /etc/qubes/post-install.d/31-testing.sh
#!/bin/sh

touch /root/ran-post-install
root@testvm:~# stat -c '%A' /etc/qubes/post-install.d/31-testing.sh
-rwxr-xr-x
root@testvm:~# ls /root
root@testvm:~# apt install -q -y tree
Reading package lists...
Building dependency tree...
Reading state information...
Installing:
  tree

Summary:
  Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
# <snip>
root@testvm:~# ls /root
root@testvm:~#
# nothing -- post-install.d script did not run :(

Expected behavior

The /etc/qubes/post-install.d/31-testing.sh script I added should have been executed.

Actual behavior

None of the scripts in /etc/qubes/post-install.d were run.

Additional information

If I run /etc/qubes-rpc/qubes.PostInstall explicitly:

root@testvm~# /etc/qubes-rpc/qubes.PostInstall 
root@testvm:~# ls /root
ran-post-install

So the post-install.d script I added does work. It appears that the qubes.PostInstall step does not run on Debian after package installation/removal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: Debian/UbuntuThis issue pertains to Debian or Ubuntu templates or standalones.C: docThis issue pertains to the official Qubes OS documentation.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions