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

retdec: split up, greatly reduce in size (by default) #34539

Merged
merged 2 commits into from Feb 3, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Feb 2, 2018

Due almost entirely to signatures in "retdec-support",
retdec is too large for the binary cache :(.

This makes retdec much less convenient to install/use,
requiring both a giant download followed by building
LLVM and the many vendored dependencies.

Upstream has improved the dependency situation
significantly (not in a tagged release yet),
leaving the signatures to account for.

This PR significantly reduces the footprint by
optionally removing the PE (Windows) signatures
which brings the uncompressed signature size
down from 3.8GB to a much more manageable 642MB.

  • 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.

In the future it might be neat to split the signatures into multiple packages
(ELF, PE, maybe by architecture...) and use a setup-hook or something to
convince retdec to use whatever has been installed; this would also
make it possible to add/remove/update signatures independently from
building/upgrading retdec itself.

(at least within signature compatibility limits, not sure)

Anyway that's a possible future :).

for now, let's just make this sane for folks to use :).

Don't include PE signatures by default,
offer "full" variant containing them if desired.
@@ -90,13 +97,14 @@ in stdenv.mkDerivation rec {
find . -wholename "*/deps/openssl/CMakeLists.txt" -print0 | \
xargs -0 sed -i -e 's|OPENSSL_URL .*)|OPENSSL_URL ${openssl})|'

cat > cmake/install-share.sh <<EOF
#!/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

#!${pkgs.stdenv.shell} I would say.

@Mic92 Mic92 merged commit 401fd19 into NixOS:master Feb 3, 2018
@dtzWill
Copy link
Member Author

dtzWill commented Feb 3, 2018

First-ever hydra build success: https://hydra.nixos.org/job/nixpkgs/trunk/retdec.x86_64-linux 😁

@dtzWill dtzWill deleted the feature/retdec-smaller branch February 3, 2018 22:07
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

3 participants