azldev-build-component
Read this before building a component or diagnosing a build failure; do not guess build flags or the inner loop. Explains how to build, iterate on, and debug an azldev component, covering comp build flags (local-repo, preserve-buildenv), the render/build/test inner loop, diff-sources, and disabling a failing %check via check.skip. Triggers include build component, build failed, build error, inner loop, preserve buildenv, local repo, disable check.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 5.4k
- Forks
- 714
01 前言 Front Matter
- name
- azldev-build-component
- description
- Read this before building a component or diagnosing a build failure; do not guess build flags or the inner loop. Explains how to build, iterate on, and debug an azldev component, covering comp build flags (local-repo, preserve-buildenv), the render/build/test inner loop, diff-sources, and disabling a failing %check via check.skip. Triggers include build component, build failed, build error, inner loop, preserve buildenv, local repo, disable check.
03 SKILL.md 正文
Build and debug a component
Never install built RPMs on your host — they target the distro, not your dev
machine. Test them in a chroot with the azldev-mock skill. Building and testing are separate
steps: azldev comp build produces RPMs; it does not test them.
Build
azldev comp build -p <name> # one component
azldev comp build -p <a> -p <b> --local-repo-with-publish <dir> # chain deps via a local repo
azldev comp build -p <name> --local-repo <dir> # rebuild against a populated repo
Build foundational packages before their dependents. RPMs land in the project's
configured output directory (out by default). -q quiets output but hides build
progress — use it only for inner-loop builds you expect to succeed.
The inner loop
investigate → modify → render → build → test → inspect
| Step | Command |
|---|---|
| Investigate | read the rendered spec under specs/, or azldev comp diff-sources -p <name> |
| Modify | edit the component's .comp.toml (see the azldev-overlays and azldev-comp-toml skills) |
| Verify | azldev comp render -p <name> (fast — skips source tarballs) |
| Build | azldev comp build -p <name> |
| Test | azldev adv mock shell --add-package <rpm> (see the azldev-mock skill) |
| Inspect | azldev comp build -p <name> --preserve-buildenv always, then a mock shell |
Prefer comp render for quick overlay verification; use comp diff-sources to see the
exact overlay effect (it fetches sources once, applies overlays to a copy, and diffs the
two trees). Builds can be slow — set generous timeouts.
Finalize with azldev comp update -p <name> before opening a PR (see the
azldev-update-component skill).
Debugging build failures
- Render error mentioning a non-standard
Releasetag — a release-calculation issue; see theazldev-comp-tomlskill. - Preview error mentioning
rpmdev-bumpspec,rpmdev-packager,rpm,rpmspec,python3, or the Python RPM module — this applies only when you explicitly use the temporary--rpmdev-bumpspecpreview. Provision the named prerequisite for that opt-in path. Without the flag, azldev keeps the legacy static Release calculation. - Overlay did not apply as expected —
azldev comp diff-sources -p <name>shows what the overlays actually change. - Inspect the build environment —
azldev comp build -p <name> --preserve-buildenv on-failure(valueson-failure,always,never), then enter a mock shell. - Failing
%check— fix the tests first (root cause, upstream patches, targeted fixes). Only as a last resort, disable withbuild.check.skip = trueand a requiredbuild.check.skip_reasonexplaining what fails, why it cannot be fixed, and whether it is temporary. A transient--no-checkbuild flag exists for one-off local builds.
Per-component build tweaks (build.defines, build.without) live in the .comp.toml —
see the azldev-comp-toml skill.
Generated by azldev docs agent; do not hand-edit.
04 同仓库更多 Skills
skill-metrics
[Skill] metrics, azure-monitor, aks - Query Azure Monitor metrics for Koji AKS node CPU, memory, disk usage, and pod readiness.
skill-mass-triage
[Skill] Batch-triage build failures from a JSON results file — diagnose with parallel sub-agents, bucketize by root cause, and produce a consolidated summary. Use when asked to triage a Koji results file. Triggers: batch triage, mass triage, triage results file, bucketize failures.
skill-kql-queries
[Skill] kql, queries, log analytics, container logs - KQL query templates for Koji container logs, pod errors, restarts, Kubernetes events, build job activity, and node resource usage via Log Analytics.
skill-koji-triage
[Skill] Examine Koji builds, fetch task info and logs from the Koji Web UI, identify failures, and provide root cause analysis. Use when triaging Koji build failures, investigating failed tasks, downloading build logs, or searching for broken packages. Triggers: koji failure, koji build failed, koji task, koji log, koji triage, build failure analysis.
skill-fedora-mirror-injections
[Skill] Diagnose Azure Linux Stage 1 (bootstrap-mirror) BuildRequires resolution failures and backfill missing RPMs into the prod Fedora updates mirror via the azl-infra injections file. Use when triaging stage-1 / azl4-bootstrap-mirror build failures, finding dependency gaps in the Fedora mirror, deciding whether a failure is a real mirror gap vs a transient timeout or a spec bug, adding entries to azl4-stage1-injections.yaml, or opening a PR with mirror injections. Triggers: 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.
skill-deployment-context
[Skill] deployment context, aks, azure, koji - Resolve Koji AKS deployment context -- resource group, cluster name, subscription, Log Analytics workspace, and monitoring resource names from deployment_summary.yaml when available, or discover them dynamically from Azure.