You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(23) |
Sep
(3) |
Oct
(28) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
(11) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
|
Nov
(7) |
Dec
(6) |
2008 |
Jan
(8) |
Feb
(5) |
Mar
|
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Richard D. <ric...@us...> - 2007-04-27 06:45:22
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv11532 Modified Files: Changes helpers.c Log Message: Build fix for NetBSD, OpenBSD: Use strerror() if strerror_r() is not available Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Changes 27 Apr 2007 06:14:11 -0000 1.25 --- Changes 27 Apr 2007 06:45:21 -0000 1.26 *************** *** 6,9 **** --- 6,12 ---- and ATTR_TEST_DIR set"; also document ATTR_TEST_DIR. + - (richdawe) Build fix for NetBSD, OpenBSD: Use strerror() + if strerror_r() is not available. + 1.02 2007-04-06 Index: helpers.c =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/helpers.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** helpers.c 28 Aug 2006 11:45:40 -0000 1.3 --- helpers.c 27 Apr 2007 06:45:21 -0000 1.4 *************** *** 9,12 **** --- 9,14 ---- #include "helpers.h" + #ifdef HAS_STRERROR_R + #ifdef __GLIBC__ *************** *** 32,35 **** --- 34,56 ---- #endif + #else /* __GLIBC__ */ + + /* + * No strerror_r(), so impersonate it using strerror(). This may not be + * thread-safe. + */ + static inline char * + my_strerror_r (const int the_errno, char *buf, const size_t buflen) + { + const char *errstr = strerror(the_errno); + + strncpy(buf, errstr, buflen); + buf[buflen - 1] = '\0'; + + return buf; + } + + #endif /* HAS_STRERROR_R */ + void setattr_warn (const char *funcname, const char *attrname, const int the_errno) |
From: Richard D. <ric...@us...> - 2007-04-27 06:14:11
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv32097 Modified Files: Changes Log Message: Note that RT #21214 was fixed in 1.00 Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Changes 27 Apr 2007 06:11:37 -0000 1.24 --- Changes 27 Apr 2007 06:14:11 -0000 1.25 *************** *** 31,34 **** --- 31,37 ---- than warnings to report errors. + - (richdawe) Fix RT #21214: "ISO C90 forbids mixed declarations + and code" + NOTE: This relase has not been built or tested on Mac OS X. |
From: Richard D. <ric...@us...> - 2007-04-27 06:11:39
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30943 Modified Files: Changes META.yml README Log Message: Bump version to 1.03; document fixes so far Index: README =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/README,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README 27 Apr 2007 06:01:57 -0000 1.9 --- README 27 Apr 2007 06:11:37 -0000 1.10 *************** *** 1,3 **** ! File-ExtAttr version 1.01 ========================= --- 1,3 ---- ! File-ExtAttr version 1.03 ========================= Index: META.yml =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/META.yml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** META.yml 2 Oct 2006 22:20:05 -0000 1.4 --- META.yml 27 Apr 2007 06:11:37 -0000 1.5 *************** *** 2,6 **** #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: File-ExtAttr ! version: 1.01 version_from: lib/File/ExtAttr.pm installdirs: site --- 2,6 ---- #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: File-ExtAttr ! version: 1.03 version_from: lib/File/ExtAttr.pm installdirs: site Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Changes 6 Apr 2007 11:44:48 -0000 1.23 --- Changes 27 Apr 2007 06:11:37 -0000 1.24 *************** *** 1,4 **** --- 1,9 ---- Revision history for Perl extension File::ExtAttr. + 1.03 2007-04-27 + + - (richdawe) Fix RT #26542: "Tests fail with taint-mode + and ATTR_TEST_DIR set"; also document ATTR_TEST_DIR. + 1.02 2007-04-06 |
From: Richard D. <ric...@us...> - 2007-04-27 06:11:38
|
Update of /cvsroot/file-extattr/File-ExtAttr/lib/File In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30943/lib/File Modified Files: ExtAttr.pm Log Message: Bump version to 1.03; document fixes so far Index: ExtAttr.pm =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/lib/File/ExtAttr.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ExtAttr.pm 6 Apr 2007 18:03:01 -0000 1.20 --- ExtAttr.pm 27 Apr 2007 06:11:37 -0000 1.21 *************** *** 155,159 **** ); ! our $VERSION = '1.02'; #this is used by getxattr(), needs documentation --- 155,159 ---- ); ! our $VERSION = '1.03'; #this is used by getxattr(), needs documentation |
From: Richard D. <ric...@us...> - 2007-04-27 06:01:59
|
Update of /cvsroot/file-extattr/File-ExtAttr/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv26983/t Modified Files: 00load.t 02load-all.t 03pod-coverage.t 11basic.t 13long.t 14optional.t 15create.t 16replace.t 17createreplace.t 18list.t 20tie-basic.t 22tie-nonuser.t 30nsbasic.t 31nsmultiple.t 32nsnonuser.t 33nslong.t 39nsempty.t Log Message: Remove taint mode from unit tests (RT #26542); document how to use ATTR_TEST_DIR Index: 03pod-coverage.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/03pod-coverage.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 03pod-coverage.t 1 Oct 2006 11:17:56 -0000 1.2 --- 03pod-coverage.t 27 Apr 2007 06:01:57 -0000 1.3 *************** *** 1,3 **** ! #!perl -T -w use strict; --- 1,3 ---- ! #!perl -w use strict; Index: 14optional.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/14optional.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 14optional.t 1 Oct 2006 11:17:56 -0000 1.3 --- 14optional.t 27 Apr 2007 06:01:57 -0000 1.4 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 33nslong.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/33nslong.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 33nslong.t 19 Aug 2006 14:06:25 -0000 1.1 --- 33nslong.t 27 Apr 2007 06:01:57 -0000 1.2 *************** *** 1,3 **** ! #!perl -T # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 15create.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/15create.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 15create.t 1 Oct 2006 11:17:56 -0000 1.2 --- 15create.t 27 Apr 2007 06:01:57 -0000 1.3 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 31nsmultiple.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/31nsmultiple.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 31nsmultiple.t 2 Oct 2006 19:53:06 -0000 1.1 --- 31nsmultiple.t 27 Apr 2007 06:01:57 -0000 1.2 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 02load-all.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/02load-all.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 02load-all.t 1 Oct 2006 11:17:56 -0000 1.3 --- 02load-all.t 27 Apr 2007 06:01:57 -0000 1.4 *************** *** 1,3 **** ! #!perl -T -w use strict; --- 1,3 ---- ! #!perl -w use strict; Index: 30nsbasic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/30nsbasic.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 30nsbasic.t 2 Oct 2006 21:59:40 -0000 1.3 --- 30nsbasic.t 27 Apr 2007 06:01:57 -0000 1.4 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 13long.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/13long.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 13long.t 1 Oct 2006 11:17:56 -0000 1.4 --- 13long.t 27 Apr 2007 06:01:57 -0000 1.5 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 20tie-basic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/20tie-basic.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 20tie-basic.t 2 Oct 2006 20:55:42 -0000 1.6 --- 20tie-basic.t 27 Apr 2007 06:01:57 -0000 1.7 *************** *** 1,3 **** ! #!perl -T -w use strict; --- 1,3 ---- ! #!perl -w use strict; Index: 39nsempty.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/39nsempty.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 39nsempty.t 19 Aug 2006 14:06:25 -0000 1.1 --- 39nsempty.t 27 Apr 2007 06:01:57 -0000 1.2 *************** *** 1,3 **** ! #!perl -T # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 22tie-nonuser.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/22tie-nonuser.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 22tie-nonuser.t 2 Oct 2006 20:55:42 -0000 1.1 --- 22tie-nonuser.t 27 Apr 2007 06:01:57 -0000 1.2 *************** *** 1,3 **** ! #!perl -T -w use strict; --- 1,3 ---- ! #!perl -w use strict; Index: 11basic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/11basic.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 11basic.t 1 Oct 2006 11:17:56 -0000 1.4 --- 11basic.t 27 Apr 2007 06:01:57 -0000 1.5 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 00load.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/00load.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 00load.t 1 Oct 2006 11:17:56 -0000 1.4 --- 00load.t 27 Apr 2007 06:01:57 -0000 1.5 *************** *** 1,3 **** ! #!perl -T -w use strict; --- 1,3 ---- ! #!perl -w use strict; Index: 16replace.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/16replace.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 16replace.t 1 Oct 2006 11:17:56 -0000 1.2 --- 16replace.t 27 Apr 2007 06:01:57 -0000 1.3 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 17createreplace.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/17createreplace.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 17createreplace.t 1 Oct 2006 11:17:56 -0000 1.2 --- 17createreplace.t 27 Apr 2007 06:01:57 -0000 1.3 *************** *** 1,3 **** ! #!perl -T -w # Before `make install' is performed this script should be runnable with --- 1,3 ---- ! #!perl -w # Before `make install' is performed this script should be runnable with Index: 32nsnonuser.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/32nsnonuser.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 32nsnonuser.t 30 Sep 2006 22:10:12 -0000 1.3 --- 32nsnonuser.t 27 Apr 2007 06:01:57 -0000 1.4 *************** *** 1,3 **** ! #!perl -T # -*-perl-*- --- 1,3 ---- ! #!perl -w # -*-perl-*- Index: 18list.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/18list.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 18list.t 6 Apr 2007 11:35:50 -0000 1.1 --- 18list.t 27 Apr 2007 06:01:57 -0000 1.2 *************** *** 1,3 **** ! #!perl -T -w use strict; --- 1,3 ---- ! #!perl -w use strict; |
From: Richard D. <ric...@us...> - 2007-04-27 06:01:58
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv26983 Modified Files: README Log Message: Remove taint mode from unit tests (RT #26542); document how to use ATTR_TEST_DIR Index: README =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/README,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README 2 Oct 2006 22:20:05 -0000 1.8 --- README 27 Apr 2007 06:01:57 -0000 1.9 *************** *** 31,34 **** --- 31,43 ---- Installation requires a C compiler. + "make test" will fail if the filesystem you are building and running + the test suite does not support extended attributes. You can use + the "ATTR_TEST_DIR" environment variable to make the test suite + use a different file system, e.g.: + + mkdir -p /path/to/somewhere/with/extattr/test-dir + export ATTR_TEST_DIR=/path/to/somewhere/with/extattr/test-dir + make test + DEPENDENCIES |
From: Richard D. <ric...@us...> - 2007-04-06 18:03:18
|
Update of /cvsroot/file-extattr/File-ExtAttr/lib/File In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5336/lib/File Modified Files: ExtAttr.pm Log Message: Improve documentation for listfattr(), listfattrns() Index: ExtAttr.pm =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/lib/File/ExtAttr.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ExtAttr.pm 6 Apr 2007 11:44:00 -0000 1.19 --- ExtAttr.pm 6 Apr 2007 18:03:01 -0000 1.20 *************** *** 31,34 **** --- 31,51 ---- } + # List attributes in the default namespace. + print "Attributes of bar.txt:\n"; + foreach (listfattr($fh)) + { + print "\t$_\n"; + } + + # Examine attributes in a namespace-aware manner. + my @namespaces = listfattrns($fh); + + foreach my $ns (@namespaces) + { + print "Attributes in namespace '$ns': "; + my @attrs = listfattr($fh, { namespace => $ns }); + print join(',', @attrs)."\n"; + } + =head1 DESCRIPTION *************** *** 177,181 **** Return the value of the attribute named C<$attrname> for the file named C<$filename> or referenced by the open filehandle ! C<$filehandle> (which should be an IO::Handle). If no attribute is found, returns C<undef>. Otherwise gives a warning. --- 194,198 ---- Return the value of the attribute named C<$attrname> for the file named C<$filename> or referenced by the open filehandle ! C<$filehandle> (which should be an IO::Handle or subclass thereof). If no attribute is found, returns C<undef>. Otherwise gives a warning. *************** *** 198,202 **** Set the attribute named C<$attrname> with the value C<$attrval> for the file named C<$filename> or referenced by the open filehandle ! C<$filehandle> (which should be an IO::Handle). C<%flags> allows control of whether the attribute should be created --- 215,219 ---- Set the attribute named C<$attrname> with the value C<$attrval> for the file named C<$filename> or referenced by the open filehandle ! C<$filehandle> (which should be an IO::Handle or subclass thereof). C<%flags> allows control of whether the attribute should be created *************** *** 232,236 **** Delete the attribute named C<$attrname> for the file named C<$filename> or referenced by the open filehandle C<$filehandle> ! (which should be an IO::Handle). Returns true on success, otherwise false and a warning is issued. --- 249,253 ---- Delete the attribute named C<$attrname> for the file named C<$filename> or referenced by the open filehandle C<$filehandle> ! (which should be an IO::Handle or subclass thereof). Returns true on success, otherwise false and a warning is issued. *************** *** 251,256 **** =item listfattr([$filename | $filehandle], [\%flags]) ! Return the attributes on the file named C<$filename> or referenced by the open ! filehandle C<$filehandle> (which should be an IO::Handle). Returns undef on failure and $! will be set. --- 268,274 ---- =item listfattr([$filename | $filehandle], [\%flags]) ! Return an array of the attributes on the file named C<$filename> ! or referenced by the open filehandle C<$filehandle> (which should be ! an IO::Handle or subclass thereof). Returns undef on failure and $! will be set. *************** *** 271,277 **** =item listfattrns([$filename | $filehandle], [\%flags]) ! Return a list containing the namespaces of attributes on the file named C<$filename> or referenced by the open filehandle C<$filehandle> ! (which should be an IO::Handle). Returns undef on failure and $! will be set. --- 289,295 ---- =item listfattrns([$filename | $filehandle], [\%flags]) ! Return an array containing the namespaces of attributes on the file named C<$filename> or referenced by the open filehandle C<$filehandle> ! (which should be an IO::Handle or subclass thereof). Returns undef on failure and $! will be set. |
From: Richard D. <ric...@us...> - 2007-04-06 11:44:49
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv16483 Modified Files: Changes Log Message: Changes to date for 1.02 Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Changes 2 Oct 2006 22:20:05 -0000 1.22 --- Changes 6 Apr 2007 11:44:48 -0000 1.23 *************** *** 1,4 **** --- 1,12 ---- Revision history for Perl extension File::ExtAttr. + 1.02 2007-04-06 + + - (richdawe) Fix listfattr() so it works on Linux. Thanks to rafl + and Jonathan Rockway for the patch! + - (richdawe) Add test cases for listfattr(). + - (richdawe) Fix warning in listfattr(), listfattrns() + when operating on a file handle. + 1.01 2006-10-02 |
From: Richard D. <ric...@us...> - 2007-04-06 11:44:01
|
Update of /cvsroot/file-extattr/File-ExtAttr/lib/File In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv16098/lib/File Modified Files: ExtAttr.pm Log Message: Fix warning in listfattr(), listfattrns() -- pass empty string rather than undef; bump version to 1.02 Index: ExtAttr.pm =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/lib/File/ExtAttr.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ExtAttr.pm 2 Oct 2006 22:20:05 -0000 1.18 --- ExtAttr.pm 6 Apr 2007 11:44:00 -0000 1.19 *************** *** 138,142 **** ); ! our $VERSION = '1.01'; #this is used by getxattr(), needs documentation --- 138,142 ---- ); ! our $VERSION = '1.02'; #this is used by getxattr(), needs documentation *************** *** 201,205 **** C<%flags> allows control of whether the attribute should be created ! or should replace an existing attribute's value. If the key C<create> is true, setfattr will fail if the attribute already exists. If the key C<replace> is true, setfattr will fail if the attribute --- 201,205 ---- C<%flags> allows control of whether the attribute should be created ! or should replace an existing attribute\'s value. If the key C<create> is true, setfattr will fail if the attribute already exists. If the key C<replace> is true, setfattr will fail if the attribute *************** *** 264,268 **** return _is_fh($file) # File handle ! ? _listfattr(undef, $file->fileno(), @_) # Filename : _listfattr($file, -1, @_); --- 264,268 ---- return _is_fh($file) # File handle ! ? _listfattr('', $file->fileno(), @_) # Filename : _listfattr($file, -1, @_); *************** *** 285,289 **** return _is_fh($file) # File handle ! ? _listfattrns(undef, $file->fileno(), @_) # Filename : _listfattrns($file, -1, @_); --- 285,289 ---- return _is_fh($file) # File handle ! ? _listfattrns('', $file->fileno(), @_) # Filename : _listfattrns($file, -1, @_); *************** *** 370,374 **** Copyright (C) 2005 by Kevin M. Goess ! Copyright (C) 2005, 2006 by Richard Dawe This library is free software; you can redistribute it and/or modify --- 370,374 ---- Copyright (C) 2005 by Kevin M. Goess ! Copyright (C) 2005, 2006, 2007 by Richard Dawe This library is free software; you can redistribute it and/or modify |
From: Richard D. <ric...@us...> - 2007-04-06 11:35:51
|
Update of /cvsroot/file-extattr/File-ExtAttr/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv13015/t Added Files: 18list.t Log Message: Patch from rafl and Jonathan Rockway to make listfattr() work on Linux; add test cases for listfattr() --- NEW FILE: 18list.t --- #!perl -T -w use strict; use Test::More tests => 122; use File::Temp qw(tempfile); use File::ExtAttr qw(setfattr getfattr delfattr listfattr); use IO::File; my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); close $fh || die "can't close $filename $!"; my %vals; for (my $i = 0; $i < 10; ++$i) { $vals{"key$i"} = "val$i"; } ########################## # Filename-based tests # ########################## print "# using $filename\n"; foreach (keys %vals) { # create it is (setfattr($filename, $_, $vals{$_}, { create => 1 }), 1); # create it again -- should fail is (setfattr($filename, $_, $vals{$_}, { create => 1 }), 0); # read it back is (getfattr($filename, $_), $vals{$_}); } # Check that the list contains all the attributes. my @attrs = listfattr($filename); @attrs = sort @attrs; my @ks = sort keys %vals; check_attrs(\@attrs, \@ks); # Clean up for next round of testing foreach (keys %vals) { # delete it ok (delfattr($filename, $_)); # check that it's gone is (getfattr($filename, $_), undef); } ########################## # IO::Handle-based tests # ########################## $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; foreach (keys %vals) { # create it is (setfattr($fh, $_, $vals{$_}, { create => 1 }), 1); # create it again -- should fail is (setfattr($fh, $_, $vals{$_}, { create => 1 }), 0); # read it back is (getfattr($fh, $_), $vals{$_}); } # Check that the list contains all the attributes. @attrs = listfattr($fh); @attrs = sort @attrs; @ks = sort keys %vals; check_attrs(\@attrs, \@ks); # Clean up for next round of testing foreach (keys %vals) { # delete it ok (delfattr($filename, $_)); # check that it's gone is (getfattr($filename, $_), undef); } END {unlink $filename if $filename}; sub check_attrs { my @attrs = @{ $_[0] }; my @ks = @{ $_[1] }; is(scalar @attrs, scalar @ks); for (my $i = 0; $i < scalar @attrs; ++$i) { is($attrs[$i], $ks[$i]); } } |
From: Richard D. <ric...@us...> - 2007-04-06 11:35:51
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv13015 Modified Files: MANIFEST extattr_linux.c Log Message: Patch from rafl and Jonathan Rockway to make listfattr() work on Linux; add test cases for listfattr() Index: extattr_linux.c =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/extattr_linux.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** extattr_linux.c 2 Oct 2006 20:27:13 -0000 1.7 --- extattr_linux.c 6 Apr 2007 11:35:50 -0000 1.8 *************** *** 272,276 **** for (spos = 0; (spos < slen); ) { ! char *pNS, *pname, *psrc; /* Get the namespace. */ --- 272,278 ---- for (spos = 0; (spos < slen); ) { ! const char *psrc; ! char *pNS, *pname; ! int src_len; /* Get the namespace. */ *************** *** 311,316 **** * We shift the namespaces from the list to the start of the buffer. */ ! memmove(&sbuf[sbuiltlen], psrc, strlen(psrc) + 1 /* nul */); ! sbuiltlen += strlen(psrc) + 1; } --- 313,319 ---- * We shift the namespaces from the list to the start of the buffer. */ ! src_len = strlen(psrc) + 1; ! memmove(&sbuf[sbuiltlen], psrc, src_len); ! sbuiltlen += src_len; } Index: MANIFEST =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/MANIFEST,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** MANIFEST 2 Oct 2006 22:20:05 -0000 1.14 --- MANIFEST 6 Apr 2007 11:35:50 -0000 1.15 *************** *** 31,34 **** --- 31,35 ---- t/16replace.t t/17createreplace.t + t/18list.t t/20tie-basic.t t/22tie-nonuser.t |
From: Richard D. <ric...@us...> - 2006-10-05 21:47:47
|
Update of /cvsroot/file-extattr/File-Attributes-Extended/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv6113/t Modified Files: 10-basic.t Log Message: Some cross checks Index: 10-basic.t =================================================================== RCS file: /cvsroot/file-extattr/File-Attributes-Extended/t/10-basic.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 10-basic.t 5 Oct 2006 21:45:12 -0000 1.1 --- 10-basic.t 5 Oct 2006 21:47:41 -0000 1.2 *************** *** 2,7 **** use strict; ! use Test::More tests => 6; use File::Attributes qw ':all'; use File::Temp qw/tempfile/; use Cwd; --- 2,8 ---- use strict; ! use Test::More tests => 8; use File::Attributes qw ':all'; + use File::ExtAttr 1.01 qw/getfattr/; use File::Temp qw/tempfile/; use Cwd; *************** *** 19,22 **** --- 20,25 ---- my %attributes = get_attributes($file); is($attributes{type}, 'text/plain'); + is(getfattr($file, 'type'), 'text/plain'); is($attributes{encoding}, 'utf8'); + is(getfattr($file, 'encoding'), 'utf8'); is($attributes{foo}, undef); |
From: Richard D. <ric...@us...> - 2006-10-05 21:45:16
|
Update of /cvsroot/file-extattr/File-Attributes-Extended In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5278 Modified Files: Makefile.PL Added Files: .cvsignore Changes MANIFEST README Log Message: Module basically works --- NEW FILE: README --- File-Attributes-Extended The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc File::Attributes::Extended You can also look for information at: Search CPAN http://search.cpan.org/dist/File-Attributes-Extended CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Attributes-Extended AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/File-Attributes-Extended CPAN Ratings: http://cpanratings.perl.org/d/File-Attributes-Extended COPYRIGHT AND LICENCE Copyright (C) 2006 Richard Dawe This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. --- NEW FILE: .cvsignore --- blib* Makefile Makefile.old Build _build* pm_to_blib* *.tar.gz .lwpcookies File-Attributes-Extended-* cover_db --- NEW FILE: Changes --- Revision history for File-Attributes-Extended 0.01 Date/time First version, released on an unsuspecting world. Index: Makefile.PL =================================================================== RCS file: /cvsroot/file-extattr/File-Attributes-Extended/Makefile.PL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.PL 14 Jul 2006 22:25:13 -0000 1.1.1.1 --- Makefile.PL 5 Oct 2006 21:45:12 -0000 1.2 *************** *** 1,12 **** use ExtUtils::MakeMaker; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. WriteMakefile( ! NAME => 'File::Attributes::Extended', ! VERSION_FROM => 'lib/File/Attributes/Extended.pm', # finds $VERSION ! PREREQ_PM => {}, ! ($] >= 5.005 ? ## Add these new keywords supported since 5.005 ! (ABSTRACT_FROM => 'lib/File/Attributes/Extended.pm', # retrieve abstract from module ! AUTHOR => 'Richard Dawe <ri...@ph...>') : ()) ); --- 1,16 ---- + use strict; + use warnings; use ExtUtils::MakeMaker; WriteMakefile( ! NAME => 'File::Attributes::Extended', ! AUTHOR => 'Richard Dawe <ric...@cp...>', ! VERSION_FROM => 'lib/File/Attributes/Extended.pm', ! ABSTRACT_FROM => 'lib/File/Attributes/Extended.pm', ! PL_FILES => {}, ! PREREQ_PM => { ! 'Test::More' => 0, ! }, ! dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, ! clean => { FILES => 'File-Attributes-Extended-*' }, ); --- NEW FILE: MANIFEST --- Changes MANIFEST META.yml # Will be created by "make dist" Makefile.PL README lib/File/Attributes/Extended.pm t/00-load.t t/boilerplate.t t/pod-coverage.t t/pod.t |
From: Richard D. <ric...@us...> - 2006-10-05 21:45:14
|
Update of /cvsroot/file-extattr/File-Attributes-Extended/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5278/t Added Files: 00-load.t 10-basic.t boilerplate.t pod-coverage.t pod.t Log Message: Module basically works --- NEW FILE: pod-coverage.t --- #!perl -T use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); --- NEW FILE: 00-load.t --- #!perl -T use Test::More tests => 1; BEGIN { use_ok( 'File::Attributes::Extended' ); } diag( "Testing File::Attributes::Extended $File::Attributes::Extended::VERSION, Perl $], $^X" ); --- NEW FILE: boilerplate.t --- #!perl -T use strict; use warnings; use Test::More tests => 3; sub not_in_file_ok { my ($filename, %regex) = @_; open my $fh, "<", $filename or die "couldn't open $filename for reading: $!"; my %violated; while (my $line = <$fh>) { while (my ($desc, $regex) = each %regex) { if ($line =~ $regex) { push @{$violated{$desc}||=[]}, $.; } } } if (%violated) { fail("$filename contains boilerplate text"); diag "$_ appears on lines @{$violated{$_}}" for keys %violated; } else { pass("$filename contains no boilerplate text"); } } not_in_file_ok(README => "The README is used..." => qr/The README is used/, "'version information here'" => qr/to provide version information/, ); not_in_file_ok(Changes => "placeholder date/time" => qr(Date/time) ); sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok($module => 'the great new $MODULENAME' => qr/ - The great new /, 'boilerplate description' => qr/Quick summary of what the module/, 'stub function definition' => qr/function[12]/, ); } module_boilerplate_ok('lib/File/Attributes/Extended.pm'); --- NEW FILE: 10-basic.t --- #!perl -w use strict; use Test::More tests => 6; use File::Attributes qw ':all'; use File::Temp qw/tempfile/; use Cwd; my ($fh, $file) = tempfile("basicXXXXXX", DIR => cwd(), UNLINK => 1); set_attribute($file, type => 'text/plain'); set_attribute($file, encoding => 'utf8'); my @attributes = list_attributes($file); is(grep(/^type$/, @attributes), 1); is(grep(/^encoding$/, @attributes), 1); is(scalar(@attributes), 2); my %attributes = get_attributes($file); is($attributes{type}, 'text/plain'); is($attributes{encoding}, 'utf8'); is($attributes{foo}, undef); --- NEW FILE: pod.t --- #!perl -T use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); |
From: Richard D. <ric...@us...> - 2006-10-05 21:45:14
|
Update of /cvsroot/file-extattr/File-Attributes-Extended/lib/File/Attributes In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5278/lib/File/Attributes Modified Files: Extended.pm Log Message: Module basically works Index: Extended.pm =================================================================== RCS file: /cvsroot/file-extattr/File-Attributes-Extended/lib/File/Attributes/Extended.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Extended.pm 14 Jul 2006 22:25:13 -0000 1.1.1.1 --- Extended.pm 5 Oct 2006 21:45:12 -0000 1.2 *************** *** 19,23 **** use warnings; use base qw(File::Attributes::Base); ! use File::ExtAttr qw(getfattr setfattr delfattr listfattr); our $VERSION = '0.01'; --- 19,23 ---- use warnings; use base qw(File::Attributes::Base); ! use File::ExtAttr 1.01 qw(getfattr setfattr delfattr listfattr); our $VERSION = '0.01'; *************** *** 25,29 **** sub applicable { # XXX: OS check; probably needs some helper function in File::ExtAttr. ! return 1; } --- 25,42 ---- sub applicable { # XXX: OS check; probably needs some helper function in File::ExtAttr. ! # But using what context? This may be path-dependent. ! # ! # For now, just assume that it's support on the operating systems ! # that File::ExtAttr 1.0.1 supports. ! my %supported = ( ! 'linux' => 1, ! 'darwin' => 1, # Mac OS X ! 'freebsd' => 1, ! 'openbsd' => 1, ! # NetBSD? ! 'solaris' => 1, ! ); ! ! return $supported{$^O} || 0; } *************** *** 35,39 **** # XXX: This requires File::ExtAttr to support exceptions. ! return getattr($file, $attr); } --- 48,52 ---- # XXX: This requires File::ExtAttr to support exceptions. ! return getfattr($file, $attr); } *************** *** 46,50 **** # XXX: This requires File::ExtAttr to support exceptions. ! setfattr($file, $attr, $value); } --- 59,63 ---- # XXX: This requires File::ExtAttr to support exceptions. ! return setfattr($file, $attr, $value); } *************** *** 56,60 **** # XXX: This requires File::ExtAttr to support exceptions. ! delfattr($file, $attr); } --- 69,73 ---- # XXX: This requires File::ExtAttr to support exceptions. ! return delfattr($file, $attr); } |
From: Richard D. <ric...@us...> - 2006-10-05 21:17:01
|
Update of /cvsroot/file-extattr/File-Attributes-Extended/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv26172/t Log Message: Directory /cvsroot/file-extattr/File-Attributes-Extended/t added to the repository |
From: Richard D. <ric...@us...> - 2006-10-02 22:20:08
|
Update of /cvsroot/file-extattr/File-ExtAttr/lib/File In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv6706/lib/File Modified Files: ExtAttr.pm Log Message: Fix brown paper bag bugs in MANIFEST that broke the build Index: ExtAttr.pm =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/lib/File/ExtAttr.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExtAttr.pm 1 Oct 2006 11:18:54 -0000 1.17 --- ExtAttr.pm 2 Oct 2006 22:20:05 -0000 1.18 *************** *** 138,142 **** ); ! our $VERSION = '1.00'; #this is used by getxattr(), needs documentation --- 138,142 ---- ); ! our $VERSION = '1.01'; #this is used by getxattr(), needs documentation |
From: Richard D. <ric...@us...> - 2006-10-02 22:20:08
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv6706 Modified Files: Changes MANIFEST META.yml README Log Message: Fix brown paper bag bugs in MANIFEST that broke the build Index: README =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/README,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README 15 Aug 2006 09:18:04 -0000 1.7 --- README 2 Oct 2006 22:20:05 -0000 1.8 *************** *** 1,3 **** ! File-ExtAttr version 1.00 ========================= --- 1,3 ---- ! File-ExtAttr version 1.01 ========================= Index: META.yml =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/META.yml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** META.yml 15 Aug 2006 09:18:04 -0000 1.3 --- META.yml 2 Oct 2006 22:20:05 -0000 1.4 *************** *** 2,6 **** #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: File-ExtAttr ! version: 1.00 version_from: lib/File/ExtAttr.pm installdirs: site --- 2,6 ---- #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: File-ExtAttr ! version: 1.01 version_from: lib/File/ExtAttr.pm installdirs: site Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Changes 2 Oct 2006 22:06:54 -0000 1.21 --- Changes 2 Oct 2006 22:20:05 -0000 1.22 *************** *** 1,4 **** --- 1,8 ---- Revision history for Perl extension File::ExtAttr. + 1.01 2006-10-02 + + - (richdawe) Fix brown paper bag bugs in MANIFEST that broke the build. + 1.00 2006-10-02 Index: MANIFEST =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/MANIFEST,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MANIFEST 19 Aug 2006 18:49:13 -0000 1.13 --- MANIFEST 2 Oct 2006 22:20:05 -0000 1.14 *************** *** 8,11 **** --- 8,13 ---- ExtAttr.xs portable.h + flags.c + flags.h helpers.h helpers.c *************** *** 13,20 **** extattr_bsd.c extattr_linux.h extattr_macosx.h extattr_os.h - extattr_solaris.c extattr_solaris.h t/00load.t t/01distribution.t --- 15,24 ---- extattr_bsd.c extattr_linux.h + extattr_linux.c extattr_macosx.h + extattr_macosx.c extattr_os.h extattr_solaris.h + extattr_solaris.c t/00load.t t/01distribution.t *************** *** 28,32 **** --- 32,38 ---- t/17createreplace.t t/20tie-basic.t + t/22tie-nonuser.t t/30nsbasic.t + t/31nsmultiple.t t/32nsnonuser.t t/33nslong.t |
From: Richard D. <ric...@us...> - 2006-10-02 22:06:57
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv1220 Modified Files: Changes TODO Log Message: 1.00 is ready for release Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Changes 2 Oct 2006 20:55:42 -0000 1.20 --- Changes 2 Oct 2006 22:06:54 -0000 1.21 *************** *** 1,5 **** Revision history for Perl extension File::ExtAttr. ! 1.00 2006-08-28 - (richdawe) Add support for Solaris 10. --- 1,5 ---- Revision history for Perl extension File::ExtAttr. ! 1.00 2006-10-02 - (richdawe) Add support for Solaris 10. Index: TODO =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/TODO,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TODO 1 Oct 2006 11:17:17 -0000 1.14 --- TODO 2 Oct 2006 22:06:54 -0000 1.15 *************** *** 12,16 **** Factor out common code from the tests Refactor the buffer allocation into a common function in ExtAttr.xs - Write tests for testing creation/replacement of attributes (and failure cases) Remove dependency on libattr on Linux - just define ENOATTR -> ENODATA? --- 12,15 ---- *************** *** 24,33 **** there's no point supporting 3.0? - "user." prefix vs. other platforms. This needs sorting out, perhaps - as an optional parameter on each *xattr function? Defaults to "user." - on Linux, nothing on the other platforms. - - TODO: How to handle "user." and the list retrieval? - Document pre-reqs for test suite: Test::Distribution, Test::Pod::Coverage Include these in a .spec file that we can include with distro --- 23,26 ---- |
From: Richard D. <ric...@us...> - 2006-10-02 22:05:06
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv542 Modified Files: extattr_bsd.c Log Message: Namespacing on *listxattr for *BSD Index: extattr_bsd.c =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/extattr_bsd.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** extattr_bsd.c 2 Oct 2006 21:58:34 -0000 1.5 --- extattr_bsd.c 2 Oct 2006 22:05:04 -0000 1.6 *************** *** 296,312 **** struct hv *flags) { ssize_t ret; ! /* XXX: Namespace? */ ! ret = extattr_list_file(path, ! EXTATTR_NAMESPACE_USER, ! /* To get the length on *BSD, pass NULL here. */ ! buflen ? buf : NULL, ! buflen); ! if (buflen && (ret > 0)) ! reformat_list(buf, ret); ! return ret; } --- 296,322 ---- struct hv *flags) { + int attrnamespace = -1; + int ok = 1; ssize_t ret; ! if (!valid_namespace(flags, &attrnamespace)) ! { ! errno = ENOATTR; ! ok = 0; ! } ! if (ok) ! { ! ret = extattr_list_file(path, ! attrnamespace, ! /* To get the length on *BSD, pass NULL here. */ ! buflen ? buf : NULL, ! buflen); ! if (buflen && (ret > 0)) ! reformat_list(buf, ret); ! } ! ! return ok ? ret : -1; } *************** *** 317,333 **** struct hv *flags) { ssize_t ret; ! /* XXX: Namespace? */ ! ret = extattr_list_fd(fd, ! EXTATTR_NAMESPACE_USER, ! /* To get the length on *BSD, pass NULL here. */ ! buflen ? buf : NULL, ! buflen); ! if (buflen && (ret > 0)) ! reformat_list(buf, ret); ! return ret; } --- 327,353 ---- struct hv *flags) { + int attrnamespace = -1; + int ok = 1; ssize_t ret; ! if (!valid_namespace(flags, &attrnamespace)) ! { ! errno = ENOATTR; ! ok = 0; ! } ! if (ok) ! { ! ret = extattr_list_fd(fd, ! attrnamespace, ! /* To get the length on *BSD, pass NULL here. */ ! buflen ? buf : NULL, ! buflen); ! if (buflen && (ret > 0)) ! reformat_list(buf, ret); ! } ! ! return ok ? ret : -1; } |
From: Richard D. <ric...@us...> - 2006-10-02 21:59:44
|
Update of /cvsroot/file-extattr/File-ExtAttr/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30602/t Modified Files: 30nsbasic.t Log Message: More debug info Index: 30nsbasic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/30nsbasic.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 30nsbasic.t 1 Oct 2006 11:18:54 -0000 1.2 --- 30nsbasic.t 2 Oct 2006 21:59:40 -0000 1.3 *************** *** 44,47 **** --- 44,48 ---- @ns = listfattrns($filename); is (grep(/^user$/, @ns), 1); + print '# '.join(' ', @ns)."\n"; #read it back *************** *** 81,84 **** --- 82,86 ---- @ns = listfattrns($fh); is (grep(/^user$/, @ns), 1); + print '# '.join(' ', @ns)."\n"; #read it back |
From: Richard D. <ric...@us...> - 2006-10-02 21:58:39
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30204 Modified Files: extattr_bsd.c extattr_bsd.h Log Message: *BSD for namespace lists Index: extattr_bsd.h =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/extattr_bsd.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** extattr_bsd.h 30 Sep 2006 22:10:12 -0000 1.4 --- extattr_bsd.h 2 Oct 2006 21:58:34 -0000 1.5 *************** *** 50,52 **** --- 50,62 ---- struct hv *flags); + ssize_t bsd_listxattrns (const char *path, + char *buf, + const size_t buflen, + struct hv *flags); + + ssize_t bsd_flistxattrns (const int fd, + char *buf, + const size_t buflen, + struct hv *flags); + #endif /* EXTATTR_BSD_H */ Index: extattr_bsd.c =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/extattr_bsd.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** extattr_bsd.c 2 Oct 2006 20:05:22 -0000 1.4 --- extattr_bsd.c 2 Oct 2006 21:58:34 -0000 1.5 *************** *** 332,334 **** --- 332,444 ---- } + static ssize_t + listxattrns (char *buf, const size_t buflen, + const int iHasUser, const int iHasSystem) + { + size_t len = 0; + int ret; + + if (iHasUser) + len += sizeof(NAMESPACE_USER); + if (iHasSystem) + len += sizeof(NAMESPACE_SYSTEM); + + if (buflen >= len) + { + char *p = buf; + + if (iHasUser) + { + memcpy(p, NAMESPACE_USER, sizeof(NAMESPACE_USER)); + p += sizeof(NAMESPACE_USER); + } + if (iHasSystem) + { + memcpy(p, NAMESPACE_SYSTEM, sizeof(NAMESPACE_SYSTEM)); + p += sizeof(NAMESPACE_SYSTEM); + } + + ret = len; + } + else if (buflen == 0) + { + ret = len; + } + else + { + errno = ERANGE; + ret = -1; + } + + return ret; + } + + ssize_t + bsd_listxattrns (const char *path, + char *buf, + const size_t buflen, + struct hv *flags) + { + int iHasUser = 0; + int iHasSystem = 0; + ssize_t ret; + + ret = extattr_list_file(path, EXTATTR_NAMESPACE_USER, NULL, 0); + if (ret > 0) + iHasUser = 1; + + if (ret >= 0) + { + ret = extattr_list_file(path, EXTATTR_NAMESPACE_SYSTEM, NULL, 0); + if (ret > 0) + iHasSystem = 1; + + /* + * XXX: How do we cope with EPERM? Throw an exception. + * For now ignore it, although this could cause problems. + */ + if (ret == -1 && errno == EPERM) + ret = 0; + } + + if (ret >= 0) + ret = listxattrns(buf, buflen, iHasUser, iHasSystem); + + return ret; + } + + ssize_t + bsd_flistxattrns (const int fd, + char *buf, + const size_t buflen, + struct hv *flags) + { + int iHasUser = 0; + int iHasSystem = 0; + ssize_t ret; + + ret = extattr_list_fd(fd, EXTATTR_NAMESPACE_USER, NULL, 0); + if (ret > 0) + iHasUser = 1; + + if (ret >= 0) + { + ret = extattr_list_fd(fd, EXTATTR_NAMESPACE_SYSTEM, NULL, 0); + if (ret > 0) + iHasSystem = 1; + + /* + * XXX: How do we cope with EPERM? Throw an exception. + * For now ignore it, although this could cause problems. + */ + if (ret == -1 && errno == EPERM) + ret = 0; + } + + if (ret >= 0) + ret = listxattrns(buf, buflen, iHasUser, iHasSystem); + + return ret; + } + #endif /* EXTATTR_BSD */ |
From: Richard D. <ric...@us...> - 2006-10-02 20:55:48
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4777 Modified Files: Changes Log Message: Make the tied hash namespace-aware Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Changes 1 Oct 2006 08:18:49 -0000 1.19 --- Changes 2 Oct 2006 20:55:42 -0000 1.20 *************** *** 2,11 **** 1.00 2006-08-28 - (richdawe) Add support for Solaris 10. - (richdawe) Add support for File::ExtAttr::Tie on *BSD. - (richdawe) API change: Namespace and the create/replace flag ! are now passed via a hash. This breaks API compatibility. ! There should be no further API changes. ! NOTE: This has not been tested on Mac OS X. 0.05 2006-05-27 --- 2,18 ---- 1.00 2006-08-28 + - (richdawe) Add support for Solaris 10. + - (richdawe) Add support for File::ExtAttr::Tie on *BSD. + - (richdawe) API change: Namespace and the create/replace flag ! are now passed via a hash. This breaks API compatibility ! for both File::ExtAttr and File::ExtAttr::Tie. ! ! One API change remains: using exceptions rather ! than warnings to report errors. ! ! NOTE: This relase has not been built or tested on Mac OS X. 0.05 2006-05-27 |
From: Richard D. <ric...@us...> - 2006-10-02 20:55:45
|
Update of /cvsroot/file-extattr/File-ExtAttr/lib/File/ExtAttr In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4777/lib/File/ExtAttr Modified Files: Tie.pm Log Message: Make the tied hash namespace-aware Index: Tie.pm =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/lib/File/ExtAttr/Tie.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Tie.pm 6 Mar 2006 20:53:47 -0000 1.2 --- Tie.pm 2 Oct 2006 20:55:42 -0000 1.3 *************** *** 10,14 **** use Data::Dumper; ! tie %a, "File::ExtAttr::Tie", "/Applications (Mac OS 9)/Sherlock 2"; print Dumper \%a; --- 10,16 ---- use Data::Dumper; ! tie %a, ! "File::ExtAttr::Tie", "/Applications (Mac OS 9)/Sherlock 2", ! { namespace => 'user' }; print Dumper \%a; *************** *** 30,33 **** --- 32,48 ---- the same restrictions as that module in terms of OS support. + =head1 METHODS + + =over 4 + + =item tie "File::ExtAttr::Tie", $filename, [\%flags] + + The flags are the same optional flags as in File::ExtAttr. Any flags + given here will be passed to all operations on the tied hash. + Only the C<namespace> flag makes sense. The hash will be tied + to the default namespace, if no flags are given. + + =back + =cut *************** *** 39,49 **** sub TIEHASH { ! my($class, $file) = @_; ! return bless { file => $file }, ref $class || $class; } sub STORE { my($self, $name, $value) = @_; ! return undef unless setfattr($self->{file}, $name, $value); $value; } --- 54,66 ---- sub TIEHASH { ! my($class, $file, $flags) = @_; ! my $self = bless { file => $file }, ref $class || $class; ! $self->{flags} = defined($flags) ? $flags : {}; ! return $self; } sub STORE { my($self, $name, $value) = @_; ! return undef unless setfattr($self->{file}, $name, $value, $self->{flags}); $value; } *************** *** 51,60 **** sub FETCH { my($self, $name) = @_; ! return getfattr($self->{file}, $name); } sub FIRSTKEY { my($self) = @_; ! $self->{each_list} = [listfattr($self->{file})]; shift @{$self->{each_list}}; } --- 68,77 ---- sub FETCH { my($self, $name) = @_; ! return getfattr($self->{file}, $name, $self->{flags}); } sub FIRSTKEY { my($self) = @_; ! $self->{each_list} = [listfattr($self->{file}, $self->{flags})]; shift @{$self->{each_list}}; } *************** *** 67,77 **** sub EXISTS { my($self, $name) = @_; ! return getfattr($self->{file}, $name) ne undef; } sub DELETE { my($self, $name) = @_; ! my $value = getfattr($self->{file}, $name); ! return $value if delfattr($self->{file}, $name); undef; } --- 84,95 ---- sub EXISTS { my($self, $name) = @_; ! return getfattr($self->{file}, $name, $self->{flags}) ne undef; } sub DELETE { my($self, $name) = @_; ! # XXX: Race condition ! my $value = getfattr($self->{file}, $name, $self->{flags}); ! return $value if delfattr($self->{file}, $name, $self->{flags}); undef; } *************** *** 80,84 **** my($self) = @_; for(listfattr($self->{file})) { ! delfattr($self->{file}, $_); } } --- 98,102 ---- my($self) = @_; for(listfattr($self->{file})) { ! delfattr($self->{file}, $_, $self->{flags}); } } |
From: Richard D. <ric...@us...> - 2006-10-02 20:55:44
|
Update of /cvsroot/file-extattr/File-ExtAttr/t In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4777/t Modified Files: 20tie-basic.t Added Files: 22tie-nonuser.t Log Message: Make the tied hash namespace-aware --- NEW FILE: 22tie-nonuser.t --- #!perl -T -w use strict; use Test::More tests => 20; use File::Temp qw(tempfile); use File::ExtAttr::Tie; use File::ExtAttr qw(getfattr); # Snaffle away the warnings for later analysis. my $warning; $SIG{'__WARN__'} = sub { $warning = $_[0] }; my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); close $fh || die "can't close $filename $!"; my %extattr; my @ks; tie %extattr, 'File::ExtAttr::Tie', $filename, { namespace => 'nonuser' }; # ok()? # Check there are no user extattrs. @ks = keys(%extattr); ok(scalar(@ks) == 0); # Test multiple attributes. my %test_attrs = ( 'foo' => '123', 'bar' => '456' ); my $k; foreach $k (sort(keys(%test_attrs))) { my $v = $test_attrs{$k}; # Check that creation works. $extattr{$k} = $v; is ($warning =~ /(Operation not supported|No such file or directory|Attribute not found)/, 1); is(getfattr($filename, "$k"), undef); # Check that updating works. $extattr{$k} = "$v$v"; is ($warning =~ /(Operation not supported|No such file or directory|Attribute not found)/, 1); is(getfattr($filename, "$k"), undef); $extattr{$k} = $v; is ($warning =~ /(Operation not supported|No such file or directory|Attribute not found)/, 1); is(getfattr($filename, "$k"), undef); # Check that deletion works. delete $extattr{$k}; is(getfattr($filename, "$k"), undef); } # Recreate the keys and check that they're all in the hash. foreach $k (sort(keys(%test_attrs))) { my $v = $test_attrs{$k}; # Check that creation works. $extattr{$k} = $v; is ($warning =~ /(Operation not supported|No such file or directory|Attribute not found)/, 1); is(getfattr($filename, "$k"), undef); } # Check there are only our extattrs. @ks = keys(%extattr); ok(scalar(@ks) == 0); print '# '.join(' ', @ks)."\n"; END {unlink $filename if $filename}; Index: 20tie-basic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/20tie-basic.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 20tie-basic.t 1 Oct 2006 11:17:56 -0000 1.5 --- 20tie-basic.t 2 Oct 2006 20:55:42 -0000 1.6 *************** *** 17,22 **** tie %extattr, 'File::ExtAttr::Tie', $filename; # ok()? ! # Check there are no user extattrs; ignore SELinux security extattrs. ! @ks = grep { !/^security\./ } keys(%extattr); ok(scalar(@ks) == 0); --- 17,22 ---- tie %extattr, 'File::ExtAttr::Tie', $filename; # ok()? ! # Check there are no user extattrs. ! @ks = keys(%extattr); ok(scalar(@ks) == 0); *************** *** 56,61 **** } ! # Check there are only our extattrs; ignore SELinux security extattrs. ! @ks = grep { !/^security\./ } keys(%extattr); ok(scalar(@ks) == scalar(keys(%test_attrs))); print '# '.join(' ', @ks)."\n"; --- 56,61 ---- } ! # Check there are only our extattrs. ! @ks = keys(%extattr); ok(scalar(@ks) == scalar(keys(%test_attrs))); print '# '.join(' ', @ks)."\n"; |