From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3A2FD138350 for ; Sun, 3 May 2020 19:52:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CD98E0963; Sun, 3 May 2020 19:52:47 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD41EE0963 for ; Sun, 3 May 2020 19:52:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B84D434F532 for ; Sun, 3 May 2020 19:52:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5D26A204 for ; Sun, 3 May 2020 19:52:43 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1588535497.9bc102eea96b304ee47910df2738c64c1b551e0d.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/dd-rescue/files/, sys-fs/dd-rescue/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild sys-fs/dd-rescue/dd-rescue-1.99.8.ebuild sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch X-VCS-Directories: sys-fs/dd-rescue/ sys-fs/dd-rescue/files/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 9bc102eea96b304ee47910df2738c64c1b551e0d X-VCS-Branch: master Date: Sun, 3 May 2020 19:52:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 642cafeb-a082-4f7b-9969-f73c460353d0 X-Archives-Hash: f4cf68a8ba3fe6d4a8415c8a88119553 commit: 9bc102eea96b304ee47910df2738c64c1b551e0d Author: Thomas Deutschmann gentoo org> AuthorDate: Sun May 3 19:48:57 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun May 3 19:51:37 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bc102ee sys-fs/dd-rescue: use sys/random.h for getrandom() decl if present Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann gentoo.org> ...ue-1.99.8.ebuild => dd-rescue-1.99.8-r1.ebuild} | 2 ++ .../files/dd-rescue-1.99.8-sysrandom.patch | 27 ++++++++++++++++++ .../files/dd-rescue-1.99.8-testhole.patch | 32 ++++++++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.8.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild similarity index 96% rename from sys-fs/dd-rescue/dd-rescue-1.99.8.ebuild rename to sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild index 85a5845b250..d421dc83aa0 100644 --- a/sys-fs/dd-rescue/dd-rescue-1.99.8.ebuild +++ b/sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild @@ -26,6 +26,8 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}"/${MY_PN}-1.99-musl-r2.patch "${FILESDIR}"/${PN}-1.99.8-xattr.patch + "${FILESDIR}"/${PN}-1.99.8-sysrandom.patch + "${FILESDIR}"/${PN}-1.99.8-testhole.patch ) src_prepare() { 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 00000000000..5ef3da29774 --- /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 + #endif + ++#ifdef HAVE_SYS_RANDOM_H ++#include ++#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 00000000000..444907088b3 --- /dev/null +++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch @@ -0,0 +1,32 @@ +commit 7f2ff6434586083747bc5d046e0207886025e684 +Author: Kurt Garloff +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 +