Building FUSE s3fs Debian Package

I’d like to play with s3 via s3fs on fuse, but couldn’t find any debian package. Normally this means a lot of work writing a couple of build and rules files and this scares me off – but i thought: just give it a try. And so i did and it was so easy, have to share it.

This is what i did.. before you try this yourself, maybe read the section “Build Requirements” below

Build the s3fs Package

  1. Go to a temp directory
  2. mkdir s3fs-build
  3. cd s3fs-build
  4. Go to http://code.google.com/p/s3fs/wiki/FuseOverAmazon and get the latest release (today: r177)
    wget http://s3fs.googlecode.com/files/s3fs-r177-source.tar.gz
  5. tar zxvf s3fs-r177-source.tar.gz
  6. Rename the directory to the actual source:
    mv s3fs s3fs-fuse-0.0177
  7. Rename the tar.gz file you’ve downloaded:
    mv s3fs-r177-source.tar.gz s3fs-fuse_0.0177.orig.tar.gz
  8. cd s3fs-fuse-0.0177
  9. Setup you your debian package with:
    dh_make

    (and follow the instructions)

  10. vim Makefile and go to line 6 (something like cp -f s3fs /usr/bin after install: all)
    change to cp -f s3fs debian/s3fs-fuse/usr/bin
  11. Build the package via:
    dpkg-buildpackage -uc -us

    (the -uc and -us switch disables signing)

Thats all, you should find s3fs-fuse_0.0177-1_i386.deb in your s3fs-build-directory. Install with dpkg -i ..

After installing s3fs, you can mount your buckets (if you dont have any yet, you might want to have a look at the Firefox plugin Fire Bucket and follow then the Beginners Guide or use s3cmd commandline tool):

s3fs bucketname -o accessKeyId=yourAccessKey -o secretAccessKey=yourSecretAccessKey /mnt/path

For more info see: http://code.google.com/p/s3fs/wiki/FuseOverAmazon

Build requirements!

Build requirements

apt-get install build-essentials g++ dh-make libcurl4-openssl-dev libxml2-dev libfuse-dev

If you dont have fuse >= 2.6 (debian etch?)

Go here: http://packages.debian.org/etch-backports/libfuse2 and download from backports (better: add to your apt/sources.list)

Build Package

s3fs-fuse_0.0177-1_i386
s3fs-fuse_0.0177-1_amd64

Leave a Reply

CAPTCHA image