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

openssl: remove build-time dependency to host perl #83446

Open
wants to merge 1 commit into
base: staging
from

Conversation

@oxalica
Copy link
Contributor

@oxalica oxalica commented Mar 26, 2020

Motivation for this change

The related code is introduced in #50926 (issue: #50921).
But now the perl script c_rehash produced by openssl.bin has shebang #!/usr/bin/env perl, which means we don't need to substitute it anymore.

Removing the occurrence of ${perl} in build script also strip the build-time dependency to host-platform perl, which is actually unused in runtime. This is helpful when cross-compiling openssl, since we don't need to build cross- perl anymore.

Note that this PR produce identical outputs (except hashes) to the current ones.

May fix #19965.

Check build dependencies when cross-compiling:

> nix-store -q --references ${$(nix-instantiate . -A pkgsCross.armv7l-hf-multiplatform.openssl)%%\!*}

Before the PR: (contains perl-5.30.1-armv7l-unknown-linux-gnueabihf)

/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh
/nix/store/31qsz0rjknaycs3rrg7kpps9pvxrwg51-bash-4.4-p23.drv
/nix/store/162gc3835iscp0zlmczcj8rchax7132z-openssl-1.1.1d.tar.gz.drv
/nix/store/3xk9ps0qz073k641b88swpa4fgx3hzwg-nix-ssl-cert-file.patch
/nix/store/nh6rsfggyqkaax1xlp57vf2gq09knd1f-perl-5.30.1.drv
/nix/store/s8d2d9lp6ayywfrrxj9rwmzhivz1k9fg-stdenv-linux.drv
/nix/store/j4rai10q3bm89s8bpnf1lwq2200is792-coreutils-8.31-armv7l-unknown-linux-gnueabihf.drv
/nix/store/6vs0w351nnh4la9ica8z50cxjzn7i5c4-perl-5.30.1-armv7l-unknown-linux-gnueabihf.drv
/nix/store/ciwp1yj92pvlyzx0zygv0nr653658pw6-separate-debug-info.sh
/nix/store/lzmcfv2m4ripknpvbsv8wcg1ik1kif4h-use-etc-ssl-certs.patch

After the PR: (perl-arm is gone)

/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh
/nix/store/31qsz0rjknaycs3rrg7kpps9pvxrwg51-bash-4.4-p23.drv
/nix/store/11jrn0xjyjs1bf88czk70b5rdjalacgp-openssl-1.1.1d.tar.gz.drv
/nix/store/2apmdnpx75brrrrg3i220x0ff2n8lbj0-stdenv-linux.drv
/nix/store/3xk9ps0qz073k641b88swpa4fgx3hzwg-nix-ssl-cert-file.patch
/nix/store/bqmqj4hj6hs3b73v4z6pi3lnc8gcar3a-perl-5.30.1.drv
/nix/store/ciwp1yj92pvlyzx0zygv0nr653658pw6-separate-debug-info.sh
/nix/store/lzmcfv2m4ripknpvbsv8wcg1ik1kif4h-use-etc-ssl-certs.patch
/nix/store/pli8pmqpj3dwfa70zk69gbnpasgpbm9r-coreutils-8.31-armv7l-unknown-linux-gnueabihf.drv
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
      • openssl
      • pkgsCross.armv7l-hf-multiplatform.openssl
      • with import ./. {
          crossSystem = {
             config = "mips-unknown-linux-musl";
             platform.gcc = { abi = "32"; arch = "mips32r2"; };
          };
        }; openssl
  • 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 nixpkgs-review --run "nixpkgs-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)
    • Identical outputs (except hashes).
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@oxalica
Copy link
Contributor Author

@oxalica oxalica commented Mar 26, 2020

r? @peti

@gnprice
Copy link
Contributor

@gnprice gnprice commented Apr 4, 2020

May fix #19965.

I think in fact the news is still better than that: I believe #19665 was fixed by the same upstream change that makes this change possible. #19965 (comment)

@oxalica
Copy link
Contributor Author

@oxalica oxalica commented Apr 16, 2020

ping @peti

@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Jun 23, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-in-distress/3604/28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Needs review
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.