Skip to content

chore(comps): annotate azl-pruning overlays with metadata#17886

Open
liunan-ms wants to merge 3 commits into
4.0from
liunan/azl-pruning
Open

chore(comps): annotate azl-pruning overlays with metadata#17886
liunan-ms wants to merge 3 commits into
4.0from
liunan/azl-pruning

Conversation

@liunan-ms

@liunan-ms liunan-ms commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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.

  • 86 components migrated
  • 115 overlay files added
  • structural no-op verified against 4.0 for every component.

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.toml files 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 besides azl-pruning the 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

  • Structural no-op: reconstructed overlay list (minus metadata, normalized ../ source paths) is identical to git show 4.0:<comp>.comp.toml for all migrated components; qemu verified value-identical via go-toml deep-compare.
  • azldev component list -a parses cleanly (7424 components).
  • comp render in PR check passed
  • metadata is fingerprint-excluded

Copilot AI review requested due to automatic review settings July 1, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toml files 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 the 4.0-stage1/4.0-stage2 default-component-config in distro/azurelinux.distro.toml.
  • [Temporary — "REVERT BEFORE MERGE"] Bump .azldev-version to 35d8fae so PR checks run against a tool that understands the new overlay-files/metadata fields.

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

@liunan-ms liunan-ms marked this pull request as ready for review July 2, 2026 03:03
@liunan-ms liunan-ms requested a review from a team as a code owner July 2, 2026 03:03

@tobiasb-ms tobiasb-ms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 reubeno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does seem upstreamable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, now marked upstream-status = "upstreamable".


[metadata]
category = "azl-pruning"
upstreamable = false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above question regarding %global; I'll refrain from additional instances, but the general question holds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a %global but also something that we'd want to upstream as a new bcond. Ditto for various other instances in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this upstreamable? It looks like we build the component without rdp, and if that config is supported upstream then these fixes are needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added commits to metadata

@@ -0,0 +1,339 @@
# Disable features not needed in Azure Linux's Hyper-V/KVM environment, and strip

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big one. Can we break it into multiple .toml files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split into six single-purpose files, with filename order preserving the original interleaved apply order.

# Retarget to the openjdk25 variant.

[metadata]
category = "azl-pruning"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstreamable? Another jdk 25.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked as upstream-status = "upstreamable".

@@ -0,0 +1,15 @@
[metadata]
category = "azl-branding-policy"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a branding thing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does seem upstreamable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked as upstream-status = "upstreamable".

Copilot AI review requested due to automatic review settings July 9, 2026 05:53
@liunan-ms liunan-ms force-pushed the liunan/azl-pruning branch from e5821f1 to 5309afe Compare July 9, 2026 05:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 210 out of 210 changed files in this pull request and generated 2 comments.

Comment thread .azldev-version Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 18:26
@liunan-ms liunan-ms force-pushed the liunan/azl-pruning branch from 5309afe to b2ad78f Compare July 10, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 210 out of 210 changed files in this pull request and generated 5 comments.

Comment thread base/comps/anaconda/overlays/0002-guard-gi-require-version.overlay.toml Outdated
Comment thread base/comps/edk2/overlays/0002-workaround-remove-virt-firmware.overlay.toml Outdated
Comment thread base/comps/systemd/overlays/0001-lower-buildrequires-setup-2.overlay.toml Outdated
Comment on lines +10 to +11
[default-component-config]
overlay-files = ["overlays/*.overlay.toml"]
Comment thread .azldev-version
liunan-ms and others added 3 commits July 10, 2026 18:41
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>
Copilot AI review requested due to automatic review settings July 10, 2026 18:43
@liunan-ms liunan-ms force-pushed the liunan/azl-pruning branch from b2ad78f to 043f898 Compare July 10, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 210 out of 210 changed files in this pull request and generated 3 comments.

Comment on lines +10 to +11
[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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants