From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/
Date: Mon, 24 Jan 2022 23:18:35 +0000 (UTC) [thread overview]
Message-ID: <1643066305.067256ef4a116f738c502fd21a560445acbfd2a6.sam@gentoo> (raw)
commit: 067256ef4a116f738c502fd21a560445acbfd2a6
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 24 23:18:08 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> gentoo.org>
sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild | 6 +++-
| 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
}
--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 <dsterba@suse.com>
+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 <dsterba@suse.com>
+--- 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)
+ {
next reply other threads:[~2022-01-24 23:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 23:18 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-02 7:29 [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/ Sam James
2024-04-25 12:21 Andreas K. Hüttel
2023-11-03 18:19 Sam James
2023-07-27 13:55 Sam James
2023-03-07 15:43 Sam James
2022-08-04 17:55 Mike Gilbert
2021-12-30 9:41 Sam James
2021-11-16 19:45 Georgy Yakovlev
2019-07-01 8:34 Lars Wendler
2019-05-19 7:57 Sergei Trofimovich
2019-01-16 12:02 Lars Wendler
2018-10-31 9:15 Lars Wendler
2018-03-19 13:36 Lars Wendler
2018-02-16 20:57 Mike Gilbert
2017-10-17 8:25 Lars Wendler
2017-03-27 20:45 Sergei Trofimovich
2016-11-12 22:09 Sergei Trofimovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1643066305.067256ef4a116f738c502fd21a560445acbfd2a6.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox