feat(qemu): disable Xen support#16462
Conversation
Azure Linux targets Hyper-V/KVM, not Xen. Since our builders have the %fedora macro set, the upstream spec enables Xen on x86_64/aarch64 by default, pulling in xen-devel at build time and libxenstore.so.4 at runtime. Override have_xen back to 0 via overlay. Verified: build succeeds and no output RPMs carry xen dependencies.
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure Linux component config for qemu to avoid enabling Xen support inherited from Fedora-specific spec behavior, aligning the build/runtime dependencies with Azure Linux’s Hyper-V/KVM targets.
Changes:
- Add a dedicated
qemu.comp.tomlwith an overlay that forces%global have_xen 0. - Remove the now-customized
qemuentry fromcomponents-full.tomlso it’s sourced via the dedicated comp file.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
base/comps/qemu/qemu.comp.toml |
Introduces an overlay to disable Xen support in the upstream QEMU spec. |
base/comps/components-full.toml |
Removes the plain qemu entry since QEMU is now defined via a dedicated *.comp.toml. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [[components.qemu.overlays]] | ||
| description = "Disable Xen support - not needed for Azure Linux (Hyper-V/KVM only)" | ||
| type = "spec-search-replace" | ||
| regex = '%global have_xen 1' |
There was a problem hiding this comment.
The spec-search-replace regex is currently an unanchored literal (%global have_xen 1). To reduce fragility and avoid accidental substring matches if the upstream spec changes formatting (extra spaces, trailing conditionals, etc.), consider anchoring the pattern and allowing flexible whitespace (e.g., matching the whole line).
| regex = '%global have_xen 1' | |
| regex = '^\s*%global\s+have_xen\s+1\s*$' |
| [components.qemu] | ||
|
|
||
| # Disable Xen support — not applicable to Azure Linux's Hyper-V/KVM environment. | ||
| # The upstream spec enables Xen when %fedora is set (which it is on our builders), |
There was a problem hiding this comment.
Did you look at whether we should be disabling fedora for this spec? What other features are we getting that we wouldn't if we looked more like RHEL?
There was a problem hiding this comment.
I didn't for this one, but it is a good analysis that can be done. I did a similar evaluation on edk2, but ended up going with fedora's version instead of rhel's since there were some valuable parts that the fedora edk2 build (namely 4MB OVMF support and IGVM). I'll do a similar analysis for qemu
|
Bringing back to draft while I analyze |
Azure Linux targets Hyper-V/KVM, not Xen. Since our builders have the %fedora macro set, the upstream spec enables Xen on x86_64/aarch64 by default, pulling in xen-devel at build time and libxenstore.so.4 at runtime.
Override have_xen back to 0 via overlay. Verified: build succeeds and no output RPMs carry xen dependencies.
Part of fixing: workitem