appfs is a utility that can mount remote resources exposed via the Atom Publishing Protocol (Atompub) as a local filesystem. It leverages Fuse (Filesystem in Userspace) and the Fuse Ruby binding, FuseFS, as well as the Atom-Tools Ruby library. appfs simply glues the two together.
These instructions are for Ubuntu 6.0.6 (Dapper Drake). If you are on another version of Ubuntu or on Debian, these instructions will likely work for you too. If you are on any other Unix-like platform, these instructions will provide some guidance. If you are on Windows, sorry, you don't get to play.
In order to get all the pieces you'll need, you need to enable the Universe repository for apt-get.
$ sudo vim /etc/apt/sources.list
Uncomment the lines that look like this:
deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe
And update the repository data
sudo apt-get update
The Fuse kernel enhancements are built right into all 2.6 Linux kernels. It is only necessary to install the development libraries and command line utilities.
$ sudo apt-get install libfuse-dev
$ sudo apt-get install fuse-utils
You can test whether Fuse is working for you by building and running the hello world example, a copy of which can be found here.
$ gcc -lfuse -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=22 hello.c -o hello
$ mkdir mountdir
$ ./hello mountdir
$ cd mountdir
$ cat hello
In order for ordinary (non-superuser) users to use Fuse two things must be done: you must change the permissions on the fusermount utility and add users to the fuse group.
$ sudo chmod 4755 /usr/bin/fusermount
$ sudo usermod -a -G fuse username
Note well, in the usermod command above you must use the -a (append) flag, otherwise the user will be added to the fuse group and removed from all others. This is especially troublesome if it's the only user who is also in the admin (sudoers) group. If you do leave off the -a flag, as I did, then this will help: http://ccollins.wordpress.com/2007/07/02/restore-default-ubuntu-groups/.
Also note that you may find instructions online that recommend changing the permissions on /dev/fuse to give "world" read and write permissions, instead of adding users to the fuse group. Ordinarily, this would work, but there is a bug in Dapper (and Edgy and Feisty) that causes the permissions to be reset at boot time. It looks like this is fixed in Gutsy. See here: https://bugs.launchpad.net/ubuntu/+source/fuse/+bug/5105.
If Ruby is not already installed on your system, you'll need to follow these instructions. Even if Ruby is installed, verify that you have support for https (see below).
Install all required Ruby components.
$ sudo apt-get install ruby irb rdoc
$ sudo apt-get install ruby1.8-dev
You'll need RubyGems installed, if you haven't got it already. Lets do that now. There's no package that I'm aware of so you'll have to build this one yourself. Fortunately, it's very simple. First, download the latest version of RubyGems from RubyForge: http://rubyforge.org/frs/?group_id=126. At the time of this writing RubyGems is at 0.9.4 Then build it:
$ tar -zxvf rubygems-0.9.4.tgz
$ cd rubygems
$ sudo ruby setup.rb
Net::HTTPS is not included by default in the Ruby packages, since this is arequirement, you must install it as follows:
$ sudo apt-get install libopenssl-ruby
appfs is dependent on FuseFS, the Ruby bindings to Fuse; atom-tools, a pure Ruby implementation of Atom and Atompub, and RedCloth, a text (Textile) to HTML conversion library. Lets get them now.
FuseFs is dependent on the Fuse libraries, so it's not packaged as a Gem. You have to build it locally.
$ wget http://rubyforge.org/frs/download.php/7830/fusefs-0.6.0.tar.gz
$ tar zxvf fusefs-0.6.0.tar.gz
$ sudo ruby setup.rb
There will be lots of warnings, you can safely ignore them.
Getting atom-tools and RedCloth is much easier.
$ sudo gem install atom-tools
$ sudo gem install redcloth
Make sure your version of atom-tools is 0.9.4 or higher
Get the latest version of appfs, put it anywhere, and make it executable
$ wget http://wanderingbarque.com/appfs/appfs.rb
$ chmod 755 appfs.rb
See the usage instructions on how to use appfs