summaryrefslogtreecommitdiffstats
path: root/system/extundelete
diff options
context:
space:
mode:
Diffstat (limited to 'system/extundelete')
-rw-r--r--system/extundelete/extundelete-e2fsprogs-1.44.1.patch12
-rw-r--r--system/extundelete/extundelete.1117
-rw-r--r--system/extundelete/extundelete.SlackBuild58
-rw-r--r--system/extundelete/extundelete.info4
4 files changed, 163 insertions, 28 deletions
diff --git a/system/extundelete/extundelete-e2fsprogs-1.44.1.patch b/system/extundelete/extundelete-e2fsprogs-1.44.1.patch
new file mode 100644
index 0000000000..61c078bfb8
--- /dev/null
+++ b/system/extundelete/extundelete-e2fsprogs-1.44.1.patch
@@ -0,0 +1,12 @@
+diff -ru extundelete-0.2.4.orig/src/insertionops.cc extundelete-0.2.4/src/insertionops.cc
+--- extundelete-0.2.4.orig/src/insertionops.cc 2018-06-04 22:19:22.460051515 +0000
++++ extundelete-0.2.4/src/insertionops.cc 2018-06-04 22:19:49.256717673 +0000
+@@ -33,7 +33,7 @@
+ os << "File flags: " << inode.i_flags << std::endl;
+ os << "File version (for NFS): " << inode.i_generation << std::endl;
+ os << "File ACL: " << inode.i_file_acl << std::endl;
+- os << "Directory ACL: " << inode.i_dir_acl << std::endl;
++ os << "Directory ACL: " << inode.i_size_high << std::endl;
+ os << "Fragment address: " << inode.i_faddr << std::endl;
+ os << "Direct blocks: ";
+ for (int n = 0; n < EXT2_NDIR_BLOCKS; n++)
diff --git a/system/extundelete/extundelete.1 b/system/extundelete/extundelete.1
new file mode 100644
index 0000000000..0eadd3efad
--- /dev/null
+++ b/system/extundelete/extundelete.1
@@ -0,0 +1,117 @@
+.\" 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 <n> 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<whatever>\fP and
+.\" \fI<whatever>\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 \-\-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 <number9652@users.sourceforge.net> Copyright (C) 2009, 2012
+.PP
+This manual page was written by Elías Alejandro Año Mendoza <ealmdz@gmail.com>,
+for the Debian project (and may be used by others).
diff --git a/system/extundelete/extundelete.SlackBuild b/system/extundelete/extundelete.SlackBuild
index 5707b90896..6d5b37af11 100644
--- a/system/extundelete/extundelete.SlackBuild
+++ b/system/extundelete/extundelete.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for extundelete
@@ -23,38 +23,45 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# Markus Reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
+# Markus Reichelt, (email removed)
+
+# 20230709 bkw: BUILD=2
+# - new maintainer.
+# - add man page, cribbed from Debian.
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=extundelete
VERSION=${VERSION:-0.2.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -66,30 +73,29 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+patch -p1 < $CWD/extundelete-e2fsprogs-1.44.1.patch
-mkdir -p $PKG/usr/bin $PKG/usr/doc
+mkdir -p $PKG/usr/bin
-DFLAGS=$LDFLAGS \
CFLAGS=$SLKCFLAGS \
-./configure --prefix=$PKG/usr
+./configure --prefix=/usr
make
-make install
+make install-strip DESTDIR=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE* README* $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a LICENSE* README* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/extundelete/extundelete.info b/system/extundelete/extundelete.info
index d6558bd741..c7127dc206 100644
--- a/system/extundelete/extundelete.info
+++ b/system/extundelete/extundelete.info
@@ -6,5 +6,5 @@ MD5SUM="77e626ad31433680c0a222069295d2ca"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Markus Reichelt"
-EMAIL="slackbuilds@mareichelt.de"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"