diff options
author | MANTANI Nobutaka <nobutaka@FreeBSD.org> | 2018-07-15 16:45:41 +0000 |
---|---|---|
committer | MANTANI Nobutaka <nobutaka@FreeBSD.org> | 2018-07-15 16:45:41 +0000 |
commit | 32c8a26e27a4280f446e558efbffd95f7c4da2b7 (patch) | |
tree | 340b734d28c7e4be987b895504faf14ee8e3cfac /sysutils/dd_rescue | |
parent | 76fa912565f0c24cbef161c58435771a6fc11fcd (diff) | |
download | ports-32c8a26e27a4280f446e558efbffd95f7c4da2b7.tar.gz ports-32c8a26e27a4280f446e558efbffd95f7c4da2b7.zip |
Notes
Diffstat (limited to 'sysutils/dd_rescue')
20 files changed, 143 insertions, 88 deletions
diff --git a/sysutils/dd_rescue/Makefile b/sysutils/dd_rescue/Makefile index 87afa2402c7d..45a8173852f2 100644 --- a/sysutils/dd_rescue/Makefile +++ b/sysutils/dd_rescue/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= dd_rescue -PORTVERSION= 1.46 +PORTVERSION= 1.99.8 CATEGORIES= sysutils MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \ http://fossies.org/unix/privat/ @@ -13,22 +13,30 @@ COMMENT= dd tool suitable for rescuing data from a medium with errors LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -GNU_CONFIGURE= yes -USES= autoreconf gmake +BROKEN_aarch64= Fails to link: undefined reference to find_nonzero_arm8 + +LIB_DEPENDS= liblzo2.so:archivers/lzo2 + +USES= autoreconf gmake ssl tar:bzip2 USE_CSTD= gnu89 +USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/${PORTNAME} +GNU_CONFIGURE= yes ALL_TARGET= default +MAKE_ARGS= EXTRA_LDFLAGS=-L${LOCALBASE}/lib +CFLAGS+= -I${LOCALBASE}/include OPTIONS_DEFINE= DOCS -BROKEN_aarch64= Fails to link: undefined reference to find_nonzero_arm8 - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/dd_rescue ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/libddr_crypt.so ${STAGEDIR}${PREFIX}/lib ${INSTALL_PROGRAM} ${WRKSRC}/libddr_hash.so ${STAGEDIR}${PREFIX}/lib ${INSTALL_PROGRAM} ${WRKSRC}/libddr_null.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/libddr_lzo.so ${STAGEDIR}${PREFIX}/lib ${INSTALL_MAN} ${WRKSRC}/dd_rescue.1 ${STAGEDIR}${PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/ddr_crypt.1 ${STAGEDIR}${PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/ddr_lzo.1 ${STAGEDIR}${PREFIX}/man/man1 do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/sysutils/dd_rescue/distinfo b/sysutils/dd_rescue/distinfo index b1b0b8a874fa..6f0c8a7cb02a 100644 --- a/sysutils/dd_rescue/distinfo +++ b/sysutils/dd_rescue/distinfo @@ -1,2 +1,3 @@ -SHA256 (dd_rescue-1.46.tar.gz) = 9e09b5583f778fe43b6c473998fe0455486d5ffeacbb72b022d6cf5ba8241aba -SIZE (dd_rescue-1.46.tar.gz) = 126790 +TIMESTAMP = 1529856127 +SHA256 (dd_rescue-1.99.8.tar.bz2) = 90db76716af6a6a2370d9726804ff26cc63e61109af9967078a5eb941faa7dbd +SIZE (dd_rescue-1.99.8.tar.bz2) = 174594 diff --git a/sysutils/dd_rescue/files/patch-Makefile b/sysutils/dd_rescue/files/patch-Makefile index 83bf0cedb4a3..fa27b7f0c4f4 100644 --- a/sysutils/dd_rescue/files/patch-Makefile +++ b/sysutils/dd_rescue/files/patch-Makefile @@ -1,28 +1,28 @@ ---- Makefile.orig 2014-05-27 20:31:21.000000000 +0900 -+++ Makefile 2014-08-06 21:41:59.000000000 +0900 -@@ -6,10 +6,7 @@ - +--- Makefile.orig 2017-12-03 21:01:05 UTC ++++ Makefile +@@ -7,10 +7,7 @@ VERSION = 1.99.8 DESTDIR = + SRCDIR = . -CC = gcc -RPM_OPT_FLAGS = -Os -Wall -g -D_FORTIFY_SOURCE=2 --CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H +-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H -I . -CFLAGS_OPT = $(CFLAGS) -O3 +CFLAGS_OPT = $(CFLAGS) -DHAVE_CONFIG_H INSTALL = install INSTALLFLAGS = -s prefix = $(DESTDIR)/usr -@@ -32,7 +29,7 @@ - LIB = lib +@@ -34,7 +31,7 @@ LIB = lib LIBDIR = /usr/$(LIB) COMPILER = $(shell $(CC) --version | head -n1) --DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" # -DPLUGSEARCH="\"$(LIBDIR)\"" -+DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\"" + ID = $(shell git describe --tags || cat REL-ID) +-DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DID=\"$(ID)\" # -DPLUGSEARCH="\"$(LIBDIR)\"" ++DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DID=\"$(ID)\" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\"" OUT = -o dd_rescue - - LZOP = $(shell type -p lzop || type -P true) -@@ -46,12 +43,6 @@ - HAVE_LZO=0 + PIC = -fPIC + PIE = -fPIE +@@ -63,19 +60,13 @@ else + HAVE_OPENSSL=0 endif -ifeq ($(CC),wcl386) @@ -31,24 +31,32 @@ - OUT = "" -endif - - HAVE_AVX2 := $(shell echo "" | $(CC) -mavx2 -xc - 2>&1 | grep unrecognized || echo 1) - HAVE_SSE42 := $(shell echo "" | $(CC) -msse4.2 -xc - 2>&1 | grep unrecognized || echo 1) + MACH := $(shell uname -m | tr A-Z a-z | sed 's/i[3456]86/i386/') -@@ -74,7 +65,7 @@ + ISX86 := 0 + ifeq ($(MACH),i386) + ISX86 := 1 endif - endif - -ifeq ($(MACH),x86_64) +ifeq ($(MACH),amd64) - LIB = lib64 - OBJECTS2 = find_nonzero_sse2.o - ifeq ($(HAVE_SSE42),1) -@@ -180,7 +171,7 @@ - $(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(LIBDIR)/libfallocate.a + ISX86 := 1 + LIB = lib64 + endif +@@ -243,7 +234,7 @@ libddr_MD5.so: libddr_hash.so + ln -sf $< $@ + + libddr_lzo.so: libddr_lzo.po +- $(CC) -shared -o $@ $^ -llzo2 ++ $(CC) -shared -o $@ $^ $(EXTRA_LDFLAGS) -llzo2 + + libddr_null.so: libddr_null.po + $(CC) -shared -o $@ $^ +@@ -306,7 +297,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c - dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS) $(OBJECTS2) -- $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl -+ $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) + # This is the default built + dd_rescue: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS) $(OBJECTS2) +- $(CC) $(CFLAGS) $(PIE) $(LDPIE) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl $(EXTRA_LDFLAGS) $(RDYNAMIC) ++ $(CC) $(CFLAGS) $(PIE) $(LDPIE) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(EXTRA_LDFLAGS) $(RDYNAMIC) - md5: md5.c md5.h hash.h config.h - $(CC) $(CFLAGS_OPT) -DMD5_MAIN -o $@ $< + # Test programs + md5: $(SRCDIR)/md5.c $(SRCDIR)/md5.h $(SRCDIR)/hash.h config.h diff --git a/sysutils/dd_rescue/files/patch-dd_rescue.c b/sysutils/dd_rescue/files/patch-dd_rescue.c index 33263289790e..e43783c2ec2b 100644 --- a/sysutils/dd_rescue/files/patch-dd_rescue.c +++ b/sysutils/dd_rescue/files/patch-dd_rescue.c @@ -1,6 +1,6 @@ ---- dd_rescue.c.orig 2014-05-27 17:27:21.000000000 +0900 -+++ dd_rescue.c 2014-06-29 01:17:08.000000000 +0900 -@@ -118,6 +118,7 @@ +--- dd_rescue.c.orig 2017-11-02 11:28:14 UTC ++++ dd_rescue.c +@@ -117,6 +117,7 @@ #include "list.h" #include "fmt_no.h" #include "find_nonzero.h" @@ -8,7 +8,7 @@ #include "fstrim.h" -@@ -2304,7 +2305,9 @@ +@@ -2712,7 +2713,9 @@ int is_filename(char* arg) const char* retstrdupcat3(const char* dir, char dirsep, const char* inm) { @@ -19,7 +19,7 @@ const int dlen = strlen(dir) + (dirsep>0? 1: dirsep); char* ret = (char*)malloc(dlen + strlen(inm) + 1); strcpy(ret, dir); -@@ -2323,7 +2326,9 @@ +@@ -2731,7 +2734,9 @@ const char* dirappfile(const char* onm, { size_t oln = strlen(onm); if (!strcmp(onm, ".")) { diff --git a/sysutils/dd_rescue/files/patch-ddr_ctrl.h b/sysutils/dd_rescue/files/patch-ddr_ctrl.h index f093adf889d1..bd0d8fa64949 100644 --- a/sysutils/dd_rescue/files/patch-ddr_ctrl.h +++ b/sysutils/dd_rescue/files/patch-ddr_ctrl.h @@ -1,5 +1,5 @@ ---- ddr_ctrl.h.orig 2014-06-29 00:49:05.000000000 +0900 -+++ ddr_ctrl.h 2014-06-29 00:49:52.000000000 +0900 +--- ddr_ctrl.h.orig 2016-12-28 22:37:15 UTC ++++ ddr_ctrl.h @@ -10,6 +10,8 @@ #ifndef _DDR_CTRL_H #define _DDR_CTRL_H diff --git a/sysutils/dd_rescue/files/patch-ffs.h b/sysutils/dd_rescue/files/patch-ffs.h index 51ad7ea588f9..0502987717e3 100644 --- a/sysutils/dd_rescue/files/patch-ffs.h +++ b/sysutils/dd_rescue/files/patch-ffs.h @@ -1,5 +1,5 @@ ---- ffs.h.orig 2014-02-22 05:39:33.000000000 +0900 -+++ ffs.h 2014-08-13 22:46:51.000000000 +0900 +--- ffs.h.orig 2015-08-27 15:45:57 UTC ++++ ffs.h @@ -27,7 +27,15 @@ #ifdef HAVE_ENDIAN_H #include <endian.h> @@ -16,7 +16,7 @@ #ifdef HAVE_FFS # define myffs(x) ffs(x) -@@ -50,12 +58,9 @@ +@@ -54,12 +62,9 @@ # define myffsl(x) myffsl_c(x) #endif @@ -28,9 +28,9 @@ -# error Need to define __WORDSIZE -#endif - #ifndef HAVE_FFS - /** Find first (lowest) bit set in word val, returns a val b/w 1 and __WORDSIZE, 0 if no bit is set */ -@@ -88,7 +93,7 @@ + //#ifndef HAVE_FFS + #ifdef NEED_FFSL_C +@@ -93,7 +98,7 @@ static int myffsl_c(unsigned long val) } #endif @@ -39,9 +39,9 @@ /** Find last (highest) bit set in word val, returns a val b/w __WORDSIZE and 1, 0 if no bit is set */ static int myflsl(unsigned long val) { -@@ -117,6 +122,8 @@ - } +@@ -132,6 +137,8 @@ static int myflsl(unsigned long val) return res; + #endif } +#else +# define myflsl(x) flsl(x) diff --git a/sysutils/dd_rescue/files/patch-fiemap.c b/sysutils/dd_rescue/files/patch-fiemap.c new file mode 100644 index 000000000000..da28e6b7dcb8 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-fiemap.c @@ -0,0 +1,10 @@ +--- fiemap.c.orig 2015-04-15 08:56:38 UTC ++++ fiemap.c +@@ -286,7 +286,6 @@ char* strippart(const char* partname) + return _fulldevnm; + } + +-#include <linux/hdreg.h> + /* Get partition offset in sectors for block device devnm */ + int64_t partoffset(const char* devnm) + { diff --git a/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c b/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c index e575ce379ae6..7c0d1239f851 100644 --- a/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c +++ b/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c @@ -1,5 +1,5 @@ ---- find_nonzero_sse2.c.orig 2014-06-29 01:06:51.000000000 +0900 -+++ find_nonzero_sse2.c 2014-06-29 01:07:11.000000000 +0900 +--- find_nonzero_sse2.c.orig 2016-12-28 21:17:50 UTC ++++ find_nonzero_sse2.c @@ -5,6 +5,7 @@ */ diff --git a/sysutils/dd_rescue/files/patch-fmt_no.h b/sysutils/dd_rescue/files/patch-fmt_no.h index 40047a93a795..e462fccbe4c2 100644 --- a/sysutils/dd_rescue/files/patch-fmt_no.h +++ b/sysutils/dd_rescue/files/patch-fmt_no.h @@ -1,5 +1,5 @@ ---- fmt_no.h.orig 2014-08-06 22:50:41.000000000 +0900 -+++ fmt_no.h 2014-08-06 22:51:11.000000000 +0900 +--- fmt_no.h.orig 2017-11-09 13:09:58 UTC ++++ fmt_no.h @@ -4,6 +4,8 @@ #define _FMT_NO_H @@ -7,5 +7,5 @@ +#include "ddr_ctrl.h" + char* fmt_int_b(unsigned char pre, unsigned char post, unsigned int scale, - loff_t no, const char* bold, const char* norm, - const char boldinvis, const unsigned char base, + loff_t no, const char* bold, const int blen, + const char* norm, const int nlen, diff --git a/sysutils/dd_rescue/files/patch-frandom.c b/sysutils/dd_rescue/files/patch-frandom.c index b03b6382253b..a5a0bc6965a6 100644 --- a/sysutils/dd_rescue/files/patch-frandom.c +++ b/sysutils/dd_rescue/files/patch-frandom.c @@ -1,5 +1,5 @@ ---- frandom.c.orig 2013-01-27 02:43:19.000000000 +0900 -+++ frandom.c 2013-01-27 02:43:29.000000000 +0900 +--- frandom.c.orig 2016-12-28 21:17:50 UTC ++++ frandom.c @@ -16,7 +16,7 @@ #include <stdlib.h> #include <stdio.h> @@ -7,5 +7,5 @@ -#include <asm/errno.h> +#include <sys/errno.h> #include <unistd.h> - #include <time.h> + #ifdef HAVE_CONFIG_H diff --git a/sysutils/dd_rescue/files/patch-libddr_MD5.c b/sysutils/dd_rescue/files/patch-libddr_MD5.c deleted file mode 100644 index db300ef3c0de..000000000000 --- a/sysutils/dd_rescue/files/patch-libddr_MD5.c +++ /dev/null @@ -1,19 +0,0 @@ ---- libddr_MD5.c.orig 2014-08-10 03:38:53.000000000 +0900 -+++ libddr_MD5.c 2014-08-13 23:02:10.000000000 +0900 -@@ -21,6 +21,7 @@ - #include "sha256.h" - #include "sha512.h" - #include "sha1.h" -+#include "ffs.h" - - #include <stdlib.h> - #include <string.h> -@@ -36,7 +37,7 @@ - #endif - - #include <netinet/in.h> /* For ntohl/htonl */ --#include <endian.h> -+#include <machine/endian.h> - - // TODO: pass at runtime rather than compile time - #define HASH_DEBUG(x) if (state->debug) x diff --git a/sysutils/dd_rescue/files/patch-libddr_crypt.c b/sysutils/dd_rescue/files/patch-libddr_crypt.c new file mode 100644 index 000000000000..f08f98550c61 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-libddr_crypt.c @@ -0,0 +1,11 @@ +--- libddr_crypt.c.orig 2017-12-03 21:58:24 UTC ++++ libddr_crypt.c +@@ -44,7 +44,7 @@ + #include <unistd.h> + #include <fcntl.h> + #include <time.h> +-#include <endian.h> ++#include <machine/endian.h> + #include <signal.h> + + #ifdef HAVE_ATTR_XATTR_H diff --git a/sysutils/dd_rescue/files/patch-libddr_hash.c b/sysutils/dd_rescue/files/patch-libddr_hash.c new file mode 100644 index 000000000000..eb283c21f36e --- /dev/null +++ b/sysutils/dd_rescue/files/patch-libddr_hash.c @@ -0,0 +1,11 @@ +--- libddr_hash.c.orig 2017-08-25 15:14:33 UTC ++++ libddr_hash.c +@@ -34,7 +34,7 @@ + #include <fcntl.h> + + #include <netinet/in.h> /* For ntohl/htonl */ +-#include <endian.h> ++#include <machine/endian.h> + + #ifdef HAVE_ATTR_XATTR_H + #include <attr/xattr.h> diff --git a/sysutils/dd_rescue/files/patch-libddr_lzo.c b/sysutils/dd_rescue/files/patch-libddr_lzo.c new file mode 100644 index 000000000000..00f28dca875f --- /dev/null +++ b/sysutils/dd_rescue/files/patch-libddr_lzo.c @@ -0,0 +1,10 @@ +--- libddr_lzo.c.orig 2017-11-04 09:14:24 UTC ++++ libddr_lzo.c +@@ -46,6 +46,7 @@ + #error __WORDSIZE unknown + #endif + ++#define HAVE_BASENAME 1 + #ifdef HAVE_BASENAME + //char* basename(char*); + #else diff --git a/sysutils/dd_rescue/files/patch-libddr_null.c b/sysutils/dd_rescue/files/patch-libddr_null.c index e6684da733ec..e2d5ca5a928c 100644 --- a/sysutils/dd_rescue/files/patch-libddr_null.c +++ b/sysutils/dd_rescue/files/patch-libddr_null.c @@ -1,5 +1,5 @@ ---- libddr_null.c.orig 2014-05-26 17:30:19.000000000 +0900 -+++ libddr_null.c 2014-08-13 22:57:16.000000000 +0900 +--- libddr_null.c.orig 2015-04-15 08:56:38 UTC ++++ libddr_null.c @@ -8,8 +8,10 @@ #include "ddr_plugin.h" diff --git a/sysutils/dd_rescue/files/patch-md5.c b/sysutils/dd_rescue/files/patch-md5.c index 6c6455f9b520..80f12ad90c93 100644 --- a/sysutils/dd_rescue/files/patch-md5.c +++ b/sysutils/dd_rescue/files/patch-md5.c @@ -1,5 +1,5 @@ ---- md5.c.orig 2014-06-29 00:53:13.000000000 +0900 -+++ md5.c 2014-06-29 00:53:22.000000000 +0900 +--- md5.c.orig 2017-11-04 09:03:51 UTC ++++ md5.c @@ -12,7 +12,7 @@ #include <stdlib.h> #include <string.h> diff --git a/sysutils/dd_rescue/files/patch-pbkdf_ossl.c b/sysutils/dd_rescue/files/patch-pbkdf_ossl.c new file mode 100644 index 000000000000..99719786058b --- /dev/null +++ b/sysutils/dd_rescue/files/patch-pbkdf_ossl.c @@ -0,0 +1,11 @@ +--- pbkdf_ossl.c.orig 2017-11-04 09:03:51 UTC ++++ pbkdf_ossl.c +@@ -11,7 +11,7 @@ + #include "md5.h" + #include <stdlib.h> + #include <assert.h> +-#include <endian.h> ++#include <machine/endian.h> + #include <stdint.h> + + #define MIN(a,b) ((a)<(b)? (a): (b)) diff --git a/sysutils/dd_rescue/files/patch-pread64.h b/sysutils/dd_rescue/files/patch-pread64.h index ffbd329ed640..e6b5d570e0f2 100644 --- a/sysutils/dd_rescue/files/patch-pread64.h +++ b/sysutils/dd_rescue/files/patch-pread64.h @@ -1,6 +1,6 @@ ---- pread64.h.orig 2014-06-29 00:37:49.000000000 +0900 -+++ pread64.h 2014-06-29 00:39:50.000000000 +0900 -@@ -94,7 +94,7 @@ +--- pread64.h.orig 2015-04-15 08:56:38 UTC ++++ pread64.h +@@ -94,7 +94,7 @@ static inline ssize_t pread64(int fd, vo { return pread(fd, buf, sz, off); } diff --git a/sysutils/dd_rescue/files/patch-sha512.c b/sysutils/dd_rescue/files/patch-sha512.c index 15d9b1eabfab..ab96fe6a329e 100644 --- a/sysutils/dd_rescue/files/patch-sha512.c +++ b/sysutils/dd_rescue/files/patch-sha512.c @@ -1,5 +1,5 @@ ---- sha512.c.orig 2014-08-07 02:38:59.000000000 +0900 -+++ sha512.c 2014-08-13 23:04:15.000000000 +0900 +--- sha512.c.orig 2016-12-28 21:17:50 UTC ++++ sha512.c @@ -13,13 +13,14 @@ #endif diff --git a/sysutils/dd_rescue/pkg-plist b/sysutils/dd_rescue/pkg-plist index 50dc32296eb3..04bb5954b9be 100644 --- a/sysutils/dd_rescue/pkg-plist +++ b/sysutils/dd_rescue/pkg-plist @@ -1,5 +1,9 @@ bin/dd_rescue +lib/libddr_crypt.so lib/libddr_hash.so lib/libddr_null.so +lib/libddr_lzo.so man/man1/dd_rescue.1.gz +man/man1/ddr_crypt.1.gz +man/man1/ddr_lzo.1.gz %%PORTDOCS%%%%DOCSDIR%%/README.dd_rescue |