From 6a99d8560a5a59999abd512325cc919a1d8bf045 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Oct 26 2008 15:42:29 +0000 Subject: Ver. 1.5 --- diff --git a/.cvsignore b/.cvsignore index 43ebbec..7c50c53 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -encfs-1.4.2.tgz +encfs-1.5-2.tgz diff --git a/encfs--gcc43-fix.diff b/encfs--gcc43-fix.diff deleted file mode 100644 index be7bbc1..0000000 --- a/encfs--gcc43-fix.diff +++ /dev/null @@ -1,68 +0,0 @@ -diff -u -r encfs-1.4.1.1/encfs/ConfigVar.cpp encfs-1.4.1.1.mod/encfs/ConfigVar.cpp ---- encfs-1.4.1.1/encfs/ConfigVar.cpp 2008-01-05 15:39:12.000000000 -0700 -+++ encfs-1.4.1.1.mod/encfs/ConfigVar.cpp 2008-03-28 03:28:06.000000000 -0700 -@@ -17,6 +17,7 @@ - - #include "ConfigVar.h" - #include -+#include - - using namespace rlog; - -diff -u -r encfs-1.4.1.1/encfs/DirNode.cpp encfs-1.4.1.1.mod/encfs/DirNode.cpp ---- encfs-1.4.1.1/encfs/DirNode.cpp 2008-01-16 00:28:17.000000000 -0700 -+++ encfs-1.4.1.1.mod/encfs/DirNode.cpp 2008-03-28 03:29:54.000000000 -0700 -@@ -38,6 +38,7 @@ - #include - - #include -+#include - - using namespace std; - using namespace rel; -diff -u -r encfs-1.4.1.1/encfs/FileNode.cpp encfs-1.4.1.1.mod/encfs/FileNode.cpp ---- encfs-1.4.1.1/encfs/FileNode.cpp 2008-01-05 15:39:12.000000000 -0700 -+++ encfs-1.4.1.1.mod/encfs/FileNode.cpp 2008-03-28 03:30:51.000000000 -0700 -@@ -45,6 +45,8 @@ - #include - #include - -+#include -+ - using namespace std; - using namespace rel; - using namespace rlog; -diff -u -r encfs-1.4.1.1/encfs/NameIO.cpp encfs-1.4.1.1.mod/encfs/NameIO.cpp ---- encfs-1.4.1.1/encfs/NameIO.cpp 2008-01-05 15:39:12.000000000 -0700 -+++ encfs-1.4.1.1.mod/encfs/NameIO.cpp 2008-03-28 03:28:06.000000000 -0700 -@@ -29,6 +29,7 @@ - #include "BlockNameIO.h" - #include "StreamNameIO.h" - #include "NullNameIO.h" -+#include - - using namespace std; - using namespace rel; -diff -u -r encfs-1.4.1.1/encfs/NullNameIO.cpp encfs-1.4.1.1.mod/encfs/NullNameIO.cpp ---- encfs-1.4.1.1/encfs/NullNameIO.cpp 2008-01-05 15:39:12.000000000 -0700 -+++ encfs-1.4.1.1.mod/encfs/NullNameIO.cpp 2008-03-28 03:16:31.000000000 -0700 -@@ -19,6 +19,7 @@ - - #include "Cipher.h" - #include "base64.h" -+#include - - using namespace rel; - using boost::shared_ptr; -diff -u -r encfs-1.4.1.1/encfs/StreamNameIO.cpp encfs-1.4.1.1.mod/encfs/StreamNameIO.cpp ---- encfs-1.4.1.1/encfs/StreamNameIO.cpp 2008-01-05 15:39:12.000000000 -0700 -+++ encfs-1.4.1.1.mod/encfs/StreamNameIO.cpp 2008-03-28 03:28:06.000000000 -0700 -@@ -25,6 +25,8 @@ - - #include "i18n.h" - -+#include -+ - using namespace rel; - using namespace std; - diff --git a/encfs--rlog.diff b/encfs--rlog.diff deleted file mode 100644 index 311444f..0000000 --- a/encfs--rlog.diff +++ /dev/null @@ -1,275 +0,0 @@ -diff -ru encfs-1.4.2/encfs/DirNode.cpp encfs-1.4.2.rlog/encfs/DirNode.cpp ---- encfs-1.4.2/encfs/DirNode.cpp 2008-04-14 03:13:23.000000000 +0400 -+++ encfs-1.4.2.rlog/encfs/DirNode.cpp 2008-08-01 11:43:41.000000000 +0400 -@@ -188,100 +188,105 @@ - { - } - -- ~RenameOp() -- { -- if(renameList) -- { -- // got a bunch of decoded filenames sitting in memory.. do a little -- // cleanup before leaving.. -- list::iterator it; -- for(it = renameList->begin(); it != renameList->end(); ++it) -- { -- it->oldPName.assign( it->oldPName.size(), ' ' ); -- it->newPName.assign( it->newPName.size(), ' ' ); -- } -- } -- } -+ ~RenameOp(); - - operator bool () const - { - return renameList; - } - -- bool apply() -+ bool apply(); -+ void undo(); -+}; -+ -+RenameOp::~RenameOp() -+{ -+ if(renameList) - { -- try -- { -- while(last != renameList->end()) -- { -- // backing store rename. -- rDebug("renaming %s -> %s", -- last->oldCName.c_str(), last->newCName.c_str()); -- -- // internal node rename.. -- dn->renameNode( last->oldPName.c_str(), -- last->newPName.c_str() ); -- -- // rename on disk.. -- if(::rename( last->oldCName.c_str(), -- last->newCName.c_str() ) == -1) -- { -- rWarning("Error renaming %s: %s", -- last->oldCName.c_str(), strerror( errno )); -- dn->renameNode( last->newPName.c_str(), -- last->oldPName.c_str(), false ); -- return false; -- } -+ // got a bunch of decoded filenames sitting in memory.. do a little -+ // cleanup before leaving.. -+ list::iterator it; -+ for(it = renameList->begin(); it != renameList->end(); ++it) -+ { -+ it->oldPName.assign( it->oldPName.size(), ' ' ); -+ it->newPName.assign( it->newPName.size(), ' ' ); -+ } -+ } -+} - -- ++last; -- } -+bool RenameOp::apply() -+{ -+ try -+ { -+ while(last != renameList->end()) -+ { -+ // backing store rename. -+ rDebug("renaming %s -> %s", -+ last->oldCName.c_str(), last->newCName.c_str()); -+ -+ // internal node rename.. -+ dn->renameNode( last->oldPName.c_str(), -+ last->newPName.c_str() ); -+ -+ // rename on disk.. -+ if(::rename( last->oldCName.c_str(), -+ last->newCName.c_str() ) == -1) -+ { -+ rWarning("Error renaming %s: %s", -+ last->oldCName.c_str(), strerror( errno )); -+ dn->renameNode( last->newPName.c_str(), -+ last->oldPName.c_str(), false ); -+ return false; -+ } - -- return true; -- } catch( rlog::Error &err ) -- { -- err.log( _RLWarningChannel ); -- return false; -- } -+ ++last; -+ } -+ -+ return true; -+ } catch( rlog::Error &err ) -+ { -+ err.log( _RLWarningChannel ); -+ return false; - } -+} -+ -+void RenameOp::undo() -+{ -+ rDebug("in undoRename"); - -- void undo() -+ if(last == renameList->begin()) - { -- rDebug("in undoRename"); -+ rDebug("nothing to undo"); -+ return; // nothing to undo -+ } - -- if(last == renameList->begin()) -- { -- rDebug("nothing to undo"); -- return; // nothing to undo -- } -+ // list has to be processed backwards, otherwise we may rename -+ // directories and directory contents in the wrong order! -+ int undoCount = 0; -+ list::const_iterator it = last; - -- // list has to be processed backwards, otherwise we may rename -- // directories and directory contents in the wrong order! -- int undoCount = 0; -- list::const_iterator it = last; -+ while( it != renameList->begin() ) -+ { -+ --it; - -- while( it != renameList->begin() ) -- { -- --it; -+ rDebug("undo: renaming %s -> %s", -+ it->newCName.c_str(), it->oldCName.c_str()); - -- rDebug("undo: renaming %s -> %s", -- it->newCName.c_str(), it->oldCName.c_str()); -+ ::rename( it->newCName.c_str(), it->oldCName.c_str() ); -+ try -+ { -+ dn->renameNode( it->newPName.c_str(), -+ it->oldPName.c_str(), false ); -+ } catch( rlog::Error &err ) -+ { -+ err.log( _RLWarningChannel ); -+ // continue on anyway... -+ } -+ ++undoCount; -+ }; - -- ::rename( it->newCName.c_str(), it->oldCName.c_str() ); -- try -- { -- dn->renameNode( it->newPName.c_str(), -- it->oldPName.c_str(), false ); -- } catch( rlog::Error &err ) -- { -- err.log( _RLWarningChannel ); -- // continue on anyway... -- } -- ++undoCount; -- }; -- -- rWarning("Undo rename count: %i", undoCount); -- } --}; -+ rWarning("Undo rename count: %i", undoCount); -+} - - DirNode::DirNode(EncFS_Context *_ctx, - const string &sourceDir, const shared_ptr &_config) -@@ -550,7 +555,7 @@ - string cyName = rootDir + naming->encodePath( plaintextPath ); - rAssert( !cyName.empty() ); - -- rLog( Info, "mkdir on %s", cyName.c_str() ); -+ rLog( Info, "mkdir on %s, mode %i", cyName.c_str(), mode ); - - // if uid or gid are set, then that should be the directory owner - int olduid = -1; -@@ -770,6 +775,22 @@ - return shared_ptr(); - } - -+shared_ptr -+DirNode::openNode( const char *plainName, mode_t mode, int flags, int *result ) -+{ -+ rAssert( result != NULL ); -+ Lock _lock( mutex ); -+ -+ shared_ptr node = findOrCreate( plainName ); -+ -+#if 0 -+ if( node && (*result = node->create( mode, flags )) >= 0 ) -+ return node; -+ else -+#endif -+ return shared_ptr(); -+} -+ - int DirNode::unlink( const char *plaintextName ) - { - string cyName = naming->encodePath( plaintextName ); -diff -ru encfs-1.4.2/encfs/DirNode.h encfs-1.4.2.rlog/encfs/DirNode.h ---- encfs-1.4.2/encfs/DirNode.h 2008-04-14 03:13:23.000000000 +0400 -+++ encfs-1.4.2.rlog/encfs/DirNode.h 2008-08-01 11:27:24.000000000 +0400 -@@ -134,6 +134,9 @@ - */ - shared_ptr openNode( const char *plaintextName, - const char *requestor, int flags, int *openResult ); -+ -+ shared_ptr openNode( const char *plaintextName, -+ mode_t mode, int flags, int *openResult ); - - std::string cipherPath( const char *plaintextPath ); - std::string plainPath( const char *cipherPath ); -diff -ru encfs-1.4.2/encfs/encfs.cpp encfs-1.4.2.rlog/encfs/encfs.cpp ---- encfs-1.4.2/encfs/encfs.cpp 2008-04-14 03:58:03.000000000 +0400 -+++ encfs-1.4.2.rlog/encfs/encfs.cpp 2008-08-01 11:27:24.000000000 +0400 -@@ -552,6 +552,40 @@ - return withCipherPath( "utimens", path, _do_utimens, ts ); - } - -+int encfs_create(const char *path, mode_t mode, struct fuse_file_info *fi) -+{ -+ EncFS_Context *ctx = context(); -+ -+ int res = -EIO; -+ shared_ptr FSRoot = ctx->getRoot(&res); -+ if(!FSRoot) -+ return res; -+ -+ try -+ { -+ shared_ptr fnode = -+ FSRoot->openNode( path, mode, fi->flags, &res ); -+ -+ if(fnode) -+ { -+ rLog(Info, "encfs_create for %s, flags %i", fnode->cipherName(), -+ fi->flags); -+ -+ if( res >= 0 ) -+ { -+ fi->fh = (uintptr_t)ctx->putNode(path, fnode); -+ res = ESUCCESS; -+ } -+ } -+ } catch( rlog::Error &err ) -+ { -+ rError("error caught in create"); -+ err.log( _RLWarningChannel ); -+ } -+ -+ return res; -+} -+ - int encfs_open(const char *path, struct fuse_file_info *file) - { - EncFS_Context *ctx = context(); diff --git a/encfs-1.4.2.tgz.asc b/encfs-1.4.2.tgz.asc deleted file mode 100644 index 8dac960..0000000 --- a/encfs-1.4.2.tgz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQBIAqFPWp20Ay6vTYARAqRxAJ0WU2bUbVIlCcqfTT0HabmOcAC1BwCfUPEj -3kHrDP/LbmUYLyqd5mMMDp0= -=4DTR ------END PGP SIGNATURE----- diff --git a/encfs-1.5-2.tgz.asc b/encfs-1.5-2.tgz.asc new file mode 100644 index 0000000..d1757d9 --- /dev/null +++ b/encfs-1.5-2.tgz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQBIx2FsWp20Ay6vTYARAmTXAJ9O5twRjMTDOI7sXeLZBdqwnZB+TgCffB+Y +LNZAwOmUuGfmZ8xwPckism0= +=bCbk +-----END PGP SIGNATURE----- diff --git a/fuse-encfs.spec b/fuse-encfs.spec index ade733f..41d20b7 100644 --- a/fuse-encfs.spec +++ b/fuse-encfs.spec @@ -1,16 +1,12 @@ Name: fuse-encfs -Version: 1.4.2 -Release: 4%{?dist} +Version: 1.5 +Release: 1%{?dist} Summary: Encrypted pass-thru filesystem in userspace License: GPLv3+ Group: System Environment/Kernel Url: http://arg0.net/wiki/encfs -Source0: http://encfs.googlecode.com/files/encfs-%{version}.tgz -Source1: http://encfs.googlecode.com/files/encfs-%{version}.tgz.asc -# applied in upstream svn -Patch0: encfs--gcc43-fix.diff -# applied in upstream svn -Patch1: encfs--rlog.diff +Source0: http://encfs.googlecode.com/files/encfs-%{version}-2.tgz +Source1: http://encfs.googlecode.com/files/encfs-%{version}-2.tgz.asc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: fuse >= 2.6 Provides: encfs = %{version} @@ -29,8 +25,6 @@ it does not use NFS. %prep %setup -q -n encfs-%{version} -%patch0 -p1 -b .gcc43 -%patch1 -p1 -b .rlog %build %configure --disable-static --with-boost-libdir=%{_libdir} @@ -55,10 +49,16 @@ it does not use NFS. %doc AUTHORS COPYING ChangeLog README %{_bindir}/* %{_libdir}/libencfs.so* -#%{_datadir}/locale/*/LC_MESSAGES/encfs.mo %{_mandir}/man1/* %changelog +* Sun Oct 26 2008 Peter Lemenkov 1.5-1 +- Ver. 1.5 +- Dropped upstreamed patches + +* Tue Aug 12 2008 Peter Lemenkov 1.4.2-5 +- Rebuild with new boost + * Fri Aug 1 2008 Peter Lemenkov 1.4.2-4 - Fix build with new rlog @@ -73,7 +73,7 @@ it does not use NFS. - Ver. 1.4.2 - add option to pass-through file 'holes'. Only available in expert mode - config file format changed to XML via boost serialization - (config file is now .encfs6.xml) + (config file is now .encfs6.xml) - remove ulockmgr support, caused numerous locking issues. (bz# 440483) - fix symlink handling in encfsctl export - fix stdinpass option parsing, reported by Scott Hendrickson diff --git a/import.log b/import.log index 1f15f38..1ccae6f 100644 --- a/import.log +++ b/import.log @@ -1 +1,2 @@ fuse-encfs-1_4_2-4_fc9:F-9:fuse-encfs-1.4.2-4.fc9.src.rpm:1217577892 +fuse-encfs-1_5-1_fc9:F-9:fuse-encfs-1.5-1.fc9.src.rpm:1225035638 diff --git a/sources b/sources index 2501ac0..df975b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61e42ab2093b9797b9c669b9a1ff665b encfs-1.4.2.tgz +b07008545545b4a57cf2bf65f08a14ad encfs-1.5-2.tgz