package/systemd: fix bcachefs magic patch
PATCH 1/1 package/systemd: fix bcachefs magic patch
Commit 29409c9d345a2536f6b72c605cda0d13f306200f ("package/systemd: fix build with recent kernels") added a patch from upstream that adds the BCACHEFS_SUPER_MAGIC definition if not provided by the kernel headers.
However, this commit from upstream was bogus: in the case BCACHEFS_SUPER_MAGIC was defined, it does an assert_cc() to verify that the value matches what we expect, but this assert_cc() statement lacks the final semi-colon, causing build breakage on host systems that do have BCACHEFS_SUPER_MAGIC defined in their kernel headers, with a weird error occuring in another header file... because only the next statement after assert_cc() was considered as having a syntax error.
Fixes:
http://autobuild.buildroot.net/results/9f99a97df2efd5e4ae4ad5cc5882607f0c8766bc/
This issue only exists in 2024.02.x at this point, because in master we have moved to systemd 256.x, which has dropped entirely this piece of code related to defining BCACHEFS_SUPER_MAGIC (and we wonder how systemd can then build with slightly older kernel headers, as BCACHEFS_SUPER_MAGIC is only in the public kernel headers since Linux 6.10).
--- package/systemd/0002-basic-add-bcachefs-magic.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
package/systemd/0002-basic-add-bcachefs-magic.patch +5 -5
@@ -1,4 +1,4 @@ -From e5ff9b585d7dc54f50085d518d7d588c250b0690 Mon Sep 17 00:00:00 2001 +From 48c1cd62de0339722fd3b72ef86aaaf1c38ff3dd Mon Sep 17 00:00:00 2001 From: Chris Packham <[email protected]> Date: Fri, 31 May 2024 09:51:38 +1200 Subject: [PATCH] basic: Add BCACHEFS magic
@@ -34,7 +34,7 @@ index 1cd66b5a5f..c82fe98227 100644 binder, {BINDERFS_SUPER_MAGIC} binfmt_misc, {BINFMTFS_MAGIC} diff --git a/src/basic/missing_magic.h b/src/basic/missing_magic.h -index 82d71c8ad1..b3d2ee9f57 100644 +index 82d71c8ad1..c8ecf44357 100644 --- a/src/basic/missing_magic.h +++ b/src/basic/missing_magic.h @@ -197,3 +197,10 @@
@@ -46,8 +46,8 @@ index 82d71c8ad1..b3d2ee9f57 100644 +#ifndef BCACHEFS_SUPER_MAGIC +# define BCACHEFS_SUPER_MAGIC 0xca451a4e +#else -+assert_cc(BCACHEFS_SUPER_MAGIC == 0xca451a4e) ++assert_cc(BCACHEFS_SUPER_MAGIC == 0xca451a4e); +#endif --- -2.45.1 +-- +2.47.0
Signature · 6 lines
2.47.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
Commit
29409c9d345a2536f6b72c605cda0d13f306200f("package/systemd: fix build with recent kernels") added a patch from upstream that adds theBCACHEFS_SUPER_MAGICdefinition if not provided by the kernel headers.However, this commit from upstream was bogus: in the case
BCACHEFS_SUPER_MAGICwas defined, it does anassert_cc()to verify that the value matches what we expect, but thisassert_cc()statement lacks the final semi-colon, causing build breakage on host systems that do haveBCACHEFS_SUPER_MAGICdefined in their kernel headers, with a weird error occuring in another header file... because only the next statement afterassert_cc()was considered as having a syntax error.Fixes:
Quoted 8 lines
http://autobuild.buildroot.net/results/9f99a97df2efd5e4ae4ad5cc5882607f0c8766bc/
This issue only exists in 2024.02.x at this point, because in master we have moved to systemd 256.x, which has dropped entirely this piece of code related to defining
BCACHEFS_SUPER_MAGIC(and we wonder how systemd can then build with slightly older kernel headers, asBCACHEFS_SUPER_MAGICis only in the public kernel headers since Linux 6.10).
Hmm, odd indeed..
Quoted 1 line
Signed-off-by Thomas Petazzoni <[email protected]>
Committed to 2024.02.x, thanks.
I see there are newer 254.x bugfix releases since v254.13 (latest is v254.21). Maybe it makes sense to update the version we use? I don't see anything directly relevant for this though.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · On Sun, 01 Dec 2024 20:41:10 +0100 Peter Korsgaard <[email protected]> wrote:
Quoted 6 lines
This issue only exists in 2024.02.x at this point, because in master we have moved to systemd 256.x, which has dropped entirely this piece of code related to defining
BCACHEFS_SUPER_MAGIC(and we wonder how systemd can then build with slightly older kernel headers, asBCACHEFS_SUPER_MAGICis only in the public kernel headers since Linux 6.10).Hmm, odd indeed..
Yes, I didn't have the time to do an actual test... but I assume this would have caused some breakage in the autobuilders, so I'm really not sure to understand why it works.
Quoted 3 lines
I see there are newer 254.x bugfix releases since v254.13 (latest is v254.21). Maybe it makes sense to update the version we use? I don't see anything directly relevant for this though.
No, the issue is not fixed upstream. I didn't test 254.21 because it wasn't there, but I tested 254.20 and it definitely was still broken.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot