<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY fuse-download-http "&sourceforge-repo;/fuse/fuse-&fuse-version;.tar.gz">
  <!ENTITY fuse-download-ftp  " ">
  <!ENTITY fuse-md5sum        "33cae22ca50311446400daf8a6255c6a">
  <!ENTITY fuse-size          "564 KB">
  <!ENTITY fuse-buildsize     "9.5 MB">
  <!ENTITY fuse-time          "0.1 SBU">
]>

<sect1 id="fuse" xreflabel="Fuse-&fuse-version;">
  <?dbhtml filename="fuse.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-26 23:16:43 -0500 (Thu, 26 Feb 2015) $</date>
  </sect1info>

  <title>Fuse-&fuse-version;</title>

  <indexterm zone="fuse">
    <primary sortas="a-Fuse">Fuse</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to Fuse</title>

    <para>
      <application>FUSE</application> (Filesystem in Userspace) is a simple
      interface for userspace programs to export a virtual filesystem to the
      Linux kernel. <application>Fuse</application> also aims to provide a
      secure method for non privileged users to create and mount their own
      filesystem implementations.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&fuse-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&fuse-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &fuse-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &fuse-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &fuse-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &fuse-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Fuse Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="doxygen"/> (to build the API documentation)
    </para>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/fuse"/>
    </para>
  </sect2>

  <sect2 role="kernel" id="fuse-kernel">
    <title>Kernel Configuration</title>

    <para>
      Enable the following options in the kernel configuration and recompile the
      kernel if necessary:
    </para>

<screen><literal>File systems  ---&gt;
  &lt;*/M&gt; FUSE (Filesystem in Userspace) support [CONFIG_FUSE_FS]</literal></screen>

    <indexterm zone="fuse fuse-kernel">
      <primary sortas="d-fuse">fuse</primary>
    </indexterm>
  </sect2>

  <sect2 role="installation">
    <title>Installation of Fuse</title>

    <note>
      <para>
        After the <command>configure</command> script has finished you will
        see a warning shown below. You can safely disregard this warning.
      </para>

<screen><computeroutput>configure: WARNING:
******************************************************************
* Please install util-linux version 2.18 or later which supports *
* --fake and --no-canonicalize options in mount and umount       *
******************************************************************</computeroutput></screen>
    </note>

    <para>
      Install <application>Fuse</application> by running the following
      commands:
    </para>

<screen><userinput>./configure --prefix=/usr --disable-static INIT_D_PATH=/tmp/init.d &amp;&amp;
make</userinput></screen>

    <para>
      If you have <xref linkend="doxygen"/> installed and wish to build the API
      documentation, issue <command>doxygen doc/Doxyfile</command>.
    </para>

    <para>
      This package does not come with a test suite.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install &amp;&amp;

mv -v   /usr/lib/libfuse.so.* /lib &amp;&amp;
ln -sfv ../../lib/libfuse.so.&fuse-version; /usr/lib/libfuse.so &amp;&amp;
rm -rf  /tmp/init.d &amp;&amp;

install -v -m755 -d /usr/share/doc/fuse-&fuse-version; &amp;&amp;
install -v -m644    doc/{how-fuse-works,kernel.txt} \
                    /usr/share/doc/fuse-&fuse-version;</userinput></screen>

    <para>
      If you built the API documentation, install it as the
      <systemitem class="username">root</systemitem> user by issuing the
      following commands:
    </para>

<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/fuse-&fuse-version;/api &amp;&amp;
install -v -m644    doc/html/* \
                    /usr/share/doc/fuse-&fuse-version;/api</userinput></screen>
  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

    <para>
      <parameter>INIT_D_PATH=/tmp/init.d</parameter>: This parameter installs
      the bootscript into <filename class="directory">/tmp/init.d</filename> as
      a bootscript is not required.
    </para>

    <para>
      <command>mv -v /usr/lib/libfuse.so.* /lib</command>: This moves the
      <application>FUSE</application> library to the root filesystem
      so that it is available early in the boot process in case
      <filename class="directory">/usr</filename> is mounted on a separate
      partition and <xref linkend="ntfs-3g"/> is built with a system-installed
      version of <application>FUSE</application>.
    </para>

    <para>
      <command>rm -rf /tmp/init.d</command>: This removes the unneeded
      bootscript.
    </para>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring fuse</title>

    <sect3 id="fuse-config">
      <title>Config Files</title>

      <para>
        Some options regarding mount policy can be set in the file
        <filename>/etc/fuse.conf</filename>. To install the file run the
        following command as the <systemitem class="username">root</systemitem>
        user:
      </para>

<screen role="root"><userinput>cat &gt; /etc/fuse.conf &lt;&lt; "EOF"
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
#user_allow_other
EOF</userinput></screen>

      <para>
        Additional information about the meaning of the configuration
        options are found in the man page.
      </para>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directory</segtitle>

      <seglistitem>
        <seg>
          fusermount, mount.fuse, and ulockmgr_server
        </seg>
        <seg>
          libfuse.so and libulockmgr.so
        </seg>
        <seg>
          /usr/include/fuse
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="fusermount">
        <term><command>fusermount</command></term>
        <listitem>
          <para>
            is a set users ID root program to mount and unmount Fuse
            filesystems.
          </para>
          <indexterm zone="fuse fusermount">
            <primary sortas="b-fusermount">fusermount</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mount.fuse">
        <term><command>mount.fuse</command></term>
        <listitem>
          <para>
            is the command <command>mount</command> would call to mount a Fuse
            filesystem.
          </para>
          <indexterm zone="fuse mount.fuse">
            <primary sortas="b-mount.fuse">mount.fuse</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ulockmgr_server">
        <term><command>ulockmgr_server</command></term>
        <listitem>
          <para>
            is the Userspace Lock Manager Server for Fuse filesystems.
          </para>
          <indexterm zone="fuse ulockmgr_server">
            <primary sortas="b-ulockmgr_server">ulockmgr_server</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libfuse">
        <term><filename class="libraryfile">libfuse.so</filename></term>
        <listitem>
          <para>
            contains the <application>FUSE</application> API functions.
          </para>
          <indexterm zone="fuse libfuse">
            <primary sortas="c-libfuse">libfuse.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libulockmgr">
        <term><filename class="libraryfile">libulockmgr.so</filename></term>
        <listitem>
          <para>
            contains the Userspace Lock Manager API functions.
          </para>
          <indexterm zone="fuse libulockmgr">
            <primary sortas="c-libulockmgr">libulockmgr.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>

  </sect2>

</sect1>
