in short: I don’t think anything suspicious happened, but now I’m just hoping for a 101-guide/write-up on how packaging executes, how to understand rebuild logs; eg: how much of nixos-rebuild
is tests, and how I can better understand (when I rebuild) which test is running and for which package it’s running. (and obviously: why did this failure happen?).
When I say it was “jarring” I mean: it caught my attention: “is some malicious code running a screenshot?” I now think the answer’s no. Here’s a snippet of the rebuild output error on output-line 1632 (apparently starting further up at line 1343; for clarity: raw log), inlined:
$ nixos-rebuild switch --upgrade
# ... logs snipped for brevity ...
> raise ScreenShotError(msg)
E mss.exception.ScreenShotError: Unable to open display: b':99'.
__class__ = <class 'mss.linux.MSS'>
display = b':99'
kwargs = {'display': ':99'}
msg = "Unable to open display: b':99'."
# ... logs snipped for brevity ...
Adding rules for package /nix/store/f1hysiasn2hnj6gk6dy9dhyvmgzy1djm-libinput-1.27.0
Copying /nix/store/f1hysiasn2hnj6gk6dy9dhyvmgzy1djm-libinput-1.27.0/lib/udev/rules.d/80-libinput-device-groups.rules to /nix/store/bmxrc2yr4irwglwv6yv8yc2l29k6ffky-udev-rules/80-libinput-device-groups.rules
# ... logs snipped for brevity ...
Checking that all programs called by absolute paths in udev rules exist... OK
self = <mss.linux.MSS object at 0x7ffff5c012a0>
src/mss/linux.py:319: ScreenShotError
=========================== short test summary info ============================
FAILED src/tests/test_find_monitors.py::test_keys_monitor_1 - mss.exception.ScreenShotError: Unable to open display: b':99'.
============ 1 failed, 58 passed, 10 skipped, 7 deselected in 4.92s ============
building '/nix/store/bvghfh9rz1if6dmxmyzyp5920v0mikql-X-Restart-Triggers-systemd-udevd.drv'...
$ [[ $? -eq 0 ]]
1
This appears to be an error from python-mss package, and nix-tree
shows I’m depending on python3.12-mss-10.0.0
indirectly because I directly install yubioath-flutter-helper-7.1.1
. I’m just now wondering: is this an actual packaging bug I should try to help fix? How do folks more easily find the nix packaging code responsible for a given line in output they see? (Example: it took me quite a while to figure out (99% sure) that it’s this perfectly-legit-looking checkPhase
block that is running the tests).
More questions: interestingly running the build command again in another terminal (I was trying to reproduce), I hit no issues. So ten what’s the functional purpose of the test failing if another rebuild has no issue?