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 B00A4158087 for ; Mon, 24 Jan 2022 23:18:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D0B20E03EC; Mon, 24 Jan 2022 23:18:38 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 32A8CE03EC for ; Mon, 24 Jan 2022 23:18:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E012C342EC3 for ; Mon, 24 Jan 2022 23:18:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 41635166 for ; Mon, 24 Jan 2022 23:18:35 +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: <1643066305.067256ef4a116f738c502fd21a560445acbfd2a6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch X-VCS-Directories: sys-fs/btrfs-progs/files/ sys-fs/btrfs-progs/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 067256ef4a116f738c502fd21a560445acbfd2a6 X-VCS-Branch: master Date: Mon, 24 Jan 2022 23:18:35 +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: 87263cf4-6981-4855-9369-e4cd00f07a1b X-Archives-Hash: b71c70f58e92d6cc8c04899c7a54d02e commit: 067256ef4a116f738c502fd21a560445acbfd2a6 Author: Sam James gentoo org> AuthorDate: Mon Jan 24 23:18:08 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jan 24 23:18:25 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=067256ef sys-fs/btrfs-progs: allow older linux-headers too w/ upstream patch Bug: https://bugs.gentoo.org/831817 Signed-off-by: Sam James gentoo.org> sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild | 6 +++- .../files/5.16-linux-headers-before-5.11.patch | 40 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild index bfedcff31bd3..015b81367170 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild @@ -45,7 +45,7 @@ RDEPEND=" zstd? ( app-arch/zstd:0= ) " DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-5.11 + >=sys-kernel/linux-headers-5.10 convert? ( sys-apps/acl ) python? ( $(python_gen_cond_dep ' @@ -79,6 +79,10 @@ fi REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +PATCHES=( + "${FILESDIR}"/5.16-linux-headers-before-5.11.patch +) + pkg_setup() { use python && python-single-r1_pkg_setup } diff --git a/sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch b/sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch new file mode 100644 index 000000000000..184656d96d22 --- /dev/null +++ b/sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch @@ -0,0 +1,40 @@ +https://github.com/kdave/btrfs-progs/commit/b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58.patch +https://bugs.gentoo.org/831817 + +From b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58 Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Thu, 13 Jan 2022 14:47:08 +0100 +Subject: [PATCH] btrfs-progs: kerncompat: add local definition for alignment + macros + +There's still problem left with compilation on musl and kernel < 5.11, +because __ALIGN_KERNEL is not defined anymore: + +../bin/ld: kernel-shared/volumes.o: in function `create_chunk': +volumes.c:(.text+0x17f8): undefined reference to `__ALIGN_KERNEL' + +Due to the entangled includes and unconditional definition of +__ALIGN_KERNEL, we can't use #ifdef in kerncompat.h to define it +eventually (as kerncompat.h is the first include). Instead add local +definitions of the macros and rename them to avoid name clashes. + +Pull-request: #433 +Signed-off-by: David Sterba +--- a/kerncompat.h ++++ b/kerncompat.h +@@ -359,7 +359,14 @@ do { \ + + /* Alignment check */ + #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) +-#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ++ ++/* ++ * Alignment, copied and renamed from /usr/include/linux/const.h to work around ++ * issues caused by moving the definition in 5.12 ++ */ ++#define __ALIGN_KERNEL__(x, a) __ALIGN_KERNEL_MASK__(x, (typeof(x))(a) - 1) ++#define __ALIGN_KERNEL_MASK__(x, mask) (((x) + (mask)) & ~(mask)) ++#define ALIGN(x, a) __ALIGN_KERNEL__((x), (a)) + + static inline int is_power_of_2(unsigned long n) + {