azldev-build-component
Skill này làm gì
Skill này giải thích cách build một thành phần azldev và xử lý các lỗi build. Nó dành cho lập trình viên đóng gói phần mềm với azldev và cần sửa một bản build bị lỗi.
Khi nào nên dùng
- ✓Khi một bản build thành phần azldev bị lỗi và bạn cần tìm nguyên nhân.
- ✓Khi bạn muốn build lại một gói với kho cục bộ các phụ thuộc của nó.
- ✓Khi một kiểm tra kiểm thử bị lỗi nên được tắt cho một thành phần cụ thể.
Liên kết skill
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-build-component/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Build thành phần azldev của tôi bị lỗi ở pha kiểm tra. Bạn có thể giúp tôi tìm nguyên nhân và lặp lại quá trình build không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent làm theo vòng lặp render, build và kiểm thử, xem xét đặc tả đã render và các diff. Nó dùng các tùy chọn build của công cụ để nối chuỗi phụ thuộc và giữ môi trường build để gỡ lỗi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Có nên cài các RPM đã build lên máy tính không?
Không. Skill ghi rằng nên kiểm thử gói trong mock build root, vì chúng nhắm tới bản phân phối chứ không phải máy của bạn.
Build có kiểm thử gói luôn không?
Không. Skill ghi rằng build và kiểm thử là hai bước riêng.
Tôi có thể bỏ qua một kiểm tra bị lỗi không?
Skill nhắc việc tắt một kiểm tra bị lỗi cho một thành phần qua một cài đặt, và cần dùng thận trọng.
Chi tiết
Mô tả gốc của tác giả
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.
repo: microsoft/azurelinux
Độ phổ biến
- Sao GitHub
- 5.4k
- Vị trí xếp hạng
- #14961
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
azldev-add-component
5.4kGiúp agent của bạn thêm một thành phần phần mềm mới vào bản build phân phối Linux azldev, từ việc kiểm tra đặc tả upstream đến xác thực kết quả.
azldev-comp-toml
5.4kGiúp agent của bạn viết, chỉnh sửa và xem xét các file định nghĩa thành phần mà azldev dùng để mô tả cách mỗi gói được build.
azldev-image
5.4kGiúp agent của bạn build, khởi động và kiểm thử một image Linux, chẳng hạn image container hoặc máy ảo, bằng các lệnh image của azldev.
azldev-mock
5.4kGiúp agent của bạn kiểm thử và kiểm tra các gói đã build trong một môi trường build mock, để chúng không bao giờ chạm vào máy tính của bạn.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.