commit 4ca937f5f740649c8050e1e3f8f5c4e4272bf33f
Author: Marcin Banasiak <[email protected]>
Date:   Thu Dec 25 01:33:09 2014 +0100

    Update to 0.2.4
    
    - updated -attrs.patch and -dirs.patch

 extundelete-attrs.patch | 20 ++++++++++----------
 extundelete-dirs.patch  | 41 ++++++++++++++++++++---------------------
 extundelete.spec        |  8 ++++----
 3 files changed, 34 insertions(+), 35 deletions(-)
---
diff --git a/extundelete.spec b/extundelete.spec
index 4a88a90..b5103ec 100644
--- a/extundelete.spec
+++ b/extundelete.spec
@@ -1,11 +1,11 @@
 Summary:       Recover deleted files from an ext3 or ext4 partition
 Name:          extundelete
-Version:       0.2.0
-Release:       2
+Version:       0.2.4
+Release:       1
 License:       GPL v2
 Group:         Applications/System
-Source0:       http://dl.sourceforge.net/extundelete/%{name}-%{version}.tar.bz2
-# Source0-md5: 6dac74b12a747f133326ff7b81fceedd
+Source0:       
http://download.sourceforge.net/extundelete/%{name}-%{version}.tar.bz2
+# Source0-md5: 77e626ad31433680c0a222069295d2ca
 URL:           http://extundelete.sourceforge.net/
 Patch0:                %{name}-attrs.patch
 Patch1:                %{name}-dirs.patch
diff --git a/extundelete-attrs.patch b/extundelete-attrs.patch
index db21f95..3a9bd38 100644
--- a/extundelete-attrs.patch
+++ b/extundelete-attrs.patch
@@ -1,5 +1,5 @@
---- a/src/extundelete.cc       2010-05-16 03:51:15.000000000 +0200
-+++ b/src/extundelete.cc       2012-01-01 15:54:07.000000000 +0100
+--- extundelete-0.2.4/src/extundelete.cc.orig  2014-12-24 14:00:40.401233636 
+0100
++++ extundelete-0.2.4/src/extundelete.cc       2014-12-24 14:41:00.240755859 
+0100
 @@ -89,6 +89,7 @@ Important future enhancements:
  #include <fcntl.h>
  #include <unistd.h>
@@ -8,19 +8,19 @@
  
  /* GNU headers */
  #ifndef HAVE_GETOPT_H
-@@ -2532,8 +2533,14 @@ int restore_inode(ext2_filsys fs, ext2_f
- 
-                       if(!flag) {
-                               if (truncate( (outputdir + fname2).c_str(), 
EXT2_I_SIZE(inode)) == 0) {
+@@ -1746,8 +1746,14 @@ errcode_t restore_inode(ext2_filsys fs,
+                               }
+                               tsize = fsize - rsize;
+                               if ((retval = truncate( (outputdir + 
fname2).c_str(), tsize)) == 0) {
 +                                      struct timeval times[2];
 +                                      chmod((outputdir + 
fname2).c_str(),inode->i_mode);
 +                                      lchown((outputdir + 
fname2).c_str(),inode->i_uid,inode->i_gid);
 +                                      times[0].tv_sec=inode->i_atime; 
times[0].tv_usec=0;
 +                                      times[1].tv_sec=inode->i_mtime; 
times[1].tv_usec=0;
 +                                      utimes((outputdir + 
fname2).c_str(),times);
-                                       std::cout << "Restored inode " << ino 
<< " to file ";
--                                      std::cout << (outputdir + fname2) << 
std::endl;
-+                                      std::cout << (outputdir + fname2) << " 
deleted " << asctime(localtime((time_t*)&inode->i_dtime));
+                                       Log::info << "Restored inode " << ino 
<< " to file "
+-                                      << (outputdir + fname2) << std::endl;
++                                      << (outputdir + fname2) << " deleted " 
<< asctime(localtime((time_t*)&inode->i_dtime)) << std::endl;
                                        retval = 0;
                                } else {
-                                       std::cout << "Failed to restore inode " 
<< ino << " to file ";
+                                       Log::warn << "Failed to restore inode " 
<< ino << " to file "
diff --git a/extundelete-dirs.patch b/extundelete-dirs.patch
index 0dfa785..1233a35 100644
--- a/extundelete-dirs.patch
+++ b/extundelete-dirs.patch
@@ -1,27 +1,26 @@
-diff -urNp a/src/extundelete.cc b/src/extundelete.cc
---- a/src/extundelete.cc       2010-05-16 03:51:15.000000000 +0200
-+++ b/src/extundelete.cc       2012-01-01 22:51:46.000000000 +0100
-@@ -2556,6 +2556,23 @@ int restore_inode(ext2_filsys fs, ext2_f
+--- extundelete-0.2.4/src/extundelete.cc.orig  2014-12-24 14:00:40.401233636 
+0100
++++ extundelete-0.2.4/src/extundelete.cc       2014-12-25 01:29:09.076514586 
+0100
+@@ -1777,6 +1777,23 @@ errcode_t restore_inode(ext2_filsys fs,
                        retval = EU_RESTORE_FAIL;
                }
        }
 +      else if (LINUX_S_ISDIR(inode->i_mode)) {
-+              if(mkdir((outputdir2 + fname2).c_str(), 0700)) {
-+                      struct timeval times[2];
-+                      chmod((outputdir + fname2).c_str(),inode->i_mode);
-+                      lchown((outputdir + 
fname2).c_str(),inode->i_uid,inode->i_gid);
-+                      times[0].tv_sec=inode->i_atime; times[0].tv_usec=0;
-+                      times[1].tv_sec=inode->i_mtime; times[1].tv_usec=0;
-+                      utimes((outputdir + fname2).c_str(),times);
-+                      std::cout << "Restored inode " << ino << " as directory 
";
-+                      std::cout << (outputdir + fname2) << " deleted " << 
asctime(localtime((time_t*)&inode->i_dtime));
-+                      retval = 0;
-+              } else {
-+                      std::cout << "Failed to restore inode " << ino << " as 
directory ";
-+                      std::cout << (outputdir + fname2) << " deleted " << 
asctime(localtime((time_t*)&inode->i_dtime));
-+                      retval = EU_RESTORE_FAIL;
-+              }
++              if(mkdir((outputdir2 + fname2).c_str(), 0700)) {
++                      struct timeval times[2];
++                      chmod((outputdir + fname2).c_str(),inode->i_mode);
++                      lchown((outputdir + 
fname2).c_str(),inode->i_uid,inode->i_gid);
++                      times[0].tv_sec=inode->i_atime; times[0].tv_usec=0;
++                      times[1].tv_sec=inode->i_mtime; times[1].tv_usec=0;
++                      utimes((outputdir + fname2).c_str(),times);
++                      std::cout << "Restored inode " << ino << " as directory 
";
++                      std::cout << (outputdir + fname2) << " deleted " << 
asctime(localtime((time_t*)&inode->i_dtime));
++                      retval = 0;
++              } else {
++                      std::cout << "Failed to restore inode " << ino << " as 
directory ";
++                      std::cout << (outputdir + fname2) << " deleted " << 
asctime(localtime((time_t*)&inode->i_dtime));
++                      retval = EU_RESTORE_FAIL;
++              }
 +      }
        else {
-               std::cout << "Failed to restore inode " << ino << " to file ";
-               std::cout << (outputdir + fname2) << ":";
+               Log::info << "extundelete identified inode " << ino << " as "
+               << (outputdir + fname2) << ":"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/extundelete.git/commitdiff/4ca937f5f740649c8050e1e3f8f5c4e4272bf33f

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to