chore(comps): annotate overlays in multiple categories with metadata#17888
chore(comps): annotate overlays in multiple categories with metadata#17888liunan-ms wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR continues a multi-PR effort to annotate Azure Linux overlays with structured provenance [metadata] and migrate them from inline [[components.<name>.overlays]] / overlays = [...] definitions into the per-file overlays/*.overlay.toml layout. It covers 30 components spanning five overlay-classifier categories (azl-branding-policy, azl-dep-missing-workaround, azl-platform-adaptation, azl-release-management, azl-security-compliance), and is intended to be a pure restructuring/annotation change with rendered specs byte-identical to 4.0. It complements sibling PRs #17727, #17886, and #17887.
Changes:
- Moves each component's overlays into
overlays/*.overlay.tomlfiles carrying a file-level[metadata]block (category+upstreamable), preserving original comments; regex literals are re-escaped for basic strings andsourcepaths rewritten to../(relative to the overlay file). - Two temporary "PR-CHECK ONLY, REVERT BEFORE MERGE" scaffolding changes: sets an inherited
overlay-filesin the 4.0 stage1/stage2default-component-config, and pins.azldev-versionto35d8fae+ regenerates the JSON schema (addsOverlayMetadata,overlay-files,resources, etc.). - Migration verified as byte-identical: regex escaping, source-path rewrites, and per-component overlay counts are all preserved (spot-checked across selinux-policy, openssl, chrony, java-25-openjdk, kernel, azurelinux-rpm-config, and others).
The only issue found is cosmetic: the kernel overlay file's conversion of triple-quoted multi-line replacement strings into single-line \n strings left behind stray trailing fragment lines. They are inert TOML comments (render output is unaffected) but should be cleaned up.
Reviewed changes
Copilot reviewed 65 out of 65 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| external/schemas/azldev.schema.json | Regenerated schema: adds OverlayMetadata, overlay-files, BugRef, resources/DistroVersionInputs defs (temp, revert-before-merge) |
| distro/azurelinux.distro.toml | Adds inherited overlay-files to 4.0 stage1/stage2 default-component-config (temp, revert-before-merge) |
| .azldev-version | Pins azldev to 35d8fae (temp, revert-before-merge) |
| base/comps/kernel/overlays/0001-azl-kernel-customizations.overlay.toml | Migrated kernel overlays; contains stray """ fragment lines from the multi-line→single-line conversion |
| base/comps/kernel/kernel.comp.toml | Inline kernel overlays removed (moved to overlay file) |
| base/comps/azurelinux-rpm-config/* | Inline overlays = [...] array migrated to per-file layout; source rewritten to ../dist.sh |
| base/comps/{shim-unsigned-x64,shim-unsigned-aarch64,rust-dlwrap,gd,java-25-openjdk}/* | azl-release-management overlays migrated |
| base/comps/{anaconda-webui,chrony,realmd,rpm}/* | azl-branding-policy overlays migrated |
| base/comps/{erlang-rebar3,golang-,libnbd,migrate,nbdkit,pyOpenSSL}/ | azl-dep-missing-workaround overlays migrated |
| base/comps/{openbios,rust-nix,rust-nix0.23/0.28/0.29/0.30,selinux-policy,vmaf}/* | azl-platform-adaptation overlays migrated; patch source rewritten to ../ |
| base/comps/{firewalld,openfec,openssl}/* | azl-security-compliance overlays migrated |
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.
|
|
||
| [metadata] | ||
| category = "azl-branding-policy" | ||
| upstreamable = false |
There was a problem hiding this comment.
Should absolutely be upstreamed.
There was a problem hiding this comment.
Changes to upstreamed and added commits.
| @@ -0,0 +1,21 @@ | |||
| [metadata] | |||
| category = "azl-branding-policy" | |||
There was a problem hiding this comment.
I don't think this is a fair use of branding-policy as a category.
There was a problem hiding this comment.
This chrony overlay enables confdir /etc/chrony.d and ships the dir, this should be a runtime-ecosystem/shipping adaptation and better fit in azl-compatibility ("Adapting a component to how Azure Linux is built and shipped, its build tooling, buildroot, infrastructure, and runtime ecosystem.")
| # broken erlang-rebar3 3.26.0 in the build tag. The latest upstream commit | ||
| # disabled bootstrap (since Fedora already has a working 3.27.0), but AZL | ||
| # doesn't yet. | ||
| # TODO: Remove this overlay once rebar3 3.27.0 is in the AZL build tag. |
There was a problem hiding this comment.
How do we capture that this is a temporary workaround that needs action?
There was a problem hiding this comment.
Now all the azl-temp-workaround need one of these actions:
- drop the overlays once upstream or environmental fix is available
- upstream the existing fix
- switch to a better fix
This overlay is set to azl-temp-workaround in #17973.
| @@ -0,0 +1,10 @@ | |||
| [metadata] | |||
| category = "azl-dep-missing-workaround" | |||
| upstreamable = false | |||
There was a problem hiding this comment.
Is this a legit upstream issue, then?
There was a problem hiding this comment.
golang-github-envoyproxy-control-plane is also a dead package, so this overlay is a temporary workaround for azl and not upstreamable. I move this overlays to azl-temp-workaround in #17973
| @@ -0,0 +1,276 @@ | |||
| # Insert version and release information from the component defines into the spec file, and update the source URL to match the AzureLinux kernel source structure | |||
There was a problem hiding this comment.
I get that we might not want to in this PR, but can we file a bug to break this up? This is definitely crying out for multiple .overlay.toml files.
There was a problem hiding this comment.
This overlay is now split into 7 per-logical-change files, each with its own category.
| @@ -0,0 +1,9 @@ | |||
| [metadata] | |||
| category = "azl-dep-missing-workaround" | |||
There was a problem hiding this comment.
How are we deciding when to use dep-missing-workaround vs. prune? I'm not sure I have a good mental model.
There was a problem hiding this comment.
The main difference between azl-pruning and azl-temp-workaround (formerly azl-dep-missing-workaround) is azl-pruning is permanent changes that remove content that upstream ships but AZL doesn't want/support (a subpackage, a patch, a BuildRequires we deliberately drop), and azl-temp-workaround is temporary workaround that should be removed once an upstream or environmental fix lands. or we have a better fix.
Add [metadata] blocks (category + upstream-status) to overlay files: - rpm/0001-customize-rpm-vendor: azl-branding-policy / inapplicable - azurelinux-rpm-config/0001: azl-branding-policy / inapplicable - realmd/0001-set-distro-redhat: azl-compatibility / inapplicable - chrony/0001-enable-confdir-at-etc: azl-compatibility / inapplicable - anaconda-webui/0001-remove-requires-fedora-logos: azl-branding-policy / upstreamed
Annotate security/compliance overlays with [metadata] (category + upstream-status): - openssl/0001-remove-fips-openssl-supported: azl-security-compliance / inapplicable - firewalld/0001-remove-fedora-patch-opens: azl-security-compliance / inapplicable - openfec/0001-suppress-debuginfo-subpackages-global: azl-security-compliance / inapplicable
Annotate release-management overlays with [metadata] (category + upstream-status): - gd/0001-bump-release-avif-removal: azl-release-management / inapplicable - java-25-openjdk/0001-add-release-upstream-rpmrelease: azl-release-management / inapplicable
Recategorize transient release-bump workarounds from azl-release-management to azl-temp-workaround (category + upstream-status): - rust-dlwrap/0001-bump-release-force-rebuild: azl-temp-workaround / inapplicable (Stage2 bring-up) - shim-unsigned-aarch64/0001-release-management-change: azl-temp-workaround / inapplicable (nightly-tag rebuild) - shim-unsigned-x64/0001-release-management-change: azl-temp-workaround / inapplicable (nightly-tag rebuild)
Add [metadata] blocks (category + upstream-status) to overlay files, and split the monolithic kernel overlay into per-logical-change files: - kernel/0001-azl-kernel-version-macros: azl-release-management / inapplicable - kernel/0002-azl-kernel-source: azl-branding-policy / inapplicable - kernel/0003-skip-fedora-process-configs: azl-compatibility / inapplicable - kernel/0004-disable-redhat-sources-patches: azl-pruning / inapplicable - kernel/0005-azl-kernel-configs: azl-compatibility / inapplicable - kernel/0006-kmod-nvidia-open-framework: azl-compatibility / inapplicable - kernel/0007-azl-changelog: azl-release-management / inapplicable - openbios/0001-restrict-build-x86-64: azl-compatibility / inapplicable - rust-nix/0001-add-patch-file-handle: azl-compatibility / upstreamable - rust-nix/0002-skip-inotify-tests-fail: azl-disable-unsupported-tests / inapplicable - rust-nix0.23/0001-add-patch-file-handle: azl-compatibility / upstreamable - rust-nix0.28/0001-add-patch-file-handle: azl-compatibility / upstreamable - rust-nix0.29/0001-add-patch-file-handle: azl-compatibility / upstreamable - rust-nix0.30/0001-add-patch-file-handle: azl-compatibility / upstreamable - selinux-policy/0001-remove-tmpfiles-write-sys: azl-compatibility / unknown - vmaf/0001-make-vmaf-models-arch: azl-temp-workaround / inapplicable
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>
a2d0bf0 to
96ff9fa
Compare
| @@ -1 +1 @@ | |||
| 0256227f5434d9e00d7c8501b16848efa400a72b | |||
| 830e6fed79750f8e24ae17cd630248f50c90c8a9 | |||
| # Set the component's name. | ||
|
|
||
| [metadata] | ||
| category = "azl-branding-policy" |
| category = "azl-branding-policy" | ||
| upstream-status = "inapplicable" | ||
|
|
||
| [[overlays]] |
| [[overlays]] | ||
| type = "spec-update-tag" | ||
| tag = "Release" | ||
| value = "2%{?dist}" | ||
|
|
||
| # Workaround: create a compat symlink that does not include the dist tag. | ||
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%install" | ||
| lines = ["ln -s %{version}-%{release} %{buildroot}%{_datadir}/shim/%{version}-2"] | ||
|
|
||
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%files" | ||
| lines = ["%{_datadir}/shim/%{version}-2"] |
| [[overlays]] | ||
| type = "spec-update-tag" | ||
| tag = "Release" | ||
| value = "2%{?dist}" | ||
|
|
||
| # Workaround: create a compat symlink that does not include the dist tag. | ||
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%install" | ||
| lines = ["ln -s %{version}-%{release} %{buildroot}%{_datadir}/shim/%{version}-2"] | ||
|
|
||
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%files" | ||
| lines = ["%{_datadir}/shim/%{version}-2"] |
Summary
This PR migrates a further set of overlay definitions to the per-file overlay layout with file-level
[metadata](category+upstream-status), covering theazl-branding-policy,azl-security-compliance,azl-release-management,azl-temp-workaround, andazl-platform-adaptationclassifier groups. 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, #17886, #17887, #17973. Components already migrated on those branches are skipped.
Changes
22 components migrated across five per-group commits (one commit per classifier theme for easy review/grouping). Each overlay file carries the category that fits its specific change.
Overlay count by category:
azl-compatibilityazl-branding-policyazl-release-managementazl-temp-workaroundazl-security-complianceazl-pruningazl-disable-unsupported-testsTwo supporting commits:
overlay-files = ["overlays/*.overlay.toml"]in the[default-component-config]inbase/comps/components.toml, so every component inherits per-file overlay discovery (no per-component key needed). Standalone so it can be reverted independently..azldev-versionto830e6fed79750f8e24ae17cd630248f50c90c8a9(adds theupstream-backportcategory,URLRefreplacingBugRef, requiredupstream-statusmetadata replacing the oldupstreamableboolean, renamesazl-dep-missing-workaround→azl-temp-workaround, and adds an optional[metadata]block on component groups) and regeneratesexternal/schemas/azldev.schema.jsonso PR checks run against a tool that understands the new overlay metadata model. Must be reverted before this PR merges.Validation
azldev comp list -aparses cleanly.azldev comp render(Check Rendered Specs PR check) produces specs identical to 4.0.