perl-fuse.git
7 years agoavoid cpan indexing of test::helper master
Dobrica Pavlinusic [Wed, 25 Apr 2012 22:21:00 +0000 (00:21 +0200)]
avoid cpan indexing of test::helper

According to perlmonks, this is standard way to which DBI uses
to hide packages from CPAN

http://www.perlmonks.org/?node_id=463693

7 years agoRemove pre-2.6 FUSE API version checks from Fuse.pm.
Derrik Pates [Thu, 12 Apr 2012 14:30:58 +0000 (08:30 -0600)]
Remove pre-2.6 FUSE API version checks from Fuse.pm.

7 years agoUpdate change list.
Derrik Pates [Sun, 8 Apr 2012 14:07:42 +0000 (08:07 -0600)]
Update change list.

7 years agoAssorted additional cleanups.
Derrik Pates [Sun, 8 Apr 2012 05:36:30 +0000 (23:36 -0600)]
Assorted additional cleanups.

Fix up some tabbing.

Set up a STAT_SEC() macro like the STAT_NSEC() macro.

7 years agoBe more compatible with OSes that aren't Linux.
Derrik Pates [Sun, 8 Apr 2012 05:31:50 +0000 (23:31 -0600)]
Be more compatible with OSes that aren't Linux.

Include sys/ioccom.ph on non-Linux OSes. This will work better on
NetBSD 6 and OS X with Fuse4X (which ioctl() is made to work on
them).

7 years agoTabbing cleanups for poll helper functions.
Derrik Pates [Wed, 4 Apr 2012 22:58:17 +0000 (16:58 -0600)]
Tabbing cleanups for poll helper functions.

7 years agoUse the new-style sparse structure population syntax.
Derrik Pates [Wed, 4 Apr 2012 22:16:19 +0000 (16:16 -0600)]
Use the new-style sparse structure population syntax.

The new compiler on Lion (clang?) complained about the population of
_available_ops, due to the use of "old style" sparse struct population
syntax. Changing to "new style" to decrease the number of warnings.

7 years agoMake ioctl implementation BSD-friendly.
Derrik Pates [Wed, 4 Apr 2012 21:57:45 +0000 (15:57 -0600)]
Make ioctl implementation BSD-friendly.

*BSD uses some different IOCTL-related macros. Set things up in a
cross-platform-friendly fashion so that the ioctl() wrapper implementation
will (in the future) work with *BSD.

Keep in mind this does not work *now*. NetBSD 6 will include PerFUSE, and
use libfuse 2.8.x, so ioctl() *may* work, and Fuse4X has userspace API
support for FUSE 2.8 features (but its kernel extension doesn't yet, the
developer says it's in the works). This is so that when that code hits,
this will work, and for now, it will build cleanly.

7 years agoAdd a word boundary match to MacFUSE compat hack.
Derrik Pates [Wed, 4 Apr 2012 19:38:48 +0000 (13:38 -0600)]
Add a word boundary match to MacFUSE compat hack.

This is to improve compatibility with Fuse4X. I'll be rolling in other
changes in the near future to fix the ioctl implementation to work
with Fuse4X as well.

7 years agoUse __APPLE__ for OS X-specific sections.
Derrik Pates [Fri, 23 Mar 2012 23:27:31 +0000 (17:27 -0600)]
Use __APPLE__ for OS X-specific sections.

Instead of using __FreeBSD__ as the preprocessor symbol for OS X-specific
bits, and verifying that it's 10 or greater, use __APPLE__. It's a
macro that's consistently defined by Apple's gcc, so it's easier to
discern as OS X than the prior way.

7 years agoRemove #if's for pre-FUSE 2.6 API checks.
Derrik Pates [Fri, 23 Mar 2012 22:47:21 +0000 (16:47 -0600)]
Remove #if's for pre-FUSE 2.6 API checks.

Since we're not going to worry about supporting FUSE API versions
prior to 2.6 (which is at this point widely supported), remove a
bunch of preprocessor conditionals for things that depended on FUSE
API versions prior to 2.6.

7 years agoMerge branch 'master' of github.com:dpavlin/perl-fuse
Derrik Pates [Wed, 21 Mar 2012 01:49:55 +0000 (19:49 -0600)]
Merge branch 'master' of github.com:dpavlin/perl-fuse

7 years agoIncrement version number, to be ready for a new release.
Derrik Pates [Wed, 21 Mar 2012 01:42:23 +0000 (19:42 -0600)]
Increment version number, to be ready for a new release.

7 years agoGet setsid() and provide absolute path for pidfile.
Derrik Pates [Mon, 19 Mar 2012 16:11:56 +0000 (10:11 -0600)]
Get setsid() and provide absolute path for pidfile.

7 years agoAdded a daemonize() function to account for certain conditions where the forked proce...
LinuxMercedes [Mon, 9 Jan 2012 22:27:57 +0000 (16:27 -0600)]
Added a daemonize() function to account for certain conditions where the forked process would still die (e.g. if mounted as a home directory and the user logs in multiple times).

7 years agos/MacFUSE/OSXFUSE/g;
Derrik Pates [Wed, 14 Mar 2012 22:05:37 +0000 (16:05 -0600)]
s/MacFUSE/OSXFUSE/g;

Instead of recommending the use of MacFUSE, suggest the newer, actually
maintained OSXFUSE. Keeping the MacFUSE compat hack for now, since it
doesn't impact OSXFUSE (and I just tested it on a Mac OS 10.6 system
in front of me; "make test" goes off with zero hitches).

7 years agoFixing ioctl on 32bit arches.
Derrik Pates [Wed, 14 Mar 2012 16:56:32 +0000 (10:56 -0600)]
Fixing ioctl on 32bit arches.

Trying the ioctl tests on ppc netted a problem - seems that even though
I'm casting cmd to "unsigned int", unless I use "newSVuv" instead of
"newSViv", it ends up signed again anyway.

7 years agoDocumentation cleanups.
Derrik Pates [Mon, 12 Mar 2012 20:55:11 +0000 (14:55 -0600)]
Documentation cleanups.

Correct docs for open(), utimens() and ioctl() ops to match up with
code changes.

Add a blurb explaining what removexattr() does.

Add an extra newline in the release() doc section to fully separate
two things that should be actually separate.

7 years agoSupport more accurate timestamps for utimens().
Derrik Pates [Sun, 4 Mar 2012 18:05:57 +0000 (11:05 -0700)]
Support more accurate timestamps for utimens().

Added an option to Fuse::main(), specifically "utimens_as_array",
that causes timestamps to be passed as arrays containing the UNIX
timestamp (seconds since the epoch), followed by the number of
nanoseconds, instead of as a floating-point value, for better
precision. However, I've noticed that when (on Linux, at least)
you "touch" a file, which ends up with utimensat() getting passed
a NULL value for the timestamp array, the resulting timestamp that
utimens() gets always has a "0" for the nanosecond field. I think
that's a FUSE misfunction.

7 years agoLion compat for -lfuse_ino64 hack.
Derrik Pates [Sat, 3 Mar 2012 04:42:38 +0000 (21:42 -0700)]
Lion compat for -lfuse_ino64 hack.

7 years agoDon't override the include path if empty.
Derrik Pates [Sat, 3 Mar 2012 04:25:01 +0000 (21:25 -0700)]
Don't override the include path if empty.

7 years agoAdded a mention about sub-second times to getattr documentation.
Derrik Pates [Fri, 2 Mar 2012 14:12:26 +0000 (07:12 -0700)]
Added a mention about sub-second times to getattr documentation.

7 years agoRewrite timestamp handling to support different representations.
Derrik Pates [Fri, 2 Mar 2012 05:56:46 +0000 (22:56 -0700)]
Rewrite timestamp handling to support different representations.

Instead of just allowing sub-second resolution times to be passed
as the fractional part of a floating point value, also support passing
times as an array ref, with separate second and nanosecond portions.
Decided to do this because the floating point representation can lose
precision (it's represented internally as a double). It tends to get
squirrelly around about a tenth of a microsecond.

7 years agoUpdated Changes and fixed a couple indents.
Derrik Pates [Thu, 1 Mar 2012 17:28:47 +0000 (10:28 -0700)]
Updated Changes and fixed a couple indents.

7 years agoAdd fix for RT #71271.
Derrik Pates [Thu, 1 Mar 2012 06:32:40 +0000 (23:32 -0700)]
Add fix for RT #71271.

Seems that my utimens() addition inspired someone to notice the
lack of support in other codepaths for sub-second time resolution.
This fix takes the fractional portion of any mtime/ctime/atime
values and converts it into the appropriate nanosecond value, and
assigns that to the correct location in the "struct stat". Tested
on Linux 3.0 (Ubuntu 11.10), FreeBSD 8.2, NetBSD 5.1 and MacOS X
10.6 (Snow Leopard).

7 years agoCode cleanups.
Derrik Pates [Wed, 29 Feb 2012 00:20:24 +0000 (17:20 -0700)]
Code cleanups.

More perl-izing using list assignment and declaration.

Added more comments to clarify purpose of parts of code.

Tweaked layout a bit to match up better with the original C version
(mostly declaration/calling/assignment order bits here and there).

Separated %fuseargs declare/init from setting the 'mountpoint' element,
to better handle parsing options out before grabbing the mount point.

7 years agoInline POD fixups, and change =head1 poll() to =head3.
Derrik Pates [Wed, 29 Feb 2012 00:14:42 +0000 (17:14 -0700)]
Inline POD fixups, and change =head1 poll() to =head3.

7 years agoFix a typo in documentation: Separeted -> Separated
Bastien ROUCARIES [Wed, 11 Jan 2012 11:02:54 +0000 (12:02 +0100)]
Fix a typo in documentation: Separeted -> Separated

7 years agoFix a typo in documentation: trunctation -> truncation
Romain Beauxis [Tue, 10 Jan 2012 14:09:06 +0000 (15:09 +0100)]
Fix a typo in documentation: trunctation -> truncation

8 years agoThe current list of major changes to the code.
Derrik Pates [Tue, 25 Oct 2011 14:27:01 +0000 (08:27 -0600)]
The current list of major changes to the code.

Not intended for release yet, but just to keep track.

8 years agoMerge remote-tracking branch 'ktdreyer/master'
Derrik Pates [Tue, 25 Oct 2011 14:23:27 +0000 (08:23 -0600)]
Merge remote-tracking branch 'ktdreyer/master'

8 years agoRemove some print statements, and handle options for debug output and threads.
Derrik Pates [Tue, 25 Oct 2011 14:14:58 +0000 (08:14 -0600)]
Remove some print statements, and handle options for debug output and threads.

8 years agoset license metadata (LGPL)
Ken Dreyer [Mon, 24 Oct 2011 03:34:40 +0000 (21:34 -0600)]
set license metadata (LGPL)

8 years agoAppears that Filesys::Statvfs on OS X actually does return f_namelen.
Derrik Pates [Sun, 14 Aug 2011 03:10:52 +0000 (21:10 -0600)]
Appears that Filesys::Statvfs on OS X actually does return f_namelen.

8 years agoUpdate MANIFEST with new ioctl/poll test scripts.
Derrik Pates [Wed, 10 Aug 2011 02:31:44 +0000 (20:31 -0600)]
Update MANIFEST with new ioctl/poll test scripts.

8 years agoOkay, nevermind, can't do that that way at all...
Derrik Pates [Wed, 10 Aug 2011 02:24:43 +0000 (20:24 -0600)]
Okay, nevermind, can't do that that way at all...

8 years agoFix a typo, and call fuse_version after 'bootstrap' is done.
Derrik Pates [Wed, 10 Aug 2011 02:22:46 +0000 (20:22 -0600)]
Fix a typo, and call fuse_version after 'bootstrap' is done.

8 years agoRemove a couple commented lines.
Derrik Pates [Wed, 10 Aug 2011 02:12:38 +0000 (20:12 -0600)]
Remove a couple commented lines.

Remove lines that were being used to diagnose a problem.

8 years agoUse FUSE_IOCTL_COMPAT from the Fuse module.
Derrik Pates [Wed, 10 Aug 2011 02:10:39 +0000 (20:10 -0600)]
Use FUSE_IOCTL_COMPAT from the Fuse module.

8 years agoAdding working but somewhat preliminary poll() support.
Derrik Pates [Wed, 10 Aug 2011 02:00:03 +0000 (20:00 -0600)]
Adding working but somewhat preliminary poll() support.

This is my current-state support for poll() (my three-quarter-assed
implementation of it anyway). I attempted to implement the poll handle
as an object, but ran into threading problems with that, so it evolved
in a slightly different direction.

Also had to add a small hack in S_fh_store_handle(), as when it
tried to use mg->mg_ptr to make the filehandle, the fsel.pl example
file ended up with all the file descriptors lost but the one. I'm not
currently sure why that's so; I've never seen that happen before, but
it seems to be threading related, as if I disable the 'threaded' flag
to Fuse::main(), it works. I think it may be an undiagnosed threading
interaction...

8 years agoAllow 'nonseekable' for open/create on Fuse 2.8.
Derrik Pates [Wed, 10 Aug 2011 01:56:09 +0000 (19:56 -0600)]
Allow 'nonseekable' for open/create on Fuse 2.8.

8 years agoAdded some ioctl-specific symbols.
Derrik Pates [Wed, 10 Aug 2011 01:55:45 +0000 (19:55 -0600)]
Added some ioctl-specific symbols.

8 years agoNo, '=' is not the same as 'eq', try harder.
Derrik Pates [Wed, 10 Aug 2011 01:41:17 +0000 (19:41 -0600)]
No, '=' is not the same as 'eq', try harder.

8 years agoMake these more compatible with their C counterparts.
Derrik Pates [Wed, 10 Aug 2011 01:40:21 +0000 (19:40 -0600)]
Make these more compatible with their C counterparts.

8 years agoUse a few more Perl-isms.
Derrik Pates [Wed, 3 Aug 2011 00:07:10 +0000 (18:07 -0600)]
Use a few more Perl-isms.

8 years agoCast the 'cmd' argument as unsigned.
Derrik Pates [Tue, 2 Aug 2011 19:33:42 +0000 (13:33 -0600)]
Cast the 'cmd' argument as unsigned.

8 years agoFix handling of XATTR_{CREATE,REPLACE} once and for all.
Derrik Pates [Tue, 2 Aug 2011 19:26:18 +0000 (13:26 -0600)]
Fix handling of XATTR_{CREATE,REPLACE} once and for all.

Okay, seems I missed a prior change that made the XATTR_CREATE and
XATTR_REPLACE functions not included when __FreeBSD__ is defined (which
also includes OS X). Also, the macros that define the symbols when
FreeBSD or NetBSD is used instead of including <sys/xattr.h> didn't
account correctly for OS X's __FreeBSD__ having a value of 10. This
corrects that.

8 years agoEnable threading in the fioc.pl ioctl example.
Derrik Pates [Tue, 2 Aug 2011 16:35:32 +0000 (10:35 -0600)]
Enable threading in the fioc.pl ioctl example.

8 years agoRemove import causing dup symbol warnings, and drop () from Carp import.
Derrik Pates [Tue, 2 Aug 2011 13:49:34 +0000 (07:49 -0600)]
Remove import causing dup symbol warnings, and drop () from Carp import.

8 years ago'unless' confused things and made this work wrong. Fixed.
Derrik Pates [Tue, 2 Aug 2011 13:46:17 +0000 (07:46 -0600)]
'unless' confused things and made this work wrong. Fixed.

8 years agoRemove more unnecessary lines.
Derrik Pates [Tue, 2 Aug 2011 05:45:23 +0000 (23:45 -0600)]
Remove more unnecessary lines.

8 years agoRemove the todo about the test path, I think that's fixed now.
Derrik Pates [Tue, 2 Aug 2011 04:57:49 +0000 (22:57 -0600)]
Remove the todo about the test path, I think that's fixed now.

8 years agoOnly allow non-pkgconfig path on NetBSD (for refuse).
Derrik Pates [Tue, 2 Aug 2011 04:57:18 +0000 (22:57 -0600)]
Only allow non-pkgconfig path on NetBSD (for refuse).

8 years agoFix up ioctl read path so we don't fprintf() error unnecessarily.
Derrik Pates [Tue, 2 Aug 2011 04:55:40 +0000 (22:55 -0600)]
Fix up ioctl read path so we don't fprintf() error unnecessarily.

Avoid fprintf()'ing an error after the Perl code has already
returned an error, in the case where we're not returning data because
we're returning an error code.

8 years agoRemove some debug output that's not needed anymore.
Derrik Pates [Tue, 2 Aug 2011 04:54:31 +0000 (22:54 -0600)]
Remove some debug output that's not needed anymore.

8 years agoHandle the ioctl call returns better.
Derrik Pates [Tue, 2 Aug 2011 04:53:53 +0000 (22:53 -0600)]
Handle the ioctl call returns better.

8 years agoUse asm/ioctl.ph instead of my home-cooked ioctl business.
Derrik Pates [Tue, 2 Aug 2011 04:37:49 +0000 (22:37 -0600)]
Use asm/ioctl.ph instead of my home-cooked ioctl business.

8 years agoAdded examples for ioctl functionality. Currently linux dependent.
Derrik Pates [Tue, 2 Aug 2011 03:13:36 +0000 (21:13 -0600)]
Added examples for ioctl functionality. Currently linux dependent.

8 years agoAdd ioctl docs, and newlines in other needed places.
Derrik Pates [Tue, 2 Aug 2011 03:12:55 +0000 (21:12 -0600)]
Add ioctl docs, and newlines in other needed places.

8 years agoA couple more cleanups to the ioctl wrapper.
Derrik Pates [Tue, 2 Aug 2011 03:12:37 +0000 (21:12 -0600)]
A couple more cleanups to the ioctl wrapper.

8 years agoGot my directions flipped around for the ioctl data handling.
Derrik Pates [Tue, 2 Aug 2011 02:25:59 +0000 (20:25 -0600)]
Got my directions flipped around for the ioctl data handling.

8 years agoAdding FUSE 2.8 specific operation 'ioctl'.
Derrik Pates [Mon, 1 Aug 2011 17:51:43 +0000 (11:51 -0600)]
Adding FUSE 2.8 specific operation 'ioctl'.

Not sure if this will actually work yet, but it builds cleanly, and from
my reading of docs and examples, this *seems* like the right way to
implement the ioctl() call wrapper. (I'd already had this mostly
implemented and disabled, but wasn't sure it was ready for prime time.
We'll find out.)

8 years agoUse the smaller size multiplier only for OS X.
Derrik Pates [Mon, 1 Aug 2011 16:46:22 +0000 (10:46 -0600)]
Use the smaller size multiplier only for OS X.

8 years agoMerge branch 'master' of github.com:dpavlin/perl-fuse
Derrik Pates [Mon, 1 Aug 2011 16:36:33 +0000 (10:36 -0600)]
Merge branch 'master' of github.com:dpavlin/perl-fuse

8 years agoReplace system() calls for 'touch' and friends with Perl ops for same.
Derrik Pates [Mon, 1 Aug 2011 16:33:27 +0000 (10:33 -0600)]
Replace system() calls for 'touch' and friends with Perl ops for same.

If we don't need specific command functionality, we should use Perl calls
to effect the desired result. That way, we depend less on command specific
functionality, and invite less opportunity for platform-specific command
options giving us trouble.

8 years agobump version to 0.14
Dobrica Pavlinusic [Mon, 1 Aug 2011 15:45:06 +0000 (17:45 +0200)]
bump version to 0.14

8 years agoChange mknod test to use Unix::Mknod and POSIX::mkfifo().
Derrik Pates [Sun, 31 Jul 2011 03:48:57 +0000 (21:48 -0600)]
Change mknod test to use Unix::Mknod and POSIX::mkfifo().

Instead of using system() to call executables (and depend on mknod
and mkfifo command syntax), use Unix::Mknod's mknod() function
and POSIX's mkfifo() function to make device and named pipe nodes,
and use Unix::Mknod's makedev() to combine major/minor numbers
appropriately instead of depending on knowing (or guessing)
the shift distance for the device major number.

8 years agoAdditional Changes item.
Derrik Pates [Fri, 29 Jul 2011 19:39:00 +0000 (13:39 -0600)]
Additional Changes item.

8 years agoOkay, seems the #defines are *not* necessary for 5.8.9, but this is...
Derrik Pates [Fri, 29 Jul 2011 19:25:51 +0000 (13:25 -0600)]
Okay, seems the #defines are *not* necessary for 5.8.9, but this is...

8 years agoPerl 5.8.9 worked before this update; 5.8.8 did not. Account for that.
Derrik Pates [Fri, 29 Jul 2011 19:12:50 +0000 (13:12 -0600)]
Perl 5.8.9 worked before this update; 5.8.8 did not. Account for that.

8 years agoDecrease the file size used in getattr.t by a factor of 1024.
Derrik Pates [Fri, 29 Jul 2011 18:52:14 +0000 (12:52 -0600)]
Decrease the file size used in getattr.t by a factor of 1024.

This issue has caused the getattr test to take... well, hours on my
MacBook. This is because the kernel is busy allocating disk pages for
all the empty space prior to the space character that's put into the
file, because the HFS+ filesystem doesn't support sparse files.

8 years agoREADME update, and use full path to mount when checking mounted FSes.
Derrik Pates [Fri, 29 Jul 2011 18:39:55 +0000 (12:39 -0600)]
README update, and use full path to mount when checking mounted FSes.

8 years agoSummary of 0.14 candidate changes.
Derrik Pates [Fri, 29 Jul 2011 17:49:45 +0000 (11:49 -0600)]
Summary of 0.14 candidate changes.

8 years agoOn Perl 5.8, lchown() sometimes ends up with leaked errno; declare $! local.
Derrik Pates [Fri, 29 Jul 2011 17:28:20 +0000 (11:28 -0600)]
On Perl 5.8, lchown() sometimes ends up with leaked errno; declare $! local.

8 years agoOn Perl 5.8, importing Unix::Mknod doesn't import symbols by default.
Derrik Pates [Fri, 29 Jul 2011 17:17:15 +0000 (11:17 -0600)]
On Perl 5.8, importing Unix::Mknod doesn't import symbols by default.

8 years agoReplace all tests that require knowing syscall numbers.
Derrik Pates [Fri, 29 Jul 2011 16:53:27 +0000 (10:53 -0600)]
Replace all tests that require knowing syscall numbers.

Since tests that need syscall.pm or sys/syscall.pm, et al., always
fail on the CPAN testing systems for one of several reasons (causing
"make test" to fail because loopback.pl can't even create plain
files without it), I'm adopting the *BSD arrangement for handling
mknod() in loopback.pl, and using the Lchown module to do lchown()
instead of trying to lookup a syscall number for it. Also changed
the statfs test to do the same, as I'd already written code to
use Filesys::Statvfs instead of trying to track down the
statfs/statvfs/statvfs1 syscall number, and worry about packing
the arguments the right way. Also changed Makefile.PL to provide
per-platform explanations of what to install for FUSE support, and
moved the "-g -ggdb" options into the OPTIMIZE parameter to
WriteMakefile(). Also made a note of testing against CentOS 5.6,
due to its use of Perl 5.8, as opposed to everything else I'd
tested against prior.

8 years agoChanged clone_params_{new,del} to Perl_clone_params_{new,del}.
Derrik Pates [Sat, 23 Jul 2011 03:07:34 +0000 (21:07 -0600)]
Changed clone_params_{new,del} to Perl_clone_params_{new,del}.

Referenced the sources for Perl 5.13.2 and Perl 5.14.1; seems both use
this function name syntax, with no #define aliases to the prior-used
naming conventions. Not sure what up there.

8 years agoMerge branch 'master' of github.com:dpavlin/perl-fuse
Derrik Pates [Sat, 23 Jul 2011 02:10:14 +0000 (20:10 -0600)]
Merge branch 'master' of github.com:dpavlin/perl-fuse

8 years agoChanges to improve compatibility with Perl 5.8.
Derrik Pates [Sat, 23 Jul 2011 02:09:18 +0000 (20:09 -0600)]
Changes to improve compatibility with Perl 5.8.

8 years agoMerge branch 'master' of github.com:dpavlin/perl-fuse
Dobrica Pavlinusic [Mon, 4 Jul 2011 08:05:55 +0000 (10:05 +0200)]
Merge branch 'master' of github.com:dpavlin/perl-fuse

8 years agoVarious changes to tests and Makefile.
Derrik Pates [Sun, 3 Jul 2011 18:07:59 +0000 (12:07 -0600)]
Various changes to tests and Makefile.

Merged all loopback scripts into a single variant; now threads are
enabled by passing --use-threads to loopback.pl instead of having a
separate script variant, and use of Filesys::Statvfs instead of
bogus filler statfs() data is enabled with --use-real-statfs. Also,
loopback now fork()s itself away into a daemon, rather than depending
on external infrastructure to do it; --pidfile can be passed to create
a PID file.

Altered test/helper.pm and test/s/mount.t to use new loopback.pl semantics.

Altered test/statfs.t to optionally use Filesys::Statvfs's statvfs()
instead of raw syscalls and pack masks, if the option is available
to us. If not available, it will try to use syscalls instead.

Cleanups to Makefile to put different options where they belong,
rather than e.g., abusing the 'OBJECT' list to specify libraries
and such. Works with all platforms.

Updates to README and MANIFEST.

8 years ago0.13 release with FreeBSD, NetBSD and OS X support
Dobrica Pavlinusic [Sun, 3 Jul 2011 17:56:23 +0000 (19:56 +0200)]
0.13 release with FreeBSD, NetBSD and OS X support

8 years agoMake the code work without USE_ITHREADS. FreeBSD's default Perl build
Derrik Pates [Wed, 29 Jun 2011 01:08:27 +0000 (19:08 -0600)]
Make the code work without USE_ITHREADS. FreeBSD's default Perl build
doesn't enable threads (it can be enabled), so let's try to be a bit
more accepting.

8 years agoMerge branch 'master' of github.com:dpavlin/perl-fuse
Derrik Pates [Tue, 28 Jun 2011 02:12:57 +0000 (20:12 -0600)]
Merge branch 'master' of github.com:dpavlin/perl-fuse

8 years agoNetBSD 5.1, not 5.0.
Derrik Pates [Tue, 28 Jun 2011 01:56:58 +0000 (19:56 -0600)]
NetBSD 5.1, not 5.0.

8 years agoNetBSD 5.1, not 5.0.
Derrik Pates [Tue, 28 Jun 2011 01:04:18 +0000 (19:04 -0600)]
NetBSD 5.1, not 5.0.

8 years agoUpdates to README.
Derrik Pates [Fri, 24 Jun 2011 17:37:25 +0000 (11:37 -0600)]
Updates to README.

8 years agoSmall pack mask change for 32-bit Linux compatibility.
Derrik Pates [Fri, 24 Jun 2011 16:55:43 +0000 (10:55 -0600)]
Small pack mask change for 32-bit Linux compatibility.

8 years agoChanges to statfs.t to work better with 32-bit versions of NetBSD.
Derrik Pates [Fri, 24 Jun 2011 16:28:26 +0000 (10:28 -0600)]
Changes to statfs.t to work better with 32-bit versions of NetBSD.

8 years agoMultiple changes for better *BSD compatibility, including:
Derrik Pates [Fri, 24 Jun 2011 13:36:53 +0000 (07:36 -0600)]
Multiple changes for better *BSD compatibility, including:

- For OS X/Darwin, use alternate function argument lists that add an
  extra parameter for the setxattr() and getxattr() call wrappers. This
  eliminates some compile-time warnings, and makes sure the call stack
  isn't getting unbalanced when those calls are made.
- For OS X/Darwin, force the use of -lfuse_ino64 on OS X 10.6 (Snow
  Leopard); FUSE filesystems won't work at all otherwise due to changes
  in the inode structure definition, and the pkgconfig files don't check
  for this.
- For OS X/Darwin, don't set the PERL_DL_NONLAZY=1 environment variable
  during "make test"; MacFuse builds their libfuse with a reference to
  _iconv, but doesn't link in -liconv at build time, and due to
  differences in their dynamic linker, linking -liconv into our library
  doesn't get that symbol into its namespace, so tests fail completely
  on OS X due to the unsatisfied link symbol when RTLD_NOW is passed to
  dlopen().
- Enabled alternate mknod handling for NetBSD and OS X/Darwin in
  addition to FreeBSD in the example code.
- Synchronized all changes (except enabling threading) from
  examples/loopback_t.pl to examples/loopback.pl.
- Reenabled threading use for OS X/Darwin in tests; testing on my
  MacBook running OS X 10.6.7 always passes with it enabled (though
  does not with threading disabled, which probably needs some
  diagnosing).
- In the mknod() test, use a different major number shift value (24
  instead of 8) for OS X/Darwin.
- In the statfs() test, use sys/syscall.ph instead of syscall.ph (works
  on Linux and all *BSDs, though NetBSD and OS X/Darwin perls don't h2ph
  the system headers at install time).
- In the statfs() test, altered the Linux pack mask for the statfs()
  syscall, added masks for FreeBSD and OS X/Darwin, and added statvfs1()
  call semantics for NetBSD, so this test will work on all supported
  platforms (though the FreeBSD pack mask may not work on non-64bit
  FreeBSDs, need to test that).
- In the statfs() test, ignore f_namelen field for NetBSD and
  OS X/Darwin. OS X/Darwin doesn't even have such a field, and NetBSD
  seems to not handle it right for PUFFS filesystems.
- In the symlink() test, use 'cp -R' on NetBSD instead of 'cp -a', since
  NetBSD's 'cp' doesn't know the '-a' option.

8 years agoCircumvent buggy negation of assigned $!.
Bojan Petrovic [Tue, 24 May 2011 21:00:43 +0000 (05:00 +0800)]
Circumvent buggy negation of assigned $!.

Loopback fs fails to create a new file every other time on FreeBSD.
This happens because of a Perl bug which occurs when $! is set from Perl
(as in x_mknod()), and then negated after a failed syscall (as in
x_getattr()). See http://www.perlmonks.org/?node_id=906466.

8 years agoHandle pipe creation in mknod() on FreeBSD.
Bojan Petrovic [Sat, 21 May 2011 20:17:06 +0000 (04:17 +0800)]
Handle pipe creation in mknod() on FreeBSD.

Additional special case is introduced in mknod() callback for the test
loopback fs. Pipes on FreeBSD are created through POSIX::mkfifo,
although they could be created by "mkfifo" command or syscall.  In the
"test/mknod.t", initial named pipe is now created by executing "mkfifo".

8 years agoMerge pull request #7 from ALPHA-60/master
Derrik Pates [Sat, 21 May 2011 19:09:53 +0000 (12:09 -0700)]
Merge pull request #7 from ALPHA-60/master

FreeBSD fixes

8 years agoWhen testing, check if '/proc/mounts' exists. (by Bojan Petrovic)
Derrik Pates [Sat, 21 May 2011 18:53:41 +0000 (12:53 -0600)]
When testing, check if '/proc/mounts' exists. (by Bojan Petrovic)

On FreeBSD, even if procfs is mounted under '/proc', there is no
'/proc/mounts' file.  Instead on relying on the existence of '/proc'
directory, we check if the '/proc/mounts' file exists. Otherwise, tests
cannot even start on FreeBSD.

8 years agoMerge remote-tracking branch 'dpavlin/master'
Bojan Petrovic [Sat, 21 May 2011 18:31:40 +0000 (20:31 +0200)]
Merge remote-tracking branch 'dpavlin/master'

Conflicts:
Fuse.xs

8 years agoHandle mknod() differently when running FreeBSD, as its mknod syscall doesn't
Derrik Pates [Sat, 21 May 2011 18:07:15 +0000 (12:07 -0600)]
Handle mknod() differently when running FreeBSD, as its mknod syscall doesn't
create plain files at all.

8 years agoFor FreeBSD and NetBSD, define XATTR_{CREATE,REPLACE}, since there is no
Derrik Pates [Sat, 21 May 2011 17:20:53 +0000 (11:20 -0600)]
For FreeBSD and NetBSD, define XATTR_{CREATE,REPLACE}, since there is no
<sys/xattr.h> for us to use to reference the values.

8 years agoWhen testing, check if '/proc/mounts' exists.
Bojan Petrovic [Sat, 21 May 2011 08:47:50 +0000 (10:47 +0200)]
When testing, check if '/proc/mounts' exists.

On FreeBSD, even if procfs is mounted under '/proc', there is no
'/proc/mounts' file.  Instead on relying on the existence of '/proc'
directory, we check if the '/proc/mounts' file exists. Otherwise, tests
cannot even start on FreeBSD.

8 years agoDo not include 'xattr.h' on FreeBSD.
Bojan Petrovic [Sat, 21 May 2011 08:42:44 +0000 (10:42 +0200)]
Do not include 'xattr.h' on FreeBSD.

The build will break if this file is included, or if XATTR_CREATE
and XATTR_REPLACE constants are used.

8 years agodocument changes for version 0.12
Dobrica Pavlinusic [Fri, 20 May 2011 13:38:44 +0000 (15:38 +0200)]
document changes for version 0.12