rpms/fuse-encfs/devel encfs--rlog.diff, NONE, 1.1 import.log, NONE, 1.1 fuse-encfs.spec, 1.19, 1.20
Peter Lemenkov (peter)
fedora-extras-commits at redhat.com
Fri Aug 1 07:59:58 UTC 2008
- Previous message (by thread): rpms/gcc/devel .cvsignore, 1.238, 1.239 gcc43.spec, 1.35, 1.36 sources, 1.241, 1.242
- Next message (by thread): rpms/coreutils/F-9 coreutils-DIR_COLORS, 1.4, 1.5 coreutils-DIR_COLORS.256color, 1.3, 1.4 coreutils-DIR_COLORS.xterm, 1.4, 1.5 coreutils.spec, 1.216, 1.217
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: peter
Update of /cvs/extras/rpms/fuse-encfs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3512/devel
Modified Files:
fuse-encfs.spec
Added Files:
encfs--rlog.diff import.log
Log Message:
Fix build with latest rlog
encfs--rlog.diff:
--- NEW FILE encfs--rlog.diff ---
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<RenameEl>::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<RenameEl>::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<RenameEl>::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<RenameEl>::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> &_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<FileNode>();
}
+shared_ptr<FileNode>
+DirNode::openNode( const char *plainName, mode_t mode, int flags, int *result )
+{
+ rAssert( result != NULL );
+ Lock _lock( mutex );
+
+ shared_ptr<FileNode> node = findOrCreate( plainName );
+
+#if 0
+ if( node && (*result = node->create( mode, flags )) >= 0 )
+ return node;
+ else
+#endif
+ return shared_ptr<FileNode>();
+}
+
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<FileNode> openNode( const char *plaintextName,
const char *requestor, int flags, int *openResult );
+
+ shared_ptr<FileNode> 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<DirNode> FSRoot = ctx->getRoot(&res);
+ if(!FSRoot)
+ return res;
+
+ try
+ {
+ shared_ptr<FileNode> 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();
--- NEW FILE import.log ---
fuse-encfs-1_4_2-4_fc9:HEAD:fuse-encfs-1.4.2-4.fc9.src.rpm:1217577502
Index: fuse-encfs.spec
===================================================================
RCS file: /cvs/extras/rpms/fuse-encfs/devel/fuse-encfs.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- fuse-encfs.spec 12 Jul 2008 15:16:11 -0000 1.19
+++ fuse-encfs.spec 1 Aug 2008 07:59:28 -0000 1.20
@@ -1,13 +1,16 @@
Name: fuse-encfs
Version: 1.4.2
-Release: 3%{?dist}
+Release: 4%{?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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: fuse >= 2.6
Provides: encfs = %{version}
@@ -27,10 +30,10 @@
%prep
%setup -q -n encfs-%{version}
%patch0 -p1 -b .gcc43
+%patch1 -p1 -b .rlog
%build
-%configure --disable-static \
- --with-boost-libdir=%{_libdir}
+%configure --disable-static --with-boost-libdir=%{_libdir}
%{__make} %{?_smp_mflags}
%install
@@ -56,6 +59,9 @@
%{_mandir}/man1/*
%changelog
+* Fri Aug 1 2008 Peter Lemenkov <lemenkov at gmail.com> 1.4.2-4
+- Fix build with new rlog
+
* Sat Jul 12 2008 Peter Lemenkov <lemenkov at gmail.com> 1.4.2-3
- rebuild due to rlog soname bump
- Previous message (by thread): rpms/gcc/devel .cvsignore, 1.238, 1.239 gcc43.spec, 1.35, 1.36 sources, 1.241, 1.242
- Next message (by thread): rpms/coreutils/F-9 coreutils-DIR_COLORS, 1.4, 1.5 coreutils-DIR_COLORS.256color, 1.3, 1.4 coreutils-DIR_COLORS.xterm, 1.4, 1.5 coreutils.spec, 1.216, 1.217
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list