diff --git a/base/comps/qemu/qemu.comp.toml b/base/comps/qemu/qemu.comp.toml index d7c87c468aa..13a6bca8189 100644 --- a/base/comps/qemu/qemu.comp.toml +++ b/base/comps/qemu/qemu.comp.toml @@ -78,4 +78,30 @@ overlays = [ { description = "Remove %package ui-sdl", type = "spec-remove-section", package = "ui-sdl", section = "%package" }, { description = "Remove %description ui-sdl", type = "spec-remove-section", package = "ui-sdl", section = "%description" }, { description = "Remove %files ui-sdl", type = "spec-remove-section", package = "ui-sdl", section = "%files" }, + + # --- Drop tests subpackage --- + # qemu-tests ships per-arch test binaries, qemu-iotests fixture images, and + # related artefacts that trip the automated package-signing pipeline's + # FS-aware deep scanner. The subpackage is test-only and not shipped in any + # Azure Linux image, so we drop it entirely. + # + # Implementation notes: + # * The upstream spec sandwiches `%if %{have_libblkio}` between the tests + # subpackage's `%description` and `%package block-blkio`, and again + # between `%files tests` and `%files block-blkio`. `spec-remove-subpackage` + # greedily consumes the trailing `%if` lines (per its documented + # limitation), so we re-append `%if %{have_libblkio}` to the end of the + # preceding sections to keep the block-blkio guards balanced. + # * `%define testsdir` lives inside the removed `%package tests` block but + # is referenced from `%install`; we re-hoist it via `%define` (lazy + # expansion of `%{name}` / `%{_libdir}`) near the other top-of-spec + # `%global` declarations so `%install` still expands cleanly. + # * The `%install` section still writes test artefacts under `%{testsdir}` + # and builds `accel-qtest-*.so` plugins, so we rm them from the buildroot + # after install to avoid "Installed (but unpackaged)" errors. + { description = "Hoist `%define testsdir` so %install expands correctly after %package tests is removed", type = "spec-search-replace", regex = '^%global enable_werror 0$', replacement = "%global enable_werror 0\n%define testsdir %{_libdir}/%{name}/tests-src" }, + { description = "Remove qemu-tests subpackage (test-only payload trips signing-pipeline deep scanner; not shipped in any Azure Linux image)", type = "spec-remove-subpackage", package = "tests" }, + { description = "Restore `%if %{have_libblkio}` ahead of %package block-blkio (consumed when the preceding tests subpackage was removed)", type = "spec-append-lines", section = "%description", package = "qemu-pr-helper", lines = ["%if %{have_libblkio}"] }, + { description = "Restore `%if %{have_libblkio}` ahead of %files block-blkio (consumed when the preceding %files tests section was removed)", type = "spec-append-lines", section = "%files", package = "common", lines = ["%if %{have_libblkio}"] }, + { description = "Drop test artefacts from buildroot after install (paired with qemu-tests subpackage removal)", type = "spec-append-lines", section = "%install", lines = ["# Azure Linux: qemu-tests subpackage removed; drop its payload from buildroot.", "rm -rf %{buildroot}%{testsdir}", "rm -f %{buildroot}%{_libdir}/%{name}/accel-qtest-*.so"] }, ] diff --git a/locks/qemu.lock b/locks/qemu.lock index ef24a0625cc..7917f129cd8 100644 --- a/locks/qemu.lock +++ b/locks/qemu.lock @@ -2,5 +2,5 @@ version = 1 import-commit = 'f2cb21ff470d94a6dfd2a2e6ef9effeaa3aead1f' upstream-commit = 'f2cb21ff470d94a6dfd2a2e6ef9effeaa3aead1f' -input-fingerprint = 'sha256:91eb9ed746dbecd75bd0f92c73b84a8ca79c2047ca4592698600326169c3c766' +input-fingerprint = 'sha256:a1ce940376507bb55ef6b3a2f71a78c858e5d517fbed199eee7b8618413bee00' resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e' diff --git a/specs/q/qemu/qemu.spec b/specs/q/qemu/qemu.spec index 7d842c8863b..4a860af21db 100644 --- a/specs/q/qemu/qemu.spec +++ b/specs/q/qemu/qemu.spec @@ -2,7 +2,7 @@ ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 3; + release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -157,6 +157,7 @@ %global have_usbredir 1 %global have_xdp 1 %global enable_werror 0 +%define testsdir %{_libdir}/%{name}/tests-src # All modules should be listed here. @@ -817,19 +818,6 @@ This package provides the qemu-pr-helper utility that is required for certain SCSI features. -%package tests -Summary: tests for the %{name} package -Requires: %{name} = %{evr} - -%define testsdir %{_libdir}/%{name}/tests-src - -%description tests -The %{name}-tests rpm contains tests that can be used to verify -the functionality of the installed %{name} package - -Install this package if you want access to qemu-iotests. - - %if %{have_libblkio} %package block-blkio Summary: QEMU blkio block driver @@ -2258,6 +2246,9 @@ rm -f \ +# Azure Linux: qemu-tests subpackage removed; drop its payload from buildroot. +rm -rf %{buildroot}%{testsdir} +rm -f %{buildroot}%{_libdir}/%{name}/accel-qtest-*.so %check # Disable iotests. RHEL has done this forever, and these # tests have been flakey in the past @@ -2548,10 +2539,6 @@ popd %{_sysusersdir}/qemu.conf -%files tests -%{testsdir} -%{_libdir}/%{name}/accel-qtest-*.so - %if %{have_libblkio} %files block-blkio %{_libdir}/%{name}/block-blkio.so @@ -3365,6 +3352,9 @@ popd %changelog ## START: Generated by rpmautospec +* Sat May 16 2026 Pawel Winogrodzki - 2:10.1.4-4 +- qemu: drop qemu-tests subpackage entirely + * Thu Apr 30 2026 reuben olinsky - 2:10.1.4-3 - feat(qemu): disable SPICE, dbus video/audio, BrlAPI, all audio backends