summaryrefslogtreecommitdiff
path: root/sys-fs/dd-rescue/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /sys-fs/dd-rescue/files
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'sys-fs/dd-rescue/files')
-rw-r--r--sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch27
-rw-r--r--sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch32
2 files changed, 59 insertions, 0 deletions
diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch
new file mode 100644
index 000000000000..5ef3da297747
--- /dev/null
+++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch
@@ -0,0 +1,27 @@
+Use sys/random.h for getrandom() decl if present.
+
+--- a/configure.in
++++ b/configure.in
+@@ -6,7 +6,7 @@ AC_C_INLINE
+ AC_HEADER_STDC
+ #AC_PROG_INSTALL
+ #CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
+-AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
++AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h sys/random.h malloc.h sched.h sys/statvfs.h])
+ AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports])
+ AC_CHECK_LIB(dl,dlsym)
+ AC_CHECK_LIB(fallocate,linux_fallocate64)
+--- a/random.c
++++ b/random.c
+@@ -23,6 +23,10 @@ typedef unsigned int __u32;
+ #include <linux/random.h>
+ #endif
+
++#ifdef HAVE_SYS_RANDOM_H
++#include <sys/random.h>
++#endif
++
+ static void msleep(unsigned int msecs)
+ {
+ struct timespec ts1, ts2;
+
diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch
new file mode 100644
index 000000000000..444907088b3b
--- /dev/null
+++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch
@@ -0,0 +1,32 @@
+commit 7f2ff6434586083747bc5d046e0207886025e684
+Author: Kurt Garloff <kurt@garloff.de>
+Date: Sat May 12 09:54:45 2018 +0000
+
+ Fix test case by ensuring there is a hole ...
+
+diff --git a/test_crypt.sh b/test_crypt.sh
+index 47f1fc9..62cf853 100755
+--- a/test_crypt.sh
++++ b/test_crypt.sh
+@@ -52,13 +52,20 @@ rm dd_rescue2
+
+ # Holes (all), skiphole
+ echo "*** Holes ***"
++# Produce file that consists of dd_rescue + hole + dd_rescue
+ ./dd_rescue -qpt dd_rescue dd_rescue3
+ ./dd_rescue -qS 512k dd_rescue dd_rescue3
++# Ensure there is a hole even if dd_rescue is long
++./dd_rescue -qS 384k -m 128k /dev/zero dd_rescue3
++# Test without and with skiphole
+ enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen "" "" "-qpt"
+ enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen skiphole "" "-qpt"
++# Store 384k-512k in cmp3
+ ./dd_rescue -qt -s 384k -m 128k -S 0 dd_rescue3.cmp dd_rescue3.cmp3
++# Should be 128k of zeroes
+ ./dd_rescue -qm 128k /dev/zero dd_rescue3.cmp2
+ cmp dd_rescue3.cmp2 dd_rescue3.cmp3 || exit 4
++# Repeat test with reverse
+ enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen "" "" "-qptr"
+ enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen skiphole "" "-qptr"
+ ./dd_rescue -qt -s 384k -m 128k -S 0 dd_rescue3.cmp dd_rescue3.cmp3
+