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

NixOS image for Google Compute Engine fails to build #23973

Closed
8573 opened this issue Mar 17, 2017 · 5 comments · Fixed by #24264
Closed

NixOS image for Google Compute Engine fails to build #23973

8573 opened this issue Mar 17, 2017 · 5 comments · Fixed by #24264

Comments

@8573
Copy link
Contributor

8573 commented Mar 17, 2017

When I try to build the NixOS image for Google Compute Engine on
latest nixos-unstable, the build process errors out with complaints
about trying to create hard links to directories:
https://gist.github.com/8573/53dfc5542f95cbf11127b6df915b7500.

@globin
Copy link
Member

globin commented Mar 23, 2017

cc @fadenb who had similar problems with the azure image.

@fadenb
Copy link
Contributor

fadenb commented Mar 23, 2017

We solved the issue with the azure images by using rsync instead of cp: See 097ef6e

@globin
Copy link
Member

globin commented Mar 23, 2017

Thanks couldn't find that commit anymore.

8573 added a commit to 8573/nixpkgs that referenced this issue Mar 24, 2017
In `nixos/modules/virtualisation/google-compute-image.nix`, copy store
paths with `rsync -a` rather than `cp -prd`, because `rsync` seems
better able to handle the hard-links that may be present in the store,
whereas `cp` may fail to copy them.

I have tested that the Google Compute Engine image builds successfully
for me with this patch, whereas it did not without this patch.

This is the same fix applied for Azure images in commit
097ef6e.

Fixes NixOS#23973.
@8573
Copy link
Contributor Author

8573 commented Mar 24, 2017

Thanks; I've filed pull request #24264 to apply the same change to the GCE image build.

@globin
Copy link
Member

globin commented Mar 24, 2017

Thanks :)

globin pushed a commit that referenced this issue Mar 24, 2017
In `nixos/modules/virtualisation/google-compute-image.nix`, copy store
paths with `rsync -a` rather than `cp -prd`, because `rsync` seems
better able to handle the hard-links that may be present in the store,
whereas `cp` may fail to copy them.

I have tested that the Google Compute Engine image builds successfully
for me with this patch, whereas it did not without this patch.

This is the same fix applied for Azure images in commit
097ef6e.

Fixes #23973.
globin pushed a commit that referenced this issue Mar 24, 2017
In `nixos/modules/virtualisation/google-compute-image.nix`, copy store
paths with `rsync -a` rather than `cp -prd`, because `rsync` seems
better able to handle the hard-links that may be present in the store,
whereas `cp` may fail to copy them.

I have tested that the Google Compute Engine image builds successfully
for me with this patch, whereas it did not without this patch.

This is the same fix applied for Azure images in commit
097ef6e.

Fixes #23973.

(cherry picked from commit e0e520a)
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
In `nixos/modules/virtualisation/google-compute-image.nix`, copy store
paths with `rsync -a` rather than `cp -prd`, because `rsync` seems
better able to handle the hard-links that may be present in the store,
whereas `cp` may fail to copy them.

I have tested that the Google Compute Engine image builds successfully
for me with this patch, whereas it did not without this patch.

This is the same fix applied for Azure images in commit
097ef6e.

Fixes NixOS#23973.

(cherry picked from commit e0e520a)
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.

3 participants