Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/systemd: account for arch dependency of vmspawn support
@ 2024-08-18 12:25 Thomas Petazzoni via buildroot
  2024-08-19 20:41 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-18 12:25 UTC (permalink / raw)
  To: buildroot; +Cc: Norbert Lange, Sen Hastings, Thomas Petazzoni, Yann E. MORIN

Since upstream commit
5c57a8650630304d8434a348283b6b643fbc676b ("vmspawn: add support for
-D/--directory"), src/vmspawn/vmspawn-util.h defines a
QEMU_MACHINE_TYPE based on the architecture, and not all architectures
are supported. This commit first appeared in systemd v256.

Due to this, the unsupported architectures fail with:

In file included from ../src/vmspawn/vmspawn-util.c:27:
../src/vmspawn/vmspawn-util.h:46:4: error: #error "No qemu machine defined for this architecture"
   46 | #  error "No qemu machine defined for this architecture"
      |    ^~~~~

So let's add a BR2_PACKAGE_SYSTEMD_VMSPAWN_ARCH_SUPPORTS and use it to
ensure vmspawn support is only used on architectures that are
supported. Even though no-one selects BR2_PACKAGE_SYSTEMD_VMSPAWN (and
would therefore need to inherit the
BR2_PACKAGE_SYSTEMD_VMSPAWN_ARCH_SUPPORTS dependency), we nevertheless
introduce BR2_PACKAGE_SYSTEMD_VMSPAWN_ARCH_SUPPORTS to make the
depency list prettier than a long "depends on A || B || C || D ||
...".

Fixes:

  http://autobuild.buildroot.net/results/0e614375f731f7bfe3c6041c6e89a09c31898053/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/systemd/Config.in | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 6708adce9b..113a8093c4 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -599,8 +599,22 @@ config BR2_PACKAGE_SYSTEMD_VCONSOLE_DEFAULT_KEYMAP
 	  Default keymap for the system. Leave empty to not set a
 	  default keymap.
 
+# See for which architectures QEMU_MACHINE_TYPE is defined in
+# src/vmspawn/vmspawn-util.h
+config BR2_PACKAGE_SYSTEMD_VMSPAWN_ARCH_SUPPORTS
+	bool
+	default y if BR2_aarch64 || BR2_aarch64_be
+	default y if BR2_arm || BR2_armeb
+	default y if BR2_i386
+	default y if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
+	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_riscv
+	default y if BR2_s390x
+	default y if BR2_x86_64
+
 config BR2_PACKAGE_SYSTEMD_VMSPAWN
 	bool "enable vmspawn"
+	depends on BR2_PACKAGE_SYSTEMD_VMSPAWN_ARCH_SUPPORTS
 	help
 	  systemd-vmspawn may be used to start a virtual machine
 	  from an OS image. In many ways it is similar to
-- 
2.46.0

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

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

end of thread, other threads:[~2024-08-19 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-18 12:25 [Buildroot] [PATCH] package/systemd: account for arch dependency of vmspawn support Thomas Petazzoni via buildroot
2024-08-19 20:41 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox