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
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 |
There was a problem hiding this comment.
Agreed, now marked upstream-status = "upstreamable".
|
|
||
| [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?
There was a problem hiding this comment.
This is now upstream-status = "needs-upstream-hook". Fedora upstream now hard-codes %global with_mingw 1 under %fedora rather than gating on a bcond, so build.without = ["mingw"] has no effect. The needs-upstream-hook status means "upstream should add a %bcond, %if, or config knob" so that we can configure it instead of using an overlay, and it's filterable across all similar instances.
| [[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.
There was a problem hiding this comment.
Switched to upstream-status = "needs-upstream-hook". Handled all the same pattern.
| 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.
There was a problem hiding this comment.
Marked needs-upstream-hook as well. There's no upstream toggle for fdk-aac today, so we drop the BuildRequires and flip -DWITH_FDK_AAC=OFF, this is another candidate for upstream %bcond gating.
| 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.
There was a problem hiding this comment.
Both gnome-remote-desktop overlays are now upstream-status = "needs-upstream-hook" as upstream needs a %bcond_with rdp (or similar) that gates both the RDP BuildRequires and the RDP-only %files entries, and AZL would then configure it off via build.without.
| # 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 |
There was a problem hiding this comment.
Added commits to metadata
| @@ -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?
There was a problem hiding this comment.
Split into six single-purpose files, with filename order preserving the original interleaved apply order.
| # Retarget to the openjdk25 variant. | ||
|
|
||
| [metadata] | ||
| category = "azl-pruning" |
There was a problem hiding this comment.
Marked as upstream-status = "upstreamable".
| @@ -0,0 +1,15 @@ | |||
| [metadata] | |||
| category = "azl-branding-policy" | |||
There was a problem hiding this comment.
This is a case that doesn't fit in other categories. This overlay reverts a Fedora timeout tweak back to the OSS upstream 90s default, so it seems azl-local policy or platform adaptation, not an upstream candidate. I recategorized from azl-branding-policy to azl-platform-adaptation, with upstream-status = "inapplicable". I'm fine to switch it if any category sounds more reasonable.
| # it explicitly when oscilloscope is disabled. | ||
|
|
||
| [metadata] | ||
| category = "azl-pruning" |
There was a problem hiding this comment.
Marked as upstream-status = "upstreamable".
e5821f1 to
5309afe
Compare
5309afe to
b2ad78f
Compare
| [default-component-config] | ||
| overlay-files = ["overlays/*.overlay.toml"] |
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-temp-workaround, azl-security-compliance, and azl-platform-adaptation. Every overlay now also records an upstream-status (upstreamable, needs-upstream-hook, or inapplicable) so reviewers can see why each divergence is carried and what it would take to drop it. The qemu overlays are split into six logical overlay files (0001-0006), each a single logical change (feature toggles, audio configure flags, audio/ui Requires unhooks, subpackage removals, tests-subpackage drop). Filename ordering preserves the exact original interleaved apply order. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin azldev to 830e6fed79750f8e24ae17cd630248f50c90c8a9, which builds on the upstream-backport overlay category, URLRef (replacing BugRef), and required upstream-status metadata (replacing the old upstreamable boolean). It also renames the azl-dep-missing-workaround category to azl-temp-workaround and adds an optional [metadata] block to component groups. Regenerate external/schemas/azldev.schema.json against the pinned tool so the authoritative schema matches the new overlay metadata model, including upstream-status, the renamed azl-temp-workaround category, and component-group metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b2ad78f to
043f898
Compare
| [default-component-config] | ||
| overlay-files = ["overlays/*.overlay.toml"] |
| description = "Annotate the now-empty %if 0%{?fedora} block to make the AZL deviation explicit (avoid confusion with the original 'needed for upstream test 1451' comment)" | ||
| type = "spec-search-replace" | ||
| regex = "^# needed for upstream test 1451$" | ||
| replacement = "# python3-impacket BuildRequires intentionally omitted in Azure Linux — see curl.comp.toml overlay (RPM signing blocker; test 1451 is Fedora-gated)" |
| type = "spec-search-replace" | ||
| section = "%prep" | ||
| regex = "^%patch -P401 -p1 -b \\.1667096$" | ||
| replacement = "# AZL: mozilla-1667096.patch (Patch401) skipped — adds fdk-aac support; see firefox.comp.toml" |
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.chore(distro): set overlay-files default-component-config -⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Sets overlay-files = ["overlays/*.overlay.toml"] in components.toml, so every component inherits per-file overlay discovery (no per-component key needed). Standalone so it can be reverted independently.
chore(azldev): pin to 830e6fed and regenerate schema -⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
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