illumos/Solaris: add xattr support, see #1337 - #10102
Merged
ThomasWaldmann merged 1 commit intoAug 14, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10102 +/- ##
==========================================
+ Coverage 87.01% 87.02% +0.01%
==========================================
Files 99 101 +2
Lines 17615 17730 +115
Branches 2664 2678 +14
==========================================
+ Hits 15327 15429 +102
- Misses 1593 1599 +6
- Partials 695 702 +7 ☔ View full report in Codecov by Harness. |
xattrs on these platforms are regular files inside a hidden attribute directory attached to each file (opened via openat(2) with O_XATTR, see fsattr(7)), so this can be implemented in pure Python: xattr names/values map to the names/contents of the files in the attribute directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ThomasWaldmann
force-pushed
the
solaris-xattr-1337
branch
from
August 14, 2026 14:47
6e08fdd to
64d622c
Compare
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add xattr support for illumos / Solaris derivatives, see #1337.
On these platforms, the extended attributes of a file are regular files inside a hidden attribute directory attached to that file, accessed by giving O_XATTR to open(2)/openat(2), see fsattr(7). Thus this can be implemented in pure Python (new
src/borg/platform/solaris.py, no C extension): xattr names/values map to the names/contents of the files in the attribute directory.listxattr: list the attribute directory, hiding theSUNWattr_*"extended system attributes" the OS maintains in there.getxattr: read the attribute file (missing attribute file → ENOATTR); values are limited to 16 MiB, like on the other platforms.setxattr: create/overwrite the attribute file (refusing names unusable as file names, andSUNWattr_*).listxattrreturns an empty result for them, and the set-xattr-on-symlink parts of the xattr tests are now gated accordingly.With this,
xattr.is_enabled()returns True on ZFS, so the xattr tests and the archiver tests' xattr comparisons now actually run in the omniOS CI job (its TMPDIR is ZFS-backed). The job now also probes/logs xattr support on TMPDIR via runat(1). Docs: platform support matrix updated.🤖 Generated with Claude Code