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: trim propagatedBuildOutputs to reduce closure size #157093

Closed
wants to merge 1 commit into from

Conversation

thomasjm
Copy link
Contributor

Motivation for this change

I'd like to reduce the closure size of openssl.dev by removing the propagatedBuildOutputs dependency on openssl.bin. This benefits dependencies that don't require openssl.bin, such as nodejs-slim.

This was previously discussed in #125240, which is where I learned about this patch.

With this change, the closure of openssl.dev shrinks by 56MB:

Before:

> nix path-info -Shr ./result-dev
/nix/store/3rd24wjad31avvylb8z4kph632gjbrnq-libidn2-2.3.2          1.8M
/nix/store/4i8j2n8lmmc9pqar468fsx3dw3d7hv1b-openssl-1.1.1m        35.6M
/nix/store/6jd4pwngw10mbqzfxcwgjp6a2a658w5j-attr-2.5.1            31.7M
/nix/store/f2whkwjdawwcyxs2c6ldxr5axadihpk8-perl-5.34.0           86.6M
/nix/store/jy5vn8pmbbsgg2651dqp832f8n79sjia-openssl-1.1.1m-bin    91.4M
/nix/store/pcqj12x7hwc2kciyc0yj6qw04ndx4rfp-libunistring-0.9.10    1.6M
/nix/store/pm7hm97hs8fifq04csfg2cy3wi71biwf-openssl-1.1.1m-dev    92.7M
/nix/store/s99ykmdxh7cn5vx76vyh9y9k08rl79na-acl-2.3.1             31.8M
/nix/store/saw6nkqqqfx5xm1h5cpk7gxnxmw9wk47-glibc-2.33-62         31.6M
/nix/store/vizjhz04x6xl57x2vrpqa52j8q6rkjfh-coreutils-9.0         33.6M

After:

nix path-info -Shr ./result-dev
/nix/store/3rd24wjad31avvylb8z4kph632gjbrnq-libidn2-2.3.2          1.8M
/nix/store/cqw026vs0kpbbvfqhnfhda3pkmia0ll0-openssl-1.1.1m        35.6M
/nix/store/idjqsdxzw5yv0y3i999vk2wdsm3vzyq8-openssl-1.1.1m-dev    36.9M
/nix/store/pcqj12x7hwc2kciyc0yj6qw04ndx4rfp-libunistring-0.9.10    1.6M
/nix/store/saw6nkqqqfx5xm1h5cpk7gxnxmw9wk47-glibc-2.33-62         31.6M

The closure size of nodejs-slim goes down from 180.4MB --> 126.6MB.

I have no idea what this might break. But I think it makes sense for these two outputs to be separate.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 30, 2022
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
@thomasjm
Copy link
Contributor Author

Closing as this was resolved by #226108

@thomasjm thomasjm closed this Aug 15, 2023
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 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 Oct 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 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 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 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
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
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 May 16, 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 Jun 7, 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
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant