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

Fixes stripDirs use after signature change #43169

Merged
merged 2 commits into from Jul 14, 2018

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Jul 8, 2018

Motivation for this change

Since a1cdc20, stripDirs now takes an addition prefixed parameters, the strip command to run.

It turns out, there were two additional users of stripDirs inside the whole of <nixpkgs>, they are openjdk and stage-1.nix. The way the command was changed made it so that the stripping wasn't done anymore.

This adds $STRIP as the first parameter to stripDirs, which I believe makes it equivalent to its older behaviour.

Testing done
  • Using mobile-nixos, which has the same stage-1 steps changed here, a boot.img was reduced from 17M to 9M.
  • Ran nixos/tests/boot-stage1.nix
  • jar from openjdk8 runs... (don't have more extensive tests I know of)
  • Currently building openjdk10

nix-path-info -S Before:

/nix/store/bmz3h4vb4f7h5v1qwk72hgibvflmx9k0-openjdk-8u172b11      327843824
/nix/store/qwzms0kzmpjgfb8d43wja3nvvmznyx0q-openjdk-10.0.1-b10    708972096

nix-path-info -S After:

/nix/store/9rzm9xmq7harjjc4c6rjlp7q0hrnf2ml-openjdk-8u172b11      327843072
/nix/store/8ilbvds7rmkgs1mmmrmnnqa0pqlb7gwa-openjdk-10.0.1-b10    708962000
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.

@samueldr samueldr changed the title Fix/strip dirs Fixes stripDirs use after signature change Jul 8, 2018
samueldr added a commit to NixOS/mobile-nixos that referenced this pull request Jul 8, 2018
samueldr added a commit to NixOS/mobile-nixos that referenced this pull request Jul 9, 2018
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Good catch! Sorry I missed this the first time around.

@matthewbauer matthewbauer merged commit 19fc061 into NixOS:master Jul 14, 2018
@samueldr samueldr deleted the fix/stripDirs branch July 15, 2018 06:06
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