azldev-overlays
यह क्या करती है
यह स्किल बताती है कि render के समय लागू होने वाले overlays से upstream पैकेज spec कैसे बदलें। यह azldev डिस्ट्रीब्यूशन में पैकेज कस्टमाइज़ करने और उनकी समस्याएँ सुलझाने वाले डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब आपको upstream spec की एक पंक्ति या एक हिस्सा बदलना हो।
- ✓जब कोई overlay विफल हो या render हुआ spec ठीक न लगे।
- ✓जब आप पूरा spec कॉपी किए बिना स्थानीय patch जोड़ना चाहते हों।
Skill का लिंक
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-overlays/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मुझे अपने पैकेज के upstream spec में एक सेटिंग बदलनी है, बिना उसे fork किए। क्या आप मेरे लिए overlay लिखने में मदद कर सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट overlay को घटक config में जोड़ता है, spec render करता है, और नतीजा जाँचता है। overlay की विफलताएँ खोजने और उन्हें ठीक करने के लिए वह diff आउटपुट इस्तेमाल करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Working with overlays
Overlays are semantic patches applied to a component's RPM spec and loose source files at render time. They let you make targeted changes to an upstream spec without forking it. Prefer an overlay over hand-editing a rendered spec: overlays are re-applied on every render, so a manual edit to a rendered spec is overwritten.
The inner loop
Overlays live in the component's TOML config — inline [[components.<name>.overlays]]
entries, or per-file overlay documents referenced by the component's overlay-files
glob. They apply in order and are non-atomic: if one fails part-way, the
overlays before it stay applied.
Add or edit the overlay in the component config.
Re-render and inspect the result:
azldev comp render -p <name>Read the rendered spec (under
specs/) to confirm the change landed where you intended, and iterate until it is correct.Finalize the lock and changelog with the normal end-of-work refresh (see the
azldev-update-componentskill): update the lock, commit, then re-render and amend.
Config errors reference the offending overlay by its description, so give every
overlay a short, specific description.
Diagnose common failures
Start with azldev comp diff-sources -p <name> to see the exact overlay effect.
Use separate pre/post prep-sources directories only when you need persistent trees
for deeper inspection.
| Symptom | Likely cause and fix |
|---|---|
spec-add-tag: tag already exists |
Upstream already has the tag. Use spec-set-tag, or spec-update-tag when its prior existence is an invariant. |
spec-search-replace: no match |
Inspect the current upstream line, check TOML regex quoting, and narrow the expression to the actual section/package. |
| Section or file not found | Inspect the upstream spec/source names; upstream may have renamed or removed the target. |
| Overlay applies but output/build is wrong | Inspect diff-sources for an over-broad match, malformed replacement, or a dependency/file change the overlay omitted. |
Choosing an overlay type
Match the change to the narrowest overlay type. Required fields are enforced when the config loads, so a missing field fails fast rather than at apply time.
Spec overlays (structured .spec edits)
| Type | Use for | Required |
|---|---|---|
spec-add-tag |
add a tag; fails if it already exists | tag, value |
spec-insert-tag |
add a tag next to its family (e.g. after the last Source*) |
tag, value |
spec-set-tag |
set a tag, replacing it if present or adding it if not | tag, value |
spec-update-tag |
change an existing tag; fails if it is missing | tag, value |
spec-remove-tag |
delete tag instances; without value, deletes every instance |
tag |
spec-prepend-lines |
insert lines at the top of a section (or the whole file) | lines |
spec-append-lines |
insert lines at the end of a section (or the whole file) | lines |
spec-search-replace |
regex replace within a section (or the whole spec) | regex |
spec-remove-section |
delete a whole section | section |
spec-remove-subpackage |
delete every section of a sub-package | package |
patch-add |
add a .patch file and register it in the spec |
source |
patch-remove |
remove a patch and its spec references | file |
File overlays (loose non-spec files; never .spec)
| Type | Use for | Required |
|---|---|---|
file-prepend-lines |
prepend lines to a file | file, lines |
file-search-replace |
regex replace in a file | file, regex |
file-add |
copy in a new file; fails if it already exists | file, source |
file-remove |
delete a file | file |
file-rename |
rename a file in place | file, replacement |
Rules that trip people up
spec-remove-tagwithoutvalueremoves every instance of the named tag. To remove one dependency, set bothtagand the exactvalueto match:[[components.mypackage.overlays]] description = "Remove an unavailable build dependency" type = "spec-remove-tag" tag = "BuildRequires" value = "unwanted-package"sectionis optional only forspec-prepend-lines,spec-append-lines, andspec-search-replace(omit it to target the whole spec). It is required forspec-remove-section.packageneedssectionon the whole-file-capable overlays — a sub-package is a sub-qualifi
अक्सर पूछे जाने वाले सवाल
render हुए spec को सीधे क्यों न बदलें?
स्किल कहती है कि हर render पर overlays दोबारा लागू होते हैं, इसलिए render हुए spec में हाथ से किया बदलाव मिट जाता है।
क्या overlays क्रम से लागू होते हैं?
हाँ। स्किल कहती है कि वे क्रम से लागू होते हैं, और बीच में विफल होने पर पहले वाले overlays लागू रहते हैं।
हर overlay को विवरण क्यों दें?
Config की त्रुटियाँ overlay को उसके विवरण से संदर्भित करती हैं, इसलिए छोटा और स्पष्ट विवरण समस्या ढूँढने में मदद करता है।
जानकारी
लेखक का मूल विवरण
Read this before adding, changing, or diagnosing any overlay; never edit a spec or rendered file from memory. Explains how to modify a component's RPM spec or loose source files with azldev overlays (semantic patches applied at render time) instead of forking the spec, covering overlay types, the render-and-inspect loop, common failures, pitfalls, and metadata. Triggers include overlay, overlay failed, no match, spec-add-tag, spec-remove-tag, patch-add, fix spec, backport, disable test, prune subpackage, edit spec.
repo: microsoft/azurelinux
लोकप्रियता
- GitHub स्टार
- 5.4k
- रैंकिंग में स्थान
- #14966
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
azldev-add-component
5.4kयह आपके एजेंट को azldev Linux डिस्ट्रीब्यूशन बिल्ड में नया सॉफ़्टवेयर घटक जोड़ने में मदद करती है, upstream spec देखने से लेकर नतीजे की जाँच तक।
azldev-build-component
5.4kयह आपके एजेंट को azldev पैकेज बनाने और उसकी बिल्ड गड़बड़ियाँ ठीक करने में मदद करती है, जिसमें render, build और test का चक्र शामिल है।
azldev-comp-toml
5.4kयह आपके एजेंट को azldev घटक फ़ाइलें लिखने, बदलने और समीक्षा करने में मदद करती है, जो बताती हैं कि हर पैकेज कैसे बनता है।
azldev-image
5.4kयह आपके एजेंट को azldev image कमांड से Linux image, जैसे container या virtual machine image, बनाने, boot करने और परखने में मदद करती है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।