You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check whether /nix/store and $TMPDIR have noexec set #157
UXThe way in which users interact with Nix. Higher level than UI.error-messagesConfusing messages and better diagnosticsfeatureFeature request or proposal
if [[ -z "$configureScript" && -x ./configure ]]; then
configureScript=./configure
fi
The executable bit is set, but on macos at least -x ./configure is still false on a noexec mount. The simplest way I found to test whether the bit is set independently of the mount is with stat -c '%a' ./configure or stat -f '%0Lp' ./configure (linux/macos) and then comparing octals… but that seems hacky. With that, though, we’d then attempt to execute ./configure and so get an error message at the correct point.
I’m not sure how useful it is to actually fix this, but if there is an elegant solution it’s probably worthwhile.
It'd be nice if nix builds could work with noexec set on /tmp . It's actually a requirement in many hardened setups. What would be needed to make that work? Could we use something like PrivateTmp for nix builds where we add a new /tmp in a mount namespace ?
UXThe way in which users interact with Nix. Higher level than UI.error-messagesConfusing messages and better diagnosticsfeatureFeature request or proposal
Activity
stale commentedon Feb 16, 2021
I marked this as stale due to inactivity. → More info
Fix permission denied when building drv
dbaynard commentedon Oct 4, 2021
I’ve encountered this; I bind-mounted a new tmpfs for nix builds.
In https://github.com/NixOS/nixpkgs/blob/86a3d865f4b05fb8c913980b6d470802e70fe577/pkgs/stdenv/generic/setup.sh#L1000-L1045, the relevant lines seem to be
The executable bit is set, but on macos at least
-x ./configureis still false on a noexec mount. The simplest way I found to test whether the bit is set independently of the mount is withstat -c '%a' ./configureorstat -f '%0Lp' ./configure(linux/macos) and then comparing octals… but that seems hacky. With that, though, we’d then attempt to execute./configureand so get an error message at the correct point.I’m not sure how useful it is to actually fix this, but if there is an elegant solution it’s probably worthwhile.
stale commentedon Apr 16, 2022
I marked this as stale due to inactivity. → More info
arianvp commentedon Jan 1, 2025
It'd be nice if nix builds could work with
noexecset on/tmp. It's actually a requirement in many hardened setups. What would be needed to make that work? Could we use something likePrivateTmpfor nix builds where we add a new/tmpin a mount namespace ?Merge pull request NixOS#157 from DeterminateSystems/improve-path-inf…
libstore/build: extract runPostBuildHookCo from buildWithHook/buildLo…
doc/inventory: record 30 candidates landed across the four cleanup sh…
doc/inventory: add NixOS#219 — post-build hook timeout silently dropped
doc/inventory: update Branch lines and counts after post-cleanup polish
libstore/build: extract runPostBuildHookCo from buildWithHook/buildLo…
libstore/build: extract runPostBuildHookCo from buildWithHook/buildLo…
v3 ARCH NixOS#155 (C5.1): Boehm/FFI RCA — Change-5 premise FALSIFIED
refactor(eval-cache): NixOS#157 step 1 — phase-parameterise OuterValu…
refactor(eval-cache): NixOS#157 step 2 — writer wraps outer probes in…