git: 7e351a1d7b1a - main - sysutils/dd_rescue: Update to 1.99.14
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 25 Aug 2024 12:31:26 UTC
The branch main has been updated by nobutaka: URL: https://cgit.FreeBSD.org/ports/commit/?id=7e351a1d7b1a133c29259dbee5901e9dda59b086 commit 7e351a1d7b1a133c29259dbee5901e9dda59b086 Author: MANTANI Nobutaka <nobutaka@FreeBSD.org> AuthorDate: 2024-08-25 12:20:11 +0000 Commit: MANTANI Nobutaka <nobutaka@FreeBSD.org> CommitDate: 2024-08-25 12:30:33 +0000 sysutils/dd_rescue: Update to 1.99.14 Replace "_" in the names of the patch files with "__" to conform to the patch file name convention. --- sysutils/dd_rescue/Makefile | 3 +- sysutils/dd_rescue/distinfo | 6 +- sysutils/dd_rescue/files/patch-Makefile | 4 +- sysutils/dd_rescue/files/patch-dd__rescue.c | 71 ++++++++++++++++++++++ sysutils/dd_rescue/files/patch-dd_rescue.c | 32 ---------- .../files/{patch-ddr_ctrl.h => patch-ddr__ctrl.h} | 0 sysutils/dd_rescue/files/patch-ffs.h | 19 +++--- sysutils/dd_rescue/files/patch-fiemap.c | 4 +- ..._nonzero_sse2.c => patch-find__nonzero__sse2.c} | 0 .../files/{patch-fmt_no.h => patch-fmt__no.h} | 13 ++-- ...{patch-libddr_crypt.c => patch-libddr__crypt.c} | 0 .../{patch-libddr_hash.c => patch-libddr__hash.c} | 4 +- sysutils/dd_rescue/files/patch-libddr__lzo.c | 10 +++ .../{patch-libddr_null.c => patch-libddr__null.c} | 0 sysutils/dd_rescue/files/patch-libddr_lzo.c | 19 ------ .../{patch-pbkdf_ossl.c => patch-pbkdf__ossl.c} | 0 sysutils/dd_rescue/files/patch-pread64.h | 20 +++--- sysutils/dd_rescue/files/patch-secmem.c | 4 +- sysutils/dd_rescue/files/patch-sha256.c | 20 ------ sysutils/dd_rescue/files/patch-sha512.c | 24 +------- 20 files changed, 122 insertions(+), 131 deletions(-) diff --git a/sysutils/dd_rescue/Makefile b/sysutils/dd_rescue/Makefile index 6b27a82fb77c..700324a3ae6d 100644 --- a/sysutils/dd_rescue/Makefile +++ b/sysutils/dd_rescue/Makefile @@ -1,6 +1,5 @@ PORTNAME= dd_rescue -PORTVERSION= 1.99.13 -PORTREVISION= 1 +PORTVERSION= 1.99.14 CATEGORIES= sysutils MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \ http://fossies.org/unix/privat/ diff --git a/sysutils/dd_rescue/distinfo b/sysutils/dd_rescue/distinfo index a51d818b1531..d274b21b275d 100644 --- a/sysutils/dd_rescue/distinfo +++ b/sysutils/dd_rescue/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1708181857 -SHA256 (dd_rescue-1.99.13.tar.bz2) = f40fe9c770ff5d27d323297ee73d0bbed332d3eafac4e4732e542eadb1c5c1e8 -SIZE (dd_rescue-1.99.13.tar.bz2) = 182574 +TIMESTAMP = 1724579114 +SHA256 (dd_rescue-1.99.14.tar.bz2) = 53a0a7f166ca74a146c137cb3dcfef320cf6c5e0f43208a75563b7c1db04d814 +SIZE (dd_rescue-1.99.14.tar.bz2) = 188613 diff --git a/sysutils/dd_rescue/files/patch-Makefile b/sysutils/dd_rescue/files/patch-Makefile index 5c4884d86f2a..1fd8aa00ce5a 100644 --- a/sysutils/dd_rescue/files/patch-Makefile +++ b/sysutils/dd_rescue/files/patch-Makefile @@ -1,11 +1,11 @@ ---- Makefile.orig 2023-02-24 08:28:08 UTC +--- Makefile.orig 2024-08-22 17:41:01 UTC +++ Makefile @@ -7,11 +7,7 @@ SRCDIR ?= . DESTDIR = SRCDIR ?= . -CC = gcc --SHELL = /bin/bash +-SHELL := 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 diff --git a/sysutils/dd_rescue/files/patch-dd__rescue.c b/sysutils/dd_rescue/files/patch-dd__rescue.c new file mode 100644 index 000000000000..1393dac40474 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-dd__rescue.c @@ -0,0 +1,71 @@ +--- dd_rescue.c.orig 2024-08-22 17:41:01 UTC ++++ dd_rescue.c +@@ -144,12 +144,11 @@ + # include <fallocate.h> + #else + # ifdef HAVE_FALLOCATE64 +-# include <linux/falloc.h> + typedef off64_t __off64_t; + # endif + #endif + +-#if defined(HAVE_DLFCN_H) && !defined(NO_LIBDL) ++#if defined(HAVE_DLFCN_H) && !defined(NO_LIBDL) && !defined(__FreeBSD__) + #include <dlfcn.h> + void* libfalloc = (void*)0; + #define USE_LIBDL 1 +@@ -177,7 +176,7 @@ void* libfalloc = (void*)0; + #endif + + /* Handle lack of stat64 */ +-#ifdef HAVE_STAT64 ++#if defined(HAVE_STAT64) && !defined(__FreeBSD__) + # define STAT64 stat64 + # define FSTAT64 fstat64 + #else +@@ -186,17 +185,17 @@ void* libfalloc = (void*)0; + # warning We lack stat64, may not handle >2GB files correctly + #endif + +-#ifndef HAVE_LSEEK64 ++#if !defined(HAVE_LSEEK64) || defined(__FreeBSD__) + # define lseek64 lseek + # warning We lack lseek64, may not handle >2GB files correctly + #endif + + /* This is not critical -- most platforms have an internal 64bit offset with plain open() */ +-#ifndef HAVE_OPEN64 ++#if !defined(HAVE_OPEN64 ) || defined(__FreeBSD__) + # define open64 open + #endif + +-#if !defined(HAVE_PREAD64) || defined(TEST_SYSCALL) ++#if !defined(HAVE_PREAD64) || defined(TEST_SYSCALL) || defined(__FreeBSD__) + #include "pread64.h" + #endif + +@@ -698,7 +697,7 @@ static void unload_plugins() {}; + static void unload_plugins() {}; + #endif + +-#if defined(HAVE_POSIX_FADVISE) && !defined(HAVE_POSIX_FADVISE64) ++#if defined(HAVE_POSIX_FADVISE) && !defined(HAVE_POSIX_FADVISE64) || defined(__FreeBSD__) + #define posix_fadvise64 posix_fadvise + #endif + #ifdef HAVE_POSIX_FADVISE +@@ -1055,13 +1054,13 @@ static void do_fallocate(int fd, const char* onm, opt_ + op->init_opos, to_falloc); + #ifdef HAVE_FALLOCATE64 + else +- rc = fallocate64(fd, 1, op->init_opos, to_falloc); ++ rc = posix_fallocate(fd, op->init_opos, to_falloc); + #endif + #elif defined(HAVE_LIBFALLOCATE) + rc = linux_fallocate64(fd, FALLOC_FL_KEEP_SIZE, + op->init_opos, to_falloc); + #else /* HAVE_FALLOCATE64 */ +- rc = fallocate64(fd, 1, op->init_opos, to_falloc); ++ rc = posix_fallocate(fd, op->init_opos, to_falloc); + #endif + if (rc) + fplog(stderr, WARN, "fallocate %s (%sk, %sk) failed: %s\n", diff --git a/sysutils/dd_rescue/files/patch-dd_rescue.c b/sysutils/dd_rescue/files/patch-dd_rescue.c deleted file mode 100644 index e9dfbb8812e4..000000000000 --- a/sysutils/dd_rescue/files/patch-dd_rescue.c +++ /dev/null @@ -1,32 +0,0 @@ ---- dd_rescue.c.orig 2023-02-23 21:51:27 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" - -@@ -2730,7 +2731,9 @@ const char* retstrdupcat3(const char* dir, char dirsep - - 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); -@@ -2749,7 +2752,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-ddr_ctrl.h b/sysutils/dd_rescue/files/patch-ddr__ctrl.h similarity index 100% rename from sysutils/dd_rescue/files/patch-ddr_ctrl.h rename to sysutils/dd_rescue/files/patch-ddr__ctrl.h diff --git a/sysutils/dd_rescue/files/patch-ffs.h b/sysutils/dd_rescue/files/patch-ffs.h index 409612b88d65..1909185499e9 100644 --- a/sysutils/dd_rescue/files/patch-ffs.h +++ b/sysutils/dd_rescue/files/patch-ffs.h @@ -1,11 +1,11 @@ ---- ffs.h.orig 2023-02-23 21:51:27 UTC +--- ffs.h.orig 2024-08-22 17:41:01 UTC +++ ffs.h -@@ -27,7 +27,15 @@ - #ifdef HAVE_ENDIAN_H - #include <endian.h> +@@ -32,6 +32,16 @@ + #include <sys/reg.h> #endif -+#include <stdint.h> ++#include <stdint.h> ++ +#ifndef __WORDSIZE +#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) +#define __WORDSIZE 64 @@ -13,10 +13,11 @@ +#define __WORDSIZE 32 +#endif +#endif - ++ #ifdef HAVE_FFS # define myffs(x) ffs(x) -@@ -54,12 +62,9 @@ + # if __WORDSIZE == 32 +@@ -57,12 +67,9 @@ # define myffsl(x) myffsl_c(x) #endif @@ -30,7 +31,7 @@ //#ifndef HAVE_FFS #ifdef NEED_FFSL_C -@@ -93,7 +98,7 @@ static int myffsl_c(unsigned long val) +@@ -96,7 +103,7 @@ static int myffsl_c(unsigned long val) } #endif @@ -39,7 +40,7 @@ /** 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) { -@@ -138,6 +143,8 @@ void probe_sse42(); +@@ -141,6 +148,8 @@ void probe_sse42(); int myffs_sse42(unsigned long); int myffsl_sse42(unsigned long); void probe_sse42(); diff --git a/sysutils/dd_rescue/files/patch-fiemap.c b/sysutils/dd_rescue/files/patch-fiemap.c index da28e6b7dcb8..9005e9b9c42c 100644 --- a/sysutils/dd_rescue/files/patch-fiemap.c +++ b/sysutils/dd_rescue/files/patch-fiemap.c @@ -1,6 +1,6 @@ ---- fiemap.c.orig 2015-04-15 08:56:38 UTC +--- fiemap.c.orig 2024-08-22 17:41:01 UTC +++ fiemap.c -@@ -286,7 +286,6 @@ char* strippart(const char* partname) +@@ -288,7 +288,6 @@ char* strippart(const char* partname) return _fulldevnm; } diff --git a/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c b/sysutils/dd_rescue/files/patch-find__nonzero__sse2.c similarity index 100% rename from sysutils/dd_rescue/files/patch-find_nonzero_sse2.c rename to sysutils/dd_rescue/files/patch-find__nonzero__sse2.c diff --git a/sysutils/dd_rescue/files/patch-fmt_no.h b/sysutils/dd_rescue/files/patch-fmt__no.h similarity index 53% rename from sysutils/dd_rescue/files/patch-fmt_no.h rename to sysutils/dd_rescue/files/patch-fmt__no.h index e462fccbe4c2..53c021c27384 100644 --- a/sysutils/dd_rescue/files/patch-fmt_no.h +++ b/sysutils/dd_rescue/files/patch-fmt__no.h @@ -1,11 +1,10 @@ ---- fmt_no.h.orig 2017-11-09 13:09:58 UTC +--- fmt_no.h.orig 2024-08-25 09:59:11 UTC +++ fmt_no.h -@@ -4,6 +4,8 @@ - #define _FMT_NO_H - - #include <sys/types.h> +@@ -8,6 +8,7 @@ + #ifdef HAVE_FCNTL_H + #include <fcntl.h> + #endif +#include "ddr_ctrl.h" -+ + char* fmt_int_b(unsigned char pre, unsigned char post, unsigned int scale, loff_t no, const char* bold, const int blen, - const char* norm, const int nlen, diff --git a/sysutils/dd_rescue/files/patch-libddr_crypt.c b/sysutils/dd_rescue/files/patch-libddr__crypt.c similarity index 100% rename from sysutils/dd_rescue/files/patch-libddr_crypt.c rename to sysutils/dd_rescue/files/patch-libddr__crypt.c diff --git a/sysutils/dd_rescue/files/patch-libddr_hash.c b/sysutils/dd_rescue/files/patch-libddr__hash.c similarity index 74% rename from sysutils/dd_rescue/files/patch-libddr_hash.c rename to sysutils/dd_rescue/files/patch-libddr__hash.c index 7af72697ad67..302405ddf8f5 100644 --- a/sysutils/dd_rescue/files/patch-libddr_hash.c +++ b/sysutils/dd_rescue/files/patch-libddr__hash.c @@ -1,6 +1,6 @@ ---- libddr_hash.c.orig 2021-04-14 08:23:02 UTC +--- libddr_hash.c.orig 2024-08-22 17:41:01 UTC +++ libddr_hash.c -@@ -35,7 +35,7 @@ +@@ -34,7 +34,7 @@ #include <fcntl.h> #include <netinet/in.h> /* For ntohl/htonl */ 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..2c706db00cf4 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-libddr__lzo.c @@ -0,0 +1,10 @@ +--- libddr_lzo.c.orig 2024-08-22 17:41:01 UTC ++++ libddr_lzo.c +@@ -13,6 +13,7 @@ + #define _LARGEFILE64_SOURCE 1 + #define _FILE_OFFSET_BITS 64 + ++#include "config.h" + #include "ddr_plugin.h" + #include "ddr_ctrl.h" + #include "mybasename.h" diff --git a/sysutils/dd_rescue/files/patch-libddr_null.c b/sysutils/dd_rescue/files/patch-libddr__null.c similarity index 100% rename from sysutils/dd_rescue/files/patch-libddr_null.c rename to sysutils/dd_rescue/files/patch-libddr__null.c diff --git a/sysutils/dd_rescue/files/patch-libddr_lzo.c b/sysutils/dd_rescue/files/patch-libddr_lzo.c deleted file mode 100644 index 8bb24e9bae34..000000000000 --- a/sysutils/dd_rescue/files/patch-libddr_lzo.c +++ /dev/null @@ -1,19 +0,0 @@ ---- libddr_lzo.c.orig 2022-07-26 13:53:37 UTC -+++ libddr_lzo.c -@@ -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 similarity index 100% rename from sysutils/dd_rescue/files/patch-pbkdf_ossl.c rename to sysutils/dd_rescue/files/patch-pbkdf__ossl.c diff --git a/sysutils/dd_rescue/files/patch-pread64.h b/sysutils/dd_rescue/files/patch-pread64.h index e6b5d570e0f2..e26c7f132e7a 100644 --- a/sysutils/dd_rescue/files/patch-pread64.h +++ b/sysutils/dd_rescue/files/patch-pread64.h @@ -1,11 +1,11 @@ ---- pread64.h.orig 2015-04-15 08:56:38 UTC +--- pread64.h.orig 2024-08-25 11:50:36 UTC +++ pread64.h -@@ -94,7 +94,7 @@ static inline ssize_t pread64(int fd, vo - { - return pread(fd, buf, sz, off); - } --static inline ssize_t pwrite(int fd, const void *buf, size_t sz, loff_t off) -+static inline ssize_t pwrite64(int fd, const void *buf, size_t sz, loff_t off) - { - return pwrite(fd, buf, sz, off); - } +@@ -18,7 +18,7 @@ + # include <sys/reg.h> + #endif + +-#if !defined(HAVE_PREAD64) && __WORDSIZE == 64 && !defined(TEST_SYSCALL) && defined(HAVE_PREAD) ++#if defined(__FreeBSD__) || !defined(HAVE_PREAD64) && __WORDSIZE == 64 && !defined(TEST_SYSCALL) && defined(HAVE_PREAD) + #define pread64 pread + #define pwrite64 pwrite + #define HAVE_PREAD64 diff --git a/sysutils/dd_rescue/files/patch-secmem.c b/sysutils/dd_rescue/files/patch-secmem.c index fb58122fe821..48183619231c 100644 --- a/sysutils/dd_rescue/files/patch-secmem.c +++ b/sysutils/dd_rescue/files/patch-secmem.c @@ -1,6 +1,6 @@ ---- secmem.c.orig 2021-05-04 08:16:41 UTC +--- secmem.c.orig 2024-08-22 17:41:01 UTC +++ secmem.c -@@ -10,6 +10,7 @@ +@@ -11,6 +11,7 @@ #include <unistd.h> #include <errno.h> #include <sys/mman.h> diff --git a/sysutils/dd_rescue/files/patch-sha256.c b/sysutils/dd_rescue/files/patch-sha256.c deleted file mode 100644 index 6c85d9dfa7a8..000000000000 --- a/sysutils/dd_rescue/files/patch-sha256.c +++ /dev/null @@ -1,20 +0,0 @@ ---- sha256.c.orig 2024-02-17 15:17:02 UTC -+++ sha256.c -@@ -108,7 +108,7 @@ void sha256_64(const uint8_t* msg, hash_t* ctx) - #endif - #endif - /* Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array: */ -- for (int i = 16; i < 64; ++i) { -+ for (i = 16; i < 64; ++i) { - const uint32_t s0 = RIGHTROTATE(w[i-15], 7) ^ RIGHTROTATE(w[i-15], 18) ^ (w[i-15] >> 3); - const uint32_t s1 = RIGHTROTATE(w[i-2], 17) ^ RIGHTROTATE(w[i-2] , 19) ^ (w[i-2] >> 10); - w[i] = w[i-16] + s0 + w[i-7] + s1; -@@ -117,7 +117,7 @@ void sha256_64(const uint8_t* msg, hash_t* ctx) - uint32_t a = ctx->sha256_h[0], b = ctx->sha256_h[1], c = ctx->sha256_h[2], d = ctx->sha256_h[3]; - uint32_t e = ctx->sha256_h[4], f = ctx->sha256_h[5], g = ctx->sha256_h[6], h = ctx->sha256_h[7]; - /* Compression function main loop: */ -- for (int i = 0; i < 64; ++i) { -+ for (i = 0; i < 64; ++i) { - const uint32_t S1 = RIGHTROTATE(e, 6) ^ RIGHTROTATE(e, 11) ^ RIGHTROTATE(e, 25); - //const uint32_t ch = (e & f) ^ ((~e) & g); - const uint32_t ch = g ^ (e & (f ^ g)); diff --git a/sysutils/dd_rescue/files/patch-sha512.c b/sysutils/dd_rescue/files/patch-sha512.c index de3a96290e4a..8a7a22fd2162 100644 --- a/sysutils/dd_rescue/files/patch-sha512.c +++ b/sysutils/dd_rescue/files/patch-sha512.c @@ -1,4 +1,4 @@ ---- sha512.c.orig 2023-02-23 21:51:27 UTC +--- sha512.c.orig 2024-08-22 17:41:01 UTC +++ sha512.c @@ -13,13 +13,14 @@ #endif @@ -14,23 +14,5 @@ -#include <endian.h> +#include <machine/endian.h> - /* - Note 1: All variables are 64 bit unsigned integers and addition is calculated modulo 2^64 -@@ -138,7 +139,7 @@ void sha512_128(const uint8_t* msg, hash_t* ctx) - #endif - #endif - /* Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array: */ -- for (int i = 16; i < 80; ++i) { -+ for (i = 16; i < 80; ++i) { - const uint64_t s0 = RIGHTROTATE(w[i-15], 1) ^ RIGHTROTATE(w[i-15], 8) ^ (w[i-15] >> 7); - const uint64_t s1 = RIGHTROTATE(w[i-2], 19) ^ RIGHTROTATE(w[i-2] ,61) ^ (w[i-2] >> 6); - w[i] = w[i-16] + s0 + w[i-7] + s1; -@@ -147,7 +148,7 @@ void sha512_128(const uint8_t* msg, hash_t* ctx) - uint64_t a = ctx->sha512_h[0], b = ctx->sha512_h[1], c = ctx->sha512_h[2], d = ctx->sha512_h[3]; - uint64_t e = ctx->sha512_h[4], f = ctx->sha512_h[5], g = ctx->sha512_h[6], h = ctx->sha512_h[7]; - /* Compression function main loop: */ -- for (int i = 0; i < 80; ++i) { -+ for (i = 0; i < 80; ++i) { - const uint64_t S1 = RIGHTROTATE(e, 14) ^ RIGHTROTATE(e, 18) ^ RIGHTROTATE(e, 41); - //const uint64_t ch = (e & f) ^ ((~e) & g); - const uint64_t ch = g ^ (e & (f ^ g)); + #ifdef HAVE_SYS_REG_H + #include <sys/reg.h>