debian/0000755000000000000000000000000012054205037007164 5ustar debian/changelog0000644000000000000000000000220312054205037011033 0ustar extundelete (0.2.0-2.1) unstable; urgency=low * Non-maintainer upload. * 05_fix_segmentation_fault.patch by Deekoo L. to fix segmentation fault when trying to recover files (Closes: #670815) -- Antonio Terceiro Sat, 24 Nov 2012 13:55:42 -0300 extundelete (0.2.0-2) unstable; urgency=low [ Elías Alejandro ] * [6d1f431] debian/extundelete.1 improve option description * [cb74d3d] 01_output_dir.patch improve option description * [b426319] debian/compat bump debhelper compat to 8 * [889af36] debian/copyright added a new copyright * [4f94f48] debian/copyright files under GPL-2 [ Julien Valroff ] * [8879732] Fix DEP-5 copyright syntax * [e561a90] Update DEP-5 uri [ Michael Prokop ] * [0bbcc08] debian/copyright: update URL for source * [264d96d] Add three patches addressing compile issues with e2fslibs-dev >=1.42-1 [Closes: #634401] -- Michael Prokop Wed, 11 Jan 2012 18:07:21 +0100 extundelete (0.2.0-1) unstable; urgency=low * Initial release. (Closes: #598186, #569085) -- Elías Alejandro Año Mendoza Fri, 10 Jun 2011 18:29:04 -0500 debian/source/0000755000000000000000000000000011473452341010472 5ustar debian/source/format0000644000000000000000000000001411473452341011700 0ustar 3.0 (quilt) debian/extundelete.10000644000000000000000000001104711677563044011616 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH EXTUNDELETE 1 "September 29, 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME extundelete \- utility to undelete files from an ext3 or ext4 partition. .SH SYNOPSIS .B extundelete .RI [ options ] " device-file" ... .br .SH DESCRIPTION .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBextundelete\fP is a utility that can recover deleted files from an ext3 or ext4 partition .br extundelete uses the information stored in the partition's journal to attempt to recover a file that has been deleted from the partition. .br There is no guarantee that any particular file will be able to be undeleted, so always try to have a good backup system in place, or at least put one in place after recovering your files! .SH OPTIONS .TP .B \-\-version Prints the version number of extundelete. .TP .B \-\-help Print a brief usage summary for extundelete. .TP .B Partition name Name of the partition that has deleted files, such as /dev/sda3. .br Could also be the file name of a copy of the partition, such as that made with dd. .TP .B \-\-superblock Prints information about the filesystem from the superblock. .TP .B \-\-journal \-\-superblock Prints information about the journal from the journal's superblock. .TP .B \-\-inode # Prints the information from the inode number of the filesystem given, such as "\-\-inode 2". .TP .B \-\-block # Prints the contents of the block, called as "\-\-block 9652". .TP .B \-\-restore\-file path/to/deleted/file Attempts to restore the file which was deleted at the given filename, called as "\-\-restore-file dirname/filename". .TP .B \-\-restore\-inode # Used to restore inodes by number, called as "\-\-restore-inode 2569". .br Also accepts a list of inodes separated by only commas, such as "\-\-restore-inode 2569,5692,6925". .TP .B \-\-restore\-files filename Restores a list of files. First, construct a list of files in the same style as would be .br used in the \-\-restore\-file option, and save it to the file "filename". .br Then, this option may be used to attempt to restore those files with a single call to extundelete. .br This form also reduces redundancy from multiple calls parsing the journal multiple times. .TP .B \-\-output\-dir path/to/dump/recovered/files Restores files in the output dir 'path'. .br By default the restored files are created under current directory 'RECOVERED_FILES' .TP .B \-\-restore\-all Restores all files possible to undelete to their names before deletion, when possible. Other files are restored to a filename like "file.NNNN". .TP .B \-\-restore\-directory path/of/directory Restores all files possible to link to specified directory to their names before deletion, when possible. .TP .B \-j journal_dev Specifies the device that is the external journal of the file system. .TP .B \-b block_number Specifies the block number of the backup superblock to be used when opening the file system. .TP .B \-B block_size Specifies the block size of the partition to be used when opening the file system. .TP .B \-\-before date Only restore files deleted before the date specified, which should be in the form of the number of seconds since the UNIX epoch. Use a shell command like .br $ date \-d "Aug 1 9:02" +%s .br to convert a human-readable date to the proper format. The conversion from the number of seconds to a readable format may be found by using either of the following: .br $ date \-d@1234567890 .br $ perl \-le "print scalar localtime 1234567890" .TP .B \-\-after date Only restore files deleted after the date specified, which should be in the form of the number of seconds since the UNIX epoch. .br See the notes for the \-\-before option for more information. .br .SH AUTHOR extundelete was written by Nic Case Copyright (C) 2009, 2010 .PP This manual page was written by Elías Alejandro Año Mendoza , for the Debian project (and may be used by others). debian/patches/0000755000000000000000000000000012054205037010613 5ustar debian/patches/04_fix_frags_per_group_compile_error.patch0000644000000000000000000000234711703340310021112 0ustar Description: fix compile error in insertionops.cc regarding rename of s_frags_per_group Fixes: insertionops.cc: In function 'std::ostream& operator<<(std::ostream&, const ext2_super_block*)': insertionops.cc:66:47: error: 'const struct ext2_super_block' has no member named 's_frags_per_group' See git commit 412376efff3c0e0c2fea00666c2457e6f2ae1878 "Add basic BIGALLOC support for cluster-based allocation" in upstreams e2fsprogs repository Forwarded: yes Author: Michael Prokop Last-Update: 2011-01-11 --- a/src/insertionops.cc +++ b/src/insertionops.cc @@ -63,7 +63,7 @@ std::ostream& operator<<(std::ostream& os, const ext2_super_block* const s_block os << "Block size: " << EXT2_BLOCK_SIZE(s_block) << std::endl; os << "Fragment size: " << EXT2_FRAG_SIZE(s_block) << std::endl; os << "# Blocks per group: " << s_block->s_blocks_per_group << std::endl; - os << "# Fragments per group: " << s_block->s_frags_per_group << std::endl; + os << "# Fragments per group: " << s_block->s_clusters_per_group << std::endl; os << "# Inodes per group: " << s_block->s_inodes_per_group << std::endl; os << "Mount time: " << s_block->s_mtime << std::endl; os << "Write time: " << s_block->s_wtime << std::endl; debian/patches/series0000644000000000000000000000030212054205037012023 0ustar 01_output_dir.patch 02_fix_reserved2_checksum_lo_compile_issue.patch 03_fix_opaque_ext2_group_desc_compile_error.patch 04_fix_frags_per_group_compile_error.patch 05_fix_segmentation_fault.patch debian/patches/01_output_dir.patch0000644000000000000000000000447211677563044014360 0ustar Description: create an additional option: --output-dir This allows restore files in a output specific directory instead default directory ./RESTORE_FILES Forwarded: yes Author: Elías Alejandro Año Mendoza Last-Update: 2010-10-25 =================================================================== --- extundelete.orig/src/extundelete.cc 2010-10-25 11:50:25.000000000 -0500 +++ extundelete/src/extundelete.cc 2010-10-25 12:01:12.000000000 -0500 @@ -466,6 +466,8 @@ os << " --restore-files 'path' Will restore files which are listed in the file 'path'.\n"; os << " Each filename should be in the same format as an option\n"; os << " to --restore-file, and there should be one per line.\n"; + os << " --output-dir 'path' Restore files in the output dir 'path'.\n"; + os << " By default the restored files are created under current directory 'RECOVERED_FILES'.\n"; os << " --restore-all Attempts to restore everything.\n"; os << " -j journal Reads an external journal from the named file.\n"; os << " -b blocknumber Uses the backup superblock at blocknumber when opening\n"; @@ -601,6 +603,7 @@ opt_show_journal_inodes, opt_restore_file, opt_restore_files, + opt_output_dir, opt_restore_directory, opt_restore_inode, opt_restore_all, @@ -626,6 +629,7 @@ {"restore-inode", 1, &long_option, opt_restore_inode}, {"restore-file", 1, &long_option, opt_restore_file}, {"restore-files", 1, &long_option, opt_restore_files}, + {"output-dir", 1, &long_option, opt_output_dir}, {"restore-directory", 1, &long_option, opt_restore_directory}, {"restore-all", 0, &long_option, opt_restore_all}, {"show-hardlinks", 0, &long_option, opt_show_hardlinks}, @@ -688,6 +692,21 @@ case opt_restore_files: commandline_restore_files = optarg; break; + case opt_output_dir: + { + std::string optarg1 = optarg; + int subcad = optarg1.find_last_of("/"); + std::string res = optarg1.substr(subcad+1); + if(res!="") + { + outputdir = optarg1 + "/RECOVERED_FILES/"; + } + else + { + outputdir = optarg1 + "RECOVERED_FILES/"; + } + } + break; case opt_restore_directory: commandline_restore_directory = optarg; break; debian/patches/03_fix_opaque_ext2_group_desc_compile_error.patch0000644000000000000000000000117611703340310022372 0ustar Description: fix FTBFS of #634401 regarding opaque_ext2_group_desc extundelete: FTBFS: extundelete.cc:963:47: error: invalid use of incomplete type 'struct opaque_ext2_group_desc' Forwarded: yes Author: Eric Sandeen Last-Update: 2011-01-11 --- a/src/extundelete.cc +++ b/src/extundelete.cc @@ -941,7 +941,7 @@ int load_super_block(ext2_filsys fs) group_descriptor_table = new ext2_group_desc[groups_]; for (uint32_t n = 0; n < fs->group_desc_count; n++) { - group_descriptor_table[n] = fs->group_desc[n]; + group_descriptor_table[n] = *ext2fs_group_desc(fs, fs->group_desc, n); } return errcode; } debian/patches/02_fix_reserved2_checksum_lo_compile_issue.patch0000644000000000000000000000170611703340310022176 0ustar Description: fix compile error regarding linux2.l_i_reserved2 deprecation See git commit 89efc88e65136ece22708cc28ec4124a33feeecd "libext2fs: add metadata checksum and snapshot feature flags" in upstreams e2fsprogs repository Forwarded: yes Author: Michael Prokop Last-Update: 2011-01-11 --- a/src/extundelete.cc +++ b/src/extundelete.cc @@ -2611,5 +2611,6 @@ void parse_inode_block(struct ext2_inode *inode, const char *buf, ext2_ino_t ino //FIXME: need to change behavior depending on the fs operating system inode->osd2.linux2.l_i_uid_high = le16_to_cpu( (uint16_t *) &inodebuf[item*58] ); inode->osd2.linux2.l_i_gid_high = le16_to_cpu( (uint16_t *) &inodebuf[item*60] ); - inode->osd2.linux2.l_i_reserved2 = le32_to_cpu( (uint32_t *) &inodebuf[item*62] ); + inode->osd2.linux2.l_i_checksum_lo = le16_to_cpu( (uint16_t *) &inodebuf[item*62] ); + inode->osd2.linux2.l_i_reserved = le16_to_cpu( (uint16_t *) &inodebuf[item*63] ); } debian/patches/05_fix_segmentation_fault.patch0000644000000000000000000000144512054205037016702 0ustar Description: fixes segmentation fault when trying to restore files Author: Deekoo L. Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670815 Origin: Debian bug #670815 Tested-By: Antonio Terceiro Last-Update: 2012-11-24 Index: extundelete-0.2.0/src/block.c =================================================================== --- extundelete-0.2.0.orig/src/block.c 2012-11-24 13:55:07.728189161 -0300 +++ extundelete-0.2.0/src/block.c 2012-11-24 13:55:33.808468007 -0300 @@ -69,6 +69,7 @@ ext2_filsys fs; ext2_ino_t ino; struct ext2_inode *inode; + struct ext2_inode inodebuf; int type; int level; int max_depth; debian/copyright0000644000000000000000000001130511703330543011120 0ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 Upstream-Name: extundelete Upstream-Contact: Nic Cas Source: http://sourceforge.net/projects/extundelete/files/ Files: * Copyright: 2009, 2010, Nic Case License: GPL-2 Files: acinclude.m4 Copyright: 2009, Steven G. Johnson 2009, Matteo Frigo License: GPL-3+ Files: install-sh Copyright: 1994, X Consortium License: X Consortium License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from the X Consor- tium. Files: compile depcomp Copyright: 1999, 2000, 2003, 2004, 2005, Free Software Foundation, Inc. License: GPL-2+ Files: missing Copyright: 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. License: GPL-2+ Files: src/kernel-jbd.h Copyright: 1998-2000 Red Hat, Inc. License: GPL-2+ Files: src/block.c Copyright: 1993, 1994, 1995, 1996, Theodore Ts'o License: GPL-2+ Files: debian/* Copyright: 2010, 2011, Elías Alejandro Año Mendoza 2010, Christophe Monniez License: GPL-2+ License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: GPL-3+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 3 can be found in the file `/usr/share/common-licenses/GPL-3'. debian/rules0000755000000000000000000000003711677563044010263 0ustar #!/usr/bin/make -f %: dh $@ debian/watch0000644000000000000000000000010111473452341010213 0ustar version=3 http://sf.net/extundelete/extundelete-(.*)\.tar\.bz2 debian/compat0000644000000000000000000000000211677563044010401 0ustar 8 debian/docs0000644000000000000000000000000711473452341010042 0ustar README debian/extundelete.manpages0000644000000000000000000000002511473452341013232 0ustar debian/extundelete.1 debian/control0000644000000000000000000000151611677563044010611 0ustar Source: extundelete Section: utils Priority: optional Maintainer: Debian Forensics Uploaders: Christophe Monniez , Elías Alejandro Año Mendoza Build-Depends: debhelper (>= 8.0.0), autotools-dev, e2fslibs-dev Standards-Version: 3.9.2 Homepage: http://extundelete.sourceforge.net/ Vcs-Browser: http://git.debian.org/?p=forensics/extundelete.git Vcs-Git: git://git.debian.org/forensics/extundelete.git Package: extundelete Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: utility to recover deleted files from ext3/ext4 partition extundelete uses the information stored in the partition's journal to attempt to recover a file that has been deleted. There is no guarantee that any particular file will be able to be undeleted.