azldev-overlay-metadata
它能做什么
这项技能说明如何用类别、上游状态和链接记录每个覆盖层存在的原因。它适用于维护 azldev 发行版中软件包补丁的开发者。
适用场景
- ✓当你添加覆盖层,需要记录它存在的原因时。
- ✓当审查覆盖层元数据,确认其类别和上游状态是否正确时。
- ✓当多个覆盖层属于同一个逻辑变更,需要共享一份记录时。
技能链接
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-overlay-metadata/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我添加了三个覆盖层,用来从构建中移除一个 CVE 修复。请帮我编写元数据,把它们记录为同一项变更。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会选择必需的类别和上游状态,添加参考链接,并把相关的覆盖层归入同一个元数据块。元数据只是文档,不会改变已构建的软件包。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Overlay metadata — pick a category and annotate
Every overlay documents why it exists (description, required) and what class
of change it is (metadata). When a [metadata] block is present it requires both
a category and an upstream-status. This skill covers how to pick the right values,
attach provenance, and write the TOML at the moment you author or review an overlay.
Metadata is pure documentation — it never changes the rendered spec and is excluded
from component fingerprints, so adding or editing it never invalidates build caches or
locks. For overlay types and the render-and-inspect loop, read the azldev-overlays
skill; this skill is only about the metadata table.
One [metadata] block = one logical change
A single logical change (a CVE backport, a feature disablement, a Fedora cherry-pick)
may need several overlays — e.g. remove a sub-package and drop the configure flags
that went with it. The per-file overlay format (overlay-files) captures exactly this:
one top-level [metadata] table and one or more [[overlays]] entries it applies to.
Per-overlay metadata inside an overlay file is rejected — the file-level block is
the single source of truth.
So: if you find yourself stamping the same metadata on several inline overlays, that is
a signal they are one logical change — move them into a single overlay file with one
[metadata] block.
When to add metadata
- New overlay (any inline
[[components.<name>.overlays]]block or[[overlays]]entry in an overlay file): addmetadatawith both acategoryand anupstream-status. - An overlay's intent changed (e.g. a prune becomes a backport): update the
categoryandupstream-statusto match the new intent.
Step 1 — Pick the category
Choose exactly one category from this closed set (authoritative — matches
metadata.category in the schema):
category |
Use when the overlay… | Extra required/expected fields |
|---|---|---|
upstream-backport |
Backports a fix from an upstream source (Fedora dist-git or the component's OSS project) that AZL will inherit once it bumps past the fix. Self-resolves on version bump. | commits (≥1 upstream commit URL) — required. upstream-status must be upstreamed or upstreamable. |
azl-pruning |
Removes content for AZL: unshipped deps, unneeded features, sub-packages, or files. | — |
azl-compatibility |
Adapts a component to how Azure Linux is built and shipped — build tooling, buildroot, infrastructure, runtime ecosystem — when upstream builds/behaves incorrectly for AZL-specific reasons that are not branding, a missing dependency, architecture, or tests (e.g. azldev downloader quirks, rpmdiff reproducibility, buildroot gaps, Fedora version-skew). |
— |
azl-temp-workaround |
Temporary workaround explicitly intended to be dropped once an upstream or environmental fix lands. Covers a dependency not yet imported into AZL (or unavailable on a target) and any other transient workaround waiting on an external change. | — |
azl-branding-policy |
Fedora→Azure Linux identity differences: intentional name/path/vendor conventions and spec fixes for upstream code that hard-codes Fedora identity strings (e.g. _vendor=redhat, <cpu>-redhat-linux[-gnu] triples, redhat-linux-build dirs). Also covers repointing a Source/URL tag from a Fedora mirror to an Azure Linux one (e.g. azurelinux-rpm-config, golang). |
— |
azl-disable-flaky-tests |
Skips tests that fail intermittently / due to environmental flakiness, not a real component bug. | — |
azl-disable-unsupported-tests |
Skips tests that cannot meaningfully run in AZL's build/runtime env (need network, root, or unavailable hardware in mock). | — |
azl-security-compliance |
Makes FIPS or crypto-policy changes. | — |
azl-release-management |
Adjusts release-tag / changelog mechanics. | — |
azl-platform-adaptation |
Makes architecture-specific adjustments. | — |
Disambiguation tips
- Backport vs. compatibility/pruning: if the exact change exists as a commit in Fedora
dist-git or the upstream project, it is
upstream-backport(supplycommits, withupstream-statusofupstreamedorupstreamable). Use anazl-*category only when the change is AZL-specific with no upstream equivalent. - Pruning vs. temp-workaround: removing a dependency we deliberate
常见问题
元数据会改变构建好的软件包吗?
不会。技能说明,元数据只是文档,并且会被排除在构建缓存之外。
类别和状态是必需的吗?
是的。技能说明,元数据块必须同时包含类别和上游状态。
每个覆盖层都可以有自己的元数据吗?
不可以。技能说明,覆盖层文件中的单个覆盖层元数据会被拒绝,因此以文件级别的元数据块为唯一来源。
详情
作者的原始描述
Read this before adding or reviewing an overlay `metadata` table; do not guess the category or upstream status from memory. Explains the overlay metadata schema that documents why an overlay exists and when it can be dropped, covering the required category and upstream-status values, commit/bug URL references, and the per-file overlay metadata block. Triggers include overlay metadata, category, upstream-status, upstream-backport, azl-pruning, azl-branding-policy, needs-upstream-hook, why overlay.
repo: microsoft/azurelinux
热度
- GitHub 星标
- 5.4k
- 排名
- #14965
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
azldev-add-component
5.4k帮你的智能体把新的软件组件添加到 azldev Linux 发行版构建中,从检查上游规格文件(spec)到验证结果。
azldev-build-component
5.4k帮你的智能体构建和调试 azldev 软件包,包括渲染、构建和测试循环,以及修复失败的构建检查。
azldev-comp-toml
5.4k帮你的智能体编写、编辑和审查 azldev 用来描述每个软件包如何构建的组件定义文件。
azldev-image
5.4k帮你的智能体使用 azldev 镜像命令构建、启动和测试 Linux 镜像,例如容器镜像或虚拟机镜像。