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

ocamlbuild: isStatic -> isMusl for the "pie" hardening check #139345

Closed
wants to merge 1 commit into from

Conversation

anmonteiro
Copy link
Member

Motivation for this change

This aligns this check with the OCaml compiler's:

hardeningDisable = lib.optional (lib.versionAtLeast version "4.09" && stdenv.hostPlatform.isMusl) "pie";

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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages 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/)
  • 21.11 Release Notes (or backporting 21.05 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
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 24, 2021
@r-burns
Copy link
Contributor

r-burns commented Sep 24, 2021

Hey, I think the hardeningDisable here can be removed entirely after #135619 (currently in staging), care to give it a try?

I'm okay with merging this as an interim fix, as long as we don't forget to reenable PIE hardening after #135619 lands.

@anmonteiro
Copy link
Member Author

I tried the staging branch without this fix and still couldn't compile ocamlbuild

@r-burns
Copy link
Contributor

r-burns commented Sep 25, 2021

Hmm, could you specify what you tried?

Texinfo fails on staging due to #139470, but after checking out 445a245 and reverting 1165533 I was able to build pkgsMusl.ocamlPackages.ocamlbuild.

@anmonteiro
Copy link
Member Author

I think I might not have selected the right revision earlier. This is indeed working in staging.

@anmonteiro anmonteiro closed this Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: ocaml 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants