Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions base/comps/components.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@ includes = ["**/*.comp.toml", "component-check-disablement.toml", "component-min
[components.hipsparse]
[components.hipsparselt]
[components.hiredis]
[components.hivex]
[components.hostname]
[components.hspell]
[components.httpcomponents-client]
Expand Down Expand Up @@ -1743,6 +1744,7 @@ includes = ["**/*.comp.toml", "component-check-disablement.toml", "component-min
[components.libgee]
[components.libgeotiff]
[components.libgexiv2]
[components.libguestfs]
Comment thread
trungams marked this conversation as resolved.
Comment thread
trungams marked this conversation as resolved.
[components.libgit2]
[components.libglade2]
[components.libglib-testing]
Expand Down Expand Up @@ -2229,14 +2231,20 @@ includes = ["**/*.comp.toml", "component-check-disablement.toml", "component-min
[components.ocaml-csexp]
[components.ocaml-curses]
[components.ocaml-dune]
[components.ocaml-fileutils]
[components.ocaml-findlib]
[components.ocaml-fmt]
[components.ocaml-gettext]
[components.ocaml-intrinsics-kernel]
[components.ocaml-labltk]
[components.ocaml-lwt]
[components.ocaml-ocamlbuild]
[components.ocaml-ocplib-endian]
[components.ocaml-ounit]
[components.ocaml-pp]
[components.ocaml-ppx-derivers]
[components.ocaml-ppx-here]
[components.ocaml-ppx-let]
[components.ocaml-ppxlib]
[components.ocaml-re]
[components.ocaml-react]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From: Thien Trung Vuong <tvuong@microsoft.com>
Date: Thu, 16 Jul 2026 00:00:00 +0000
Subject: [PATCH] tests: do not build the Windows phony-guest image

The Windows phony guest (test-data/phony-guests/windows.img) is generated
at "make check" time by make-windows-img.sh, which partitions a disk inside
the libguestfs appliance and runs "mkfs ntfs" on the new partitions. In a
build environment without /dev/kvm the appliance runs under slow TCG
emulation, where the partition device node (/dev/sda1) is not always created
by udev before mkfs runs; the image build then fails with
"mkfs: /dev/sda1: No such file or directory". Because windows.img is
check_DATA, that failure takes down the entire %check.

Azure Linux does not test Windows guests, so drop windows.img from the
phony-guest image set. guests-all-good.xml (used by the *-guests tests) is
generated only from images that exist -- make-guests-all-good.pl skips
missing/empty files -- and the windows domain that remains in guests.xml is
tolerated by the tests as a deliberately-missing disk.
---
diff --git a/test-data/phony-guests/Makefile.am b/test-data/phony-guests/Makefile.am
index ad6457431b..e7d57ecbc9 100644
--- a/test-data/phony-guests/Makefile.am
+++ b/test-data/phony-guests/Makefile.am
@@ -53,8 +53,7 @@ disk_images = \
fedora-lvm-on-luks.img \
ubuntu.img \
archlinux.img \
- coreos.img \
- windows.img
+ coreos.img

# This is 'check_DATA' because we don't need it until 'make check'
# time and we need the tools we have built in order to make it.
37 changes: 37 additions & 0 deletions base/comps/guestfs-tools/guestfs-tools.comp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[components.guestfs-tools]

# guestfs-tools' %check builds a set of "phony guest" disk images (check_DATA)
# and boots the libguestfs appliance to run the virt-* tools against them. One of
# those images, windows.img, is created by make-windows-img.sh, which partitions
# a disk inside the appliance and runs mkfs.ntfs on the new partitions. Without
# /dev/kvm in the build sandbox the appliance runs under slow TCG emulation, where
# the partition device node (/dev/sda1) is not always created by udev before mkfs
# runs; the image build then fails ("mkfs: /dev/sda1: No such file or directory")
# and, because windows.img is check_DATA, takes down the whole %check. Azure Linux
# does not test Windows guests, so we drop just that image rather than disabling
# the entire %check -- the remaining phony guests and all other tests still run.
[[components.guestfs-tools.overlays]]
description = "Drop the Windows phony-guest image (windows.img) from the test suite. Its make-check-time build partitions a disk in the libguestfs appliance and runs mkfs.ntfs, which fails under TCG emulation (no /dev/kvm) with 'mkfs: /dev/sda1: No such file or directory' and, being check_DATA, fails the whole %check. Azure Linux does not test Windows guests; the *-guests tests tolerate the missing image (guests-all-good.xml only lists images that exist, and guests.xml's windows domain is treated as a deliberately-missing disk)."
type = "patch-add"
source = "0001-tests-do-not-build-the-Windows-phony-guest-image.patch"

# test-virt-diff.sh is a golden-output test that modifies the fedora phony guest
# and expects virt-diff to report only those changes. In this build environment
# virt-diff additionally reports the guest's separate ext2 /boot partition entries
# as changed (identical mode/size -- only timestamps differ) because the appliance
# mounts the image to make the modification. That is an environment artifact the
# upstream golden output does not expect, not a virt-diff defect. Skip it via the
# test suite's own SKIP_TEST_* hook, mirroring the SKIP_TEST_VIRT_FORMAT_SH skip
# the upstream spec already carries for the same "fails in restricted build env"
# reason. test-virt-diff.sh honours this through its skip_if_skipped() preamble.
[[components.guestfs-tools.overlays]]
description = "Skip test-virt-diff.sh in %check. virt-diff spuriously reports the guest's separate ext2 /boot partition as changed (identical mode/size, only timestamps differ) because the appliance mounts the image to apply the test's modification -- a build-environment artifact the upstream golden output does not expect. Uses the test suite's own SKIP_TEST_VIRT_DIFF_SH hook (via skip_if_skipped), matching the existing SKIP_TEST_VIRT_FORMAT_SH skip in the upstream spec."
type = "spec-prepend-lines"
section = "%check"
lines = [
"# virt-diff also reports the guest's separate ext2 /boot partition as changed",
"# (identical mode/size, only timestamps differ) because the appliance mounts the",
"# image to make the test modification -- a build-environment artifact the upstream",
"# golden output does not expect. virt-diff itself is unaffected.",
"export SKIP_TEST_VIRT_DIFF_SH=1",
]
8 changes: 0 additions & 8 deletions base/comps/hivex/hivex.comp.toml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From: Azure Linux <azurelinux@microsoft.com>
Date: Thu, 4 Jun 2026 00:00:00 +0000
Subject: [PATCH] Recognize Azure Linux as an rpm/dnf distro

Azure Linux sets ID=azurelinux (with ID_LIKE=fedora) in
/etc/os-release and does not ship an /etc/redhat-release or
/etc/fedora-release marker file. supermin's os-release parser only
inspects the ID field, so fedora_detect() fails to recognize Azure
Linux and supermin aborts with "could not detect package manager used
by this system or distro".

Add "azurelinux" to the list of recognized rpm/dnf distro IDs so that
supermin (and libguestfs, which uses supermin to build its appliance)
works on Azure Linux.

This should be submitted upstream:
https://github.com/libguestfs/supermin
---
src/ph_rpm.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
index 5061d32..db82819 100644
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -32,7 +32,7 @@ let stringset_of_list pkgs =
let fedora_detect () =
Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&
(Config.yumdownloader <> "no" || Config.dnf <> "no") &&
- (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos"; "openEuler"; "anolis"; "KylinSecOS" ] ||
+ (List.mem (Os_release.get_id ()) [ "azurelinux"; "fedora"; "rhel"; "centos"; "openEuler"; "anolis"; "KylinSecOS" ] ||
try
(stat "/etc/redhat-release").st_kind = S_REG ||
(stat "/etc/fedora-release").st_kind = S_REG ||
14 changes: 14 additions & 0 deletions base/comps/supermin/supermin.comp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[components.supermin]

# supermin's package-manager auto-detection (src/ph_rpm.ml) 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 this patch supermin aborts with
# "could not detect package manager used by this system or distro" — which
# also breaks the libguestfs appliance build. The patch adds "azurelinux" to
# the recognized rpm/dnf distro list. Should be submitted upstream:
# https://github.com/libguestfs/supermin
[[components.supermin.overlays]]
description = "Teach supermin to recognize Azure Linux (ID=azurelinux) as an rpm/dnf distro so the package-manager detection used by --build/--prepare and the libguestfs appliance works."
type = "patch-add"
source = "0001-Recognize-Azure-Linux-as-an-rpm-dnf-distro.patch"
6 changes: 3 additions & 3 deletions base/images/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ capability isn't in `--capabilities`.

System packages (not pip-installable):

- **`libguestfs-tools`** + **`guestfs-tools`** — `guestmount`,
`guestunmount`, `virt-inspector` (VM images)
- **`libguestfs`** — `guestmount`, `guestunmount` (VM images)
- **`guestfs-tools`** — `virt-inspector` (VM images)
- **`skopeo`** — OCI archive conversion (container images, static tests)
- **`umoci`** — OCI image unpacking (container images, static tests)
- **`buildah`** — cleanup of rootless umoci extracts (container images, static tests)
Expand Down Expand Up @@ -240,7 +240,7 @@ module-level `NativeTool` constants and uses them at the call sites:
# utils/extract.py
GUESTMOUNT = NativeTool(
name="guestmount",
package_hint="libguestfs-tools",
package_hint="libguestfs",
reason="FUSE-mount VM images",
when="vm", # "always" | "vm" | "container"
)
Expand Down
4 changes: 2 additions & 2 deletions base/images/tests/utils/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
# (and used at the call sites below) where they're needed.
GUESTMOUNT = NativeTool(
name="guestmount",
package_hint="libguestfs / libguestfs-tools",
package_hint="libguestfs",
reason="FUSE-mount VM images read-only",
when="vm",
)
GUESTUNMOUNT = NativeTool(
name="guestunmount",
package_hint="libguestfs / libguestfs-tools",
package_hint="libguestfs",
reason="unmount guestmount FUSE mounts",
when="vm",
)
Expand Down
2 changes: 1 addition & 1 deletion base/images/tests/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use them at the call site::

# in utils/extract.py
GUESTMOUNT = NativeTool("guestmount", package_hint="libguestfs-tools",
GUESTMOUNT = NativeTool("guestmount", package_hint="libguestfs",
reason="FUSE-mount VM images", when="vm")

def mount_vm_image(...):
Expand Down
6 changes: 6 additions & 0 deletions locks/guestfs-tools.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = 'a948c9aaa7a4fcdf132073c4a7781a5cfc413593'
upstream-commit = 'a948c9aaa7a4fcdf132073c4a7781a5cfc413593'
input-fingerprint = 'sha256:5fa672efb78227a80d70a2146f151d42ad731361a4a41e9492f413a73bc11af1'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
2 changes: 1 addition & 1 deletion locks/hivex.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
version = 1
import-commit = 'f3ef8b3c8adeb35ddddd03deb8a3091e64294953'
upstream-commit = 'f3ef8b3c8adeb35ddddd03deb8a3091e64294953'
input-fingerprint = 'sha256:682cbdde917f423c701c9d2d912c864ec8de5c6427c1c93a95bfd9c93a376e98'
input-fingerprint = 'sha256:141c5c62e7b4b1d87653b5da7643147d5385732141ff55810425fd861eafbe1a'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/libguestfs.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = '18dc2aa8b85ed23a60567fd0295f16ebd462db32'
upstream-commit = '18dc2aa8b85ed23a60567fd0295f16ebd462db32'
input-fingerprint = 'sha256:131350ed3666e40f286e94bd9189590bbb032db4a8d8e8d452d7e4eabc4a4c5f'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/ocaml-fileutils.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = '09b1b038dda43d6d07e7a1466b4798571d0c44cd'
upstream-commit = '09b1b038dda43d6d07e7a1466b4798571d0c44cd'
input-fingerprint = 'sha256:df338d44ada08c45d80a685f55158b37c7fbcec1c2d93877be075e2ac9bcc62d'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/ocaml-gettext.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = 'bb2c1fb3b9657fe4ae80607a010b280fe9490705'
upstream-commit = 'bb2c1fb3b9657fe4ae80607a010b280fe9490705'
input-fingerprint = 'sha256:9fb8b436356100e942283997eb5ccf509f7e745f976acf74fcbe6456d149f930'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/ocaml-lwt.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = '1a45e4585bbb4e15d525f4ee6d35698f6aa2f3c5'
upstream-commit = '1a45e4585bbb4e15d525f4ee6d35698f6aa2f3c5'
input-fingerprint = 'sha256:7f9244a0e4c9832bf360a51c5f2ca8d86ade99ec63fc0d767c22585622f48203'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/ocaml-ounit.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = '26fa4c7e334e68c7211097d3f519a5478a7b2646'
upstream-commit = '26fa4c7e334e68c7211097d3f519a5478a7b2646'
input-fingerprint = 'sha256:80c9df45f237c9845ec8365a8ecdbb6b6c4cf60fdbebab6655ef4e1319c73c62'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/ocaml-ppx-here.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = '2bc0fc5d0692cee8ce7ee68b61382d5b7de160ac'
upstream-commit = '2bc0fc5d0692cee8ce7ee68b61382d5b7de160ac'
input-fingerprint = 'sha256:48534d2bb4a8545362fa9cb26c0a234257eb404c4a3d6340c0f68f2363510c32'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/ocaml-ppx-let.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = 'e98941fd5e418bd05bb19597f51152b50997c5f7'
upstream-commit = 'e98941fd5e418bd05bb19597f51152b50997c5f7'
input-fingerprint = 'sha256:e235bb56d2f537ee25f70677240b3c0c48196838dad5443d29e86c7f65aecd21'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
6 changes: 6 additions & 0 deletions locks/supermin.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Managed by azldev component update. Do not edit manually.
version = 1
import-commit = 'dbb5a2fe0e36ccacdf586f2c846094f20d7d5a88'
upstream-commit = 'dbb5a2fe0e36ccacdf586f2c846094f20d7d5a88'
input-fingerprint = 'sha256:279d005ea057bc3934bc8d22924f310986829fd2b28f62b4dc3cc0473d838b81'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From: Thien Trung Vuong <tvuong@microsoft.com>
Date: Thu, 16 Jul 2026 00:00:00 +0000
Subject: [PATCH] tests: do not build the Windows phony-guest image

The Windows phony guest (test-data/phony-guests/windows.img) is generated
at "make check" time by make-windows-img.sh, which partitions a disk inside
the libguestfs appliance and runs "mkfs ntfs" on the new partitions. In a
build environment without /dev/kvm the appliance runs under slow TCG
emulation, where the partition device node (/dev/sda1) is not always created
by udev before mkfs runs; the image build then fails with
"mkfs: /dev/sda1: No such file or directory". Because windows.img is
check_DATA, that failure takes down the entire %check.

Azure Linux does not test Windows guests, so drop windows.img from the
phony-guest image set. guests-all-good.xml (used by the *-guests tests) is
generated only from images that exist -- make-guests-all-good.pl skips
missing/empty files -- and the windows domain that remains in guests.xml is
tolerated by the tests as a deliberately-missing disk.
---
diff --git a/test-data/phony-guests/Makefile.am b/test-data/phony-guests/Makefile.am
index ad6457431b..e7d57ecbc9 100644
--- a/test-data/phony-guests/Makefile.am
+++ b/test-data/phony-guests/Makefile.am
@@ -53,8 +53,7 @@ disk_images = \
fedora-lvm-on-luks.img \
ubuntu.img \
archlinux.img \
- coreos.img \
- windows.img
+ coreos.img

# This is 'check_DATA' because we don't need it until 'make check'
# time and we need the tools we have built in order to make it.
Loading
Loading