Hi Gordon,

> Some time ago, I got a rudimentary version of a GNU/Linux-compatible
> "sys/xattr.h" module working on my Mac. (For those unfamiliar with the
> trivia involved, Mac OS includes eight of the twelve xattr functions
> natively, but with extra parameters that simultaneously render them
> not directly compatible while obviating the need for the other four.)
> 
> I didn't finish developing it at the time because I wasn't sure where
> I should send it so people could use it; or, for that matter, whether
> anyone WOULD want to use it when it only works on Mac OS.
> 
> Is this a thing that anyone would want submitted to GNUlib?

It seems to me that many GNU packages (coreutils, emacs, gettext, sed, at
least) include <sys/xattr.h> only for the purpose of ACLs.

GNU tar needs variants with *at, which it declares in xattr-at.h.

GNU wget2 needs it in order to set
  user.mime_type
  user.charset
  user.xdg.origin.url
  user.xdg.referrer.url
  user.last_modified
attributes, and has code for it on Linux, macOS, FreeBSD (the code for
FreeBSD being obviously buggy).

But these are not the only OSes that have xattr. fgetxattr and fsetxattr
are available on
  Linux, Hurd, macOS, NetBSD, Cygwin, Android
whereas the extattr_* functions are available on
  FreeBSD, NetBSD.

Would you like to work on submitting a sys/xattr.h facility for Gnulib,
that
  - covers all functions from glibc [1],
  - works on Linux, Hurd, macOS, FreeBSD, NetBSD, Cygwin, Android ?

You can delegate some of the platform specific testing to us.
You will need to sign copyright papers with the FSF for this contribution,
cf. [2].

Bruno

[1] 
https://sourceware.org/git/?p=glibc.git;a=blob;f=misc/sys/xattr.h;h=f9345137beeb7ed7909b7d58b97061396df16022;hb=HEAD
[2] https://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html




Reply via email to