S3fs GCS Directory Support

Adds directory support to gcs buckets.

Nextjournal uses the s3fs fuse driver to connect to Amazon S3 buckets as well as Google Cloud Storage buckets. It was made for S3 buckets but also works with GCS buckets.

If GCS directories are created in the web frontend, they are not detected correclty as directories from the s3fs fuse driver, because s3fs checks for content size to be 0 or 1, but it's larger than that (e.g. 11)

This modified s3fs fuse version fixes this:

Install build requirements:

apt-get update
apt-get install fuse automake build-essential make libcurl4 libcurl4-openssl-dev libxml2 libxml2-dev mime-support openssl libssl-dev libfuse-dev libtool pkg-config 
apt-get clean

Github repositories are mounted readonly, so copy it to be able to compile it, which produces output:

cp -r /s3fs-fuse /s3fs-fuse-patched

Validate that we have the correct patch:

cd /s3fs-fuse-patched
git checkout gcs-directories
git show

Build the project...

cd /s3fs-fuse-patched
sudo make install

... clean up build dependencies

apt-get remove automake build-essential libcurl4-openssl-dev libxml2-dev  libssl-dev libfuse-dev pkg-config 

... and check that the built binary works.

s3fs --help