Open aryairani opened 1 year ago
Is there something I can do or provide to help get a fix worked out for this?
Removing the corrupted artifacts and rebuilding might be enough. You'll probably want to scan the whole store for corruption though, in addition to the ones I've identified; and I don't imagine that's something I can do directly myself, or I might try.
So what you are saying is that likely *-ghc9.2.8.dylib
are busted. While *-ghc8.10.7.dylib
are not.
Now what I assume here happens is that stripping breaks them. The would need to be re-signed after stripping, (I believe nixpkgs did do this though).
According to @hamishmack we don't strip, so this must be something else.
I'll have to take a closer look at the derivations and the actual steps we do.
Thanks @angerman. Let me know if there's anything I can do to help.
I'm barely conversant in nix, but it's peculiar to me that the binaries are valid when I build them locally. (And the same binaries I build locally are valid on other machines.) It's only the outputs on cache.iog.io that are broken. I didn't think this sort of thing was possible with nix derivations, but here we are. 😅 Hopefully this is a clue.
Oh? That is indeed quite odd. Do note though that nix is only reproducible up to system level tools. And darwin is partially impure. We can't build darwin as pure a Linux (ala nixOS) and have to rely on some system tools. I do think we build codesign though. I'll keep a log of what I find out.
Hi -- I wanted to check if there's any news or anything even I can do to help on this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bump 🤜 🤛
Am I the only one running on an arm64 mac? 😅
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bump
Describe the bug
Using
haskell.nix
and trusting thecache.iog.io
substituter got me a build environment that was partially broken. Specifically, myhaskell-language-server
was dying on me withKilled: 9
and system log entries contained this entry complaining of an invalid code signature inlibHSunliftio-0.2.25.0-H3rn7kmXhvKWwCKX2Y0ol-ghc9.2.8.dylib
:I confirmed that I only saw these crashes when I use the
cache.iog.io
substituter when building up my nix store. I searched my nix store for bad signatures and found several libraries with bad signatures, all of which I'd downloaded from cache.iog.org.There are likely other improperly signed packages on the server that I'm not aware of.
Steps To Reproduce
Here is a bash script to download the packages I noticed issues with and confirm the bad signatures.
The first 9 report invalid signatures, the last 2 have valid signatures. I included a mix to help see the difference in output.
If you run the script, I recommend doing so from an empty directory to facilitate cleanup.
Here is the output of the script. The result of code signature verification is at the end of each line.
Expected behavior
Running
codesign -vv
on each binary should produce"valid on disk"
, not"invalid signature"
.