Skip to content

feat: add libguestfs and supermin#17624

Draft
christopherco wants to merge 3 commits into
4.0from
chrco/add-libguestfs
Draft

feat: add libguestfs and supermin#17624
christopherco wants to merge 3 commits into
4.0from
chrco/add-libguestfs

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented Jun 4, 2026

Adds the libguestfs package (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 is a patch series of three self-contained commits:

  1. fix(hivex): re-enable OCaml bindings — Reverts the earlier
    workaround (bf151bb) that disabled hivex's OCaml bindings due to a
    broken bootstrap OCaml toolchain. The bootstrap is now resolved,
    so hivex again provides ocaml-hivex-devel, a mandatory libguestfs
    build dependency. The dedicated comp file is removed and hivex
    returns to an inline entry.

  2. feat(supermin): add supermin component — Adds the appliance
    builder libguestfs depends on, with an overlay patch teaching
    supermin's package-manager detection to recognize ID=azurelinux
    (upstream only checks a hard-coded ID allow-list, ignoring ID_LIKE).
    The patch is flagged for upstream submission.

  3. feat(libguestfs): add libguestfs component — Adds libguestfs with
    the full Fedora binding set (OCaml, Perl, Python, Ruby, Lua, PHP,
    GObject/Vala) and no overlays.

Fixes: AB#20621

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant