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

Closed
wants to merge 1 commit into 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 commented Mar 26, 2020

r? @peti

@gnprice
Copy link
Contributor

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 commented Apr 16, 2020

ping @peti

@nixos-discourse
Copy link

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

@SuperSandro2000
Copy link
Member

Got fixed.

Staging automation moved this from Needs review to Done Nov 29, 2020
@oxalica oxalica reopened this Apr 1, 2021
@oxalica
Copy link
Contributor Author

oxalica commented Apr 1, 2021

@SuperSandro2000
What is fixed? Sure, the issue I mentioned is fixed. But that's not all of this PR for.

Currently in master, openssl still depends on build-time host-platform perl, but it is actually not used. The c_rehash is using #!/usr/bin/env perl. The related code is not necessary.
I'm building openssl for riscv64. It requires building riscv64 perl while not using it at all. This PR can get rid of it.

@oxalica
Copy link
Contributor Author

oxalica commented Apr 1, 2021

NVM. #115911 did the same thing about 20 days ago. Close as dup.

@oxalica oxalica closed this Apr 1, 2021
@oxalica oxalica deleted the fix/openssl-perl-dep branch July 20, 2021 16:52
Artturin pushed a commit to Artturin/nixpkgs that referenced this pull request Apr 14, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Oct 8, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Oct 9, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Oct 13, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Oct 20, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 14, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
awake-bot pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 21, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 22, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 22, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 22, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 22, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 22, 2023
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
awake-bot pushed a commit to awakesecurity/nixpkgs that referenced this pull request Jan 13, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Jan 13, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
awake-bot pushed a commit to awakesecurity/nixpkgs that referenced this pull request Feb 23, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Feb 27, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
awake-bot pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 6, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 8, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
awake-bot pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 19, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 22, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 22, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 22, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 22, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
tm-drtina pushed a commit to awakesecurity/nixpkgs that referenced this pull request Apr 22, 2024
Replaces perl based c_rehash script with shell script wrapping `openssl rehash`
with the same functionality.

Fixes: NixOS#19965
Supersedes: NixOS#156776, NixOS#83446
Possibly related to: NixOS#157093, NixOS#82924
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants