diff --git a/sysutils/dd_rescue/Makefile b/sysutils/dd_rescue/Makefile index a828bbb074f0..565f3dcd0edf 100644 --- a/sysutils/dd_rescue/Makefile +++ b/sysutils/dd_rescue/Makefile @@ -1,42 +1,43 @@ PORTNAME= dd_rescue -PORTVERSION= 1.99.11 +PORTVERSION= 1.99.12 CATEGORIES= sysutils MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \ http://fossies.org/unix/privat/ MAINTAINER= nobutaka@FreeBSD.org COMMENT= dd tool suitable for rescuing data from a medium with errors LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING 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 GNU_CONFIGURE= yes ALL_TARGET= default MAKE_ARGS= EXTRA_LDFLAGS=-L${LOCALBASE}/lib CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib OPTIONS_DEFINE= DOCS 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} ${INSTALL_DATA} ${WRKSRC}/README.dd_rescue ${STAGEDIR}${DOCSDIR} .include diff --git a/sysutils/dd_rescue/distinfo b/sysutils/dd_rescue/distinfo index f562eaeb3afe..f8764c73cf70 100644 --- a/sysutils/dd_rescue/distinfo +++ b/sysutils/dd_rescue/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1620114532 -SHA256 (dd_rescue-1.99.11.tar.bz2) = 84c780919b971459e6fb18775ee097a41fc3dbdcb5aab8332e71e83a03ec645f -SIZE (dd_rescue-1.99.11.tar.bz2) = 181927 +TIMESTAMP = 1659154970 +SHA256 (dd_rescue-1.99.12.tar.bz2) = f304750aecf2b04a4798b26373a66483cf075e0a8e4619e78dc307e8f794c895 +SIZE (dd_rescue-1.99.12.tar.bz2) = 181798 diff --git a/sysutils/dd_rescue/files/patch-Makefile b/sysutils/dd_rescue/files/patch-Makefile index e1773aaec5dd..11fba0d58a69 100644 --- a/sysutils/dd_rescue/files/patch-Makefile +++ b/sysutils/dd_rescue/files/patch-Makefile @@ -1,63 +1,63 @@ ---- Makefile.orig 2021-04-29 08:31:32 UTC +--- Makefile.orig 2022-07-26 13:31:58 UTC +++ Makefile -@@ -7,11 +7,7 @@ VERSION = 1.99.11 +@@ -7,11 +7,7 @@ VERSION = 1.99.12 DESTDIR = - SRCDIR = . + SRCDIR ?= . -CC = gcc -SHELL = /bin/bash -RPM_OPT_FLAGS ?= -Os -Wall -g -D_FORTIFY_SOURCE=2 -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 -@@ -36,7 +32,7 @@ LIB = lib +@@ -39,7 +35,7 @@ LIB = lib LIBDIR = /usr/$(LIB) COMPILER = $(shell $(CC) --version | head -n1) 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 PIC = -fPIC PIE = -fPIE -@@ -71,19 +67,13 @@ else +@@ -74,19 +70,13 @@ else HAVE_XATTR=0 endif -ifeq ($(CC),wcl386) - CFLAGS = "-ox -wx $(EXTRA_CFLAGS)" - DEFINES = -dMISS_STRSIGNAL -dMISS_PREAD -dVERSION=\"$(VERSION)\" -d__COMPILER__="\"$(COMPILER)\"" - OUT = "" -endif - MACH := $(shell uname -m | tr A-Z a-z | sed 's/i[3456]86/i386/') ISX86 := 0 ifeq ($(MACH),i386) ISX86 := 1 endif -ifeq ($(MACH),x86_64) +ifeq ($(MACH),amd64) ISX86 := 1 LIB = lib64 endif -@@ -289,7 +279,7 @@ libddr_MD5.so: libddr_hash.so +@@ -292,7 +282,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 $@ $^ -@@ -360,7 +350,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) +@@ -363,7 +353,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) # 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) # Test programs md5: $(SRCDIR)/md5.c $(SRCDIR)/md5.h $(SRCDIR)/hash.h config.h diff --git a/sysutils/dd_rescue/files/patch-aes__c.c b/sysutils/dd_rescue/files/patch-aes__c.c new file mode 100644 index 000000000000..6943abda15cd --- /dev/null +++ b/sysutils/dd_rescue/files/patch-aes__c.c @@ -0,0 +1,11 @@ +--- aes_c.c.orig 2022-07-30 04:37:00 UTC ++++ aes_c.c +@@ -32,8 +32,6 @@ + + #include + #include +-#include +-#include + + typedef unsigned char u8; + typedef unsigned short u16; diff --git a/sysutils/dd_rescue/files/patch-dd_rescue.c b/sysutils/dd_rescue/files/patch-dd_rescue.c index 40c916eddfbc..7508cb37bd3d 100644 --- a/sysutils/dd_rescue/files/patch-dd_rescue.c +++ b/sysutils/dd_rescue/files/patch-dd_rescue.c @@ -1,32 +1,32 @@ ---- dd_rescue.c.orig 2021-03-07 06:46:37 UTC +--- dd_rescue.c.orig 2022-01-09 17:27:45 UTC +++ dd_rescue.c @@ -116,6 +116,7 @@ #include "list.h" #include "fmt_no.h" #include "find_nonzero.h" +#include "ffs.h" #include "fstrim.h" -@@ -2725,7 +2726,9 @@ int is_filename(char* arg) +@@ -2728,7 +2729,9 @@ int is_filename(char* arg) const char* retstrdupcat3(const char* dir, char dirsep, const char* inm) { - char* ibase = basename(strdupa(inm)); + char* str = alloca(strlen(inm) + 1); + strcpy(str, inm); + char* ibase = basename(str); const int dlen = strlen(dir) + (dirsep>0? 1: dirsep); char* ret = (char*)malloc(dlen + strlen(inm) + 1); strcpy(ret, dir); -@@ -2744,7 +2747,9 @@ const char* dirappfile(const char* onm, opt_t *op) +@@ -2747,7 +2750,9 @@ const char* dirappfile(const char* onm, opt_t *op) { size_t oln = strlen(onm); if (!strcmp(onm, ".")) { - char* ret = strdup(basename(strdupa(op->iname))); + char* str = alloca(strlen(op->iname) + 1); + strcpy(str, op->iname); + char* ret = strdup(basename(str)); LISTAPPEND(freenames, ret, charp); return ret; } diff --git a/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c b/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c index 7c0d1239f851..3cac732ffe6a 100644 --- a/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c +++ b/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c @@ -1,10 +1,10 @@ ---- find_nonzero_sse2.c.orig 2016-12-28 21:17:50 UTC +--- find_nonzero_sse2.c.orig 2022-07-25 15:45:07 UTC +++ find_nonzero_sse2.c @@ -5,6 +5,7 @@ */ #include "find_nonzero.h" +#include "ffs.h" - #if defined(__SSE2__) - #include + #if defined(__x86_64__) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) + diff --git a/sysutils/dd_rescue/files/patch-libddr_crypt.c b/sysutils/dd_rescue/files/patch-libddr_crypt.c index f08f98550c61..e42e60a71a17 100644 --- a/sysutils/dd_rescue/files/patch-libddr_crypt.c +++ b/sysutils/dd_rescue/files/patch-libddr_crypt.c @@ -1,11 +1,11 @@ ---- libddr_crypt.c.orig 2017-12-03 21:58:24 UTC +--- libddr_crypt.c.orig 2022-07-26 10:06:31 UTC +++ libddr_crypt.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include - #ifdef HAVE_ATTR_XATTR_H + #ifdef HAVE_SYS_XATTR_H diff --git a/sysutils/dd_rescue/files/patch-libddr_hash.c b/sysutils/dd_rescue/files/patch-libddr_hash.c index eb283c21f36e..7af72697ad67 100644 --- a/sysutils/dd_rescue/files/patch-libddr_hash.c +++ b/sysutils/dd_rescue/files/patch-libddr_hash.c @@ -1,11 +1,11 @@ ---- libddr_hash.c.orig 2017-08-25 15:14:33 UTC +--- libddr_hash.c.orig 2021-04-14 08:23:02 UTC +++ libddr_hash.c -@@ -34,7 +34,7 @@ +@@ -35,7 +35,7 @@ #include #include /* For ntohl/htonl */ -#include +#include - #ifdef HAVE_ATTR_XATTR_H - #include + #ifdef HAVE_SYS_XATTR_H + #include diff --git a/sysutils/dd_rescue/files/patch-libddr_lzo.c b/sysutils/dd_rescue/files/patch-libddr_lzo.c index 00f28dca875f..8bb24e9bae34 100644 --- a/sysutils/dd_rescue/files/patch-libddr_lzo.c +++ b/sysutils/dd_rescue/files/patch-libddr_lzo.c @@ -1,10 +1,19 @@ ---- libddr_lzo.c.orig 2017-11-04 09:14:24 UTC +--- libddr_lzo.c.orig 2022-07-26 13:53:37 UTC +++ libddr_lzo.c -@@ -46,6 +46,7 @@ +@@ -13,6 +13,8 @@ + #define _LARGEFILE64_SOURCE 1 + #define _FILE_OFFSET_BITS 64 + ++#include "config.h" ++ + #include "ddr_plugin.h" + #include "ddr_ctrl.h" + +@@ -48,6 +50,7 @@ #error __WORDSIZE unknown #endif +#define HAVE_BASENAME 1 #ifdef HAVE_BASENAME //char* basename(char*); #else diff --git a/sysutils/dd_rescue/files/patch-pbkdf_ossl.c b/sysutils/dd_rescue/files/patch-pbkdf_ossl.c index 99719786058b..18f9ff5cd595 100644 --- a/sysutils/dd_rescue/files/patch-pbkdf_ossl.c +++ b/sysutils/dd_rescue/files/patch-pbkdf_ossl.c @@ -1,11 +1,11 @@ ---- pbkdf_ossl.c.orig 2017-11-04 09:03:51 UTC +--- pbkdf_ossl.c.orig 2021-04-14 08:23:02 UTC +++ pbkdf_ossl.c -@@ -11,7 +11,7 @@ - #include "md5.h" +@@ -12,7 +12,7 @@ + #include "secmem.h" #include #include -#include +#include #include #define MIN(a,b) ((a)<(b)? (a): (b)) diff --git a/sysutils/dd_rescue/files/patch-random.c b/sysutils/dd_rescue/files/patch-random.c index e2a830f9b41c..e20ccfd66b9d 100644 --- a/sysutils/dd_rescue/files/patch-random.c +++ b/sysutils/dd_rescue/files/patch-random.c @@ -1,12 +1,12 @@ ---- random.c.orig 2015-09-10 15:51:08 UTC +--- random.c.orig 2022-07-25 15:45:07 UTC +++ random.c -@@ -22,6 +22,9 @@ typedef unsigned int __u32; - #ifdef HAVE_LINUX_RANDOM_H - #include +@@ -28,6 +28,9 @@ typedef unsigned int __u32; + #endif + #include #endif +#ifdef __FreeBSD__ +#include +#endif static void msleep(unsigned int msecs) {