lix on non-linux does not clear xattrs when adding outputs to the store #1008

Open
opened 2025-10-10 16:10:25 +00:00 by pennae · 4 comments
Owner
❯ nix repl -L
Lix 2.94.0-dev-pre20250913-8981fb5
Type :? for help.
nix-repl> p = import <nixpkgs> { system = "aarch64-darwin"; }                                              
Added p.

nix-repl> src = p.runCommand "xattr-source" {} "touch $out; /usr/bin/xattr -w systems.lix.test value $out"
Added src.

nix-repl> :b p.runCommand "xattr-read" {} "/usr/bin/xattr -l ${src} >&2"
xattr-read> systems.lix.test: value

this does not happen on linux. can we forbid this inside the sandbox until we support xattrs everywhere?

``` ❯ nix repl -L Lix 2.94.0-dev-pre20250913-8981fb5 Type :? for help. nix-repl> p = import <nixpkgs> { system = "aarch64-darwin"; } Added p. nix-repl> src = p.runCommand "xattr-source" {} "touch $out; /usr/bin/xattr -w systems.lix.test value $out" Added src. nix-repl> :b p.runCommand "xattr-read" {} "/usr/bin/xattr -l ${src} >&2" xattr-read> systems.lix.test: value ``` this does not happen on linux. can we forbid this inside the sandbox until we support xattrs everywhere?
pennae changed title from lix on macos does not clear xattrs when adding outputs to the store to lix on non-linux does not clear xattrs when adding outputs to the store 2025-10-10 16:16:23 +00:00
Author
Owner

this should also affect freebsd and any other non-linux system. so, uh.

this should also affect freebsd and any other non-linux system. so, uh.
pennae added this to the 2.95 milestone 2026-01-02 19:34:00 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/4856 ("libstore/platform/linux: allow xattrs in the sandbox")
  • commit message in cl/4861 ("libstore/local-store: remove xattrs all the time")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/4856", "number": 4856, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4861", "number": 4861, "kind": "commit message"}], "cl_meta": {"4856": {"change_title": "libstore/platform/linux: allow xattrs in the sandbox"}, "4861": {"change_title": "libstore/local-store: remove xattrs all the time"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/4856](https://gerrit.lix.systems/c/lix/+/4856) ("libstore/platform/linux: allow xattrs in the sandbox") * commit message in [cl/4861](https://gerrit.lix.systems/c/lix/+/4861) ("libstore/local-store: remove xattrs all the time")
Owner

Working on this, I realized that pyxattr is not available on Darwin, so this is also one requirement to fix to close this on the testing side. That is, adding support to Darwin to pyxattr (and probably pylibacl later on).

Working on this, I realized that pyxattr is not available on Darwin, so this is also one requirement to fix to close this on the testing side. That is, adding support to Darwin to pyxattr (and probably pylibacl later on).
Owner

https://github.com/NixOS/nixpkgs/pull/476848 solves the problem for pyxattr.

https://github.com/NixOS/nixpkgs/pull/476848 solves the problem for pyxattr.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1008
No description provided.