aboutsummaryrefslogtreecommitdiff
path: root/sysutils/myrescue
diff options
context:
space:
mode:
authorMahdi Mokhtari <mmokhi@FreeBSD.org>2017-03-02 09:25:10 +0000
committerMahdi Mokhtari <mmokhi@FreeBSD.org>2017-03-02 09:25:10 +0000
commite33f4d79e97f183fc8e0d97cc046d1e0e21cb8ff (patch)
treea3c174855bfc9b8c37914eacce09aacb931d0fca /sysutils/myrescue
parent5e722e26b55c0d1b79c9585e576eff73643dd178 (diff)
downloadports-e33f4d79e97f183fc8e0d97cc046d1e0e21cb8ff.tar.gz
ports-e33f4d79e97f183fc8e0d97cc046d1e0e21cb8ff.zip
sysutils/myrescue: Add the port to the tree.
myrescue is a program to rescue the still-readable data from a damaged hard-disk, similar in purpose to dd_rescue. PR: 217433 Submitted by: Mageirias Anastasios <anastasios@mageirias.com> Reported by: Mageirias Anastasios <anastasios@mageirias.com> Reviewed by: feld, mat Approved by: feld, mat (mentors) Differential Revision: https://reviews.freebsd.org/D9845
Notes
Notes: svn path=/head/; revision=435219
Diffstat (limited to 'sysutils/myrescue')
-rw-r--r--sysutils/myrescue/Makefile23
-rw-r--r--sysutils/myrescue/distinfo3
-rw-r--r--sysutils/myrescue/files/patch-myrescue.c74
-rw-r--r--sysutils/myrescue/pkg-descr6
4 files changed, 106 insertions, 0 deletions
diff --git a/sysutils/myrescue/Makefile b/sysutils/myrescue/Makefile
new file mode 100644
index 000000000000..15c56ae967da
--- /dev/null
+++ b/sysutils/myrescue/Makefile
@@ -0,0 +1,23 @@
+# $FreeBSD$
+
+PORTNAME= myrescue
+PORTVERSION= 0.9.4
+CATEGORIES= sysutils
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}/
+
+MAINTAINER= anastasios@mageirias.com
+COMMENT= Rescue still-readable data from a damaged harddisk
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/../COPYING
+
+WRKSRC_SUBDIR= src
+
+PLIST_FILES= bin/myrescue \
+ man/man1/myrescue.1.gz
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/myrescue ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/myrescue.1 ${STAGEDIR}${MANPREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/sysutils/myrescue/distinfo b/sysutils/myrescue/distinfo
new file mode 100644
index 000000000000..3339f02398c2
--- /dev/null
+++ b/sysutils/myrescue/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1486501077
+SHA256 (myrescue-0.9.4.tar.gz) = 0cdfa61df0f73e3a3362dcacd944b7d25223b679a66f53f65b97de45c4aa5501
+SIZE (myrescue-0.9.4.tar.gz) = 16932
diff --git a/sysutils/myrescue/files/patch-myrescue.c b/sysutils/myrescue/files/patch-myrescue.c
new file mode 100644
index 000000000000..873345334f3f
--- /dev/null
+++ b/sysutils/myrescue/files/patch-myrescue.c
@@ -0,0 +1,74 @@
+--- myrescue.c.orig 2017-02-10 01:59:06 UTC
++++ myrescue.c
+@@ -36,7 +36,7 @@
+
+ long long filesize ( int fd )
+ {
+- long long rval = lseek64(fd, 0, SEEK_END) ;
++ long long rval = lseek(fd, 0, SEEK_END) ;
+ if (rval < 0) {
+ perror("filesize");
+ exit(-1);
+@@ -47,8 +47,8 @@ long long filesize ( int fd )
+ int peek_map(int bitmap_fd, int block)
+ {
+ char c = 0;
+- if (lseek64(bitmap_fd, block, SEEK_SET) < 0) {
+- perror("peek_map lseek64");
++ if (lseek(bitmap_fd, block, SEEK_SET) < 0) {
++ perror("peek_map lseek");
+ exit(-1);
+ }
+ if (read(bitmap_fd, &c, 1) < 0) {
+@@ -60,8 +60,8 @@ int peek_map(int bitmap_fd, int block)
+
+ void poke_map(int bitmap_fd, int block, char val)
+ {
+- if (lseek64(bitmap_fd, block, SEEK_SET) < 0) {
+- perror("poke_map lseek64");
++ if (lseek(bitmap_fd, block, SEEK_SET) < 0) {
++ perror("poke_map lseek");
+ exit(-1);
+ }
+ if (write(bitmap_fd, &val, 1) != 1) {
+@@ -81,13 +81,13 @@ int copy_block( int src_fd, int dst_fd,
+ filepos = block_num;
+ filepos *= block_size;
+
+- if (lseek64(src_fd, filepos, SEEK_SET) < 0) {
+- perror("lseek64 src_fd");
++ if (lseek(src_fd, filepos, SEEK_SET) < 0) {
++ perror("lseek src_fd");
+ return errno;
+ }
+
+- if (lseek64(dst_fd, filepos, SEEK_SET) < 0) {
+- perror("lseek64 dst_fd");
++ if (lseek(dst_fd, filepos, SEEK_SET) < 0) {
++ perror("lseek dst_fd");
+ return errno;
+ }
+
+@@ -479,19 +479,19 @@ int main(int argc, char** argv)
+
+ /* open files */
+
+- src_fd = open64(src_name, O_RDONLY);
++ src_fd = open(src_name, O_RDONLY);
+ if ( src_fd < 0 ) {
+ perror ( "source open failed" ) ;
+ exit(-1) ;
+ }
+
+- dst_fd = open64(dst_name, O_RDWR | O_CREAT, 0600);
++ dst_fd = open(dst_name, O_RDWR | O_CREAT, 0600);
+ if ( dst_fd < 0 ) {
+ perror ( "destination open failed" ) ;
+ exit(-1) ;
+ }
+
+- bitmap_fd = open64(bitmap_name, O_RDWR | O_CREAT, 0600);
++ bitmap_fd = open(bitmap_name, O_RDWR | O_CREAT, 0600);
+ if ( bitmap_fd < 0 ) {
+ perror ( "bitmap open failed" ) ;
+ exit(-1) ;
diff --git a/sysutils/myrescue/pkg-descr b/sysutils/myrescue/pkg-descr
new file mode 100644
index 000000000000..09cc3eb27659
--- /dev/null
+++ b/sysutils/myrescue/pkg-descr
@@ -0,0 +1,6 @@
+myrescue is a program to rescue the still-readable data from a damaged
+hard-disk. It is similar in purpose to dd_rescue, but it tries to quickly get
+out of damaged areas, handling the non-damaged areas and then returning to
+the damaged sections later.
+
+WWW: https://sourceforge.net/projects/myrescue