Qubes Upgrade to 4.2 - In Place Upgrade

All of the files in /etc/qubes-rpc/policy/ have a file format as follows:

qubes.InputMouse.rpmsave

Not sure what rpmsave means

/etc/qubes-rpc/policy/ →

sys-usb dom0 ask, default_target=dom0
sys-usb dom0 ask, default_target=sys-gui-gpu
sys-usb dom0 allow
$anyvm $anyvm deny

pppp

Compare the content of qubes.InputMouse.rpmsave and qubes.InputMouse, there was a transition to the new qrexec policy format and I’m not sure how Qubes OS in-place upgrade tools handles that:

I’m also not sure if it’s a problem with qrexec policies or with qrexec tool itself, maybe there something in the log, but I don’t know what to look for specifically, but it could be something related to qrexec and policy.

there is no qubes.InputMouse, only qubes.InputMouse.rpmsave

Maybe this file was generated during one of the dom0 updates before you’ve upgraded to Qubes OS 4.2. In that case these files shouldn’t be related to your issue.

What do you suspect is the cause of the issue? PAM?

PAM error is unrelated and you can ignore it.
I have no idea what’s the issue.
Maybe it’d be easier to just make a clean reinstall of Qubes OS.

what is the qrexec policy issue that you suspect?

Maybe some package in dom0 wasn’t updated during upgrade.

how to update dom0?

It should’ve updated normally during upgrade, you can try to update dom0 in a normal way using GUI Qubes Update tool but I’m not sure that it’ll help to solve the issue.

Maybe you have the same issue as here:

Then I guess you need to convert your qrexec policy files to the new format.

sudo qubes-dist-upgrade -p:

(STAGE 6) Convert qrexec policy to the new format, it may take several minutes
Initiating policy conversion process…
WARNING:root:warning: !compat-4.0 directive in file /etc/qubes/policy.d/35-compat.policy line 16 is transitional and will be deprecated
Traceback (most recent call last):
File “/usr/bin/qrexec-legacy-convert”, line 5, in
sys.exit(main())
File “/usr/lib/python3.11/site-packages/qrexec/tools/qrexec_legacy_convert.py”,
line 184, main
qrexec_policy_graph.main([‘–policy-dir’,
File “/usr/lib/python3.11/site-packages/qrexec/tools/qrexec_policy_graph.py”, line
186, in main
action = policy.evaluate(request)
File “/usr/lib/python3.11/site-packages/qrexec/policy/parser.py”, line 1623, in evaluate return rule.action.evaluate(request)
File “/usr/lib/python3.11/site-packages/qrexec/policy/parser.py”, line 1115, in evaluate
return request.ask.resolution_type(
File “/usr/lib/python3.11/site-packages/qrexec/policy/parser.py”, line 733, in init
assert default_target is None or default_target in targets_for_ask

AssertionError

How to convert qrexec policy files to the new format?

Maybe there is an error in one of your old qrexec policy files and the qubes-dist-upgrade can’t convert the old qrexec policy file with an error to the new format properly.

which qrexec file?

The policy files are located in /etc/qubes-rpc/policy/ for old policy format and /etc/qubes/policy.d/ for new policy format, I have no idea which file could it be.

which file would be important in the /etc/qubes/policy.d/ new format?

All of them are important. Any syntax error in any policy file can cause qrexec to stop working.
I think qrexec is reading all files in the directory and if it’ll encounter an error in one of the files then it’ll fail and won’t continue to read the rest of the files.

what kind of syntax error.

Based on this message:

assert default_target is None or default_target in targets_for_ask

It may be some issue with default_target value, but it could be anything else as well.