lowdown: fix aarch64-darwin by removing deprecated sandbox#125004
lowdown: fix aarch64-darwin by removing deprecated sandbox#125004domenkozar merged 8 commits intoNixOS:masterfrom
Conversation
f651e83 to
3653379
Compare
|
Result of 6 packages built successfully:
Result of 6 packages built successfully:
|
Co-authored-by: Dmitry Kalinkin <[email protected]>
Co-authored-by: Dmitry Kalinkin <[email protected]>
|
@GrahamcOfBorg build lowdown |
|
@veprbl you're fast! but I added there as well $out/bin to the postInstall check, it doesn't find the binary without some help it seems. |
|
@GrahamcOfBorg build lowdown |
|
Result of 5 packages built:
|
|
Backport failed for Please cherry-pick the changes locally: git fetch origin release-21.05
git worktree add -d .worktree/backport-125004-to-release-21.05 origin/release-21.05
cd .worktree/backport-125004-to-release-21.05
git checkout -b backport-125004-to-release-21.05
ancref=$(git merge-base 6094bec3c3cb811800f6f71a8951328487b6df8c ded7f8f89567b63096a41d90177fb7a4e702c7a5)
git cherry-pick -x $ancref..ded7f8f89567b63096a41d90177fb7a4e702c7a5 |
|
This PR doesn't follow our contribution guidelines for commit messages. Please try a bit harder to follow it. If senior contributors don't do that we have zero chance to enforce it as they aren't leading with good examples. |
|
Ouch, this was intended to be squashed on merge... |
that's very fair point! I'm less senior than having merge rights, but I'm in the habit of squasing and renaming the commit messages. |
This is a program written in a memory‐unsafe language that processes potentially‐untrusted user input. We shouldn’t disable upstream’s sandboxing mechanisms for all downstream consumers without good reason. Although the sandbox API is officially marked as deprecated, it is used as the basis for the supported App Sandbox and it is extremely unlikely to ever be removed as it is used extensively throughout the OS for service hardening and by third parties like the Chrome sandbox. Nix itself uses it to sandbox builds, and its lack of support for nesting is why this caused problems in the first place. Instead, introduce a `lowdown-unsandboxed` package that can be used in the `nativeBuildInputs` of Nix builds, while keeping the sandboxed version of the program for general use. The name might not be ideal, as it remains identical to `lowdown` on non‐Darwin platforms, but I couldn’t think of a better one. See: NixOS#125004 Closes: NixOS#346933
This is a program written in a memory‐unsafe language that processes potentially‐untrusted user input. We shouldn’t disable upstream’s sandboxing mechanisms for all downstream consumers without good reason. Although the sandbox API is officially marked as deprecated, it is used as the basis for the supported App Sandbox and it is extremely unlikely to ever be removed as it is used extensively throughout the OS for service hardening and by third parties like the Chrome sandbox. Nix itself uses it to sandbox builds, and its lack of support for nesting is why this caused problems in the first place. Instead, introduce a `lowdown-unsandboxed` package that can be used in the `nativeBuildInputs` of Nix builds, while keeping the sandboxed version of the program for general use. The name might not be ideal, as it remains identical to `lowdown` on non‐Darwin platforms, but I couldn’t think of a better one. See: NixOS#125004 Closes: NixOS#346933
Motivation for this change
Currently latest nix doesn't build on aarch64 due to failure from lowdown.
The current regression test provided from lowdown falsly pass.
So I wrote one very basic install-check.
Some interesting discussions about the (bad and deprecated) sandbox.h
https://developer.apple.com/forums/thread/661939
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)