borg icon indicating copy to clipboard operation
borg copied to clipboard

xattr support for NetBSD

Open enkore opened this issue 9 years ago • 5 comments

NetBSD has a compatibility layer to Linux' xattr API: https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/xattr.h (w/ no access to the system namespace, whatever that's used for)

/*
 * Support for file system extended attributes.
 *
 * This provides an interface that is compatible with Linux's extended
 * attribute support.  These calls operate on the same extended attributes
 * as <sys/extattr.h>, but access only the "user" namespace.
 */

The native mechanism is sys/extattr.h - this then also allows access to the system namespace.

Edit: In fact, it seems that NetBSD's extattr API is identical to FreeBSD's. So this might just be a matter of adding "netbsd" in xattr to the platform check.

Note: OpenBSD has neither ACLs nor xattrs.

enkore avatar Jul 14 '16 20:07 enkore

Can't get it to work, neither do the command line utilities (listextattr(1) etc). Everything's a EOPNOTSUP, independent of file system (FFS, UDF, ext2fs). Looking at the kernel code and config it should work with at least FFS and UDF (after initattr etc)

If someone uses NetBSD and Borg, feel free to test it whether it actually works (db6ce4812a3)

src/borg/xattr.py:

elif sys.platform.startswith(('freebsd', 'netbsd')):

enkore avatar Jul 16 '16 11:07 enkore

"whether it actually works" <-- (if you run the tests and the one test in src/borg/testsuite/xattr passes and is not skipped - then it works)

enkore avatar Jul 18 '16 07:07 enkore

https://mail-index.netbsd.org/tech-kern/2022/05/24/msg028105.html

Looks like we have to wait for netbsd 10.

Hmm, guess like the xattr stuff is already in the pre-release netbsd 10 code (and also the fs corruption issues seem to be solved), so if someone has time, that could be worked on.

After getting that to work on netbsd 10 pre, behaviour of the new code should be also tested on netbsd < 10 again, so it works there as expected (== without supporting xattrs, but not crashing or malfunctioning).

ThomasWaldmann avatar Apr 03 '23 01:04 ThomasWaldmann

NetBSD 10 is released:

https://www.netbsd.org/

Vagrant machine - is netbsd 10 already available?:

https://app.vagrantup.com/boxes/search?architecture=amd64&provider=virtualbox&q=netbsd&sort=created

ThomasWaldmann avatar Dec 24 '23 01:12 ThomasWaldmann

Still no vagrant box, no netbsd user caring for this. Guess I'll remove it from milestone.

ThomasWaldmann avatar Apr 22 '24 12:04 ThomasWaldmann