AGENT SKILL

azldev 发行版构建指南

azldev

在运行 azldev 或编辑 azldev 配置之前,以及在包含 azldev.toml 文件的仓库中工作时,请先阅读本技能;切勿臆测 azldev 的命令或配置。本技能说明如何使用 azldev CLI 从 TOML 配置构建发行版(distro),包括核心概念(组件、覆盖层 overlays、发行版 distros、渲染后的规格 rendered specs、锁 locks)、运行 azldev 的方式(仓库根目录或 -C,以及 -q 和 -O json 参数)、常用命令,以及各工作流应参考的文档。触发场景包括 azldev、comp build、comp render、comp update、构建组件、添加组件、distro 配置。

License 许可
MIT
最近更新
2026-11-15
Stars
★ 5.4k
Forks
714

01 前言 Front Matter

name
azldev
description
Read this before running azldev or editing azldev config, and whenever working in a repo that contains an azldev.toml file; do not guess azldev's commands or config. Explains how to use the azldev CLI to build a distro from TOML config, including the core concepts (components, overlays, distros, rendered specs, locks), running azldev (repo root or -C, plus the -q and -O json flags), the common commands, and where to go for each workflow. Triggers include azldev, comp build, comp render, comp update, build a component, add a component, distro config.

03 SKILL.md 正文

Using azldev

azldev builds a Linux distribution from TOML configuration. It imports RPM specs from an upstream distro and customizes them with an overlay system — no spec forking. Components render to specs and sidecar build inputs, then build into RPMs; images assemble RPMs into bootable artifacts.

Orient yourself

  • Run azldev from the repo root (where azldev.toml lives), or pass -C <dir>.
  • Global, agent-friendly flags: -q (quiet) and -O json (machine-readable output). They work on every command.
  • Config is a stitched TOML hierarchy: azldev.toml includes the distro and project config, which include the component files (**/*.comp.toml) into one namespace.

Core concepts

  • Component — a unit of packaging that renders to a spec and sidecar build inputs, then builds into one or more RPMs. Its spec source is upstream (default), a pinned upstream distro/version, or a local spec.
  • Overlay — a semantic patch applied to a spec or source file at render time, so you customize upstream without forking it.
  • Distro — a named build target (*.distro.toml) with upstream URIs, release versions, and build inputs.
  • Rendered spec — the generated .spec after overlays; a build input, never hand-edited.
  • Lock — a per-component file pinning the resolved upstream commit and an input fingerprint.

Common commands

Top-level commands in this build:

  • azldev completion — Generate the autocompletion script for the specified shell
  • azldev component — Manage components
  • azldev config — Manage tool configuration
  • azldev docs — Documentation commands
  • azldev image — Manage Azure Linux images
  • azldev package — Manage binary package configuration
  • azldev project — Manage Azure Linux projects
  • azldev repo — Inspect and manage RPM repositories
  • azldev version — Print the CLI version

Everyday tasks (add -q -O json when scripting):

Task Command
List components azldev comp list -a
Inspect one component azldev comp list -p <name>
Add a component azldev comp add
Build a component azldev comp build -p <name>
Render specs azldev comp render -p <name> (or -a)
Refresh a lock azldev comp update -p <name>
List / build images azldev image list / azldev image build

comp is an alias for component. Always confirm current syntax with azldev <command> --help.

The hidden advanced group (adv) contains specialist integrations such as MCP and mock helpers; it is intentionally omitted from normal help.

Where to go next

  • Add a new component — read the azldev-add-component skill.
  • Edit or review a component's TOML — read the azldev-comp-toml skill.
  • Add or change overlays — read the azldev-overlays skill.
  • Annotate an overlay's intent (category, upstream status, provenance) — read the azldev-overlay-metadata skill.
  • Build, iterate, and debug a component — read the azldev-build-component skill.
  • Build, boot, and register images — read the azldev-image skill.
  • Refresh a lock and finalize for a PR — read the azldev-update-component skill.
  • Remove a component — read the azldev-remove-component skill.
  • Test built RPMs in a chroot — read the azldev-mock skill.

Golden rules

  • Never edit generated output — rendered specs and the output/work/log dirs are produced by azldev. Change the source config and re-render.
  • Re-run azldev comp update before opening a PR — the lock fingerprint covers the whole component config, and lock / rendered-spec CI checks run on committed state.
  • Every overlay needs a description explaining why the change is needed.

Generated by azldev docs agent; do not hand-edit.

04 同仓库更多 Skills

microsoft
microsoft/azurelinux

AKS 节点指标查询

skill-metrics

[技能] metrics、azure-monitor、aks——查询 Azure Monitor 指标,包括 Koji AKS 节点的 CPU、内存、磁盘使用率以及 Pod 就绪状态。

SRE 工程师运维监控与告警
★ 5.4k
microsoft
microsoft/azurelinux

构建失败批量分诊

skill-mass-triage

[技能] 从 JSON 结果文件中批量分诊构建失败——使用并行子代理进行诊断,按根因分类归纳,并生成汇总报告。当被要求对 Koji 结果文件进行分诊时使用。触发词:批量分诊、大规模分诊、分诊结果文件、按类别归纳失败。

测试工程师调试与故障排查
★ 5.4k
microsoft
microsoft/azurelinux

KQL 日志查询模板

skill-kql-queries

[技能] kql、queries、log analytics、container logs —— 通过 Log Analytics 提供 KQL 查询模板,用于查询 Koji 容器日志、pod 错误、重启、Kubernetes 事件、构建作业活动及节点资源使用情况。

SRE 工程师运维监控与告警
★ 5.4k
microsoft
microsoft/azurelinux

Koji 构建故障分诊

skill-koji-triage

[技能] 检查 Koji 构建,从 Koji Web UI 获取任务信息与日志,识别失败并提供根因分析。在分诊 Koji 构建失败、调查失败任务、下载构建日志或搜索损坏软件包时使用。触发词:koji failure、koji build failed、koji task、koji log、koji triage、build failure analysis。

SRE 工程师调试与故障排查
★ 5.4k
microsoft
microsoft/azurelinux

Fedora 镜像依赖注入修复

skill-fedora-mirror-injections

[技能] 诊断 Azure Linux Stage 1(bootstrap-mirror)的 BuildRequires 解析失败,并通过 azl-infra 注入文件将缺失的 RPM 回填到生产 Fedora 更新镜像。在分诊 stage-1 / azl4-bootstrap-mirror 构建失败、排查 Fedora 镜像中的依赖缺口、判断失败究竟是真正的镜像缺口还是瞬时超时或 spec 缺陷、向 azl4-stage1-injections.yaml 添加条目,或提交带镜像注入的 PR 时使用。触发词:bootstrap-mirror、stage 1 build failure、fedora mirror gap、missing BuildRequires、nothing provides crate、no match for argument、injections file、azl4-stage1-injections、mirror injection。

SRE 工程师调试与故障排查
★ 5.4k
microsoft
microsoft/azurelinux

AKS 部署上下文解析

skill-deployment-context

[技能] deployment context、aks、azure、koji —— 解析 Koji AKS 部署上下文,包括资源组、集群名称、订阅、Log Analytics 工作区及监控资源名称:优先从 deployment_summary.yaml 获取(若可用),否则从 Azure 动态发现。

SRE 工程师部署与发布管理
★ 5.4k