All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2024.02.x] package/systemd: fix bcachefs magic patch
@ 2024-11-30  9:25 Thomas Petazzoni via buildroot
  2024-12-01 19:41 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-11-30  9:25 UTC (permalink / raw)
  To: Buildroot List
  Cc: bastien.curutchet, Sen Hastings, Thomas Petazzoni, Norbert Lange,
	Yann E. MORIN

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).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/systemd/0002-basic-add-bcachefs-magic.patch | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/systemd/0002-basic-add-bcachefs-magic.patch b/package/systemd/0002-basic-add-bcachefs-magic.patch
index e7f4b1cbb7..372066ebef 100644
--- a/package/systemd/0002-basic-add-bcachefs-magic.patch
+++ b/package/systemd/0002-basic-add-bcachefs-magic.patch
@@ -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 <chris.packham@alliedtelesis.co.nz>
 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
 
-- 
2.47.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 2024.02.x] package/systemd: fix bcachefs magic patch
  2024-11-30  9:25 [Buildroot] [PATCH 2024.02.x] package/systemd: fix bcachefs magic patch Thomas Petazzoni via buildroot
@ 2024-12-01 19:41 ` Peter Korsgaard
  2024-12-02  9:36   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2024-12-01 19:41 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot, jarkko
  Cc: Thomas Petazzoni, bastien.curutchet, Sen Hastings, Norbert Lange,
	Yann E. MORIN

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > 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).

Hmm, odd indeed..

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

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.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 2024.02.x] package/systemd: fix bcachefs magic patch
  2024-12-01 19:41 ` Peter Korsgaard
@ 2024-12-02  9:36   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-02  9:36 UTC (permalink / raw)
  To: Peter Korsgaard
  Cc: Thomas Petazzoni via buildroot, jarkko, bastien.curutchet,
	Sen Hastings, Norbert Lange, Yann E. MORIN

On Sun, 01 Dec 2024 20:41:10 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:

>  > 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).  
> 
> 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.

> 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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-02  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30  9:25 [Buildroot] [PATCH 2024.02.x] package/systemd: fix bcachefs magic patch Thomas Petazzoni via buildroot
2024-12-01 19:41 ` Peter Korsgaard
2024-12-02  9:36   ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.