Skip to content

Commit

Permalink
sysutils/dd_rescue: Update to 1.99.13
Browse files Browse the repository at this point in the history
  • Loading branch information
MANTANI Nobutaka authored and MANTANI Nobutaka committed Feb 17, 2024
1 parent 6e197c6 commit f891e9c
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 20 deletions.
2 changes: 1 addition & 1 deletion sysutils/dd_rescue/Makefile
@@ -1,5 +1,5 @@
PORTNAME= dd_rescue
PORTVERSION= 1.99.12
PORTVERSION= 1.99.13
CATEGORIES= sysutils
MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \
http://fossies.org/unix/privat/
Expand Down
6 changes: 3 additions & 3 deletions sysutils/dd_rescue/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1659154970
SHA256 (dd_rescue-1.99.12.tar.bz2) = f304750aecf2b04a4798b26373a66483cf075e0a8e4619e78dc307e8f794c895
SIZE (dd_rescue-1.99.12.tar.bz2) = 181798
TIMESTAMP = 1708181857
SHA256 (dd_rescue-1.99.13.tar.bz2) = f40fe9c770ff5d27d323297ee73d0bbed332d3eafac4e4732e542eadb1c5c1e8
SIZE (dd_rescue-1.99.13.tar.bz2) = 182574
12 changes: 6 additions & 6 deletions sysutils/dd_rescue/files/patch-Makefile
@@ -1,6 +1,6 @@
--- Makefile.orig 2022-07-26 13:31:58 UTC
--- Makefile.orig 2023-02-24 08:28:08 UTC
+++ Makefile
@@ -7,11 +7,7 @@ VERSION = 1.99.12
@@ -7,11 +7,7 @@ SRCDIR ?= .
DESTDIR =
SRCDIR ?= .

Expand All @@ -13,7 +13,7 @@
INSTALL ?= install
INSTALLFLAGS = -s
prefix = $(DESTDIR)/usr
@@ -39,7 +35,7 @@ LIB = lib
@@ -39,7 +35,7 @@ ID = $(shell git describe --tags || cat REL-ID)
LIBDIR = /usr/$(LIB)
COMPILER = $(shell $(CC) --version | head -n1)
ID = $(shell git describe --tags || cat REL-ID)
Expand All @@ -22,7 +22,7 @@
OUT = -o dd_rescue
PIC = -fPIC
PIE = -fPIE
@@ -74,19 +70,13 @@ else
@@ -75,19 +71,13 @@ endif
HAVE_XATTR=0
endif

Expand All @@ -43,7 +43,7 @@
ISX86 := 1
LIB = lib64
endif
@@ -292,7 +282,7 @@ libddr_MD5.so: libddr_hash.so
@@ -296,7 +286,7 @@ libddr_lzo.so: libddr_lzo.po
ln -sf $< $@

libddr_lzo.so: libddr_lzo.po
Expand All @@ -52,7 +52,7 @@

libddr_null.so: libddr_null.po
$(CC) -shared -o $@ $^
@@ -363,7 +353,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS)
@@ -367,7 +357,7 @@ dd_rescue: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJE

# This is the default built
dd_rescue: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS) $(OBJECTS2)
Expand Down
6 changes: 3 additions & 3 deletions sysutils/dd_rescue/files/patch-dd_rescue.c
@@ -1,4 +1,4 @@
--- dd_rescue.c.orig 2022-01-09 17:27:45 UTC
--- dd_rescue.c.orig 2023-02-23 21:51:27 UTC
+++ dd_rescue.c
@@ -116,6 +116,7 @@
#include "list.h"
Expand All @@ -8,7 +8,7 @@

#include "fstrim.h"

@@ -2728,7 +2729,9 @@ int is_filename(char* arg)
@@ -2730,7 +2731,9 @@ const char* retstrdupcat3(const char* dir, char dirsep

const char* retstrdupcat3(const char* dir, char dirsep, const char* inm)
{
Expand All @@ -19,7 +19,7 @@
const int dlen = strlen(dir) + (dirsep>0? 1: dirsep);
char* ret = (char*)malloc(dlen + strlen(inm) + 1);
strcpy(ret, dir);
@@ -2747,7 +2750,9 @@ const char* dirappfile(const char* onm, opt_t *op)
@@ -2749,7 +2752,9 @@ const char* dirappfile(const char* onm, opt_t *op)
{
size_t oln = strlen(onm);
if (!strcmp(onm, ".")) {
Expand Down
8 changes: 4 additions & 4 deletions sysutils/dd_rescue/files/patch-ffs.h
@@ -1,4 +1,4 @@
--- ffs.h.orig 2021-03-07 06:41:24 UTC
--- ffs.h.orig 2023-02-23 21:51:27 UTC
+++ ffs.h
@@ -27,7 +27,15 @@
#ifdef HAVE_ENDIAN_H
Expand Down Expand Up @@ -39,12 +39,12 @@
/** 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)
{
@@ -134,6 +139,8 @@ static int myflsl(unsigned long val)
}
@@ -138,6 +143,8 @@ void probe_sse42();
int myffs_sse42(unsigned long);
int myffsl_sse42(unsigned long);
void probe_sse42();
+#else
+# define myflsl(x) flsl(x)
#endif

void probe_sse42();
#endif /* _FFS_H */
4 changes: 2 additions & 2 deletions sysutils/dd_rescue/files/patch-frandom.c
@@ -1,4 +1,4 @@
--- frandom.c.orig 2016-12-28 21:17:50 UTC
--- frandom.c.orig 2023-02-23 21:51:27 UTC
+++ frandom.c
@@ -16,7 +16,7 @@
#include <stdlib.h>
Expand All @@ -7,5 +7,5 @@
-#include <asm/errno.h>
+#include <sys/errno.h>
#include <unistd.h>
//#include <assert.h>

#ifdef HAVE_CONFIG_H
20 changes: 20 additions & 0 deletions sysutils/dd_rescue/files/patch-sha256.c
@@ -0,0 +1,20 @@
--- 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));
20 changes: 19 additions & 1 deletion sysutils/dd_rescue/files/patch-sha512.c
@@ -1,4 +1,4 @@
--- sha512.c.orig 2016-12-28 21:17:50 UTC
--- sha512.c.orig 2023-02-23 21:51:27 UTC
+++ sha512.c
@@ -13,13 +13,14 @@
#endif
Expand All @@ -16,3 +16,21 @@

/*
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));

0 comments on commit f891e9c

Please sign in to comment.