From b54ab25dc1b334c2e71ef7b49d35a5e213b94432 Mon Sep 17 00:00:00 2001 From: garga Date: Tue, 19 Jul 2005 12:17:18 +0000 Subject: 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. PR: ports/83666 Submitted by: Emanuel Haupt Approved by: flz (mentor) --- sysutils/magicrescue/Makefile | 34 +++++++++++++++++++++++++++++ sysutils/magicrescue/distinfo | 2 ++ sysutils/magicrescue/files/patch-magicsort | 20 +++++++++++++++++ sysutils/magicrescue/pkg-descr | 14 ++++++++++++ sysutils/magicrescue/pkg-plist | 35 ++++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 sysutils/magicrescue/Makefile create mode 100644 sysutils/magicrescue/distinfo create mode 100644 sysutils/magicrescue/files/patch-magicsort create mode 100644 sysutils/magicrescue/pkg-descr create mode 100644 sysutils/magicrescue/pkg-plist (limited to 'sysutils/magicrescue') diff --git a/sysutils/magicrescue/Makefile b/sysutils/magicrescue/Makefile new file mode 100644 index 000000000000..1179d157bed8 --- /dev/null +++ b/sysutils/magicrescue/Makefile @@ -0,0 +1,34 @@ +# New ports collection makefile for: magicrescue +# Date created: 18 Jul 2005 +# Whom: Emanuel Haupt +# +# $FreeBSD$ +# + +PORTNAME= magicrescue +PORTVERSION= 1.1.4 +CATEGORIES= sysutils +MASTER_SITES= http://jbj.rapanden.dk/magicrescue/release/ + +MAINTAINER= ehaupt@critical.ch +COMMENT= A file recovery tool which recovers deleted files from a block device + +GNU_CONFIGURE= yes +USE_REINPLACE= yes +USE_PERL5_RUN= yes + +MAN1= dupemap.1 magicrescue.1 magicsort.1 + +post-patch: + @${REINPLACE_CMD} -e 's|^#!/usr/bin/env.*|#!${PERL}|' \ + ${WRKSRC}/magicsort + +.if !defined(NOPORTDOCS) +post-install: + ${MKDIR} ${DOCSDIR} +.for f in NEWS README + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} +.endfor +.endif + +.include diff --git a/sysutils/magicrescue/distinfo b/sysutils/magicrescue/distinfo new file mode 100644 index 000000000000..a5d197bff5c2 --- /dev/null +++ b/sysutils/magicrescue/distinfo @@ -0,0 +1,2 @@ +MD5 (magicrescue-1.1.4.tar.gz) = 1df1ca602732208adf48f17ab703e2b6 +SIZE (magicrescue-1.1.4.tar.gz) = 89965 diff --git a/sysutils/magicrescue/files/patch-magicsort b/sysutils/magicrescue/files/patch-magicsort new file mode 100644 index 000000000000..dff60005d0c6 --- /dev/null +++ b/sysutils/magicrescue/files/patch-magicsort @@ -0,0 +1,20 @@ +--- magicsort.orig Mon Jul 18 11:55:35 2005 ++++ magicsort Mon Jul 18 12:03:01 2005 +@@ -13,7 +13,7 @@ + while (defined(my $file = readdir DH)) { + next unless -f $file; + +- open FILE, "-|", "file", $file or die "Executing file: $!\n"; ++ open(FILE, 'file '.$file.'|') or die "Executing file: $!\n"; + my $idstring = ; + close FILE; + +@@ -25,7 +25,7 @@ + next; + } + my $dir = substr($idstring, length($file) + 2); +- mkdir $dir; ++ mkdir $dir,0755; + rename $file, "$dir/$file" or warn "Cannot move $file: $!\n"; + } + diff --git a/sysutils/magicrescue/pkg-descr b/sysutils/magicrescue/pkg-descr new file mode 100644 index 000000000000..2aa5f29fa145 --- /dev/null +++ b/sysutils/magicrescue/pkg-descr @@ -0,0 +1,14 @@ +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. + +WWW: http://jbj.rapanden.dk/magicrescue/ + +- ehaupt +ehaupt@critical.ch diff --git a/sysutils/magicrescue/pkg-plist b/sysutils/magicrescue/pkg-plist new file mode 100644 index 000000000000..ae72551f6513 --- /dev/null +++ b/sysutils/magicrescue/pkg-plist @@ -0,0 +1,35 @@ +bin/dupemap +bin/magicrescue +bin/magicsort +%%DATADIR%%/recipes/avi +%%DATADIR%%/recipes/elf +%%DATADIR%%/recipes/gimp-xcf +%%DATADIR%%/recipes/gpl +%%DATADIR%%/recipes/gzip +%%DATADIR%%/recipes/jpeg-exif +%%DATADIR%%/recipes/jpeg-jfif +%%DATADIR%%/recipes/mp3-id3v1 +%%DATADIR%%/recipes/mp3-id3v2 +%%DATADIR%%/recipes/msoffice +%%DATADIR%%/recipes/perl +%%DATADIR%%/recipes/png +%%DATADIR%%/recipes/zip +%%DATADIR%%/tools/checkrecipe +%%DATADIR%%/tools/elfextract.pl +%%DATADIR%%/tools/gimp-resave.pl +%%DATADIR%%/tools/gzip_rename.pl +%%DATADIR%%/tools/inputseek +%%DATADIR%%/tools/laola.pl +%%DATADIR%%/tools/mp3extract.pl +%%DATADIR%%/tools/ole_rename.pl +%%DATADIR%%/tools/oleextract.pl +%%DATADIR%%/tools/pngextract.pl +%%DATADIR%%/tools/safecat +%%DATADIR%%/tools/script_rename.pl +%%DATADIR%%/tools/textextract +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README +@dirrm %%DATADIR%%/tools +@dirrm %%DATADIR%%/recipes +@dirrm %%DATADIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% -- cgit