Skip to contentSkip to conversation

xen: fix sstate namespace collision

PATCH In review Ronaldo Nunez 2 participants 2 messages Nov 23 – Nov 30

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: fix sstate namespace collision

The sstate namespace is defined by PACKAGE_ARCH which defaults to TUNE_PKGARCH. Building for a second MACHINE that shares the same tune will fail due to a collision on that namespace.

Set PACKAGE_ARCH to MACHINE_ARCH in both recipe include files, so each machine gets an isolated output namespace.

Tested by building xen for qemuarm64 and for a qemuarm64-derived machine with the same tune, both now build.

---
 recipes-extended/xen/xen-hypervisor.inc | 2 ++
 recipes-extended/xen/xen-tools.inc      | 2 ++
 2 files changed, 4 insertions(+)
recipes-extended/xen/xen-hypervisor.inc +2 -0
index f448564d1f96634605ec97658d48333ff6dd96d8..40d2e472aabc0ad3236c3325c0d16c818ed35e13 100644
@@ -11,6 +11,8 @@ COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
 
 inherit deploy python3native cml1
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 PACKAGES = " \
     ${PN} \
     ${PN}-dbg \
recipes-extended/xen/xen-tools.inc +2 -0
index f38cabc2b1766ceb9b2a64f48eddc37e413a5cc6..2a18fe1e3613e45f4755cbb0767bebb537db0f24 100644
@@ -6,6 +6,8 @@ COMPATIBLE_HOST = 'i686-.*-linux|(x86_64.*).*-linux|aarch64.*-linux'
 inherit setuptools3 update-rc.d systemd deploy
 require xen-blktap.inc
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 # dom0 network topology for DomU guests. Set XEN_DOM0_NETWORK in local.conf:
 #   bridged (default) - eth0 is enslaved into xenbr0 and xenbr0 gets DHCP; DomU
 #                       vifs bridge onto whatever LAN xenbr0's uplink is on.

---
base-commit: 89b00d096a432000766729cd721ae647af500112
change-id: 20261123-sstate-collision-fix-735333853d9d

Best regards,

Signature · 1 line
Ronaldo Nunez <[email protected]>
#1 lore raw
Quoted 3 lines

The sstate namespace is defined by PACKAGE_ARCH which defaults to TUNE_PKGARCH. Building for a second MACHINE that shares the same tune will fail due to a collision on that namespace.

What was the actual error you hit ? Can you put it in the commit message, along with the two machines ? Without it, I'm guessing at which part of the build is colliding.

Quoted 2 lines

Set PACKAGE_ARCH to MACHINE_ARCH in both recipe include files, so each machine gets an isolated output namespace.

Making the hypervisor machine specific seems reasonable to me, it is in the same spot as a kernel or bootloader.

xen-tools is a different story. With this, every toolstack package (the libraries, xl, the python bits) is built and packaged once per machine, even when the tune is identical. So I'd like to know what actually differs in xen-tools between your two machines before taking that. If it's only the hypervisor whose output changes, then only it needs the change.

Quoted 2 lines

Tested by building xen for qemuarm64 and for a qemuarm64-derived machine with the same tune, both now build.

What does the qemuarm64-derived machine change ? If it's adding xen config fragments, or anything else that changes what gets built, that would explain which recipe needs to be machine specific.

Bruce