qemu: drop qemu-tests subpackage entirely#17212
Merged
Merged
Conversation
0742967 to
b723955
Compare
112b9b7 to
3a5696a
Compare
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. |
05dd1f5 to
2b35318
Compare
20beef4 to
b72de49
Compare
christopherco
requested changes
May 16, 2026
| * Thu Apr 30 2026 Daniel McIlvaney <damcilva@microsoft.com> - 2:10.1.4-2 | ||
| - feat: introduce deterministic commit resolution via Azure Linux lock file | ||
| * Tue May 12 2026 Daniel McIlvaney <damcilva@microsoft.com> - 2:10.1.4-2 | ||
| - ci(checks): scope render to PR-touched components |
Collaborator
There was a problem hiding this comment.
@dmcilvaney this seems a bit odd. Is this expected?
Contributor
There was a problem hiding this comment.
No... this feels odd. Will look tomorrow.
dmcilvaney
reviewed
May 16, 2026
| ## START: Generated by rpmautospec | ||
| * 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 | ||
| * Sat May 16 2026 Pawel Winogrodzki <pawelwi@microsoft.com> - 2:10.1.4-3 |
Contributor
There was a problem hiding this comment.
Release calc seems broken here, should increment.
dmcilvaney
requested changes
May 16, 2026
Contributor
dmcilvaney
left a comment
There was a problem hiding this comment.
Azldev release calc seems wrong
0f9da6c to
37cbf4e
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` re-hoists `%define testsdir
%{_libdir}/%{name}/tests-src` 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). `%define` is used (not `%global`) so `%{name}` and
`%{_libdir}` expand lazily at use-time, after rpm has parsed the
spec's `Name:` line.
* 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.
37cbf4e to
5c1eb9d
Compare
christopherco
approved these changes
May 17, 2026
dmcilvaney
approved these changes
May 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.
Fixes: AB#19874
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.