This repository has been archived by the owner. It is now read-only.

fuse4ex-kext: Caveats section gives bad instructions #15364

karlsackett opened this Issue Oct 8, 2012 · 14 comments


None yet
6 participants

According to 'brew info fuse4x-kext':

"In order for FUSE-based filesystems to work, the fuse4x kernel extension
must be installed by the root user:

sudo cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.1/Library/Extensions/fuse4x.kext /Library/Extensions"

Here is the result when I try this:

~ sudo cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.1/Library/Extensions/fuse4x.kext /Library/Extensions
cp: invalid option -- 'X'
Try 'cp --help' for more information.

This set of options, '-rfX', doesn't work for either GNU cp or BSD cp.


mistydemeo commented Oct 9, 2012

-X is a valid option in OS X's cp. (It tells cp not to copy extended attributes or resource forks.) Are you sure you're using the system's BSD cp?

Using an explicit /bin/cp fixed the problem.

What threw me is that -r isn't listed as a valid option on the BSD cp's man page, while -X is not a valid option for GNU cp. So it doesn't matter which version of cp you use; -rfX isn't supposed to be a valid combination of options for either of them, at least according to their respective man pages.

But /bin/cp -rfX apparently worked.


mistydemeo commented Oct 9, 2012

-r is listed in the system BSD cp manpage, but with the caveat:

     Historic versions of the cp utility had a -r option.  This implementation supports that
     option; however, its use is strongly discouraged, as it does not correctly copy special files,
     symbolic links, or fifo's.

So it's valid, but probably not the best invocation.


adamv commented Oct 9, 2012

Can you post your which cp?


adamv commented Oct 9, 2012

Unless we want to mess with the cp line (@anatol ?) I'd say we close this issue, as we don't support replacing /bin with GNU versions.


anatol commented Oct 9, 2012

The standard BSD 'cp' is a core tool and replacing it with GNU cp is a bad idea (as for me).

But I am ok with using full path to cp, just in case if a user puts its own version of this tool. In this case we should check all formulas and make sure that we use full path in all cases where BSD specific features are used (as '-X' for cp).

~ which cp
~ ll /usr/local/opt/coreutils/libexec/gnubin/cp
lrwxr-xr-x 1 krs 40 Sep  2 19:33 /usr/local/opt/coreutils/libexec/gnubin/cp -> /usr/local/Cellar/coreutils/8.19/bin/gcp

adamv commented Oct 9, 2012

Closing; when replacing BSD tools with GNU, we assume you know what you are doing.

@adamv adamv closed this Oct 9, 2012


Sharpie commented Oct 10, 2012

I suppose we could change the line to explicitly run /bin/cp, will add to some fuse4x updates I have on deck at the moment.

@Sharpie Sharpie reopened this Oct 10, 2012


anatol commented Oct 10, 2012

I suppose we could change the line to explicitly run /bin/cp

To be consistent we need to change all other formulas to use full path to standard tools (especially to those that use BSD specific features, such as -X for 'cp')


adamv commented Oct 11, 2012

No we're not going to add /bin before everything, don't be silly.

@adamv adamv closed this Oct 11, 2012

@Sharpie Sharpie reopened this Oct 11, 2012

@Sharpie Sharpie closed this in 922b8a5 Oct 11, 2012


MikeMcQuaid commented Oct 11, 2012

Perhaps anything with --with-default-names could be keg-only and/or removed from the PATH by superenv?


Sharpie commented Oct 11, 2012

Perhaps anything with --with-default-names could be keg-only

I get the feeling people installing coreutils would just brew link it anyway.


mistydemeo commented Oct 11, 2012

@MikeMcQuaid They're already not in PATH except when requested, this was a user following the command on their regular prompt.

At any rate coreutils no longer exposes a --with-default-names option, and installs the default names in an unlinked location. This user had brew --prefix/libexec/gnubin in their PATH. Which is fine, but people who play with fire know what to expect. ;)

snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012

fuse4x-kext: Use explicit path to cp in caveats
Directions for installing the fuse4x kernel extension rely on the `-X` option
which is only available from BSD `cp` and is absent in GNU `cp`.

Fixes #15364.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.