the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: gmailfs-py%type_pkg[python]
Version: 0.7.2
Revision: 2
Distribution: (%type_pkg[python] = 24) 10.4, (%type_pkg[python] = 24) 10.5
Type: python (2.4 2.5)
Source: http://richard.jones.name/google-hacks/gmail-filesystem/gmailfs-%v.tar.gz
Source-MD5: 895ee1c3f02973d39e73ccbee9552296
BuildDepends: fink (>= 0.24.12)
Depends: <<
python%type_pkg[python], libgmail-py%type_pkg[python] (>> 0.1.5.1-1),
fuse-py%type_pkg[python]
<<
PatchFile: gmailfs-py.patch
PatchFile-MD5: 5b80c1cc34ef8b0b0c56566e7510cba3
PatchScript: <<
sed -i.bak -e'1s,/usr/bin/env python,%p/bin/python%type_raw[python],' gmailfs.py
sed -i.bak -e'1s,/usr/bin/env python,%p/bin/python%type_raw[python],' \
-e'/^DEFAULT_GMAILFS_LOCATION/s,/usr/share/gmailfs,%p/lib/python%type_raw[python]/site-packages,' \
mount.gmailfs
patch -p1 < %{PatchFile}
<<
CompileScript: echo "Nothing to do"
InstallScript: <<
mkdir -p %i/lib/python%type_raw[python]/site-packages
/usr/bin/install -m0644 gmailfs.py %i/lib/python%type_raw[python]/site-packages
mkdir -p %i/bin
cp mount.gmailfs %i/bin/gmailfs-py%type_pkg[python]
<<
PostInstScript: <<
update-alternatives --install %p/bin/gmailfs gmailfs %p/bin/gmailfs-py%type_pkg[python] %type_pkg[python]
<<
PreRmScript: <<
if [ $1 != "upgrade" ]
then
update-alternatives --remove gmailfs %p/bin/gmailfs-py%type_pkg[python]
fi
<<
DocFiles: COPYING ChangeLog gmailfs.conf
Description: FUSE Gmail file system
DescDetail: <<
Gmail Filesystem provides a mountable filesystem which uses your Gmail
account as its storage medium. Gmail Filesystem is a Python
application and uses the FUSE userland filesystem infrastructure to
help provide the filesystem, and libgmail to communicate with Gmail.
GmailFS supports most file operations such as read, write, open,
close, stat, symlink, link, unlink, truncate and rename. This means
that you can use all your favourite unix command line tools to operate
on files stored on Gmail (e.g. cp, ls, mv, rm, ln, grep etc. etc.).
<<
DescUsage: <<
Copy gmailfs.conf from %p/share/doc/gmailfs-py%type_pkg[python]
to ~/.gmailfs.conf (and edit it).
Then run "gmailfs /path/to/mountpoint"
<<
License: GPL
Homepage: http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem.html
Maintainer: Brendan Cully
<<
Remove 'none' from required arguments.
Consult ~/.gmail.conf for options.
Set fuse API version.
diff --git a/gmailfs.py b/gmailfs.py
--- a/gmailfs.py
+++ b/gmailfs.py
@@ -17,6 +17,8 @@ GmailFS provides a filesystem using a Go
#@+others
#@+node:imports
+import fuse
+fuse.fuse_python_api = (0, 1)
from fuse import Fuse
import os
from errno import *
@@ -565,7 +567,7 @@ class Gmailfs(Fuse):
password = DefaultPassword
username = DefaultUsername
- options_required = 1
+ options_required = 0
if self.optdict.has_key("reference"):
try:
reference = References[self.optdict['reference']]
@@ -1120,7 +1122,7 @@ defaultLoggingHandler = logging.StreamHa
defaultLoggingHandler = logging.StreamHandler(sys.stdout)
_addLoggingHandlerHelper(defaultLoggingHandler)
-GmailConfig("/etc/gmailfs.conf")
+GmailConfig(os.path.expanduser('~/.gmailfs.conf'))
try:
libgmail.ConfigLogs(log)
except:
diff --git a/mount.gmailfs b/mount.gmailfs
--- a/mount.gmailfs
+++ b/mount.gmailfs
@@ -8,9 +8,7 @@ This utility allows Gmail filesystems to
'mount' command, or even to be listed in /etc/fstab
Usage:
- 1. mount.gmailfs none /path/of/mount/point [options]
- 2. in /etc/fstab, add:
- none /path/of/mount/point gmailfs noauto[,options]
+ gmailfs /path/of/mount/point [options]
"""
import sys, os, os.path, time, optparse, getpass, re, tempfile, signal
@@ -24,7 +22,7 @@ ENCFS_MOUNTPOINT_CHECK_DELAY = 5 # in s
ENCFS_MOUNTPOINT_CHECK_DELAY = 5 # in seconds
def parseCommandLineArgs(args):
- usage = "usage: %prog none mountpoint [options]"
+ usage = "usage: %prog mountpoint [options]"
parser = optparse.OptionParser(usage=usage)
parser.add_option("-p", "--prompt-for-password", dest="promptForPasswd",
@@ -39,10 +37,10 @@ def parseCommandLineArgs(args):
options, args = parser.parse_args(args)
- if len(args) != 2:
+ if len(args) != 1:
parser.error("Wrong number of arguments")
else:
- pyfile, mountpoint = args
+ mountpoint = args[0]
odata = options.gmailfsOptions
@@ -59,10 +57,7 @@ def parseCommandLineArgs(args):
namedOptions['password'] = getpass.getpass("Gmail password: ")
# pyfile sanitation
- if pyfile == 'none':
- pyfile = DEFAULT_GMAILFS_LOCATION
- else:
- pyfile = os.path.abspath(pyfile)
+ pyfile = DEFAULT_GMAILFS_LOCATION
if not os.path.isfile(pyfile):
log.error("file %s doesn't exist, or is not a file" % pyfile)
sys.exit(1)