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

buildRustPackage: Restrict find to files #34968

Merged
merged 1 commit into from Apr 23, 2018
Merged

Conversation

timokau
Copy link
Member

@timokau timokau commented Feb 14, 2018

Motivation for this change

find -executable finds everything with the executable bit set,
including directories. Thats not harmful in this scenario as cp won't
copy those directories, but it does result in a few warning messages.

I did not test this (since it would require a rebuild of all rust packages), but it does not introduce any functional changes (since cp without -r doesn't copy directories).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

`find -executable` finds everything with the executable bit set,
including directories. Thats not harmful in this scenario as `cp` won't
copy those directories, but it does result in a few warning messages.
@Mic92
Copy link
Member

Mic92 commented Apr 23, 2018

@GrahamcOfBorg build fd

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: fd

Partial log (click to expand)

post-installation fixup
moving /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0/man to /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0/share/man
shrinking RPATHs of ELF executables and libraries in /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0
shrinking /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0/bin/fd
gzipping man pages under /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0/share/man/
strip is /nix/store/65ir27a74jycbnjfn1w6n5z701js27di-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0/bin
patching script interpreter paths in /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0
checking for references to /build in /nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0...
/nix/store/9kngrkc3srrixsbwd3fkq7n1mi73jwp1-fd-7.0.0

@LnL7 LnL7 merged commit 65e92d1 into NixOS:staging Apr 23, 2018
@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: fd

Partial log (click to expand)

cannot build derivation '/nix/store/2mjd3gxcm7sjmk12n7dq7xwgjg6iiqah-apple-framework-CoreText.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/5flkiwfjpalrdfnm46aabxcxxv0l0593-apple-framework-ImageIO.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/q36d40py2z6z31qgqsyy23qggd6cv3lw-apple-framework-ApplicationServices.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/9iy4k7pppdh8kqxnz2wp00j0210qlhf9-libuv-1.20.0.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/c92i5b84kkvyg1lxp8x4lmzmqiyyk0kb-cmake-3.10.2.drv': 13 dependencies couldn't be built
cannot build derivation '/nix/store/ps19i3hi3gdw0zbaiwgz9rmjvcvjq4mg-libgit2-0.26.0.drv': 12 dependencies couldn't be built
cannot build derivation '/nix/store/26dylk96z8g1alb7g8pl0d51l9nj1x0c-rustc-1.25.0.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/ximrzy62nsph8vk7j71dbw2gdf09ckd5-cargo-0.26.0.drv': 18 dependencies couldn't be built
cannot build derivation '/nix/store/y8glsnniqq31i74rldrrkghxa8szwq46-fd-7.0.0.drv': 6 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/y8glsnniqq31i74rldrrkghxa8szwq46-fd-7.0.0.drv' failed

@timokau timokau deleted the rust-find branch April 23, 2018 20:02
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: fd

Partial log (click to expand)

   Compiling rls-data v0.15.0
   Compiling rustc_errors v0.0.0 (file:///build/rustc-1.25.0-src/src/librustc_errors)
   Compiling backtrace v0.3.5
   Compiling proc_macro v0.0.0 (file:///build/rustc-1.25.0-src/src/libproc_macro)
   Compiling rustc_const_math v0.0.0 (file:///build/rustc-1.25.0-src/src/librustc_const_math)
   Compiling syntax_ext v0.0.0 (file:///build/rustc-1.25.0-src/src/libsyntax_ext)
building of '/nix/store/k1fz2wzg10ibqhmazs078sdz977ijz3i-rustc-1.25.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/wf7yfmkwdwhw6sdamfjzimcv3lna0j5c-cargo-0.26.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/091p0b9dg1gd01dwxxn98y5y700d9zxc-fd-7.0.0.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/091p0b9dg1gd01dwxxn98y5y700d9zxc-fd-7.0.0.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants