chore(comps): annotate azl-compatibility overlays with metadata#17887
chore(comps): annotate azl-compatibility overlays with metadata#17887liunan-ms wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates all azl-compatibility (and adjacent-category) overlays for 27 components from inline overlays = [...] / [[components.<name>.overlays]] blocks in their .comp.toml files into per-group overlays/*.overlay.toml documents, each stamped with a file-level [metadata] block (category + upstreamable). It is presented as a structural no-op: overlays are neither added, removed, reordered, nor semantically changed, and rendered specs are claimed byte-identical. It also carries two clearly-labeled temporary commits needed only for PR checks.
Changes:
- Split 27 components' inline overlays into 42 new
overlays/*.overlay.tomlfiles, one per logical change group, preserving comments and adding taxonomy[metadata]; multi-category components get one file per group. Localsource/patch references are rewritten with a../prefix to resolve from theoverlays/subdir back to the component root. - Temporary (revert-before-merge): add
overlay-files = ["overlays/*.overlay.toml"]to the 4.0 stage1/stage2default-component-configso components inherit per-file overlay discovery. - Temporary (revert-before-merge): pin
.azldev-versionto35d8faeand regenerateexternal/schemas/azldev.schema.json(addsOverlayMetadata,BugRef,overlay-files, resources schema) so PR checks run against a tool that understands the new fields.
Reviewed changes
Copilot reviewed 72 out of 72 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
external/schemas/azldev.schema.json |
Regenerated schema adding OverlayMetadata/BugRef/overlay-files + resources defs (temporary). |
distro/azurelinux.distro.toml |
Adds inherited overlay-files discovery default to both 4.0 stages (temporary; sole discovery mechanism). |
.azldev-version |
Pins azldev to 35d8fae (temporary). |
base/comps/*/*.comp.toml (27 files) |
Removes inline overlays, leaving component config/release settings intact. |
base/comps/*/overlays/*.overlay.toml (42 files) |
New per-group overlay docs with [metadata]; ../ source paths verified against existing component-root files. |
Notes from review: source/patch ../ paths resolve correctly (all referenced files exist at component root), regex conversions from TOML literal to basic strings preserve escaping, and per-file numeric prefixes preserve original overlay order. Two items flagged: the load-bearing-yet-temporary distro discovery default, and apache-sshd/overlays/0001 missing upstreamable.
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.
|
I'm going through this PR and will post comments within the day. My main initial feedback is that the categorization is aggressively using azl-compatibility aggressively -- and in a way that I think will make the categorization less useful. |
reubeno
left a comment
There was a problem hiding this comment.
I don't think we need the data to be 100% accurate to get started, but I do want us to see if we're going to get the insights we need here.
|
|
||
| [metadata] | ||
| category = "azl-pruning" | ||
| upstreamable = false |
There was a problem hiding this comment.
Worth considering upstreamability here. Fedora will also need to move to 25 as the default at some point.
There was a problem hiding this comment.
Marked upstream-status = "upstreamable"
| @@ -0,0 +1,26 @@ | |||
| [metadata] | |||
| category = "azl-compatibility" | |||
There was a problem hiding this comment.
Why? Do we have any indication of what these changes were actually doing?
There was a problem hiding this comment.
This change works around an upstream Fedora 43 packaging bug: the installed versions of maven-remote-resources-plugin, plexus-utils, and plexus-xml in the Fedora 43 repos are mutually incompatible during the Maven 3 -> 4 transition. This issue has been existing in Fedora 43 and failing the build. The Fedora 44 (commit) upgraded apache-sshd version to 2.16 and disabled maven-remote-resources-plugin for the rpm build avoid this issue. I think azl-compability is a good fit for this change with upstream-status = "upstreamed" and commits without changing the spec and rebuild, so that we can remove this overlay once pinning to f44.
| # TODO: Remove this overlay once a new upstream release (> 1.0.3) is available. | ||
|
|
||
| [metadata] | ||
| category = "azl-compatibility" |
There was a problem hiding this comment.
I worry that azl-compatibility is being more widely used than expected. I see it used for tdnf compat symlinks, which is for compat with previous AZL versions, but this isn't really the same sort of change.
There was a problem hiding this comment.
Agree, I recategorized to category = "azl-temp-workaround" (it forces -std=gnu17 to dodge the GCC 15 C23 bool-keyword conflict) with upstream-status = "upstreamable" and the upstream fix commit in commits. It comments a TODO to remove once an upstream release > 1.0.3 ships. That better reflects that it's a temporary workaround.
| @@ -0,0 +1,15 @@ | |||
| [metadata] | |||
| category = "azl-platform-adaptation" | |||
There was a problem hiding this comment.
The azldev docs call out this category for "architecture-specific" adaptation. Is this architectural?
There was a problem hiding this comment.
This only rewrites version-string macros (specversion / tarfile_release) so the spec tracks the AZL kernel's versioning. Moved from azl-platform-adaptation to category = "azl-release-management" with upstream-status = "inapplicable" (permanent AZL-only versioning). I kept azl-platform-adaptation only on 0005-build-generate-native-cross, which genuinely detects native arch and cross-generates headers.
| # Source: use full Azure Linux kernel tarball instead of pre-built headers. | ||
|
|
||
| [metadata] | ||
| category = "azl-platform-adaptation" |
There was a problem hiding this comment.
Agree, this is not arch-specific. This substitutes Fedora's pre-built-headers tarball for the full AZL kernel source tree which should be a Fedora -> AZL source/identity choice. Recategorized to category = "azl-branding-policy", upstream-status = "inapplicable" (Fedora ships their own tarball and would never take this).
| @@ -0,0 +1,9 @@ | |||
| [metadata] | |||
| category = "azl-compatibility" | |||
| upstreamable = false | |||
|
|
||
| [metadata] | ||
| category = "azl-compatibility" | ||
| upstreamable = false |
There was a problem hiding this comment.
Actually is upstreamable. And in fact, I believe Tobias already upstreamed it.
There was a problem hiding this comment.
Confirmed that the AZL4 configs are already upstream to Fedora. Set upstream-status = "upstreamed" with both commits, and a TODO: remove once pinning to f44. Changed to category = "upstream-backport" since the new mock-core-configs version is already in f44, at which point it drops entirely.
|
|
||
| [metadata] | ||
| category = "azl-compatibility" | ||
| upstreamable = false |
There was a problem hiding this comment.
This is an example of a set of changes that aren't directly upstreamable, but which we don't want to carry forever. How would you recommend we capture that?
There was a problem hiding this comment.
Set category = "azl-branding-policy" (it's driven by %_vendor = azurelinux), upstream-status = "needs-upstream-hook", indicating the current form (dropping .cfg files in three build locations) isn't directly upstreamable, but it flags that we'd like an upstream hook so we don't carry this forever.
| @@ -0,0 +1,17 @@ | |||
| [metadata] | |||
| category = "azl-compatibility" | |||
| upstreamable = false | |||
There was a problem hiding this comment.
This uses %{_target_platform} instead of the hardcoded %{_arch}-redhat-linux-gnu for the compiler-rt runtime path. Recategorized to category = "azl-branding-policy" with upstream-status = "upstreamable".
| regex = "%global dist.*" | ||
| replacement = "" | ||
|
|
||
| # TEMPORARILY remove release from the dependency on the shim unsigned packages |
There was a problem hiding this comment.
How do we capture that this is intended as a temporary workaround?
There was a problem hiding this comment.
Now captured explicitly: category = "azl-temp-workaround", upstream-status = "inapplicable", meant to be removed once the underlying release-management issue is resolved.
68938da to
f32ec72
Compare
| [[overlays]] | ||
| type = "spec-search-replace" | ||
| regex = "%global dist.*" | ||
| replacement = "" |
| [[overlays]] | ||
| type = "spec-search-replace" | ||
| regex = "^BuildRequires:.*unsignedx64.*$" | ||
| replacement = "BuildRequires: %{unsignedx64} = 15.8" |
| [[overlays]] | ||
| type = "spec-search-replace" | ||
| regex = "^BuildRequires:.*unsignedia32.*$" | ||
| replacement = "BuildRequires: %{unsignedia32} = 15.8" |
| [[overlays]] | ||
| type = "spec-search-replace" | ||
| regex = "^BuildRequires:.*unsignedaa64.*$" | ||
| replacement = "BuildRequires: %{unsignedaa64} = 15.8" |
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%prep" | ||
| lines = ["test -e %{shimdirx64}/$(basename %{shimefix64}) && cp -vf %{shimdirx64}/$(basename %{shimefix64}) %{shimefix64} ||:", "test -e %{shimdiria32}/$(basename %{shimefiia32}) && cp -vf %{shimdiria32}/$(basename %{shimefiia32}) %{shimefiia32} ||:", "test -e %{shimdiraa64}/$(basename %{shimefiaa64}) && cp -vf %{shimdiraa64}/$(basename %{shimefiaa64}) %{shimefiaa64} ||:"] |
|
|
||
| [metadata] | ||
| category = "azl-temp-workaround" | ||
| upstream-status = "upstreamable" |
| category = "azl-branding-policy" | ||
| upstream-status = "upstreamable" | ||
| commits = [{ url = "https://github.com/llvm/llvm-project/pull/200894" }] |
| category = "azl-branding-policy" | ||
| upstream-status = "upstreamable" | ||
| commits = [{ url = "https://github.com/llvm/llvm-project/pull/200894" }] |
| category = "azl-branding-policy" | ||
| upstream-status = "upstreamable" | ||
| commits = [{ url = "https://github.com/llvm/llvm-project/pull/200894" }] |
| @@ -1 +1 @@ | |||
| 0256227f5434d9e00d7c8501b16848efa400a72b | |||
| 830e6fed79750f8e24ae17cd630248f50c90c8a9 | |||
Thanks! This pushed me to re-audit every |
Migrate azl-compatibility components to the per-file overlay layout with file-level metadata. Each component's inline overlays -- along with their explanatory comments -- move into per-group overlays/*.overlay.toml files (one file per logical group, even for single-overlay components), and each file carries a [metadata] block with category, upstream-status, and commit references where applicable. Multi-category components get one file per group, each stamped with that group's own category. The comp.toml files are reduced to their bare [components.<name>] headers. Overlay values and apply order are preserved (validated as a structural no-op against 4.0). Components already migrated on the azl-pruning and overlay_metadata branches are skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sets default-component-config.overlay-files globally so the new *.overlay.toml files are exercised by PR checks. DO NOT MERGE — revert this commit before merging the PR.
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>
f32ec72 to
cc2980f
Compare
| upstream-status = "inapplicable" | ||
|
|
||
| [[overlays]] | ||
| type = "spec-search-replace" |
|
|
||
| # TEMPORARILY remove release from the dependency on the shim unsigned packages | ||
| [[overlays]] | ||
| type = "spec-search-replace" |
| replacement = "BuildRequires: %{unsignedx64} = 15.8" | ||
|
|
||
| [[overlays]] | ||
| type = "spec-search-replace" |
| replacement = "BuildRequires: %{unsignedia32} = 15.8" | ||
|
|
||
| [[overlays]] | ||
| type = "spec-search-replace" |
| upstream-status = "inapplicable" | ||
|
|
||
| [[overlays]] | ||
| type = "spec-append-lines" |
| upstream-status = "inapplicable" | ||
|
|
||
| [[overlays]] | ||
| type = "spec-append-lines" |
| # Install: copy headers_install output into RPM buildroot, replacing Fedora's copy logic. | ||
| # The exit 0 at the end short-circuits the original Fedora install logic. | ||
| [[overlays]] | ||
| type = "spec-prepend-lines" |
| @@ -1 +1 @@ | |||
| 0256227f5434d9e00d7c8501b16848efa400a72b | |||
| 830e6fed79750f8e24ae17cd630248f50c90c8a9 | |||
Summary
This PR migrates all
azl-compatibilityoverlay definitions to the per-file overlay layout with file-level metadata. This is a pure restructuring/annotation change — no overlay is added, removed, reordered, or semantically altered, and the rendered specs are byte-identical to 4.0.Complements the sibling PRs #17727, #17888. Components already migrated on those branches are skipped.
Changes
chore(comps): annotate azl-compatibility overlays with metadata
Migrates 27 components from inline
overlays = [...]in their.comp.tomlto per-groupoverlays/*.overlay.tomlfiles (42 new overlay files).[metadata]block withcategory(andupstream-status/ commit references where applicable). Multi-category components (apache-sshd, kernel-headers, mock-core-configs, rocm-compilersupport, rust, shim, unicode-ucd) get one file per logical change group, each stamped with that group's own category..comp.tomlcomments (including interior comments between overlay fields) are preserved verbatim into the overlay files; the.comp.tomlfiles are reduced to their bare[components.<name>]headers.azl-pruning/overlay_metadatabranches are skipped.azl-compatibility,azl-branding-policy,azl-release-management,azl-temp-workaround,azl-pruning,azl-platform-adaptation.TEMP: enable overlay-files loading for PR check —⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Sets
overlay-files = ["overlays/*.overlay.toml"]in the[default-component-config]ofbase/comps/components.toml, so every component inherits per-file overlay discovery (no per-component key needed) and the new*.overlay.tomlfiles are exercised by PR checks. Standalone so it can be reverted independently.chore(azldev): pin to 830e6fed and regenerate schema —⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Pins
.azldev-versionto830e6fed(upstream-backport category, URLRef replacing BugRef, requiredupstream-statusreplacing the oldupstreamableboolean,azl-dep-missing-workaround→azl-temp-workaroundrename, and optional component-group[metadata]) and regeneratesexternal/schemas/azldev.schema.jsonso PR checks run against a tool that understands the newoverlay-files/ metadata fields. Must be reverted before this PR merges.Validation
azldev comp list -aparses cleanly.comp renderin PR check passed.