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 7A331158086 for ; Tue, 21 Dec 2021 02:07:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB6082BC02C; Tue, 21 Dec 2021 02:07:03 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 9186F2BC02C for ; Tue, 21 Dec 2021 02:07:03 +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 B2F15342AAB for ; Tue, 21 Dec 2021 02:07:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D6CD256 for ; Tue, 21 Dec 2021 02:07:01 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1640052390.64eb52417158266e183780b3f1f92743bac97e64.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/files/, sys-fs/zfs/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/zfs/files/2.1.2-musl-tests.patch sys-fs/zfs/zfs-2.1.2-r1.ebuild X-VCS-Directories: sys-fs/zfs/files/ sys-fs/zfs/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 64eb52417158266e183780b3f1f92743bac97e64 X-VCS-Branch: master Date: Tue, 21 Dec 2021 02:07:01 +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: d17753c1-c42f-4ed1-ba63-7da35260e730 X-Archives-Hash: bbdd84c9bb3df9af9f7c5684f81308b2 commit: 64eb52417158266e183780b3f1f92743bac97e64 Author: Georgy Yakovlev gentoo org> AuthorDate: Tue Dec 21 02:05:37 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Tue Dec 21 02:06:30 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64eb5241 sys-fs/zfs: fix test build failure on musl in 2.1.2 PR: https://github.com/openzfs/zfs/pull/12891 Signed-off-by: Georgy Yakovlev gentoo.org> sys-fs/zfs/files/2.1.2-musl-tests.patch | 58 +++++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-2.1.2-r1.ebuild | 1 + 2 files changed, 59 insertions(+) diff --git a/sys-fs/zfs/files/2.1.2-musl-tests.patch b/sys-fs/zfs/files/2.1.2-musl-tests.patch new file mode 100644 index 000000000000..3d2c563f8c51 --- /dev/null +++ b/sys-fs/zfs/files/2.1.2-musl-tests.patch @@ -0,0 +1,58 @@ +From 123c87b3c2d75636da79f57a4b0ed60d2a3133a8 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Mon, 20 Dec 2021 12:25:11 -0800 +Subject: [PATCH] zfs-test/mmap_seek: fix build on musl + +it needs linux/fs.h for SEEK_DATA and friends + +without linux/fs.h: + +``` +mmap_seek.c +mmap_seek.c: In function 'seek_data': +mmap_seek.c:37:40: error: 'SEEK_DATA' undeclared (first use in this function); +did you mean 'SEEK_SET'? + 37 | off_t data_offset = lseek(fd, offset, SEEK_DATA); +``` + +also it needs sys/sysmacros.h for P2ROUNDUP +without it: + +``` +mmap_seek.c: In function 'main': +mmap_seek.c:122:19: warning: +implicit declaration of function 'P2ROUNDUP' [-Wimplicit-function-declaration] + 122 | seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size)); + | ^~~~~~~~~ +powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.o: in function `main': +mmap_seek.c:(.text.startup+0x1b8): undefined reference to `P2ROUNDUP' +powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x1d8): + undefined reference to `P2ROUNDUP' +powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x21c): + undefined reference to `P2ROUNDUP' +collect2: error: ld returned 1 exit status +make[5]: *** [Makefile:754: mmap_seek] Error 1 +``` + +Closes: https://github.com/openzfs/zfs/pull/12891 +Signed-off-by: Georgy Yakovlev +--- + tests/zfs-tests/cmd/mmap_seek/mmap_seek.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c +index f476e1dba9a..bb36527aafe 100644 +--- a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c ++++ b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c +@@ -29,7 +29,11 @@ + #include + #include + #include ++#include + #include ++#ifdef __linux__ ++#include ++#endif + + static void + seek_data(int fd, off_t offset, off_t expected) diff --git a/sys-fs/zfs/zfs-2.1.2-r1.ebuild b/sys-fs/zfs/zfs-2.1.2-r1.ebuild index c274ee49ba4b..a5b0419a7ed8 100644 --- a/sys-fs/zfs/zfs-2.1.2-r1.ebuild +++ b/sys-fs/zfs/zfs-2.1.2-r1.ebuild @@ -104,6 +104,7 @@ RESTRICT="test" PATCHES=( "${FILESDIR}/2.1.2-scrub-timers.patch" "${FILESDIR}/2.1.2-openrc-vendor.patch" + "${FILESDIR}/2.1.2-musl-tests.patch" ) pkg_pretend() {