This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ITP] FUSE 2.8


This package adds FUSE 2.8 support to Cygwin. FUSE is the well-known
"Filesystem in Userspace" project for Linux and other platforms: [FUSE].

FUSE file systems that use this package usually require minimal changes to
run on Cygwin. For example, here are the pull requests I have submitted to
SSHFS and FUSEPY to make them run on Cygwin: [SSHFS-PR], [FUSEPY-PR].

FUSE file systems that use this package will expose a file system not just
to Cygwin, but to ALL of Windows (i.e. Explorer, cmd.exe and all of
Windows apps will be able to access their files). For this to work the
cygfuse.dll in the package needs to interface with a kernel mode
component, which does NOT ship as part of this package.

Which brings me to a large caveat with this package. The package has an
external dependency on my own open source project called WinFsp [WINFSP].
WinFsp includes the necessary kernel-mode driver that enables the
FUSE-like functionality on Windows. Unfortunately this driver can only be
built with Microsoft tools. Furthermore it must be signed with an EV
certificate (and going forward Microsoft will soon require that they sign
every kernel mode driver themselves through the sysdev portal).

For this reason you cannot simply get the source code for the FUSE cygport
and WinFsp and compile everything from scratch. This is not a licensing
issue (all code is AGPLv3), but a tools/signing issue. The alternatives
are:

1. Accept the FUSE cygport package as is. Understand that it requires
prior installation of WinFsp in order to properly work.

2. Accept the FUSE cygport package, but require that the package downloads
and installs the WinFsp MSI (perhaps as part of its post install process).

3. Reject this package.

I have currently implemented option (1) but I am happy to change to option
(2). The package files can be found at [CYGFUSE]. The source code for the
package can be found under the opt/cygfuse directory in this repository:
[WINFSP-GH]

The setup.hint file is as follows:

    category: Utils
    requires: cygwin pkg-config
    sdesc: "WinFsp-FUSE compatibility layer"
    ldesc: "WinFsp-FUSE enables FUSE file systems to be run on Cygwin."

The package is generated by the following cygport file:

    NAME="fuse"
    VERSION=2.8
    RELEASE=3
    CATEGORY="Utils"
    SUMMARY="WinFsp-FUSE compatibility layer"
    DESCRIPTION="WinFsp-FUSE enables FUSE file systems to be run on
Cygwin."
    HOMEPAGE="http://www.secfs.net/winfsp/";

    
SRC_URI=${CYGPORT_SRC_URI:-"https://github.com/billziss-gh/winfsp/archive/m
aster.tar.gz"}
    SRC_DIR=${CYGPORT_SRC_DIR:-winfsp-master}

    src_compile()
    {
        lndirs
        cd ${B}/opt/cygfuse
        make
     }

    src_install()
    {
        cd ${B}/inc/fuse
        includeinto fuse
        doinclude fuse.h
        doinclude fuse_common.h
        doinclude fuse_opt.h
        doinclude winfsp_fuse.h

        cd ${B}/opt/cygfuse
        dobin cygfuse-${VERSION}.dll
        dolib libfuse-${VERSION}.dll.a
        dosym libfuse-${VERSION}.dll.a /usr/lib/libfuse.dll.a
        dopkgconfig fuse.pc
    }

    RESTRICT="strip postinst-doc"

To test the package install it and the WinFsp MSI. Also install glib2 and
any build tools you may be missing. Clone my fork of SSHFS from [SSHFS].
Then issue the following commands in the cloned repository.

    autoreconf -i
    ./configure
    make

You should now be able to test sshfs with a command line such as:

    ./sshfs -o idmap=user billziss@macbook-pro: Y:

Be sure to issue this command from a non-administrator prompt as Windows
has some arcane rules on how drives are assigned. You can now open Windows
explorer and browse through drive Y:. When you are done simply issue:

    pkill sshfs

Comments greatly appreciated.

Bill

[CYGFUSE]   https://github.com/billziss-gh/winfsp/releases/tag/v0.14
[FUSE]      https://en.wikipedia.org/wiki/Filesystem_in_Userspace
[FUSEPY-PR] https://github.com/terencehonles/fusepy/pull/54
[SSHFS]     https://github.com/billziss-gh/sshfs
[SSHFS-PR]  https://github.com/libfuse/sshfs/pull/23
[WINFSP]    http://www.secfs.net/winfsp/
[WINFSP-GH] https://github.com/billziss-gh/winfsp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]