Open steinuil opened 4 weeks ago
Pinging @Mic92 as the author of the referenced commit.
I just finished rebuilding my system with the postFixup
step restored in the overlay and I can confirm that it fixes the signing issue and makes the camera work in normal applications.
Also I found #230289 which has some discussion about this signing issue with regards to reproducibility. I think that since the private key is provided before building, re-signing these shared libraries should not cause this package to be unreproducible again, but maybe @Mic92 will know more about this.
Ok. Looks like we should restore that fixup but also keep the static key because of reproducible builds. Can you make a pull request?
Describe the bug
libcamera
requires its builtin IPA modules to be signed during compilation in order not to use its isolated proxy worker mechanism. In the current version of the package they are not signed correctly solibcamera
falls back to using the proxy workers (which also does not work correctly).This bug also affects wireplumber on my system and renders pipewire completely unusable, because it crashes while trying to load the cameras.
Steps To Reproduce
Steps to reproduce the behavior:
libcamera
on a system that has a camera with an IPU3 (I'm using a Surface Pro 5)LIBCAMERA_LOG_LEVELS=*:DEBUG cam --list
ipa_ipu3.so
IPA module's signature is not valid, and the isolated proxy worker mechanism is tried instead.(The segfault is not directly relevant to this bug.)
Expected behavior
The logs for
IPAManager
should showIPA module /nix/store/...-libcamera-0.3.1/lib/libcamera/ipa_ipu3.so signature is valid
and for the proxy worker mechanism should not be used.Additional context
I think this error was introduced in https://github.com/NixOS/nixpkgs/commit/fb0ddd9186170fe297e2274c01ee410d79874f9f where a fixed key for signing the IPA modules was introduced and the
postFixup
step was removed. I created an overlay for my system which inserts this step again, and in this version oflibcamera
the logs reportipa_ipu3.so
's signature as valid.If this seems reasonable I can create a PR that adds this step back in again.
I'll also note that the IPA proxy mechanism does not currently work unless you explicitly set
LIBCAMERA_IPA_PROXY_PATH
to${pkgs.libcamera}/libexec/libcamera
when running something that useslibcamera
, becauselibcamera
seems to think that it's not installed and decides to set its IPA proxy search path to/nix/store/src/ipa
. Here is the relevant code. I haven't looked into this too much but maybe it can be solved by providing some options during the build step.The segfault is not responsible for these errors, but I think it's a bug upstream that triggers when the
IPAProxyIPU3
destructor is run if the IPU3 proxy is not found in the path.Notify maintainers
meta.maintainers lists
citadelcore
but that user does not seem to exist anymore?Metadata
Add a :+1: reaction to issues you find important.