Support xattrs in the build sandbox #838
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
awaiting
author
awaiting
contributors
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
Feature/S3
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#838
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?
I found out today that we block xattrs usage with seccomp on Linux: https://git.lix.systems/lix-project/lix/src/5ca168f6f2dfda3aa047386de6d8733fcddff1bd/lix/libstore/platform/linux.cc#L701-L706
This is not ideal and we probably want to allow it especially if we do #298, since it will prevent running our own test suite inside the nix sandbox.
The reason that xattrs are blocked in the first place is that they aren't representable in NARs so you could have local builds with different results than substitutions. There's a couple of issues with the way this is implemented:
So like, you know...
the seccomp filter that disables setxattr and friends was introduced in may 2017. it's been An While™ since then, the "some filesystems don't support them" justification is increasingly untrue, and on linux all places (that we checked) that add anything to the store include a canonicalization step that just drops all xattrs in the input anyway. this never having happened on macos and nothing having broken in the meantime is reasonable justification to assume that nothing actually uses them, so enabling them should be mostly fine.
a while ago we opened #1008 for clearing xattrs on non-linux specifically, that should still be done.
we'll have to look into that in the near future anyway, so we'll probably end up just allowing xattrs
This issue was mentioned on Gerrit on the following CLs: