chore(comps): annotate azl-pruning overlays with metadata#17886
chore(comps): annotate azl-pruning overlays with metadata#17886liunan-ms wants to merge 3 commits into
Conversation
Migrate all azl-pruning components to the per-file overlay layout with file-level metadata (category = "azl-pruning"). A handful of migrated components carry sibling overlays in other categories, which move with them and keep their own metadata: azl-release-management, azl-disable-unsupported-tests, azl-compatibility, azl-dep-missing-workaround, azl-security-compliance, azl-platform-adaptation, and azl-branding-policy (notably systemd, which spans several). 46 qemu overlays are consolidated into a single overlay file using TOML 1.1.0 multi-line inline tables to preserve their exact interleaved apply order and section comments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enable per-file overlay discovery for every component by setting overlay-files = ["overlays/*.overlay.toml"] in the 4.0 stage1/stage2 default-component-config. This is what makes the migrated components' overlays/*.overlay.toml files load. Kept as a standalone latest commit so it can be reverted independently of the annotation migration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… BEFORE MERGE] TEMPORARY: this commit exists solely so the PR checks run against an azldev build that understands the new overlay-files / metadata / BugRef config. It MUST be reverted before the PR is merged. Pin azldev to 35d8fae562980db7bda057d79322cc51ddad8d62, the merged form of the overlay-files-after-resolution change (microsoft/azure-linux-dev-tools#256). This version supports inheriting overlay-files from a project-wide [default-component-config] and allows an empty overlay-files list to disable inherited patterns. Regenerate external/schemas/azldev.schema.json against the pinned tool so the authoritative schema knows the new metadata / overlay-files / BugRef fields. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates the overlays of ~86 azl-pruning (and adjacent-category) components from inline [[components.<name>.overlays]] blocks in each *.comp.toml into per-file overlays/*.overlay.toml documents, each carrying a single file-level [metadata] block (category, and upstreamable where known). It builds on the sibling PR #17727 (backport-overlay annotation) and relies on the inheritable overlay-files feature. Per the description, this is a pure annotation/restructuring change with byte-identical rendered specs, and two of the three commits are temporary scaffolding to make PR checks pass in isolation.
Changes:
- Move each migrated component's inline overlays into numbered
overlays/*.overlay.tomlfiles with file-level[metadata](category +upstreamable), preserving overlay order, descriptions, comments, and regex/replacement escaping (single-quote TOML literals re-expressed as double-quote basic strings). - [Temporary — "REVERT BEFORE MERGE"] Add
overlay-files = ["overlays/*.overlay.toml"]to the4.0-stage1/4.0-stage2default-component-configindistro/azurelinux.distro.toml. - [Temporary — "REVERT BEFORE MERGE"] Bump
.azldev-versionto35d8faeso PR checks run against a tool that understands the newoverlay-files/metadatafields.
Spot checks confirmed the mechanical correctness of the sampled diffs: escaping conversions preserve regex semantics (e.g. wxGTK, libsndfile, plymouth), multi-file splits are numbered in original overlay sequence so apply-order is preserved (e.g. systemd 0001–0005, webkitgtk 0001–0003), and patch source paths are correctly rewritten to ../ (e.g. anaconda/overlays/0002, resolving to the existing component-root patch). No functional defects were found in the reviewed files. The main considerations are the enormous scope (115+ new files across 86 components), the correctness dependence on the byte-identical render verification that cannot be reproduced here, the ordering-invariant that must hold for every multi-file split, and the two commits that must be manually reverted before merge (and the dependency on #17727 landing first).
Reviewed changes
Copilot reviewed 205 out of 205 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
distro/azurelinux.distro.toml |
Adds inheritable overlay-files default to both 4.0 stages (temporary scaffolding to revert) |
.azldev-version |
Pins azldev to 35d8fae for new overlay/metadata support (temporary scaffolding to revert) |
base/comps/*/*.comp.toml (~86) |
Removes inline overlays now relocated to per-file overlay documents |
base/comps/*/overlays/*.overlay.toml (115+) |
New per-file overlays with file-level [metadata], preserving original operations, order, and comments |
tobiasb-ms
left a comment
There was a problem hiding this comment.
I spot-checked some things and the fact that the spec renderer ran and didn't complain -- despite no changes to specs/ -- indicates this is a functional no-op. Approved.
reubeno
left a comment
There was a problem hiding this comment.
My main high level feedback here is that there's a fair bit of pruning where the overlays should be upstreamed as new bconds/fixes to existing bit-rotted bconds, even if the choice to disable the features remains in Azure Linux.
|
|
||
| [metadata] | ||
| category = "azl-pruning" | ||
| upstreamable = false |
|
|
||
| [metadata] | ||
| category = "azl-pruning" | ||
| upstreamable = false |
There was a problem hiding this comment.
How do we express that the upstreamable thing here is to turn the %global into a %bcond that would allow us to configure without the need for an overlay?
Ditto for other similar instances.
There was a problem hiding this comment.
The current expression with category = "azl-pruning" + upstreamable = true cannot allow us to filter out this group of overlays that can be removed by turning the %global into a %bcond. There're roughly 24~ overlay definitions hard-code a %global flip. Do you think this group deserve a separate category?
| [[overlays]] | ||
| description = "Remove elfutils-default-yama-scope package" | ||
| type = "spec-search-replace" | ||
| regex = "%global provide_yama_scope\\s+1" |
There was a problem hiding this comment.
See above question regarding %global; I'll refrain from additional instances, but the general question holds.
| description = "Drop BuildRequires: pkgconfig(fdk-aac) (fdk-aac-free not available in AZL)" | ||
| type = "spec-remove-tag" | ||
| tag = "BuildRequires" | ||
| value = "pkgconfig(fdk-aac)" |
There was a problem hiding this comment.
Not a %global but also something that we'd want to upstream as a new bcond. Ditto for various other instances in this PR.
| category = "azl-pruning" | ||
|
|
||
| [[overlays]] | ||
| description = "Remove RDP-only enable-service from %files" |
There was a problem hiding this comment.
Is this upstreamable? It looks like we build the component without rdp, and if that config is supported upstream then these fixes are needed.
| # cliff.sphinxext uses argparse.HelpFormatter._format_actions_usage, a private API | ||
| # removed in Python 3.14. This crashes sphinx-build during %build when generating docs. | ||
| # Disable doc generation while we figure out what to do about this. | ||
| # Fixed in cliff: https://opendev.org/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 |
| @@ -0,0 +1,339 @@ | |||
| # Disable features not needed in Azure Linux's Hyper-V/KVM environment, and strip | |||
There was a problem hiding this comment.
This is a big one. Can we break it into multiple .toml files?
| # Retarget to the openjdk25 variant. | ||
|
|
||
| [metadata] | ||
| category = "azl-pruning" |
| @@ -0,0 +1,15 @@ | |||
| [metadata] | |||
| category = "azl-branding-policy" | |||
| # it explicitly when oscilloscope is disabled. | ||
|
|
||
| [metadata] | ||
| category = "azl-pruning" |
Summary
This PR migrates all azl-pruning components to the per-file overlay layout (overlays/*.overlay.toml) with file-level [metadata]. This is a pure annotation/restructuring change — no overlay is added, removed, reordered, or semantically altered. The rendered spec is byte-identical before and after.
Changes
Three commits, deliberately kept separate so the two scaffolding pieces can be dropped independently after #17727 is merged:
chore(comps): annotate azl-pruning overlays with metadata
Each migrated component's overlays move into
overlays/*.overlay.tomlfiles carrying file-level category (+ upstreamable/commits where known). Original comp.toml comments are preserved into the overlay files. Because a migrated component's overlays aren't all one category, sibling overlays move with it and keep their own metadata — so besidesazl-pruningthe commit also touches:azl-release-management,azl-disable-unsupported-tests,azl-compatibility,azl-dep-missing-workaround,azl-security-compliance,azl-platform-adaptation,azl-branding-policy(notablysystemd, which spans several).qemu's 46 overlays are consolidated into a single overlay file using TOML1.1.0multi-line inline tables to preserve their exact interleaved apply order and section comments.chore(distro): set overlay-files default-component-config -⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Sets overlay-files = ["overlays/*.overlay.toml"] in the 4.0 stage1/stage2 default-component-config, so every component inherits per-file overlay discovery (no per-component key needed). Standalone so it can be reverted independently.
chore(azldev): pin to 35d8fae and regenerate schema -⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Pins .azldev-version to 35d8fae (merged form of azure-linux-dev-tools#256: inheritable overlay-files + empty-list override) and regenerates external/schemas/azldev.schema.json so PR checks run against a tool that understands the new overlay-files / metadata / BugRef fields. Must be reverted before this PR merges.
Validation
git show 4.0:<comp>.comp.tomlfor all migrated components;qemuverified value-identical via go-toml deep-compare.azldev component list -aparses cleanly (7424 components).comp renderin PR check passed