martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting

Home Page:https://launchpad.net/umockdev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nix test is failing

martinpitt opened this issue · comments

3 weeks ago, the nix test has started to fail:

meson.build:2:11: ERROR: Command `/build/source/src/getversion.sh` failed with status 1.

This is annoying to debug: with DEBUG=1 tests/run-nix I can attach to the container with podman exec -itl bash, but the log says

To attach install cntr and run the following command as root:

   cntr attach -t command cntr-/nix/store/3j73y1b58xhcrffl213ksc672vacij95-umockdev-0.17.18

but that doesn't actually work:

cannot mount filesystem: Cannot raise file descriptor limit: EPERM: Operation not permitted

So I went on with some set -x debugging, and it shows

+ git -C /build/source describe
/build/source/src/getversion.sh: line 4: git: not found

which isn't obvious -- git is installed in the container, just somehow not in the build environment. For a long time, adding it as a build dependency with buildInputs = attrs.buildInputs ++ [ pkgs.git ]; worked, but somehow it seems to have stopped.

@jtojnar @flokli do you know what's going on here and how to debug this? Possibly also how to provide a sane interactive debug environment in that "inner" build container, so that this can be debugged more interactively?

I also tried nix-env -i cntr, but that doesn't seem to do anything useful or obvious.

I added commit f8fb070 which fixes meson log printing. The log now shows the error properly. I still can't make sense of it, though.

Sounds like a downfall of NixOS/nixpkgs@5876256. If a dependency is expected at build-time, it should go to nativeBuildInputs.