Setting tempdir in nix3-develop, nix3-print-dev-env can lead to issues #979
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#979
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
In the nix3-develop codepath, we set
NIX_BUILD_TOP
,TMP
, and a bunch of synonyms thereof to a newmktemp -d
created directory.Diferences from
/tmp
This can lead to subtle bugs because now our
TMP
directory differs from the normal one in a few ways./tmp
has 1777 on my system. But folders created bymktemp -d
have different permissions, eg, 0700TMP
directory and now your shell is suddenly broken.Bugs
For instance https://github.com/NixOS/nix/issues/10753 was triggered by the following scenario.
root
and setTMP
to that. This doesn't have permissions for arbitrary users to create folders in itnixbld
user with the sandbox off (since we are using docker)If systemd-tmpfiles deletes your
TMP
folder, then your shell is broken and you need to re source it. This can be painful for users who use tools likehaskell.nix
which have extremely bad eval times (so users sometimes keep a shell open for months (sic!)). I think there is an issue for this somewhere but I can't find it.