File::ExtAttr 1.08, (Open)Solaris and 2 xattr schemes
I released File::ExtAttr 1.08, which has some changes to make it report errors more consistently (
$! should always contain the value of
errno now). It also has some build changes, which will hopefully avoid all the CPAN Testers FAIL reports on platforms that don’t have the development packages installed for using xattrs (libattr-devel rpm on Linux).
I development this release on various platforms, but the most exciting one was OpenSolaris 2008.05 (AKA Project Indiana). This is so much easier to install and use than Solaris 10. It’s much more like using a Linux distro. The OpenSolaris LiveCD is very easy to install, and things just seem to work. It took about 6 steps to get a fully functional development environment for File::ExtAttr.
While developing 1.08 on OpenSolaris, I discovered that it has two separate ways of storing extended metadata: extended file attributes, and extensible system attributes. The extensible system attributes were added as part of supporting CIFS on ZFS. It’s still unclear to me why the existing metadata scheme wasn’t good enough – maybe the semantics of the original xattr interface weren’t compatible with the use cases?
(The original xattr scheme is that you open the file as though it were a directory, and then the xattrs can be accessed through directory entries. This is clever, but different to the way Linux, *BSD and Mac OS X implement xattrs.)
I’m now not sure which xattr API I should be exposing through File::ExtAttr. I guess it comes down to which one will be more portable across platforms. I think that will be determined by which xattrs are preserved by tar, etc.
Anyow, here’s the change log for File::ExtAttr 1.08:
1.08 2008-08-19 - (richdawe) Add a typemap for usage of "const char *" in the XS. This may help fix the build with Perl 5.6.x or earlier. - (richdawe) Remove NetBSD 3.x from list of supported OSes, since File::ExtAttr's test suite will never pass on it. - (richdawe) Update Makefile.PL to fail more gracefully when the build pre-requisites are not present. On Linux use Devel::CheckLib to check for libattr. Also exit more gracefully if libattr's headers are not present. - (richdawe) OpenBSD isn't supported, so bail gracefully in Makefile.PL on that platform. - (richdawe) Make sure that the errno value from any failed system calls is propagated into $! (#32679, #32680). - (richdawe) File::ExtAttr no longer generate noisy warnings when an xattr system call fails. All error reporting is now via the function return values and $!. - (richdawe) Operations with non-default or non-"user" namespaces will now fail with EOPNOTSUPP instead of ENOATTR on Mac OS X, *BSD and Solaris. This behaviour matches the behaviour on Linux. - (richdawe) Added a note to the documentation about Solaris extensible system attributes, which are different to extended file attributes.