I am new to Ubuntu and I need to create a FUSE based file system. I've seen many examples online, but I can't understand the differences between the examples. Some examples from what I've seen so far include C Programs, so:

  1. I'm curious why the unit tests are created with Python, specifically the py.test module.
  2. Some of the FUSE filesystem archives contain kernel sources, and some don't. I don't understand why this is done.
  3. At the official download page I studied all the examples. Please help me understand the differences between fuse-2.9.7.tar.gz, fuse-2.9.7.tar.gz.asc and Source code (zip), Source code (tar.gz).
  • I've edited your question, and broke it into the three areas you were concerned with. If my edit is not what you intended let me, or someone else know and we will re edit it. I've provided an answer below. – eyoung100 Jun 29 '16 at 4:19

Three Major Questions

I broke your question into the three areas you were concerned about. While I can't help you write a FUSE file system, I can answer those 3 questions:

  1. Quoting Wikipedia:In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.

In regards to why Python was used: This was done because some, if not all programming languages contain Unit Testing Frameworks. A framework allows a programmer to use something that already exists in order to extend and test their code. Python was the programmer's choice for the libfuse project. See The Hitchhiker's Guide to Python: Testing Your Code.

  1. From the README.md file:

FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the Linux kernel. The FUSE project consists of two components: the fuse kernel module (maintained in the regular kernel repositories) and the libfuse userspace library (maintained in this repository). libfuse provides the reference implementation for communicating with the FUSE kernel module.

A FUSE file system is typically implemented as a standalone application that links with libfuse. libfuse provides functions to mount the file system, unmount it, read requests from the kernel, and send responses back. libfuse offers two APIs: a "high-level", synchronous API, and a "low-level" asynchronous API. In both cases, incoming requests from the kernel are passed to the main program using callbacks. When using the high-level API, the callbacks may work with file names and paths instead of inodes, and processing of a request finishes when the callback function returns. When using the low-level API, the callbacks must work with inodes and responses must be sent explicitly using a separate set of API functions.

In regards to your question, all the archives should contain the C Files. If what you downloaded did not contain C files, it probably wasn't a FUSE archive.

  1. All linux based source code always comes in the format <packagename-Ver.si.on>.<compression format>.

    • .tar.gz is common for Linux. It's short for GZipped Tar Archive. Read man tar and man gzip for more information.
    • .zip is common in Windows. It's short for Zipped File. It's linux equivalent comes as two commands. Read man zip and man unzip.
    • .asc is commonly referred to as the ASCII Checksum. This file is used to verify that the file you downloaded isn't corrupted. To verify this use the GNU Privacy Guard program. See UNIX / Linux: PGP TarBall File Signature Keys Verification for examples.

Regarding FUSE Itself

Please note that you probably don't need to write your own FUSE filesystem, as most distributions contain a FUSE package. Ubuntu is one of those distributions. See the Official Ubuntu Repository Page for FUSE, and install it with sudo apt-get-update && sudo apt-get install fuse.

Not the answer you're looking for? Browse other questions tagged or ask your own question.