Skip to content

chore(comps): annotate overlays in multiple categories with metadata#17888

Open
liunan-ms wants to merge 7 commits into
4.0from
liunan/azl-annotations
Open

chore(comps): annotate overlays in multiple categories with metadata#17888
liunan-ms wants to merge 7 commits into
4.0from
liunan/azl-annotations

Conversation

@liunan-ms

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

Copy link
Copy Markdown
Contributor

Summary

This PR migrates a further set of overlay definitions to the per-file overlay layout with file-level [metadata] (category + upstream-status), covering the azl-branding-policy, azl-security-compliance, azl-release-management, azl-temp-workaround, and azl-platform-adaptation classifier 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:

Category Overlays
azl-compatibility 12
azl-branding-policy 4
azl-release-management 4
azl-temp-workaround 4
azl-security-compliance 3
azl-pruning 1
azl-disable-unsupported-tests 1
Total 29

Two supporting commits:

  • chore(comps): add default overlay-files glob⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE. Temporary. Sets overlay-files = ["overlays/*.overlay.toml"] in the [default-component-config] in base/comps/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. Temporary. Pins .azldev-version to 830e6fed79750f8e24ae17cd630248f50c90c8a9 (adds the upstream-backport category, URLRef replacing BugRef, required upstream-status metadata replacing the old upstreamable boolean, renames azl-dep-missing-workaroundazl-temp-workaround, and adds an optional [metadata] block on component groups) and regenerates external/schemas/azldev.schema.json so PR checks run against a tool that understands the new overlay metadata model. Must be reverted before this PR merges.

Validation

  • ✅ Structural no-op: every migrated component's reconstructed overlay list is byte-identical to 4.0.
  • azldev comp list -a parses cleanly.
  • azldev comp render (Check Rendered Specs PR check) produces specs identical to 4.0.

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 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.toml files carrying a file-level [metadata] block (category + upstreamable), preserving original comments; regex literals are re-escaped for basic strings and source paths rewritten to ../ (relative to the overlay file).
  • Two temporary "PR-CHECK ONLY, REVERT BEFORE MERGE" scaffolding changes: sets an inherited overlay-files in the 4.0 stage1/stage2 default-component-config, and pins .azldev-version to 35d8fae + regenerates the JSON schema (adds OverlayMetadata, 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

Comment thread base/comps/kernel/overlays/0001-azl-kernel-customizations.overlay.toml Outdated
@liunan-ms liunan-ms marked this pull request as ready for review July 2, 2026 05:19
@liunan-ms liunan-ms requested a review from a team as a code owner July 2, 2026 05:19

@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.


[metadata]
category = "azl-branding-policy"
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.

Should absolutely be upstreamed.

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.

Changes to upstreamed and added commits.

@@ -0,0 +1,21 @@
[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.

I don't think this is a fair use of branding-policy as a 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 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.

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 capture that this is a temporary workaround that needs action?

@liunan-ms liunan-ms Jul 11, 2026

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.

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

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 a legit upstream issue, then?

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.

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

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.

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.

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

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 are we deciding when to use dep-missing-workaround vs. prune? I'm not sure I have a good mental model.

@liunan-ms liunan-ms Jul 11, 2026

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 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.

liunan-ms and others added 7 commits July 10, 2026 23:59
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>
Copilot AI review requested due to automatic review settings July 11, 2026 00:15
@liunan-ms liunan-ms force-pushed the liunan/azl-annotations branch from a2d0bf0 to 96ff9fa Compare July 11, 2026 00:15

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 54 out of 54 changed files in this pull request and generated 5 comments.

Comment thread .azldev-version
@@ -1 +1 @@
0256227f5434d9e00d7c8501b16848efa400a72b
830e6fed79750f8e24ae17cd630248f50c90c8a9
# Set the component's name.

[metadata]
category = "azl-branding-policy"
category = "azl-branding-policy"
upstream-status = "inapplicable"

[[overlays]]
Comment on lines +8 to +22
[[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"]
Comment on lines +8 to +22
[[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"]
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