diff --git a/.gitignore b/.gitignore index 43ebbec..dd03581 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -encfs-1.4.2.tgz +/encfs-1.7.4.tgz 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-const.patch b/encfs-1.5-const.patch deleted file mode 100644 index a246912..0000000 --- a/encfs-1.5-const.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru encfs-1.5.orig/encfs/NameIO.cpp encfs-1.5/encfs/NameIO.cpp ---- encfs-1.5.orig/encfs/NameIO.cpp 2009-03-03 14:56:44.000000000 +0000 -+++ encfs-1.5/encfs/NameIO.cpp 2009-03-03 14:57:02.000000000 +0000 -@@ -190,7 +190,7 @@ - } else - { - bool isDotFile = (*path == '.'); -- char *next = strchr( path, '/' ); -+ const char *next = strchr( path, '/' ); - int len = next ? next - path : strlen( path ); - - // at this point we know that len > 0 diff --git a/encfs-1.7.4.tgz.asc b/encfs-1.7.4.tgz.asc new file mode 100644 index 0000000..dff010a --- /dev/null +++ b/encfs-1.7.4.tgz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG/MacGPG2 v2.0.14 (Darwin) + +iEYEABECAAYFAkzk4fYACgkQWp20Ay6vTYDVLACfVAlEpvpUYBgJvXQRbiAv867o +1joAnR1x4PgVMIKB7fXXKL7DbI74iC/i +=j69Z +-----END PGP SIGNATURE----- diff --git a/fuse-encfs.spec b/fuse-encfs.spec index 8002042..04e02cb 100644 --- a/fuse-encfs.spec +++ b/fuse-encfs.spec @@ -1,21 +1,25 @@ -Name: fuse-encfs -Version: 1.4.2 -Release: 1%{?dist} -Summary: Encrypted pass-thru filesystem in userspace +Name: fuse-encfs +Version: 1.7.4 +Release: 7%{?dist} +Summary: Encrypted pass-thru filesystem in userspace License: GPLv3+ -Group: System Environment/Kernel +Group: System Environment/Kernel Url: http://www.arg0.net/encfs Source0: http://encfs.googlecode.com/files/encfs-%{version}.tgz Source1: http://encfs.googlecode.com/files/encfs-%{version}.tgz.asc -Patch0: encfs-1.5-const.patch -Patch1: encfs--rlog.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%if 0%{?el5} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%endif Requires: fuse >= 2.6 Provides: encfs = %{version}-%{release} -BuildRequires: rlog-devel >= 1.3 -BuildRequires: openssl-devel -BuildRequires: boost-devel -BuildRequires: fuse-devel >= 2.6 +BuildRequires: rlog-devel >= 1.3 +BuildRequires: openssl-devel +%if 0%{?el5} +BuildRequires: boost141-devel +%else +BuildRequires: boost-devel >= 1.34 +%endif +BuildRequires: fuse-devel >= 2.6 BuildRequires: gettext %description @@ -23,44 +27,176 @@ EncFS implements an encrypted filesystem in userspace using FUSE. FUSE provides a Linux kernel module which allows virtual filesystems to be written in userspace. EncFS encrypts all data and filenames in the filesystem and passes access through to the underlying filesystem. Similar to CFS except that -it does not use NFS. +it does not use NFS. %prep %setup -q -n encfs-%{version} -%patch0 -p1 -b .const -%patch1 -p1 -b .rlog %build +%if 0%{?el5} +%configure --disable-static BOOST_CPPFLAGS="-I%{_includedir}/boost141 -L%{_libdir}/boost141" BOOST_LDFLAGS="-L%{_libdir}/boost141" +%else %configure --disable-static --with-boost-libdir=%{_libdir} -%{__make} LDFLAGS="-lboost_filesystem" %{?_smp_mflags} +%endif +make %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} -%{__make} DESTDIR=%{buildroot} install -%{__rm} -f %{buildroot}/%{_libdir}/*.la -%{__rm} -f %{buildroot}/%{_libdir}/*.so +%if 0%{?el5} +rm -rf %{buildroot} +%endif +make DESTDIR=%{buildroot} install +rm -f %{buildroot}/%{_libdir}/*.la +rm -f %{buildroot}/%{_libdir}/*.so %find_lang encfs %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%if 0%{?el5} %clean -%{__rm} -rf %{buildroot} +rm -rf %{buildroot} +%endif %files -f encfs.lang %defattr(-, root, root, -) %doc AUTHORS COPYING ChangeLog README -%{_bindir}/* -%{_libdir}/libencfs.so* -%{_mandir}/man1/* +%{_bindir}/encfs +%{_bindir}/encfsctl +%{_bindir}/encfssh +%{_libdir}/libencfs.so.6 +%{_libdir}/libencfs.so.6.0.1 +%{_mandir}/man1/encfs.1* +%{_mandir}/man1/encfsctl.1* %changelog -* Wed Mar 10 2010 Josh Kayse 1.4.2-1 -- Update to 1.4.2 -- include patch for rlog -- include patch for const string -- pass boost_filesystem to the LDFLAGS when building +* Wed Jul 11 2012 Till Maas - 1.7.4-7 +- Add el5 conditionals for obsoleted macros +- Use less globbing in %%files +- Use boost141 in el5 + +* Tue Feb 28 2012 Fedora Release Engineering - 1.7.4-6 +- Rebuilt for c++ ABI breakage + +* Fri Jan 13 2012 Fedora Release Engineering - 1.7.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sun Nov 20 2011 Thomas - 1.7.4-4 +- rebuild for https://fedoraproject.org/wiki/Features/F17Boost148 + +* Fri Sep 09 2011 Adam Jackson 1.7.4-3 +- Rebuild for boost 1.47 + +* Thu Aug 25 2011 Peter Lemenkov - 1.7.4-2 +- Rebuilt for new boost + +* Mon Apr 11 2011 Peter Lemenkov - 1.7.4-1 +- Ver. 1.7.4 + +* Tue Feb 08 2011 Fedora Release Engineering - 1.7.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Feb 06 2011 Thomas Spura - 1.7.2-2 +- rebuild for new boost + +* Tue Sep 7 2010 Peter Lemenkov - 1.7.2-1 +- Ver. 1.7.2 + +* Sun Sep 5 2010 Peter Lemenkov - 1.7.1-1 +- Fixed three security flaws (see rhbz #630460) +- Cleaned up spec-file a little + +* Sun Aug 01 2010 Josh Kayse - 1.6.1-1 +- update to 1.6-1 +- remove patch because it's been incorporated + +* Thu Jul 29 2010 Bill Nottingham - 1.5-13 +- Rebuild for boost-1.44 + +* Tue Jul 27 2010 Bill Nottingham - 1.5-12 +- Rebuild for boost-1.44 + +* Fri Jan 22 2010 Rahul Sundaram - 1.5.11 +- Rebuild for Boost soname bump + +* Sat Oct 17 2009 Peter Lemenkov 1.5-10 +- Added version in Requires for boost-devel + +* Thu Sep 17 2009 Peter Lemenkov 1.5-9 +- rebuilt with new fuse + +* Fri Aug 21 2009 Tomas Mraz - 1.5-8 +- rebuilt with new openssl + +* Fri Jul 24 2009 Fedora Release Engineering - 1.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Mar 03 2009 Caolán McNamara - 1.5-6 +- constify ret of strchr(const char*) + +* Tue Feb 24 2009 Fedora Release Engineering - 1.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Jan 16 2009 Tomas Mraz 1.5-4 +- rebuild with new openssl + +* Tue Dec 30 2008 Peter Lemenkov 1.5-3 +- Fixed URL + +* Thu Dec 18 2008 Petr Machata - 1.5-2 +- Rebuild with new boost + +* 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 + +* Sat Jul 12 2008 Peter Lemenkov 1.4.2-3 +- rebuild due to rlog soname bump + +* Mon May 5 2008 Tomas Hoger - 1.4.2-2 +- Work-around broken boost library path auto detection causing build failures + on 64-bit architectures. + +* Mon Apr 14 2008 Peter Lemenkov 1.4.2-1 +- 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) +- remove ulockmgr support, caused numerous locking issues. (bz# 440483) +- fix symlink handling in encfsctl export +- fix stdinpass option parsing, reported by Scott Hendrickson +- fix path suffix in encfsctl + +* Fri Mar 28 2008 Alex Lancaster - 1.4.1.1-5 +- Update patch for building with GCC 4.3 (use throughout) + +* Tue Mar 25 2008 Peter Lemenkov 1.4.1.1-4.1 +- Another attempt to fix GCC 4.3 builds + +* Tue Mar 25 2008 Peter Lemenkov 1.4.1.1-4 +- Another attempt to fix GCC 4.3 builds + +* Tue Feb 19 2008 Fedora Release Engineering - 1.4.1.1-3 +- Autorebuild for GCC 4.3 + +* Sat Feb 9 2008 Peter Lemenkov 1.4.1.1-2 +- Rebuild for GCC 4.3 + +* Wed Jan 23 2008 Peter Lemenkov 1.4.1.1-1 +- Ver. 1.4.1.1 +- Changed License tag according to Fedora policy +- Added new BR - boost-devel +- Proper locale handling +- Some other cosmetic changes + +* Wed Dec 05 2007 Release Engineering - 1.3.2-2 +- Rebuild for deps * Thu Apr 12 2007 Peter Lemenkov 1.3.2-1 - Version 1.3.2 diff --git a/sources b/sources index 2501ac0..49ede2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61e42ab2093b9797b9c669b9a1ff665b encfs-1.4.2.tgz +ac90cc10b2e9fc7e72765de88321d617 encfs-1.7.4.tgz