Skip to content

darwin.postFixupSignHook: use absolute path to codesign_allocate#208120

Closed
Smaug123 wants to merge 4 commits intoNixOS:masterfrom
Smaug123:codesign-hook-abs-path
Closed

darwin.postFixupSignHook: use absolute path to codesign_allocate#208120
Smaug123 wants to merge 4 commits intoNixOS:masterfrom
Smaug123:codesign-hook-abs-path

Conversation

@Smaug123
Copy link
Copy Markdown
Contributor

@Smaug123 Smaug123 commented Dec 28, 2022

Description of changes

This is #148282 but months later. I'm currently building hello, we're getting through Clang and Python first. (If it works, I'll squash the merge commit into the previous one.)

This is a massive sledgehammer, I don't know whether it's correct to allowlist these deps.

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/)
  • 23.05 Release Notes (or backporting 22.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.

@Smaug123 Smaug123 changed the title Codesign hook abs path darwin.postFixupSignHook: use absolute path to codesign_allocate Dec 28, 2022
@Smaug123
Copy link
Copy Markdown
Contributor Author

@ofborg build pkgsCross.aarch64-darwin.hello hello

@Smaug123
Copy link
Copy Markdown
Contributor Author

Phew, finally reproduced the original problem after 44mins of building:

error: output '/nix/store/0ybgf3i55fmcdm3m3kk4gbqla1f2ahzl-bootstrap-stage2-stdenv-darwin' is not allowed to refer to the following paths:
         /nix/store/fl3sghzfg8jhyx6zggl4cv15jzy2898w-libtapi-1100.0.11
         /nix/store/p5g5cgpzi74z7zwa0s2qfq0dkq9fwfp8-cctools-port-973.0.1
         /nix/store/vdi592m39p8ckb4b8x00c810r14cr8yy-ncurses-6.3-p20220507

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 28, 2022
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Dec 28, 2022
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Dec 28, 2022
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Dec 28, 2022
@Smaug123
Copy link
Copy Markdown
Contributor Author

OK, I am extremely out of my depth here, I can see effort being taken to avoid linking ncurses in stage 4 but after this change we want it in stage 2.

sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Mar 13, 2023
codesign_allocate is assumed to be in PATH:

NixOS#154203
NixOS#148189

Using an absolute reference in post-link-sign-hook would be another
possibility, but hasn't been fruitful so far:
NixOS#148282
NixOS#208120
sternenseemann added a commit that referenced this pull request Mar 14, 2023
codesign_allocate is assumed to be in PATH:

#154203
#148189

Using an absolute reference in post-link-sign-hook would be another
possibility, but hasn't been fruitful so far:
#148282
#208120
@szlend szlend mentioned this pull request Jun 17, 2023
12 tasks
@tjni
Copy link
Copy Markdown
Contributor

tjni commented Aug 3, 2023

This should be superceded by #238323.

@tjni tjni closed this Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants