chore(comps): annotate backport overlays with category metadata#17727
chore(comps): annotate backport overlays with category metadata#17727liunan-ms wants to merge 5 commits into
Conversation
| replacement = "" | ||
| # Overlays live as one-logical-change-per-file under ./overlays/. | ||
| # See https://github.com/microsoft/azure-linux-dev-tools/blob/main/docs/user/reference/config/overlays.md#per-file-overlay-format-overlaytoml | ||
| overlay-dir = "overlays" |
There was a problem hiding this comment.
It would be great to update the AI instructions to explain when to use this pattern vs. not, and what sort of data to add to each overlay.
There was a problem hiding this comment.
Yes, I'll add a SKILL.md for sorting out the existing overlays and add suggested annotations for new overlays.
93c3e9b to
e29cdb5
Compare
23ed86c to
4107a39
Compare
Stamp 'category=backport-fedora' (plus 'commits', 'fixed-in', and 'removable-after' where available) on all backport overlays surfaced by the overlay classifier. Migrate cpio, gnulib, javapackages-tools, qemu, and zbar to the per-file 'overlay-dir' layout so the shared metadata lives once in a file-level [metadata] block. Rendered specs are byte-identical and 'azldev comp update' reports no lock drift.
Add category/commits metadata to backport-dist-git overlays across components, renaming the category from backport-fedora to backport-dist-git and dropping the removed fixed-in/removable-after fields. Migrate apache-ivy and cloud-init to the per-file overlay-dir layout. Metadata-only changes; rendered specs are unchanged.
There was a problem hiding this comment.
Pull request overview
This PR annotates the Azure Linux overlays previously flagged by the overlay classifier with structured metadata (a category plus upstream commits/pr/bugs), so future Fedora rebases can mechanically identify and retire backported overlays once they land upstream. It also bumps the pinned azldev version to one that understands these annotations and a new per-file overlay layout.
Changes:
- Inline annotations (17 components): add a
[components.<name>.overlays.metadata]block to existing single-/few-overlay.comp.tomlfiles. Note these attach per-overlay (to the immediately preceding overlay), which is used deliberately in some files (e.g.sos,sssd) but is inconsistent inxbean. - Per-file migration (7 components):
cpio,gnulib,javapackages-tools,qemu,zbar,apache-ivy,cloud-initmove inline overlays intooverlays/*.overlay.tomlfiles (top-level[metadata]+[[overlays]], withsourcepaths rewritten to../to point back at the component root).qemualso consolidates per-section subpackage removals intospec-remove-subpackage(verified output-equivalent against the rendered spec). .azldev-versionbump to enable the newoverlay-files/metadatafeatures; the committed authoritative schema was not regenerated to match.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.azldev-version |
Bumps pinned azldev to a version supporting overlay-files/metadata; committed schema not regenerated (flagged). |
base/comps/{ant,atlas,glade,gt,intel-qpl,maven,maven4,xclock,xmvn,xmvn5}/*.comp.toml |
Single-overlay inline metadata annotations (correct attachment). |
base/comps/{sos,sssd,kdump-utils,rust-podman-sequoia,vamp-plugin-sdk}/*.comp.toml |
Multi-overlay inline metadata with distinct per-overlay commits (correct). |
base/comps/xbean/xbean.comp.toml |
Inline metadata; remove/add openjdk retarget pair annotated inconsistently (flagged). |
base/comps/cpio/* |
Migrated to per-file overlay; rmt BR drop annotated. |
base/comps/gnulib/* |
Migrated; temporary Source-URL backport annotated. |
base/comps/javapackages-tools/* |
Migrated; openjdk21-drop multi-commit backport consolidated. |
base/comps/qemu/* |
Migrated to 4 overlay files; subpackage removals consolidated to spec-remove-subpackage (output-equivalent). |
base/comps/zbar/* |
Migrated; GIR-drop (backport) and video-disable (pruning) split into two files. |
base/comps/apache-ivy/* |
Migrated; 0001 overlays lack required description fields (flagged nit). |
base/comps/cloud-init/* |
Migrated to 3 overlay files (cpe-fix, azl4 patch series, branding); ../ source paths point at component-root patches. |
| @@ -1 +1 @@ | |||
| 0256227f5434d9e00d7c8501b16848efa400a72b | |||
| 1516af28ef70edbf0b031567be1be93503d1f85a No newline at end of file | |||
| [components.xbean.overlays.metadata] | ||
| category = "backport-dist-git" | ||
| commits = ["https://src.fedoraproject.org/rpms/xbean/c/1df289d87c3617482e813a5dac348b01c67d271f"] |
| [[overlays]] | ||
| type = "file-add" | ||
| file = "IMPROVEMENT-use-Apache-Commons-Compress-for-pack200-.patch" | ||
| source = "../IMPROVEMENT-use-Apache-Commons-Compress-for-pack200-.patch" |
Bump .azldev-version to 1516af28ef70edbf0b031567be1be93503d1f85a, which
adds the inline [metadata] block and per-file overlay-files support.
Align overlay config with the new format:
- Replace overlay-dir with overlay-files = ["overlays/*.overlay.toml"]
(cpio, zbar, apache-ivy, javapackages-tools, cloud-init, gnulib)
- Rename retired categories azl-feature-disablement and
azl-dependency-pruning to azl-pruning
- Replace unsupported metadata fields: bug -> bugs (list of {url=...}),
drop pr field (not part of the metadata schema)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4107a39 to
13381f7
Compare
| [components.xbean.overlays.metadata] | ||
| category = "backport-dist-git" | ||
| commits = ["https://src.fedoraproject.org/rpms/xbean/c/1df289d87c3617482e813a5dac348b01c67d271f"] |
| @@ -1 +1 @@ | |||
| 0256227f5434d9e00d7c8501b16848efa400a72b | |||
| 1516af28ef70edbf0b031567be1be93503d1f85a No newline at end of file | |||
| [components.xbean.overlays.metadata] | ||
| category = "backport-dist-git" | ||
| commits = ["https://src.fedoraproject.org/rpms/xbean/c/1df289d87c3617482e813a5dac348b01c67d271f"] |
| [[overlays]] | ||
| type = "file-add" | ||
| file = "IMPROVEMENT-use-Apache-Commons-Compress-for-pack200-.patch" | ||
| source = "../IMPROVEMENT-use-Apache-Commons-Compress-for-pack200-.patch" |
📄❌ Rendered specs are out of dateFIX: — run this and commit the result: azldev component render -a --clean-staleOr download the fix patch and apply it: gh run download 28404686923 -R microsoft/azurelinux -n rendered-specs-patch
git apply rendered-specs.patch
Files to addThese files are produced by
Files to removeThese files are in your branch but are not produced by render. Remove them.
… and 22 more file(s). |
Annotate every overlay in the backport-dist-git category with the new file-level [metadata] format (category, upstreamable, verified upstream commits) and migrate all 22 components to the per-file overlay layout. overlay-files is now declared once in the project-wide default-component-config (base/comps/components.toml) as ["overlays/*.overlay.toml"] and inherited by every component, instead of being set per comp.toml. Each component's overlays move into overlays/*.overlay.toml files (one logical change per file), including single-overlay components. Mixed-category components (apache-ivy, cloud-init, grub2, sssd, zbar) move all overlays into files so apply order is preserved. Pure annotation/restructuring: verified byte-identical post-overlay sources for all components via prepare-sources, and no lock drift via comp update. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The per-file overlay migration relies on inheriting overlay-files from the project-level default-component-config. That inheritance is only supported as of azldev 4b5f72c (fix(overlays): expand overlay files after config resolution). The pin was left at 1516af2, which rejects overlay-files on default-component-config, breaking the config-load step in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| # All gnulib overlays live one-logical-change-per-file under ./overlays/. | ||
| # See https://github.com/microsoft/azure-linux-dev-tools/blob/main/docs/user/reference/config/overlays.md#per-file-overlay-format | ||
| overlay-files = ["overlays/*.overlay.toml"] |
| [[overlays]] | ||
| type = "file-add" | ||
| file = "IMPROVEMENT-use-Apache-Commons-Compress-for-pack200-.patch" | ||
| source = "../IMPROVEMENT-use-Apache-Commons-Compress-for-pack200-.patch" |
| [metadata] | ||
| category = "azl-pruning" | ||
| upstreamable = false |
| [default-component-config] | ||
| overlay-files = ["overlays/*.overlay.toml"] |
This PR annotates all 24 components surfaced by the overlay classifier as
category = "backport-dist-git", attachingcommitsso future Fedora rebases can mechanically retire patches that have landed upstream.What changed
Inline annotations (17 components): ant, atlas, glade, gt, intel-qpl, maven, maven4, sos, xbean, xclock, xmvn, xmvn5, kdump-utils, rust-podman-sequoia, sssd, vamp-plugin-sdk, xbean, xsimd — added file-level
[metadata]blocks on existing single-overlay .comp.toml files.Per-file overlay-dir migration (7 components): cpio, gnulib, javapackages-tools, qemu, zbar, apache-ivy, cloud-init — split inline overlays into per-logical-change
*.overlay.tomlfiles so the shared metadata lives once per backport. Multi-commit backports (e.g.javapackages-tools openjdk21 drop) consolidate related upstream commits into a single file viacommits = [url1, url2, …].Note:
qemuhasazl-feature-disablementoverlays instead of backport, adding its annotations as an example of annotations for other categories.Validation
azldev comp updatereports no lock drift.azldev component metadata -a --only-annotated(feat(component): add overlay metadata and 'component metadata' command azure-linux-dev-tools#242)