qemu: drop qemu-tests subpackage entirely#17212
Open
PawelWMS wants to merge 1 commit into
Open
Conversation
📄❌ Rendered specs are out of dateFIX: — run this and commit the result: azldev component render qemuOr download the fix patch and apply it: gh run download 25839015261 -R microsoft/azurelinux -n rendered-specs-patch
git apply rendered-specs.patch
Content diffs`specs/q/qemu/qemu.spec`--- committed/specs/q/qemu/qemu.spec
+++ rendered/specs/q/qemu/qemu.spec
@@ -3368,8 +3368,8 @@
%changelog
## START: Generated by rpmautospec
-* Thu May 14 2026 azldev <azldev@local> - 2:10.1.4-4
-- Local changes (uncommitted)
+* Thu May 14 2026 Pawel Winogrodzki <pawelwi@microsoft.com> - 2:10.1.4-4
+- qemu: empty out qemu-tests subpackage payload
* Thu Apr 30 2026 reuben olinsky <reubeno@users.noreply.github.com> - 2:10.1.4-3
- feat(qemu): disable SPICE, dbus video/audio, BrlAPI, all audio backends
|
0742967 to
b723955
Compare
112b9b7 to
3a5696a
Compare
The qemu-tests subpackage ships per-arch test binaries, qemu-iotests
fixture images, and accel-qtest-*.so plugins -- artefacts that trip
the automated package-signing pipeline's FS-aware deep scanner on the
SRPM/RPM payload, blocking the build's signing step. The subpackage
is test-only and not consumed by any Azure Linux image manifest or by
any other component in the repo.
This commit replaces the earlier "empty-out the payload" workaround
(which left `%package tests` / `%description tests` / `%files tests`
declarations in place and just blanked their content) with a clean
removal of the whole subpackage via `spec-remove-subpackage`.
Why the indirection
-------------------
The upstream qemu.spec sandwiches `%if %{have_libblkio}` between the
tests subpackage's `%description` and `%package block-blkio`, and
again between `%files tests` and `%files block-blkio`. The
`spec-remove-subpackage` overlay greedily consumes everything up to
the next section directive, including those trailing `%if` lines, so
removing `tests` would leave the block-blkio guards unbalanced (an
orphan `%endif` after each block-blkio body).
Approach:
* `spec-remove-subpackage package = "tests"` drops the three tests
sections in one go.
* Two `spec-append-lines` overlays re-append `%if %{have_libblkio}`:
one against `%description package = "qemu-pr-helper"` (the last
`%description` block before `%package block-blkio` in the
post-removal spec), and one against `%files package = "common"`
(the last `%files` block before `%files block-blkio`). Both are
package-scoped so the directive lands at the right anchor; an
unscoped `section = "%files"` append silently lands on the FIRST
`%files` (the unnamed main one), orphaning `%files block-blkio`.
* A `spec-search-replace` hoists a `%global testsdir
%{_libdir}/%{name}/tests-src` declaration to the top of the spec
(the original `%define testsdir` lived inside the removed
`%package tests` body, but `%install` still references the macro
to build the test artefacts).
* A final `spec-append-lines` in `%install` deletes the test
artefacts from `%{buildroot}` after install, so the build's stray
output doesn't trip "Installed (but unpackaged)" errors now that
there is no `%files tests` to claim them.
Files
-----
1. base/comps/qemu/qemu.comp.toml -- new overlays replacing the four
empty-out-payload overlays.
2. specs/q/qemu/qemu.spec -- regenerated; `%package tests`,
`%description tests`, `%files tests` are all GONE.
3. locks/qemu.lock -- refreshed input-fingerprint.
Validation
----------
- `rpmspec -P specs/q/qemu/qemu.spec` parses cleanly (the
`%autorelease` warnings are expected and present in the upstream
spec too).
- `rpmspec -q --qf '%{NAME}\n' specs/q/qemu/qemu.spec | sort -u |
grep -c '^qemu-tests$'` returns 0 -- the subpackage is no longer
produced.
- `%if %{have_libblkio}` still appears immediately before both
`%package block-blkio` and `%files block-blkio` in the rendered
spec; block-blkio guards are balanced.
- Lock converges (re-running `azldev comp update -p qemu` after a
fresh render produces no further diff).
- Full build NOT run: qemu build time is prohibitive; validated by
spec parse and rendered-subpackage inspection.
3a5696a to
05dd1f5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure Linux qemu component customization to avoid shipping qemu-tests artifacts that trigger the signing pipeline’s deep scanner, by removing the tests payload/subpackage-related outputs from the rendered spec.
Changes:
- Removes the
qemu-testssubpackage from the renderedqemu.specand adds%installcleanup to delete test artifacts from%{buildroot}. - Hoists a
testsdirmacro definition so%installcontinues to parse/expand after the tests subpackage removal. - Updates the
qemulock fingerprint to reflect the component definition change.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
specs/q/qemu/qemu.spec |
Rendered spec updated: tests subpackage blocks removed; testsdir added; %install now deletes test artifacts from buildroot. |
base/comps/qemu/qemu.comp.toml |
Adds overlays to remove the tests subpackage, restore %if %{have_libblkio} guards, and clean test artifacts post-install. |
locks/qemu.lock |
Updates input fingerprint for the modified component definition. |
| %global have_usbredir 1 | ||
| %global have_xdp 1 | ||
| %global enable_werror 0 | ||
| %global testsdir %{_libdir}/%{name}/tests-src |
Comment on lines
+101
to
+103
| { description = "Hoist `%global 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%global 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}"] }, |
Comment on lines
+102
to
+105
| { 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"] }, |
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.
Koji build
The
qemu-testssubpackage ships per-arch test binaries, qemu-iotests fixture images, andaccel-qtest-*.soplugins. Those artefacts trip the automated package-signing pipeline's FS-aware deep scanner on the SRPM/RPM payload, blocking the build's signing step. The subpackage is test-only and not consumed by any Azure Linux image manifest or by any other component in the repo.Approach
Drop the whole
qemu-testssubpackage cleanly viaspec-remove-subpackage. The naive approach trips two overlay-engine quirks (seeazure-linux-dev-tools#193) that this PR works around:Greedy
%ifconsumption. The upstream spec sandwiches%if %{have_libblkio}between the tests subpackage's%descriptionand%package block-blkio, and again between%files testsand%files block-blkio.spec-remove-subpackagewalks forward to the next section directive, swallowing the%iflines and orphaning their%endifs. Twospec-append-linesoverlays re-append%if %{have_libblkio}:%description package = "qemu-pr-helper"(the last%descriptionblock before%package block-blkioin the post-removal spec),%files package = "common"(the last%filesblock before%files block-blkio).Both are package-scoped — an unscoped
section = "%files"append silently lands on the FIRST%files(the unnamed main one), which would orphan%files block-blkio.%define testsdirinside the removed body. The upstream spec puts%define testsdir %{_libdir}/%{name}/tests-srcinside%package tests, but%installstill uses%{testsdir}to build test artefacts. After the removal the macro is undefined and%installexpands to broken paths. Aspec-search-replacehoists an equivalent%global testsdir ...to the top of the spec, next to the other%globaldeclarations.A final
spec-append-linesin%installdeletes the test artefacts from%{buildroot}after install, so the build's stray output doesn't trip "Installed (but unpackaged)" errors now that there is no%files teststo claim them.Validation
rpmspec -P specs/q/qemu/qemu.specexits 0 (the%autoreleasewarnings are expected and present in the upstream spec too).rpmspec -q --qf '%{NAME}\n' specs/q/qemu/qemu.spec | sort -u | grep -c '^qemu-tests$'returns 0 — the subpackage is no longer produced.%if %{have_libblkio}still appears immediately before both%package block-blkioand%files block-blkioin the rendered spec; block-blkio guards balanced.azldev comp update -p qemuafter a fresh render produces no further diff).Reverse-dependency check
No other component in the repo declares
Requires:/BuildRequires:onqemu-tests, and no Azure Linux image manifest references it.