Added exceptions to qubes udev device export#130
Conversation
Enables #977
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
=======================================
Coverage 60.60% 60.60%
=======================================
Files 6 6
Lines 952 952
Branches 104 104
=======================================
Hits 577 577
Misses 285 285
Partials 90 90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| # skip devices excluded elsewhere | ||
| ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", ENV{QUBES_EXPORT_BLOCK_DEVICE}!="1", GOTO="qubes_block_end" | ||
| ENV{QUBES_EXPORT_BLOCK_DEVICE}=="0", GOTO="qubes_block_end" |
There was a problem hiding this comment.
=="0" is already covered by !="1", no?
There was a problem hiding this comment.
No, note that it's a new line. !="1" is only checked if dm-crypt rules are disabled using DM_UDEV_DISABLE_DISK_RULES_FLAG. That breaks a lot of things.
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025101005-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025081011-4.3&flavor=update
Failed tests17 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/149225#dependencies 83 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:13 performance degradations
Remaining performance tests:166 tests
|
After way too much troubleshooting I realized that the qubes udev rules break systemd device integration (specifically
.deviceinode watching). This pull request enables exemptions to the qubes rules without also disabling other udev rules.This enables #977, if you run the swap encryption in the VM.(This is probably better achieved withephemeralinqvm-volume, which I already had done and forgotten 🤦)My use case is gone, but I still think that this should be merged, since it's a noninvasive change that enables udev rules that currently cannot be written (unless you surround the
99-qubes[...].rulesfile and reset the env variable after it).