feat: add libguestfs and guestfs-tools packages to enable static image tests#18041
Open
trungams wants to merge 11 commits into
Open
feat: add libguestfs and guestfs-tools packages to enable static image tests#18041trungams wants to merge 11 commits into
trungams wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds libguestfs, guestfs-tools, supermin, and required OCaml dependencies for VM image testing.
Changes:
- Imports the new package stack and lock files.
- Re-enables hivex OCaml bindings.
- Adds Azure Linux compatibility and test overlays.
Reviewed changes
Copilot reviewed 38 out of 52 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
base/comps/components.toml |
Registers unmodified imports. |
base/comps/guestfs-tools/0001-tests-do-not-build-the-Windows-phony-guest-image.patch |
Skips Windows test image generation. |
base/comps/guestfs-tools/guestfs-tools.comp.toml |
Defines guestfs-tools overlays. |
base/comps/hivex/hivex.comp.toml |
Removes OCaml disablement. |
base/comps/supermin/0001-Recognize-Azure-Linux-as-an-rpm-dnf-distro.patch |
Adds Azure Linux detection. |
base/comps/supermin/supermin.comp.toml |
Defines the supermin overlay. |
locks/guestfs-tools.lock |
Pins guestfs-tools. |
locks/hivex.lock |
Refreshes hivex inputs. |
locks/libguestfs.lock |
Pins libguestfs. |
locks/ocaml-fileutils.lock |
Pins ocaml-fileutils. |
locks/ocaml-gettext.lock |
Pins ocaml-gettext. |
locks/ocaml-lwt.lock |
Pins ocaml-lwt. |
locks/ocaml-ounit.lock |
Pins ocaml-ounit. |
locks/ocaml-ppx-here.lock |
Pins ocaml-ppx-here. |
locks/ocaml-ppx-let.lock |
Pins ocaml-ppx-let. |
locks/supermin.lock |
Pins supermin. |
specs/g/guestfs-tools/0001-tests-do-not-build-the-Windows-phony-guest-image.patch |
Renders the test patch. |
specs/g/guestfs-tools/guestfs-tools.spec |
Packages virt-* tools. |
specs/g/guestfs-tools/libguestfs.keyring |
Supplies signature keys. |
specs/g/guestfs-tools/sources |
Records source hashes. |
specs/h/hivex/hivex.azl.macros |
Removes OCaml-disable macro. |
specs/h/hivex/hivex.spec |
Re-enables OCaml bindings. |
specs/l/libguestfs/README-replacement.in |
Supplies packaged documentation. |
specs/l/libguestfs/copy-patches.sh |
Imports maintainer helper. |
specs/l/libguestfs/guestfish.sh |
Configures guestfish prompts. |
specs/l/libguestfs/libguestfs.keyring |
Supplies signature keys. |
specs/l/libguestfs/libguestfs.spec |
Packages libguestfs and bindings. |
specs/l/libguestfs/sources |
Records source hashes. |
specs/l/libguestfs/yum.conf.in |
Configures appliance repository. |
specs/o/ocaml-fileutils/ocaml-fileutils.spec |
Packages ocaml-fileutils. |
specs/o/ocaml-fileutils/sources |
Records source hash. |
specs/o/ocaml-gettext/37.patch |
Removes dune-site usage. |
specs/o/ocaml-gettext/ocaml-gettext.spec |
Packages ocaml-gettext. |
specs/o/ocaml-gettext/sources |
Records source hash. |
specs/o/ocaml-lwt/ocaml-lwt-mathlib.patch |
Adds math-library linkage. |
specs/o/ocaml-lwt/ocaml-lwt-ppxlib-0.36.patch |
Adds ppxlib compatibility. |
specs/o/ocaml-lwt/ocaml-lwt.spec |
Packages ocaml-lwt. |
specs/o/ocaml-lwt/sources |
Records source hash. |
specs/o/ocaml-ounit/0001-Remove-stdlib-shims.patch |
Removes obsolete dependencies. |
specs/o/ocaml-ounit/ocaml-ounit.spec |
Packages ocaml-ounit. |
specs/o/ocaml-ounit/sources |
Records source hash. |
specs/o/ocaml-ppx-here/ocaml-ppx-here.spec |
Packages ocaml-ppx-here. |
specs/o/ocaml-ppx-here/sources |
Records source hash. |
specs/o/ocaml-ppx-let/ocaml-ppx-let.spec |
Packages ocaml-ppx-let. |
specs/o/ocaml-ppx-let/sources |
Records source hash. |
specs/s/supermin/0001-Recognize-Azure-Linux-as-an-rpm-dnf-distro.patch |
Renders Azure Linux detection. |
specs/s/supermin/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch |
Makes appliance archives reproducible. |
specs/s/supermin/libguestfs.keyring |
Supplies signature keys. |
specs/s/supermin/sources |
Records source hashes. |
specs/s/supermin/supermin-find-requires |
Generates appliance dependencies. |
specs/s/supermin/supermin.attr |
Registers RPM dependency generator. |
specs/s/supermin/supermin.spec |
Packages supermin. |
Contributor
|
It likes like this branch is woefully behind |
The bootstrap OCaml toolchain (ocaml-findlib-devel) had ABI-mismatched module hashes that prevented dependency resolution, which forced the workaround in bf151bb to disable hivex's OCaml bindings via build.without = ["ocaml"]. The OCaml bootstrap sequence is now resolved (verified by a clean ocaml-augeas build, which consumes ocaml-findlib-devel), so this reverts the workaround. hivex now builds the ocaml-hivex / ocaml-hivex-devel subpackages again, which libguestfs requires as a mandatory build dependency. With no overlays remaining, the dedicated comp file is removed and the component returns to an inline entry.
supermin builds the minimal appliance image used by libguestfs. Imported from Fedora dist-git. Includes an overlay patch teaching supermin's package-manager auto-detection (src/ph_rpm.ml) to recognize Azure Linux. Upstream only inspects the os-release ID field against a hard-coded allow-list and does not consider ID_LIKE; Azure Linux sets ID=azurelinux (ID_LIKE=fedora) and ships no /etc/redhat-release marker, so without the patch supermin aborts with "could not detect package manager used by this system or distro", which also breaks the libguestfs appliance build. The patch should be submitted upstream (https://github.com/libguestfs/supermin).
libguestfs is a library and set of tools (guestfish, virt-* utilities) for accessing and modifying virtual machine disk images. Imported from Fedora dist-git with the full Fedora binding set (OCaml, Perl, Python, Ruby, Lua, PHP, GObject/Vala) and no overlays, keeping divergence from upstream minimal for regular Fedora-baseline refreshes. Requires the supermin component (added in a prior commit) and the ocaml-hivex-devel subpackage re-enabled in hivex. Build was validated end to end: the appliance builds and the upstream %check boots the appliance under KVM and runs libguestfs-test-tool against both the libvirt and direct backends, with both reporting TEST FINISHED OK.
OCaml build dependency for guestfs-tools.
OCaml build dependency for guestfs-tools.
OCaml build dependency for guestfs-tools.
OCaml build dependency for guestfs-tools.
OCaml build dependency for guestfs-tools.
OCaml build dependency for guestfs-tools.
trungams
force-pushed
the
tvuong/4.0/enable-image-test
branch
from
July 17, 2026 21:58
f8bfc13 to
c979183
Compare
| [components.hipsparse] | ||
| [components.hipsparselt] | ||
| [components.hiredis] | ||
| [components.hivex] |
| [components.libgee] | ||
| [components.libgeotiff] | ||
| [components.libgexiv2] | ||
| [components.libguestfs] |
trungams
force-pushed
the
tvuong/4.0/enable-image-test
branch
from
July 17, 2026 22:19
c979183 to
6b2713c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 55 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
base/comps/guestfs-tools/guestfs-tools.comp.toml:31
- This insertion does not require a search/replace: the variable only needs to be set before the existing
%checkbody runs. Usingspec-prepend-linesavoids coupling the overlay to Fedora'sSKIP_TEST_VIRT_RESIZE_PLline, which may move or disappear during a baseline refresh.
type = "spec-search-replace"
section = "%check"
regex = 'export SKIP_TEST_VIRT_RESIZE_PL=1'
Comment on lines
+712
to
+714
| %if 0%{?rhel} | ||
| QEMU=%{_libexecdir}/qemu-kvm \ | ||
| %endif |
Comment on lines
+732
to
+736
| --disable-gobject \ | ||
| --disable-lua \ | ||
| --disable-php \ | ||
| --disable-ruby \ | ||
| %endif |
Provides virt-inspector and the other virt-* tools on top of libguestfs. Two targeted %check overlays keep the test suite enabled in the KVM-less build sandbox instead of disabling it: drop the Windows phony-guest image (its mkfs.ntfs step fails under TCG emulation and, being check_DATA, would fail the whole %check) and skip test-virt-diff.sh via the suite's own SKIP_TEST_VIRT_DIFF_SH hook (virt-diff spuriously flags the guest's separate /boot partition as changed after the appliance mounts the image). All other tests run.
There is no `libguestfs-tools` package: guestmount/guestunmount are provided by `libguestfs` and virt-inspector by `guestfs-tools`. Update the prerequisite docs (README) and the native-tool preflight hints (utils/extract.py, utils/tools.py) to reference packages that exist, so the "install this" guidance is actionable.
trungams
force-pushed
the
tvuong/4.0/enable-image-test
branch
from
July 17, 2026 22:40
6b2713c to
b04943a
Compare
tobiasb-ms
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picking up from #17624
Adds the
libguestfsandguestfs-toolspackage (library +guestfish/virt-*tools for accessing and modifying VM disk images) to Azure Linux 4.0, imported from Fedora dist-git with the full Fedora binding set and no overlays to keep divergence minimal for regular Fedora-baseline refreshes.This PR includes the following changes/additions:
ocaml-hivex-devel, a mandatory libguestfs build dependency. The dedicated comp file is removed and hivex returns to an inline entry.ID=azurelinux(upstream only checks a hard-coded ID allow-list, ignoringID_LIKE). The patch is flagged for upstream submission.guestfs-toolsvirt-*tools with 2 overlays to keep%checksection pass.Verification:
azldev image build vm-base-dev azldev image test vm-base-devFixes: AB#20621