updates llfuse requirement and API to >=0.42
authorJoshua Randall <joshua.randall@sanger.ac.uk>
Wed, 3 Feb 2016 11:48:55 +0000 (11:48 +0000)
committerTom Clegg <tom@curoverse.com>
Thu, 29 Dec 2016 02:37:43 +0000 (21:37 -0500)
backports/deb-fuse/fpm-info.sh [new file with mode: 0644]
backports/deb-libfuse-dev/fpm-info.sh [new file with mode: 0644]
backports/python-llfuse/fpm-info.sh
services/fuse/arvados_fuse/__init__.py
services/fuse/setup.py

diff --git a/backports/deb-fuse/fpm-info.sh b/backports/deb-fuse/fpm-info.sh
new file mode 100644 (file)
index 0000000..6f2b022
--- /dev/null
@@ -0,0 +1,5 @@
+case "$TARGET" in
+    ubuntu1204)
+        fpm_depends+=('libfuse2 = 2.9.2-5')
+        ;;
+esac
diff --git a/backports/deb-libfuse-dev/fpm-info.sh b/backports/deb-libfuse-dev/fpm-info.sh
new file mode 100644 (file)
index 0000000..6f2b022
--- /dev/null
@@ -0,0 +1,5 @@
+case "$TARGET" in
+    ubuntu1204)
+        fpm_depends+=('libfuse2 = 2.9.2-5')
+        ;;
+esac
index 9fc00987e6f9561f37528368264adf15718b3afd..5573dabfa61a9f6dfa8ea2378e117f90bb044deb 100644 (file)
@@ -3,9 +3,13 @@ case "$TARGET" in
         build_depends+=('fuse-devel')
         fpm_depends+=(glibc fuse-libs)
         ;;
+    ubuntu1204)
+        build_depends+=(libfuse2 libfuse-dev)
+        fpm_depends+=(libc6 python-contextlib2 'libfuse2 = 2.9.2-5' 'fuse = 2.9.2-5')
+        ;;
     debian* | ubuntu*)
         build_depends+=('libfuse-dev')
-        fpm_depends+=(libc6 libfuse2)
+        fpm_depends+=(libc6 'libfuse2 > 2.9.0' 'fuse > 2.9.0')
         ;;
 esac
 
index 51b0a57a7fe11e573361e242eb80d324a540dfda..8a80950b45646f14efc668037e88ac31140143e8 100644 (file)
@@ -400,7 +400,10 @@ class Operations(llfuse.Operations):
                 parent.update()
 
     @catch_exceptions
-    def getattr(self, inode):
+    def getattr(self, inode, ctx):
+        return self._getattr(inode)
+
+    def _getattr(self, inode):
         if inode not in self.inodes:
             raise llfuse.FUSEError(errno.ENOENT)
 
@@ -432,15 +435,15 @@ class Operations(llfuse.Operations):
 
         entry.st_blksize = 512
         entry.st_blocks = (entry.st_size/512)+1
-        entry.st_atime = int(e.atime())
-        entry.st_mtime = int(e.mtime())
-        entry.st_ctime = int(e.mtime())
+        entry.st_atime_ns = int(e.atime())
+        entry.st_mtime_ns = int(e.mtime())
+        entry.st_ctime_ns = int(e.mtime())
 
         return entry
 
     @catch_exceptions
-    def setattr(self, inode, attr):
-        entry = self.getattr(inode)
+    def setattr(self, inode, attr, ctx):
+        entry = self._getattr(inode)
 
         e = self.inodes[inode]
 
@@ -452,7 +455,7 @@ class Operations(llfuse.Operations):
         return entry
 
     @catch_exceptions
-    def lookup(self, parent_inode, name):
+    def lookup(self, parent_inode, name, ctx):
         name = unicode(name, self.inodes.encoding)
         inode = None
 
@@ -471,7 +474,7 @@ class Operations(llfuse.Operations):
             _logger.debug("arv-mount lookup: parent_inode %i name '%s' inode %i",
                       parent_inode, name, inode)
             self.inodes[inode].inc_ref()
-            return self.getattr(inode)
+            return self._getattr(inode)
         else:
             _logger.debug("arv-mount lookup: parent_inode %i name '%s' not found",
                       parent_inode, name)
@@ -488,7 +491,7 @@ class Operations(llfuse.Operations):
                 self.inodes.del_entry(ent)
 
     @catch_exceptions
-    def open(self, inode, flags):
+    def open(self, inode, flags, ctx):
         if inode in self.inodes:
             p = self.inodes[inode]
         else:
@@ -575,7 +578,7 @@ class Operations(llfuse.Operations):
         self.release(fh)
 
     @catch_exceptions
-    def opendir(self, inode):
+    def opendir(self, inode, ctx):
         _logger.debug("arv-mount opendir: inode %i", inode)
 
         if inode in self.inodes:
@@ -610,11 +613,11 @@ class Operations(llfuse.Operations):
         e = off
         while e < len(handle.entries):
             if handle.entries[e][1].inode in self.inodes:
-                yield (handle.entries[e][0].encode(self.inodes.encoding), self.getattr(handle.entries[e][1].inode), e+1)
+                yield (handle.entries[e][0].encode(self.inodes.encoding), self._getattr(handle.entries[e][1].inode), e+1)
             e += 1
 
     @catch_exceptions
-    def statfs(self):
+    def statfs(self, ctx):
         st = llfuse.StatvfsData()
         st.f_bsize = 128 * 1024
         st.f_blocks = 0
@@ -660,7 +663,7 @@ class Operations(llfuse.Operations):
         self.inodes.touch(p)
 
         f.inc_ref()
-        return (fh, self.getattr(f.inode))
+        return (fh, self._getattr(f.inode))
 
     @catch_exceptions
     def mkdir(self, inode_parent, name, mode, ctx):
@@ -673,22 +676,22 @@ class Operations(llfuse.Operations):
         d = p[name]
 
         d.inc_ref()
-        return self.getattr(d.inode)
+        return self._getattr(d.inode)
 
     @catch_exceptions
-    def unlink(self, inode_parent, name):
+    def unlink(self, inode_parent, name, ctx):
         _logger.debug("arv-mount unlink: parent_inode %i '%s'", inode_parent, name)
         p = self._check_writable(inode_parent)
         p.unlink(name)
 
     @catch_exceptions
-    def rmdir(self, inode_parent, name):
+    def rmdir(self, inode_parent, name, ctx):
         _logger.debug("arv-mount rmdir: parent_inode %i '%s'", inode_parent, name)
         p = self._check_writable(inode_parent)
         p.rmdir(name)
 
     @catch_exceptions
-    def rename(self, inode_parent_old, name_old, inode_parent_new, name_new):
+    def rename(self, inode_parent_old, name_old, inode_parent_new, name_new, ctx):
         _logger.debug("arv-mount rename: old_parent_inode %i '%s' new_parent_inode %i '%s'", inode_parent_old, name_old, inode_parent_new, name_new)
         src = self._check_writable(inode_parent_old)
         dest = self._check_writable(inode_parent_new)
@@ -702,5 +705,5 @@ class Operations(llfuse.Operations):
     def fsync(self, fh, datasync):
         self.flush(fh)
 
-    def fsyncdir(self, fh, datasync):
+    def fsyncdir(self, fh, datasync): 
         self.flush(fh)
index 9e282caf49919972b3fefe60001c603ae8176305..4718c3002493dd3e58e83c6f66aa1240b445e762 100644 (file)
@@ -38,7 +38,7 @@ setup(name='arvados_fuse',
       ],
       install_requires=[
         'arvados-python-client >= 0.1.20151118035730',
-        'llfuse==0.41.1',
+        'llfuse>=0.42.1',
         'python-daemon',
         'ciso8601',
         'setuptools'