Skip site navigation (1)Skip section navigation (2)
Date:      18 Jul 2005 13:23:45 -0000
From:      Emanuel Haupt <ehaupt@critical.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/83666: new port: sysutils/magicrescue
Message-ID:  <20050718132345.93030.qmail@mx.critical.ch>
Resent-Message-ID: <200507181330.j6IDUDeD021398@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         83666
>Category:       ports
>Synopsis:       new port: sysutils/magicrescue
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 18 13:30:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Emanuel Haupt
>Release:        FreeBSD 4.11-RELEASE-p11 i386
>Organization:
>Environment:
System: FreeBSD admin.critical.ch 4.11-RELEASE-p11 FreeBSD 4.11-RELEASE-p11 #0: Thu Jun 30 09:36:40 CEST 2005 root@admin.critical.ch:/usr/obj/usr/src-release/src/sys/GENERIC i386


	
>Description:
new port: sysutils/magicrescue

Magic Rescue scans a block device for file types it knows how to recover and
calls an external program to extract them. It looks at "magic bytes" in file
contents, so it can be used both as an undelete utility and for recovering a
corrupted drive or partition. As long as the file data is there, it will
find it.

It works on any file system, but on very fragmented file systems it can only
recover the first chunk of each file. Practical experience shows, however, that
chunks of 30-50MB are not uncommon.


>How-To-Repeat:
	
>Fix:

	



--- magicrescue.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	magicrescue
#	magicrescue/Makefile
#	magicrescue/pkg-descr
#	magicrescue/distinfo
#	magicrescue/files
#	magicrescue/files/patch-magicsort
#	magicrescue/pkg-plist
#
echo c - magicrescue
mkdir -p magicrescue > /dev/null 2>&1
echo x - magicrescue/Makefile
sed 's/^X//' >magicrescue/Makefile << 'END-of-magicrescue/Makefile'
X# New ports collection makefile for:	magicrescue
X# Date created:				18 Jul 2005
X# Whom:					Emanuel Haupt <ehaupt@critical.ch>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	magicrescue
XPORTVERSION=	1.1.4
XCATEGORIES=	sysutils
XMASTER_SITES=	http://jbj.rapanden.dk/magicrescue/release/
X
XMAINTAINER=	ehaupt@critical.ch
XCOMMENT=	A file recovery tool which recovers deleted files from a block device
X
XGNU_CONFIGURE=	yes
XUSE_REINPLACE=	yes
XUSE_PERL5_RUN=	yes
X
XMAN1=		dupemap.1 magicrescue.1 magicsort.1
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|^#!/usr/bin/env.*|#!${PERL}|' \
X		${WRKSRC}/magicsort
X
X.if !defined(NOPORTDOCS)
Xpost-install:
X	${MKDIR} ${DOCSDIR}
X.for f in NEWS README
X	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.mk>
END-of-magicrescue/Makefile
echo x - magicrescue/pkg-descr
sed 's/^X//' >magicrescue/pkg-descr << 'END-of-magicrescue/pkg-descr'
XMagic Rescue scans a block device for file types it knows how to recover and
Xcalls an external program to extract them. It looks at "magic bytes" in file
Xcontents, so it can be used both as an undelete utility and for recovering a
Xcorrupted drive or partition. As long as the file data is there, it will
Xfind it.
X
XIt works on any file system, but on very fragmented file systems it can only
Xrecover the first chunk of each file. Practical experience shows, however, that
Xchunks of 30-50MB are not uncommon.
X
XWWW: http://jbj.rapanden.dk/magicrescue/
X
X- ehaupt
Xehaupt@critical.ch
END-of-magicrescue/pkg-descr
echo x - magicrescue/distinfo
sed 's/^X//' >magicrescue/distinfo << 'END-of-magicrescue/distinfo'
XMD5 (magicrescue-1.1.4.tar.gz) = 1df1ca602732208adf48f17ab703e2b6
XSIZE (magicrescue-1.1.4.tar.gz) = 89965
END-of-magicrescue/distinfo
echo c - magicrescue/files
mkdir -p magicrescue/files > /dev/null 2>&1
echo x - magicrescue/files/patch-magicsort
sed 's/^X//' >magicrescue/files/patch-magicsort << 'END-of-magicrescue/files/patch-magicsort'
X--- magicsort.orig     Mon Jul 18 11:55:35 2005
X+++ magicsort  Mon Jul 18 12:03:01 2005
X@@ -13,7 +13,7 @@
X while (defined(my $file = readdir DH)) {
X     next unless -f $file;
X 
X-    open FILE, "-|", "file", $file or die "Executing file: $!\n";
X+    open(FILE, 'file '.$file.'|') or die "Executing file: $!\n";
X     my $idstring = <FILE>;
X     close FILE;
X 
X@@ -25,7 +25,7 @@
X       next;
X     }
X     my $dir = substr($idstring, length($file) + 2);
X-    mkdir $dir;
X+    mkdir $dir,0755;
X     rename $file, "$dir/$file" or warn "Cannot move $file: $!\n";
X }
X 
END-of-magicrescue/files/patch-magicsort
echo x - magicrescue/pkg-plist
sed 's/^X//' >magicrescue/pkg-plist << 'END-of-magicrescue/pkg-plist'
Xbin/dupemap
Xbin/magicrescue
Xbin/magicsort
X%%DATADIR%%/recipes/avi
X%%DATADIR%%/recipes/elf
X%%DATADIR%%/recipes/gimp-xcf
X%%DATADIR%%/recipes/gpl
X%%DATADIR%%/recipes/gzip
X%%DATADIR%%/recipes/jpeg-exif
X%%DATADIR%%/recipes/jpeg-jfif
X%%DATADIR%%/recipes/mp3-id3v1
X%%DATADIR%%/recipes/mp3-id3v2
X%%DATADIR%%/recipes/msoffice
X%%DATADIR%%/recipes/perl
X%%DATADIR%%/recipes/png
X%%DATADIR%%/recipes/zip
X%%DATADIR%%/tools/checkrecipe
X%%DATADIR%%/tools/elfextract.pl
X%%DATADIR%%/tools/gimp-resave.pl
X%%DATADIR%%/tools/gzip_rename.pl
X%%DATADIR%%/tools/inputseek
X%%DATADIR%%/tools/laola.pl
X%%DATADIR%%/tools/mp3extract.pl
X%%DATADIR%%/tools/ole_rename.pl
X%%DATADIR%%/tools/oleextract.pl
X%%DATADIR%%/tools/pngextract.pl
X%%DATADIR%%/tools/safecat
X%%DATADIR%%/tools/script_rename.pl
X%%DATADIR%%/tools/textextract
X%%PORTDOCS%%%%DOCSDIR%%/NEWS
X%%PORTDOCS%%%%DOCSDIR%%/README
X@dirrm %%DATADIR%%/tools
X@dirrm %%DATADIR%%/recipes
X@dirrm %%DATADIR%%
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-magicrescue/pkg-plist
exit
--- magicrescue.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050718132345.93030.qmail>