Hi ports@,

Thanks to the last commit in src/libfuse, some patches for encfs are
now useless.

With the following diff, I tried to clean the patches directory.

OK ?

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/encfs/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- Makefile    17 Jan 2014 10:16:07 -0000      1.2
+++ Makefile    20 Jan 2014 12:17:08 -0000
@@ -2,6 +2,7 @@
 
 COMMENT =              fuse-based cryptographic filesystem
 DISTNAME =             encfs-1.7.4
+REVISION =             0
 SHARED_LIBS =          encfs   0.0     # 6.1
 CATEGORIES =           security
 HOMEPAGE =             http://www.arg0.net/encfs
Index: patches/patch-encfs_CipherFileIO_cpp
===================================================================
RCS file: patches/patch-encfs_CipherFileIO_cpp
diff -N patches/patch-encfs_CipherFileIO_cpp
--- patches/patch-encfs_CipherFileIO_cpp        17 Jan 2014 10:10:58 -0000      
1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-encfs_CipherFileIO_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/CipherFileIO.cpp.orig        Mon Aug 30 08:27:49 2010
-+++ encfs/CipherFileIO.cpp     Thu Jan 16 17:36:02 2014
-@@ -78,9 +78,9 @@ rel::Interface CipherFileIO::interface() const
-     return CipherFileIO_iface;
- }
- 
--int CipherFileIO::open( int flags )
-+int CipherFileIO::open( int flags, mode_t mode )
- {
--    int res = base->open( flags );
-+    int res = base->open( flags, mode );
-     
-     if( res >= 0 )
-       lastFlags = flags;
Index: patches/patch-encfs_CipherFileIO_h
===================================================================
RCS file: patches/patch-encfs_CipherFileIO_h
diff -N patches/patch-encfs_CipherFileIO_h
--- patches/patch-encfs_CipherFileIO_h  17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-encfs_CipherFileIO_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/CipherFileIO.h.orig  Thu Jan 16 17:14:56 2014
-+++ encfs/CipherFileIO.h       Thu Jan 16 17:16:00 2014
-@@ -44,7 +44,7 @@ class CipherFileIO : public BlockFileIO (public)
-     virtual const char *getFileName() const;
-     virtual bool setIV( uint64_t iv );
- 
--    virtual int open( int flags );
-+    virtual int open( int flags, mode_t mode );
- 
-     virtual int getAttr( struct stat *stbuf ) const;
-     virtual off_t getSize() const;
Index: patches/patch-encfs_DirNode_cpp
===================================================================
RCS file: patches/patch-encfs_DirNode_cpp
diff -N patches/patch-encfs_DirNode_cpp
--- patches/patch-encfs_DirNode_cpp     17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-encfs_DirNode_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/DirNode.cpp.orig     Thu Jan 16 17:43:57 2014
-+++ encfs/DirNode.cpp  Thu Jan 16 17:44:33 2014
-@@ -805,6 +805,22 @@ DirNode::openNode( const char *plainName, const char *
-       return shared_ptr<FileNode>();
- }
- 
-+shared_ptr<FileNode>
-+DirNode::openNode( const char *plainName, const char * requestor, int flags,
-+      mode_t mode, int *result )
-+{
-+    (void)requestor;
-+    rAssert( result != NULL );
-+    Lock _lock( mutex );
-+
-+    shared_ptr<FileNode> node = findOrCreate( plainName );
-+
-+    if( node && (*result = node->open( flags, mode )) >= 0 )
-+      return node;
-+    else
-+      return shared_ptr<FileNode>();
-+}
-+
- int DirNode::unlink( const char *plaintextName )
- {
-     string cyName = naming->encodePath( plaintextName );
Index: patches/patch-encfs_DirNode_h
===================================================================
RCS file: patches/patch-encfs_DirNode_h
diff -N patches/patch-encfs_DirNode_h
--- patches/patch-encfs_DirNode_h       17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-encfs_DirNode_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/DirNode.h.orig       Thu Jan 16 17:43:08 2014
-+++ encfs/DirNode.h    Thu Jan 16 17:42:34 2014
-@@ -107,6 +107,9 @@ class DirNode (public)
-     */
-     shared_ptr<FileNode> openNode( const char *plaintextName, 
-           const char *requestor, int flags, int *openResult );
-+    shared_ptr<FileNode> openNode( const char *plaintextName, 
-+          const char *requestor, int flags, mode_t mode, 
-+          int *openResult );
- 
-     /* For internal use - open a cipher file directly
-     */
Index: patches/patch-encfs_FileIO_h
===================================================================
RCS file: patches/patch-encfs_FileIO_h
diff -N patches/patch-encfs_FileIO_h
--- patches/patch-encfs_FileIO_h        17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-encfs_FileIO_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/FileIO.h.orig        Sun Nov 29 23:04:12 2009
-+++ encfs/FileIO.h     Thu Jan 16 17:38:22 2014
-@@ -62,7 +62,7 @@ class FileIO (public)
- 
-     // open file for specified mode.  There is no corresponding close, so a
-     // file is open until the FileIO interface is destroyed.
--    virtual int open( int flags ) =0;
-+    virtual int open( int flags, mode_t = 0) =0;
-    
-     // get filesystem attributes for a file
-     virtual int getAttr( struct stat *stbuf ) const =0;
Index: patches/patch-encfs_FileNode_cpp
===================================================================
RCS file: patches/patch-encfs_FileNode_cpp
diff -N patches/patch-encfs_FileNode_cpp
--- patches/patch-encfs_FileNode_cpp    17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-encfs_FileNode_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/FileNode.cpp.orig    Thu Jan 16 17:32:36 2014
-+++ encfs/FileNode.cpp Thu Jan 16 17:33:34 2014
-@@ -225,6 +225,14 @@ int FileNode::open(int flags) const
-     return res;
- }
- 
-+int FileNode::open(int flags, mode_t mode) const
-+{
-+    Lock _lock( mutex );
-+
-+    int res = io->open( flags, mode );
-+    return res;
-+}
-+
- int FileNode::getAttr(struct stat *stbuf) const
- {
-     Lock _lock( mutex );
Index: patches/patch-encfs_FileNode_h
===================================================================
RCS file: patches/patch-encfs_FileNode_h
diff -N patches/patch-encfs_FileNode_h
--- patches/patch-encfs_FileNode_h      17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-encfs_FileNode_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/FileNode.h.orig      Thu Jan 16 17:32:40 2014
-+++ encfs/FileNode.h   Thu Jan 16 17:33:13 2014
-@@ -57,6 +57,7 @@ class FileNode (public)
- 
-     // Returns < 0 on error (-errno), file descriptor on success.
-     int open(int flags) const;
-+    int open(int flags, mode_t mode) const;
- 
-     // getAttr returns 0 on success, -errno on failure
-     int getAttr(struct stat *stbuf) const;
Index: patches/patch-encfs_MACFileIO_cpp
===================================================================
RCS file: patches/patch-encfs_MACFileIO_cpp
diff -N patches/patch-encfs_MACFileIO_cpp
--- patches/patch-encfs_MACFileIO_cpp   17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-encfs_MACFileIO_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/MACFileIO.cpp.orig   Thu Jan 16 17:36:32 2014
-+++ encfs/MACFileIO.cpp        Thu Jan 16 17:36:53 2014
-@@ -84,9 +84,9 @@ rel::Interface MACFileIO::interface() const
-     return MACFileIO_iface;
- }
- 
--int MACFileIO::open( int flags )
-+int MACFileIO::open( int flags, mode_t mode )
- {
--    return base->open( flags );
-+    return base->open( flags, mode );
- }
- 
- void MACFileIO::setFileName( const char *fileName )
Index: patches/patch-encfs_MACFileIO_h
===================================================================
RCS file: patches/patch-encfs_MACFileIO_h
diff -N patches/patch-encfs_MACFileIO_h
--- patches/patch-encfs_MACFileIO_h     17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-encfs_MACFileIO_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/MACFileIO.h.orig     Thu Jan 16 17:20:27 2014
-+++ encfs/MACFileIO.h  Thu Jan 16 17:20:50 2014
-@@ -42,7 +42,7 @@ class MACFileIO : public BlockFileIO (public)
-     virtual const char *getFileName() const;
-     virtual bool setIV( uint64_t iv );
- 
--    virtual int open( int flags );
-+    virtual int open( int flags, mode_t mode );
-     virtual int getAttr( struct stat *stbuf ) const;
-     virtual off_t getSize() const;
- 
Index: patches/patch-encfs_RawFileIO_h
===================================================================
RCS file: patches/patch-encfs_RawFileIO_h
diff -N patches/patch-encfs_RawFileIO_h
--- patches/patch-encfs_RawFileIO_h     17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-encfs_RawFileIO_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/RawFileIO.h.orig     Thu Jan 16 17:14:44 2014
-+++ encfs/RawFileIO.h  Thu Jan 16 17:15:49 2014
-@@ -34,7 +34,7 @@ class RawFileIO : public FileIO (public)
-     virtual void setFileName( const char *fileName );
-     virtual const char *getFileName() const;
- 
--    virtual int open( int flags );
-+    virtual int open( int flags, mode_t mode );
-     
-     virtual int getAttr( struct stat *stbuf ) const;
-     virtual off_t getSize() const;
Index: patches/patch-encfs_encfs_cpp
===================================================================
RCS file: patches/patch-encfs_encfs_cpp
diff -N patches/patch-encfs_encfs_cpp
--- patches/patch-encfs_encfs_cpp       17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-$OpenBSD: patch-encfs_encfs_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/encfs.cpp.orig       Thu Nov 18 03:50:51 2010
-+++ encfs/encfs.cpp    Thu Jan 16 18:08:31 2014
-@@ -553,6 +553,42 @@ int encfs_utimens(const char *path, const struct times
-     return withCipherPath( "utimens", path, _do_utimens, ts );
- }
- 
-+int encfs_create(const char *path, mode_t mode, struct fuse_file_info *file)
-+{
-+    EncFS_Context *ctx = context();
-+
-+    int res = -EIO;
-+    shared_ptr<DirNode> FSRoot = ctx->getRoot(&res);
-+    if(!FSRoot)
-+      return res;
-+
-+    try
-+    {
-+      shared_ptr<FileNode> fnode =
-+          FSRoot->openNode( path, "create", file->flags, mode, &res );
-+
-+      if(fnode)
-+      {
-+          rLog(Info, "encfs_create for %s, flags %i", fnode->cipherName(),
-+                  file->flags);
-+
-+          if( res >= 0 )
-+          {
-+              file->fh = (uintptr_t)ctx->putNode(path, fnode);
-+              res = ESUCCESS;
-+          }
-+      }
-+    } catch( rlog::Error &err )
-+    {
-+      rError("error caught in create");
-+      err.log( _RLWarningChannel );
-+    }
-+
-+    res = encfs_release(path, file);
-+
-+    return res;
-+}
-+
- int encfs_open(const char *path, struct fuse_file_info *file)
- {
-     EncFS_Context *ctx = context();
Index: patches/patch-encfs_encfs_h
===================================================================
RCS file: patches/patch-encfs_encfs_h
diff -N patches/patch-encfs_encfs_h
--- patches/patch-encfs_encfs_h 17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-encfs_encfs_h,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/encfs.h.orig Mon Jan 13 13:55:00 2014
-+++ encfs/encfs.h      Mon Jan 13 13:55:23 2014
-@@ -74,6 +74,7 @@ int encfs_ftruncate(const char *path, off_t size,
-       struct fuse_file_info *fi);
- int encfs_utime(const char *path, struct utimbuf *buf);
- int encfs_open(const char *path, struct fuse_file_info *info);
-+int encfs_create(const char *path, mode_t mode, struct fuse_file_info *info);
- int encfs_release(const char *path, struct fuse_file_info *info);
- int encfs_read(const char *path, char *buf, size_t size, off_t offset,
-       struct fuse_file_info *info);
Index: patches/patch-encfs_main_cpp
===================================================================
RCS file: /cvs/ports/security/encfs/patches/patch-encfs_main_cpp,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-encfs_main_cpp
--- patches/patch-encfs_main_cpp        17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ patches/patch-encfs_main_cpp        20 Jan 2014 12:17:08 -0000
@@ -22,15 +22,6 @@ $OpenBSD: patch-encfs_main_cpp,v 1.1.1.1
  #include <locale.h>
  
  #include "i18n.h"
-@@ -563,7 +560,7 @@ int main(int argc, char *argv[])
-     encfs_oper.init = encfs_init;
-     encfs_oper.destroy = encfs_destroy;
-     //encfs_oper.access = encfs_access;
--    //encfs_oper.create = encfs_create;
-+    encfs_oper.create = encfs_create;
-     encfs_oper.ftruncate = encfs_ftruncate;
-     encfs_oper.fgetattr = encfs_fgetattr;
-     //encfs_oper.lock = encfs_lock;
 @@ -756,7 +753,11 @@ static bool unmountFS(EncFS_Context *ctx)
        // xgroup(diag)
        rWarning(_("Unmounting filesystem %s due to inactivity"),
Index: patches/patch-encfs_rawfileio_cpp
===================================================================
RCS file: patches/patch-encfs_rawfileio_cpp
diff -N patches/patch-encfs_rawfileio_cpp
--- patches/patch-encfs_rawfileio_cpp   17 Jan 2014 10:10:58 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-$OpenBSD: patch-encfs_rawfileio_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/RawFileIO.cpp.orig   Sun Nov 29 23:04:12 2009
-+++ encfs/RawFileIO.cpp        Thu Jan 16 16:56:14 2014
-@@ -122,7 +122,7 @@ static int open_readonly_workaround(const char *path, 
-     -  Also keep the O_LARGEFILE flag, in case the underlying filesystem needs
-        it..
- */
--int RawFileIO::open(int flags)
-+int RawFileIO::open(int flags, mode_t mode)
- {
-     bool requestWrite = ((flags & O_RDWR) || (flags & O_WRONLY));
- 
-@@ -139,6 +139,9 @@ int RawFileIO::open(int flags)
-     {
-       int finalFlags = requestWrite ? O_RDWR : O_RDONLY;
- 
-+      if (flags & O_CREAT)
-+              finalFlags = flags;
-+
- #if defined(O_LARGEFILE)
-       if( flags & O_LARGEFILE )
-           finalFlags |= O_LARGEFILE;
-@@ -146,8 +149,13 @@ int RawFileIO::open(int flags)
- #warning O_LARGEFILE not supported
- #endif
- 
--      int newFd = ::open( name.c_str(), finalFlags );
--      
-+
-+      int newFd;
-+      if (flags & O_CREAT)
-+              newFd = ::open( name.c_str(), finalFlags, mode);
-+      else
-+              newFd = ::open( name.c_str(), finalFlags);
-+
-       rDebug("open file with flags %i, result = %i", finalFlags, newFd);
- 
-       if((newFd == -1) && (errno == EACCES))

Reply via email to