-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python3Packages.jaxlib: fetchAttrs reproducibility #323681
python3Packages.jaxlib: fetchAttrs reproducibility #323681
Conversation
Bazel, in hands of Google, can't even fetch reproducibly. Cf. NixOS#321920 (comment)
...because jaxlib.src is cast into a string
|
||
# Non-reproducible fetch https://github.com/NixOS/nixpkgs/issues/321920#issuecomment-2184940546 | ||
preInstall = '' | ||
cat << \EOF > "$bazelOut/external/go_sdk/versions.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the file has to exist, otherwise bazel-build will attempt a re-download.
Note: the original file looks something like
[
{
"version": "go1.23rc1",
"stable": false,
"files": [
{
"filename": "go1.23rc1.src.tar.gz",
"os": "",
"arch": "",
"version": "go1.23rc1",
"sha256": "6e9c4765872808663ccf0b937e5637c7df67146943fa6e8909a81a0d129c8045",
"size": 28156320,
"kind": "source"
},
{
"filename": "go1.23rc1.aix-ppc64.tar.gz",
"os": "aix",
"arch": "ppc64",
"version": "go1.23rc1",
"sha256": "d0cfbc6fda8a6fa993e24b42ebe77cd1109fb7200cb315a90ce72d75c78075fc",
"size": 97662103,
"kind": "archive"
},
{
"filename": "go1.23rc1.darwin-amd64.tar.gz",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternativley (needs findutils and moreutils)
find -name "*.json" -exec sh -c "jq --sort-keys < {} | sponge {}" \;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we can do that to all of $bazelOut/
, but at least to $bazelOut/external/go_sdk
? Ideally, I suppose, we'd only leave the bare minimum unmasked, but let's start small:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done ! You need to provide the missing hashes though.
|
||
# Non-reproducible fetch https://github.com/NixOS/nixpkgs/issues/321920#issuecomment-2184940546 | ||
preInstall = '' | ||
cat << \EOF > "$bazelOut/external/go_sdk/versions.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternativley (needs findutils and moreutils)
find -name "*.json" -exec sh -c "jq --sort-keys < {} | sponge {}" \;
...to where an average Nixpkgs reader might expect it Co-authored-by: zimbatm <[email protected]>
e7bd746
to
02a1df4
Compare
Ofborg seems ok, let's give it a try Future work:
|
Maybe you know off the top of your head what's best for NixOS 24.05? It won't fetch now: https://hydra.nixos.org/build/269853893 |
@vcunat I can't immediately see what is the real error in https://hydra.nixos.org/build/269853893/nixlog/3, but if it's the |
The error is hash mismatch of the fixed-output derivation, I believe. |
Ok yes it is the hash, and I'd assume it is the same unpinned URL issue. I can backport the change in a few days unless someone else does it first
Side note, I could build
|
Description of changes
#321920 (comment) says bazel downloads
external/go_sdk/versions.json
from an unpinned URL resulting in an unstable FOD hash; "good" news is, the build doesn't seem to actually use any of this golang stuff...CC @lromor @GaetanLepage @samuela @zimbatm
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.