azldev-comp-toml
ما الذي تفعله
تشرح هذه المهارة صيغة ملفات مكوّنات azldev، التي تحدد مصدر مواصفات الحزمة وطريقة تخصيصها. وهي موجهة للمطورين الذين يصونون تعريفات الحزم في توزيعة azldev.
متى تستخدمها
- ✓عندما تحتاج إلى إنشاء ملف تعريف مكوّن أو تعديله.
- ✓عندما تراجع ملف مكوّن بحثًا عن أخطاء أو إعدادات لا لزوم لها.
- ✓عندما تريد تغيير إعدادات بناء الحزمة أو حساب الإصدار فيها.
رابط المهارة
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-comp-toml/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك مراجعة ملف مكوّن jq لدي وإخباري بالإعدادات التي يمكنني حذفها لأنها تطابق القيم الافتراضية؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يقرأ الوكيل بنية ملف المكوّن والمخطط، ثم يفحص مصدر المواصفات وإعدادات البناء والتراكبات. ويقترح تغييرات تطابق صيغة الأداة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Component definition files (*.comp.toml)
A component definition tells azldev where a package's spec comes from and how to
customize it for your distro. Every component lives under [components.<name>].
Get the authoritative, always-current field list from the schema:
azldev config generate-schema
Structure
A bare entry inherits everything from your distro's defaults — most upstream packages need nothing more:
[components.curl]
Add sub-tables only for what you change. The fields you will reach for most:
| Field | Purpose |
|---|---|
spec |
where the spec comes from (see below) |
overlays / overlay-files |
targeted spec/source edits (see the azldev-overlays skill) |
build.defines / build.with / build.without |
RPM macro and bcond build tweaks |
release.calculation |
how the Release tag is managed |
render.skip-file-filter |
rendering edge-case escape hatch |
Spec source
The spec field selects where the spec is fetched from. When omitted, the component
inherits the distro default (normally an upstream import).
# Upstream import (the usual case) — inherits the distro's upstream version
[components.curl]
# Upstream, but pinned to a specific upstream distro/version
[components.curl]
spec = { type = "upstream", upstream-distro = { name = "fedora", version = "rawhide" } }
# Upstream package whose name differs from the component name
[components.mydistro-rpm-config]
spec = { type = "upstream", upstream-name = "redhat-rpm-config" }
# Local spec that lives in your repo (not imported from an upstream distro)
[components.mydistro-release]
spec = { type = "local", path = "mydistro-release.spec" }
Build configuration
[components.mypackage.build]
defines = { rhel = "11" } # override RPM macros
with = ["feature_x"] # enable %bcond_with conditionals
without = ["plugin_rhsm"] # disable %bcond_with conditionals
Release calculation
release.calculation controls the Release: tag. There are four modes:
auto(default) — leave%autoreleaseunchanged; otherwise bump a static integer Release once for each fingerprint-derived synthetic change.autorelease— force%autoreleasehandling (use when auto-detection misreads a spec that wraps%autoreleasein a conditional).static— require a non-%autoreleasestatic release. The default legacy calculation supports only an integer,integer%{?dist}, orinteger%{dist}; other forms requiremanualor an overlay.manual— you own theRelease:value. Use this only when render fails with a "non-standard Release tag" error. Amanualcomponent is not bumped by the render/commit/amend cycle, so increment its release yourself in the same change (see theazldev-update-componentskill).
[components.mypackage.release]
calculation = "manual"
The temporary --rpmdev-bumpspec flag on comp build, comp render, and
comp prepare-sources opts into transactional host handling while Azure Linux
migrates. Only that path requires rpmdev-bumpspec, rpmdev-packager, rpm,
rpmspec, and Python with its RPM module. It preserves the fixed team
identity/comment/datestamp and strict source-EVR transaction checks; locks and
synthetic history still determine the number and order of bumps. Without the
flag, no bumpspec runtime discovery occurs and the legacy static calculation is
used. %autorelease behavior is unchanged on either path.
Render configuration
render.skip-file-filter = true keeps all source and patch files during render.
azldev normally prunes files not referenced by the rendered spec; set this only for
the rare spec whose Source/Patch filenames use macros the filter cannot expand.
File organization
- Inline — put simple, customization-free components directly in a shared config
file (e.g.
[components.jq]). - Dedicated — give a component its own
<name>/<name>.comp.tomlonce it needs overlays, build config, or a local spec. Rule of thumb: anything more than[components.<name>]earns a dedicated file. - A parent config picks up dedicated files through an
includesglob, for exampleincludes = ["**/*.comp.toml"].
Review checklist
Start with azldev comp list -p <name> -q -O json, then use
azldev comp query -p <name> -q -O json when the review needs parsed spec details.
For a change review, focus on the diff while checking enough surrounding context to
ensure
الأسئلة الشائعة
هل يمكن أن يكون ملف المكوّن قصيرًا جدًا؟
نعم. تذكر المهارة أن المدخل المجرد يرث القيم الافتراضية، لذلك تحتاج معظم الحزم الأصلية إلى القليل جدًا.
أين توجد قائمة الحقول الدقيقة؟
تذكر المهارة أن يُولَّد المخطط بأمر الإعدادات في الأداة، بدلًا من الاعتماد على الذاكرة.
ما هو التراكب؟
هو تصحيح يُطبَّق على مواصفات الحزمة وقت البناء، بدلًا من نسخ المواصفات وتعديلها.
التفاصيل
الوصف الأصلي من المؤلف
Read this before authoring, editing, or reviewing a *.comp.toml file; do not work from memory. Explains the azldev component definition format and review workflow, covering component structure, spec sources, build config, release calculation, render options, file organization, overlay hygiene, stale files, disabled tests, and testing verification. Triggers include comp.toml, component config, review component, component hygiene, spec source, upstream-distro, build defines, release calculation, includes.
repo: microsoft/azurelinux
الشعبية
- نجوم GitHub
- 5.4k
- الترتيب
- #14962
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
azldev-add-component
5.4kتساعد وكيلك على إضافة مكوّن برمجي جديد إلى بناء توزيعة Linux مبنية بـ azldev، من فحص مواصفات المصدر الأصلي إلى التحقق من النتيجة.
azldev-build-component
5.4kتساعد وكيلك على بناء حزمة azldev وتصحيح أخطائها، بما في ذلك حلقة العرض والبناء والاختبار وإصلاح فشل فحوص البناء.
azldev-image
5.4kتساعد وكيلك على بناء صورة Linux واختبارها، مثل صورة حاوية أو آلة افتراضية، باستخدام أوامر الصور في azldev.
azldev-mock
5.4kتساعد وكيلك على اختبار الحزم المبنية وفحصها داخل بيئة بناء وهمية، فلا تمسّ جهازك أبدًا.
مهارات مشابهة
openclaw-update
394kيساعد وكيلك على تحديث بوابة OpenClaw Gateway الموجودة، مع اختيار طريقة التحديث المناسبة لطريقة تثبيتها والحفاظ على جلستك.
diagnose-gateway
394kيساعد وكيلك على معرفة سبب فشل بوابة OpenClaw Gateway عبر فحص الإعدادات والقنوات والمنافذ دون تغيير أي شيء.
crabbox-apps
394kيساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.