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

docs: allow building in sandbox on darwin #326653

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

n8henrie
Copy link
Contributor

For whatever reason zip in this case doesn't seem to be respecting the
$TMP or $TMPDIR variables, resulting in a permission denied error on
Darwin when sandbox is enabled.

The -b flag allows one to manually specify a tempdir, which allows the
build to succeed in spite of sandboxing.

Fixes #326380

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

For whatever reason `zip` in this case doesn't seem to be respecting the
`$TMP` or `$TMPDIR` variables, resulting in a permission denied error on
Darwin when sandbox is enabled.

The `-b` flag allows one to manually specify a tempdir, which allows the
build to succeed in spite of sandboxing.

Fixes NixOS#326380
@n8henrie
Copy link
Contributor Author

cc @NixOS/documentation-team
cc @NixOS/darwin-maintainers

@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 10.rebuild-linux: 0 labels Jul 13, 2024
@paparodeo
Copy link
Contributor

I believe this was fixed with NixOS/nix#11031 and i believe the fix has made it to nixpkgs
#326163 and the PRs it references.

@khaneliman
Copy link
Contributor

khaneliman commented Jul 13, 2024

I believe this was fixed with NixOS/nix#11031 and i believe the fix has made it to nixpkgs #326163 and the PRs it references.

@emilazy has some knowledge about the darwin sandbox stuff going on recently.

@emilazy
Copy link
Member

emilazy commented Jul 13, 2024

See #326380 (comment). This PR seems fine to me, although $TMPDIR is more Unixly‐correct.

@fricklerhandwerk fricklerhandwerk merged commit 1600707 into NixOS:master Jul 13, 2024
25 checks passed
@toonn
Copy link
Contributor

toonn commented Jul 13, 2024

Why was @emilazy's comment ignored? TMPDIR is both POSIX and SUS.

@fricklerhandwerk
Copy link
Contributor

@toonn, based on @emilazy's wording I didn't consider it a blocker but merely nice to have. Opened #326808 as a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: docs (aarch64-darwin, sandbox issue)
6 participants