From owner-svn-ports-head@freebsd.org Tue Feb 7 20:31:34 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15AB7CD530D; Tue, 7 Feb 2017 20:31:34 +0000 (UTC) (envelope-from krion@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC121C6F; Tue, 7 Feb 2017 20:31:33 +0000 (UTC) (envelope-from krion@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17KVWCX059124; Tue, 7 Feb 2017 20:31:32 GMT (envelope-from krion@FreeBSD.org) Received: (from krion@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17KVWMY059099; Tue, 7 Feb 2017 20:31:32 GMT (envelope-from krion@FreeBSD.org) Message-Id: <201702072031.v17KVWMY059099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: krion set sender to krion@FreeBSD.org using -f From: Kirill Ponomarew Date: Tue, 7 Feb 2017 20:31:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r433587 - in head/sysutils: . safecopy safecopy/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2017 20:31:34 -0000 Author: krion Date: Tue Feb 7 20:31:32 2017 New Revision: 433587 URL: https://svnweb.freebsd.org/changeset/ports/433587 Log: New port: sysutils/safecopy Safecopy is a data recovery tool which tries to extract as much data as possible from a problematic (i.e. damaged sectors) source - like floppy drives, hard disk partitions, CDs, tape devices etc, ... , where other tools like dd would fail due to I/O errors. Safecopy includes a low level IO layer to read CDROM disks in raw mode, and issue device resets and other helpful low level operations on a number of other device classes. The project also includes a device simulator which can be used to simulate bad media for testing and benchmarking safecopy as well as other data rescue tools. WWW: http://safecopy.sourceforge.net/ PR: 216892 Submitted by: anastasios@mageirias.com Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D9479 Added: head/sysutils/safecopy/ head/sysutils/safecopy/Makefile (contents, props changed) head/sysutils/safecopy/distinfo (contents, props changed) head/sysutils/safecopy/files/ head/sysutils/safecopy/files/patch-src_safecopy.c (contents, props changed) head/sysutils/safecopy/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Tue Feb 7 20:31:32 2017 (r433586) +++ head/sysutils/Makefile Tue Feb 7 20:31:32 2017 (r433587) @@ -1010,6 +1010,7 @@ SUBDIR += s6-rc SUBDIR += safe-rm SUBDIR += safecat + SUBDIR += safecopy SUBDIR += samefile SUBDIR += samesame SUBDIR += sample Added: head/sysutils/safecopy/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/safecopy/Makefile Tue Feb 7 20:31:32 2017 (r433587) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +PORTNAME= safecopy +PORTVERSION= 1.7 +CATEGORIES= sysutils +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}/ + +MAINTAINER= anastasios@mageirias.com +COMMENT= Safe copying of files and partition + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= gmake +GNU_CONFIGURE= yes + +PLIST_FILES= bin/safecopy \ + man/man1/safecopy.1.gz + +.include Added: head/sysutils/safecopy/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/safecopy/distinfo Tue Feb 7 20:31:32 2017 (r433587) @@ -0,0 +1,3 @@ +TIMESTAMP = 1486492944 +SHA256 (safecopy-1.7.tar.gz) = 42fbed5d4764020eb0f34d95e97a0e14e62d801c3ef80f89bd497d94d39cc4fd +SIZE (safecopy-1.7.tar.gz) = 398465 Added: head/sysutils/safecopy/files/patch-src_safecopy.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/safecopy/files/patch-src_safecopy.c Tue Feb 7 20:31:32 2017 (r433587) @@ -0,0 +1,29 @@ +--- src/safecopy.c.orig 2017-02-07 19:49:05 UTC ++++ src/safecopy.c +@@ -900,7 +900,7 @@ int main(int argc, char ** argv) { + fprintf(stdout, "File size: %llu\n", (long long) statusvars->filesize ); + } else { + fprintf(stderr, "Filesize not reported by stat(), trying seek().\n"); +- statusvars->source = open(configvars->sourcefile, O_RDONLY | O_RSYNC); ++ statusvars->source = open(configvars->sourcefile, O_RDONLY | O_SYNC); + if (statusvars->source) { + statusvars->filesize = lseek(statusvars->source, 0, SEEK_END); + close(statusvars->source); +@@ -1691,7 +1691,7 @@ int main(int argc, char ** argv) { + for ( statusvars->cseeks = 0; statusvars->cseeks < statusvars->seeks ; statusvars->cseeks ++) { + debug(DEBUG_SEEK, "debug: forced head realignment\n"); + // note. must use O_RSYNC since with O_DIRECT / raw devices, lseek to end of file might not work +- statusvars->source = open(configvars->sourcefile, O_RDONLY | O_NONBLOCK | O_RSYNC ); ++ statusvars->source = open(configvars->sourcefile, O_RDONLY | O_NONBLOCK | O_SYNC ); + if (statusvars->source) { + lseek(statusvars->source, 0, SEEK_SET); + select_for_reading(statusvars->source, configvars, statusvars); +@@ -1699,7 +1699,7 @@ int main(int argc, char ** argv) { + read(statusvars->source, statusvars->databuffer , statusvars->blocksize ); + close(statusvars->source); + } +- statusvars->source = open(configvars->sourcefile, O_RDONLY | O_NONBLOCK | O_RSYNC ); ++ statusvars->source = open(configvars->sourcefile, O_RDONLY | O_NONBLOCK | O_SYNC ); + if (statusvars->source) { + lseek(statusvars->source,- statusvars->blocksize , SEEK_END); + select_for_reading(statusvars->source, configvars, statusvars); Added: head/sysutils/safecopy/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/safecopy/pkg-descr Tue Feb 7 20:31:32 2017 (r433587) @@ -0,0 +1,11 @@ +Safecopy is a data recovery tool which tries to extract as much data as +possible from a problematic (i.e. damaged sectors) source - like floppy drives, +hard disk partitions, CDs, tape devices etc, ... , where other tools like dd +would fail due to I/O errors. +Safecopy includes a low level IO layer to read CDROM disks in raw mode, and +issue device resets and other helpful low level operations on a number of other +device classes. +The project also includes a device simulator which can be used to simulate bad +media for testing and benchmarking safecopy as well as other data rescue tools. + +WWW: http://safecopy.sourceforge.net/