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

coreutils: split a coreutils-full version #45720

Merged
merged 2 commits into from Sep 1, 2018

Conversation

vcunat
Copy link
Member

@vcunat vcunat commented Aug 28, 2018

Motivation for this change

Have faster *sum utilities. Details in commits and previous discussion threads: #44937 Please comment what you think.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

`tool --version` now gets additional line:
Packaged by https://NixOS.org
- default coreutils is stripped of /share/ (11 -> 2 MiB)
- coreutils-full retains /share/ and adds openssl for faster *sum tools
- NixOS systemPackages contains coreutils-full
- *Support parameter defaults are moved inside
  (it seemed confusing to have `? false` and "at once" with `? isLinux`)

Closure considerations:
+ typical build-time closure will get lighter by ~9 MiB
- typical closure of NixOS installation will grow by ~2 MiB,
  due to referring to both versions.  I think it would be possible to
  re-use most of the utils between the two versions, but the expression
  would get much more complex.

I considered having stdenv with minimal coreutils and the default
`coreutils` attribute being full, but it turned out there were too many
trivial references in nixpkgs, so it didn't seem easy to keep rebuild
impact of openssl from growing significantly.
@vcunat
Copy link
Member Author

vcunat commented Aug 28, 2018

I chose a generic name coreutils-full, as I thought we might make a larger difference between the variants than just openssl – I immediately removed share/* from the default one, and I considered adding selinux to -full but there was some error and I didn't want to spend more time on that. acl and attr seemed small enough to keep as they are (everywhere except stdenv bootstrap).

};

coreutils = callPackage ../tools/misc/coreutils { };
coreutils-full = coreutils.override { minimal = false; };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be coreutils-full be part of NixOS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: coreutils

Partial log (click to expand)

/nix/store/j6migyd1qv56z6mspvbskwjx96yaqfa6-coreutils-8.29

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: coreutils

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29
shrinking /nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29/libexec/coreutils/libstdbuf.so
shrinking /nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29/bin/coreutils
strip is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/strip
stripping (with command strip and flags -S) in /nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29/libexec  /nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29/bin
checking for references to /build in /nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29...
shrinking RPATHs of ELF executables and libraries in /nix/store/lx1xkb2n31k753c507k4kxzayngfgnvp-coreutils-8.29-info
strip is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/strip
checking for references to /build in /nix/store/lx1xkb2n31k753c507k4kxzayngfgnvp-coreutils-8.29-info...
/nix/store/2xdf4mgczzfjwj1fmcz0jjx7plvvcgsq-coreutils-8.29

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: coreutils

Partial log (click to expand)

make[3]: Leaving directory '/private/tmp/nix-build-coreutils-8.29.drv-0/coreutils-8.29/gnulib-tests'
make[2]: Leaving directory '/private/tmp/nix-build-coreutils-8.29.drv-0/coreutils-8.29/gnulib-tests'
make[1]: Leaving directory '/private/tmp/nix-build-coreutils-8.29.drv-0/coreutils-8.29'
post-installation fixup
strip is /nix/store/2ws9cmamvr7xyvdg4d2nnd1bmr1zjrrq-bootstrap-tools/bin/strip
stripping (with command strip and flags -S) in /nix/store/r5g3kfqkf2hsbp00l6mjldrp6ny9ppcl-coreutils-8.29/libexec  /nix/store/r5g3kfqkf2hsbp00l6mjldrp6ny9ppcl-coreutils-8.29/bin
patching script interpreter paths in /nix/store/r5g3kfqkf2hsbp00l6mjldrp6ny9ppcl-coreutils-8.29
strip is /nix/store/2ws9cmamvr7xyvdg4d2nnd1bmr1zjrrq-bootstrap-tools/bin/strip
patching script interpreter paths in /nix/store/1mq6swg4c9nk391ixmgcjxfjbjv9aamm-coreutils-8.29-info
/nix/store/r5g3kfqkf2hsbp00l6mjldrp6ny9ppcl-coreutils-8.29

@LnL7
Copy link
Member

LnL7 commented Aug 28, 2018

Are dashes in attributes the official convention now? I think the manual still mentions not to do that.

@vcunat
Copy link
Member Author

vcunat commented Aug 29, 2018

Yes; IIRC the hyphenated style has been officially preferred for a couple years. EDIT: oh, it was actually documented by my commit #1815 :-)

@vcunat vcunat merged commit fd3927a into NixOS:staging Sep 1, 2018
@vcunat vcunat deleted the p/coreutils-openssl branch September 1, 2018 15:51
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: pkgsCross.scaleway-c1.coreutils-full, pkgsCross.armv7l-hf-multiplatform.coreutils-full

Partial log (click to expand)

make[5]: Entering directory '/build/coreutils-8.30/gnulib-tests'
make[5]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[4]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[3]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[2]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[1]: Leaving directory '/build/coreutils-8.30'
cp: missing destination file operand after '/nix/store/w7hy21dn1mpnyxqgmj8d4hxvgd5xy7l7-coreutils-8.30-armv7a-unknown-linux-gnueabihf/share/man/man1'
Try 'cp --help' for more information.
builder for '/nix/store/cnr563b7zv9s7c2wfskl1x3zbi2yg86y-coreutils-8.30-armv7a-unknown-linux-gnueabihf.drv' failed with exit code 1
error: build of '/nix/store/73dlmv1g7bj72c3aaa44qjav2qfng0ma-coreutils-8.30-armv7a-unknown-linux-gnueabihf.drv', '/nix/store/cnr563b7zv9s7c2wfskl1x3zbi2yg86y-coreutils-8.30-armv7a-unknown-linux-gnueabihf.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: pkgsCross.scaleway-c1.coreutils-full, pkgsCross.armv7l-hf-multiplatform.coreutils-full

Partial log (click to expand)

make[5]: Entering directory '/build/coreutils-8.30/gnulib-tests'
make[5]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[4]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[3]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[2]: Leaving directory '/build/coreutils-8.30/gnulib-tests'
make[1]: Leaving directory '/build/coreutils-8.30'
cp: missing destination file operand after '/nix/store/ad4ryljg480mm5fq6k6whss7953c5dj6-coreutils-8.30-armv7a-unknown-linux-gnueabihf/share/man/man1'
Try 'cp --help' for more information.
builder for '/nix/store/fngmjs05c22lhixqfs8h4a1dw1v53g3h-coreutils-8.30-armv7a-unknown-linux-gnueabihf.drv' failed with exit code 1
error: build of '/nix/store/fngmjs05c22lhixqfs8h4a1dw1v53g3h-coreutils-8.30-armv7a-unknown-linux-gnueabihf.drv', '/nix/store/g7fysp9040mv071mr682388z9g854mb6-coreutils-8.30-armv7a-unknown-linux-gnueabihf.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

4 participants