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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2A16D15800A for ; Sun, 23 Jul 2023 01:52:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73796E07F0; Sun, 23 Jul 2023 01:52:30 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 56824E07F0 for ; Sun, 23 Jul 2023 01:52:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6DEF6340D19 for ; Sun, 23 Jul 2023 01:52:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 79F32BFA for ; Sun, 23 Jul 2023 01:52:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1690077109.3669e5495eeda680246ea087408dcf85e74b9f11.sam@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.13-r1.ebuild sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch X-VCS-Directories: sys-fs/dd-rescue/files/ sys-fs/dd-rescue/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3669e5495eeda680246ea087408dcf85e74b9f11 X-VCS-Branch: master Date: Sun, 23 Jul 2023 01:52:26 +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: c87cfd78-a701-4d4f-adc5-d3ca23fa6fea X-Archives-Hash: 8ffde053cb47c6aca9ceb87bf31d406b commit: 3669e5495eeda680246ea087408dcf85e74b9f11 Author: brahmajit das protonmail com> AuthorDate: Thu Sep 15 07:01:43 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jul 23 01:51:49 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3669e549 sys-fs/dd-rescue: Fix building for musl. The original patch was written by gentoo developer Thomas Deutschmann gentoo.org>, but the patch needed to be rebased. I've added in my secmem patch inside it (another musl fix for dd-rescue). Closes: https://bugs.gentoo.org/829285 Signed-off-by: brahmajit das protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/26455 Signed-off-by: Sam James gentoo.org> ...-1.99.13.ebuild => dd-rescue-1.99.13-r1.ebuild} | 4 + sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild | 6 +- .../dd-rescue/files/dd-rescue-1.99.13-musl.patch | 145 +++++++++++++++++++++ 3 files changed, 154 insertions(+), 1 deletion(-) diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild similarity index 97% copy from sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild copy to sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild index d330001df26d..e36b59fed8a0 100644 --- a/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild +++ b/sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild @@ -25,6 +25,10 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-1.99.13-musl.patch +) + src_prepare() { default diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild index d330001df26d..d0b6a87d18c7 100644 --- a/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild +++ b/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild @@ -14,7 +14,7 @@ SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm ~mips ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="cpu_flags_x86_avx2 lzo cpu_flags_x86_sse4_2 static xattr" RDEPEND=" @@ -25,6 +25,10 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-1.99.13-musl.patch +) + src_prepare() { default diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch new file mode 100644 index 000000000000..53d8af201280 --- /dev/null +++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch @@ -0,0 +1,145 @@ +# Original patch was created by Thomas Deutschmann , but the +# patch needed to be rebased. Mainly configure.ac instead of configure.in. +# The only additional included part is secmem patch. +# +# Closes: https://bugs.gentoo.org/829285 +From 69c3974670f5a8ee0f2258f10a9228b39025b464 Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann +Date: Wed, 13 Dec 2017 01:02:12 +0100 +Subject: [PATCH] loff_t and __WORDSIZE includes for MUSL + +Rewrite of Justin Keogh's patch [Link 1] to fix build problems +on ARM. + +Link 1: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5abc0f1b036921d6eb5b0f434c960ed280619f +Fixes: https://bugs.gentoo.org/616364 +--- a/configure.ac ++++ b/configure.ac +@@ -11,7 +11,7 @@ AC_C_INLINE + + #AC_PROG_INSTALL + #CFLAGS="$CFLAGS -DHAVE_CONFIG_H" +-AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h attr/xattr.h sys/acl.h sys/ioctl.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 sys/resource.h sys/endian.h linux/swab.h]) ++AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h attr/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 sys/resource.h sys/endian.h linux/swab.h]) + AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htonl htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports getrlimit aligned_alloc]) + AC_CHECK_LIB(dl,dlsym) + AC_CHECK_LIB(fallocate,linux_fallocate64) +--- a/ddr_ctrl.h ++++ b/ddr_ctrl.h +@@ -7,6 +7,9 @@ + * License: GNU GPLv2 or v3 + */ + ++#define _GNU_SOURCE ++#include ++ + #ifndef _DDR_CTRL_H + #define _DDR_CTRL_H + +--- a/ffs.h ++++ b/ffs.h +@@ -28,6 +28,9 @@ + #include + #endif + ++#ifdef HAVE_SYS_REG_H ++#include ++#endif + + #ifdef HAVE_FFS + # define myffs(x) ffs(x) + +--- a/fiemap.h ++++ b/fiemap.h +@@ -29,5 +29,9 @@ + + #endif /* HAVE_LINUX_FS_H */ + ++#ifdef HAVE_SYS_REG_H ++#include ++#endif ++ + #endif /* _FIEMAPH */ + +--- a/fmt_no.h ++++ b/fmt_no.h +@@ -1,4 +1,6 @@ + /** Decl for int to str conversion with highlighting */ ++#define _GNU_SOURCE ++#include + + #ifndef _FMT_NO_H + #define _FMT_NO_H + +--- a/fstrim.h ++++ b/fstrim.h +@@ -1,3 +1,6 @@ ++#define _GNU_SOURCE ++#include ++ + #ifndef _FSTRIM_H + #define _FSTRIM_H + +--- a/libddr_hash.c ++++ b/libddr_hash.c +@@ -34,6 +34,10 @@ + #include + #include + ++#ifdef HAVE_SYS_REG_H ++#include ++#endif ++ + #include /* For ntohl/htonl */ + #include + +--- a/libddr_lzo.c ++++ b/libddr_lzo.c +@@ -16,6 +16,9 @@ + #include "ddr_plugin.h" + #include "ddr_ctrl.h" + ++#ifdef HAVE_SYS_REG_H ++#include ++#endif + #include + #include + #include + +--- a/libddr_null.c ++++ b/libddr_null.c +@@ -10,6 +10,9 @@ + #include "ddr_ctrl.h" + #include + #include ++#ifdef HAVE_SYS_REG_H ++#include ++#endif + + /* fwd decl */ + extern ddr_plugin_t ddr_plug; + +--- a/sha512.h ++++ b/sha512.h +@@ -3,6 +3,10 @@ + + #include "hash.h" + ++#ifdef HAVE_SYS_REG_H ++#include ++#endif ++ + void sha512_init(hash_t *ctx); + void sha384_init(hash_t *ctx); + void sha512_128(const uint8_t* msg, hash_t* ctx); + +--- a/secmem.c ++++ b/secmem.c +@@ -15,6 +15,7 @@ + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include ++# include + #endif + + static unsigned char *optr;