Pārlūkot izejas kodu

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Thomas Petazzoni 8 mēneši atpakaļ
vecāks
revīzija
4088777f7b

+ 5 - 5
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>
 From: Chris Packham <chris.packham@alliedtelesis.co.nz>
 Date: Fri, 31 May 2024 09:51:38 +1200
 Date: Fri, 31 May 2024 09:51:38 +1200
 Subject: [PATCH] basic: Add BCACHEFS magic
 Subject: [PATCH] basic: Add BCACHEFS magic
@@ -34,7 +34,7 @@ index 1cd66b5a5f..c82fe98227 100644
  binder,          {BINDERFS_SUPER_MAGIC}
  binder,          {BINDERFS_SUPER_MAGIC}
  binfmt_misc,     {BINFMTFS_MAGIC}
  binfmt_misc,     {BINFMTFS_MAGIC}
 diff --git a/src/basic/missing_magic.h b/src/basic/missing_magic.h
 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
 --- a/src/basic/missing_magic.h
 +++ b/src/basic/missing_magic.h
 +++ b/src/basic/missing_magic.h
 @@ -197,3 +197,10 @@
 @@ -197,3 +197,10 @@
@@ -46,8 +46,8 @@ index 82d71c8ad1..b3d2ee9f57 100644
 +#ifndef BCACHEFS_SUPER_MAGIC
 +#ifndef BCACHEFS_SUPER_MAGIC
 +#  define BCACHEFS_SUPER_MAGIC 0xca451a4e
 +#  define BCACHEFS_SUPER_MAGIC 0xca451a4e
 +#else
 +#else
-+assert_cc(BCACHEFS_SUPER_MAGIC == 0xca451a4e)
++assert_cc(BCACHEFS_SUPER_MAGIC == 0xca451a4e);
 +#endif
 +#endif
---
-2.45.1
+-- 
+2.47.0