Skip to content
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

Complete implementation of paths-from-graph.pl #29264

Closed
nlewo opened this issue Sep 12, 2017 · 2 comments
Closed

Complete implementation of paths-from-graph.pl #29264

nlewo opened this issue Sep 12, 2017 · 2 comments

Comments

@nlewo
Copy link
Member

nlewo commented Sep 12, 2017

To feed a fresh nix-store from a closure, I'm using the script paths-from-graphs.pl to generate a nix database dump file, that is then used by nix-store --load-db.

The script paths-from-graph.pl generate a dummy sha (instead the drv sha that produced the output path). See https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/kernel/paths-from-graph.pl#L73.

This leads to an incorrect db:

 nix-store --verify-path /nix/store/y4ihw837rm0s0ps5f31zi18w7ri1a0y8-glibc-2.25
path ‘/nix/store/y4ihw837rm0s0ps5f31zi18w7ri1a0y8-glibc-2.25’ was modified! expected hash ‘0000000000000000000000000000000000000000000000000000000000000000’, got ‘b37d7cc7722eb858203ec73f142f46b98c0c0a1038853bb0129532a529c28c0f’

I also have some errors when hydra tryies to copy these paths to the binary cache. But I really don't know if it is related to this error:

while copying/substituting output ‘/nix/store/0yyc337sysd114nfqksv95zgmsapk2cn-python2.7-pytest-xdist-1.18.2’ of ‘/nix/store/9awv5fsv63ggzab8n3rmn9xzs1hwq5pv-python2.7-pytest-xdist-1.18.2.drv’: refusing to copy corrupted path ‘/nix/store/y4ihw837rm0s0ps5f31zi18w7ri1a0y8-glibc-2.25’ to binary cache

I use these mecanism to build a Docker image where nix is usable #28561 . I then use hydra in this container.

You can reproduce by checking out the PR and running:

 % nix-build ./ -A dockerTools.examples.nix && docker load -i result && docker run --rm nix nix-store --verify-path /nix/store/y4ihw837rm0s0ps5f31zi18w7ri1a0y8-glibc-2.25
/nix/store/gaxw3wxm6shmjcs5nla9rzkmh1328ifq-docker-image-nix.tar.gz
Loaded image: nix:latest
warning: the group ‘nixbld’ specified in ‘build-users-group’ does not exist
path ‘/nix/store/y4ihw837rm0s0ps5f31zi18w7ri1a0y8-glibc-2.25’ was modified! expected hash ‘0000000000000000000000000000000000000000000000000000000000000000’, got ‘b37d7cc7722eb858203ec73f142f46b98c0c0a1038853bb0129532a529c28c0f’

To be honnest, i'm really confused with the nix store boostraping. I don't know what is the best way to do it, or if it is simple to fix the paths-from-graph.pl scripts, or...

Any ideas?

@edolstra
Copy link
Member

See also NixOS/nix#1134 and NixOS/nix@c2b0d87.

@nlewo
Copy link
Member Author

nlewo commented Sep 13, 2017

Thanks.

@nlewo nlewo closed this as completed Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants