azldev-mock
यह क्या करती है
यह स्किल दिखाती है कि azldev के साथ mock chroot के भीतर पैकेज कैसे चलाएँ और RPM फ़ाइलें कैसे जाँचें। यह उन डेवलपर्स के लिए है जो भेजने से पहले बने पैकेज सुरक्षित रूप से परखना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आपने RPM बनाया है और उसे अपने कंप्यूटर पर इंस्टॉल किए बिना परखना है।
- ✓जब कोई RPM इंस्टॉल नहीं हो रहा और आप त्रुटि का विवरण देखना चाहते हैं।
- ✓जब आपको बने पैकेज की फ़ाइल सूची या dependencies जाँचनी हों।
Skill का लिंक
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-mock/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैंने अपने पैकेज के लिए एक RPM बनाया है। क्या आप उसे mock chroot में परख सकते हैं और उसकी फ़ाइल सूची व dependencies जाँच सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट नॉन-इंटरैक्टिव इनपुट से mock shell में कमांड चलाता है, पैकेज की जानकारी पढ़ता है, और अलग-थलग एनवायरनमेंट के भीतर इंस्टॉल फिर से आज़माता है। होस्ट पर कुछ इंस्टॉल नहीं होता।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Test and inspect packages in a mock chroot
Never install built RPMs on the host. They target the distro you are building, not your dev machine. Use a mock chroot instead.
azldev tests and inspects packages inside mock build roots via mock shell,
which lives under the hidden advanced group (azldev adv is an alias for
azldev advanced; it does not appear in azldev --help).
Non-interactive chroot (preferred for agents)
Pipe commands in via a heredoc — fully autonomous, no user interaction needed:
azldev adv mock shell --add-package /path/to/package.rpm <<'CMDS'
<command> --version
echo "exit code: $?"
exit
CMDS
Use this for automated checks: running binaries, querying installed packages, inspecting paths.
Inspect an RPM without installing it
When --add-package fails to install, or you just want to look at an RPM's
contents, get the file inside the chroot and inspect it there rather than
installing on the host. If the RPM is not already reachable inside the build
root, copy it in first with mock --copyin <rpm> /tmp/ (using the project's
distro mock config), then:
azldev adv mock shell <<'CMDS'
rpm -qip /tmp/<name>*.rpm # package info
rpm -qlp /tmp/<name>*.rpm # file list
rpm -qRp /tmp/<name>*.rpm # dependencies
dnf install /tmp/<name>*.rpm # retry the install to see the error details
exit
CMDS
This gives you the full distro environment for debugging dependency issues, file conflicts, and failed installs, without touching the host.
Interactive chroot
Use when you need to explore interactively or react to output between commands:
azldev adv mock shell --add-package /path/to/package.rpm --enable-network
When driving an interactive shell as an agent:
- Run a simple command (e.g.
echo ready) in a foreground terminal to establish a shared shell. - Ask the user to run the
azldev adv mock shellcommand in that same terminal. - Wait for confirmation that they are inside the mock shell.
- Run diagnostic commands in the same foreground terminal — they execute inside the chroot.
- Run
exitto leave the chroot.
Prefer the non-interactive heredoc approach; use interactive only when you must react to output between commands.
Key flags
| Flag | Purpose |
|---|---|
-p, --add-package <path> |
Install a package into the chroot before entering. Accepts an RPM file path or a package name. May be repeated. |
--enable-network |
Allow network access (dependency resolution, downloads). |
-pmeans--add-package, not a component name. Unlikeazldev comp build -p <name>,mock shellhas no component selector.-p <name>installs a package by name from the configured repos — it does not set up a chroot with that component's build dependencies.
Gotchas
- Don't mix
-p <name>with--add-package /path/to/<name>.rpmfor the same package — that installs both the repo build and your local build, which conflict. Use one or the other. - The mock chroot is persistent across
azldev adv mock shellsessions — installed packages and created files survive. Handy (install once, re-enter later), but stale state can confuse. azldev has no built-in reset; clear it withmockdirectly (--scrub=chroot, or--scrub=allto also drop the bootstrap), pointing at the project's distro mock config. - One mock session per terminal. Running
azldev adv mock shellwhile a terminal is already inside a mock shell fails — runexitfirst.
Generated by azldev docs agent; do not hand-edit.
अक्सर पूछे जाने वाले सवाल
RPM अपने कंप्यूटर पर क्यों इंस्टॉल न करें?
स्किल कहती है कि बने पैकेज उस डिस्ट्रीब्यूशन के लिए हैं जिसे बनाया जा रहा है, आपकी अपनी मशीन के लिए नहीं।
क्या यह बिना मैन्युअल चरणों के चल सकती है?
हाँ। स्किल कमांड को shell में पाइप करने का एक नॉन-इंटरैक्टिव तरीका बताती है।
क्या इसके लिए कोई खास कमांड चाहिए?
यह उन्नत mock shell कमांड इस्तेमाल करती है, जो मानक help आउटपुट में नहीं दिखती।
जानकारी
लेखक का मूल विवरण
Read this before testing or inspecting a built RPM; do not drive mock by hand from memory. Explains how to test and inspect built packages in a mock chroot with 'azldev adv mock shell', covering non-interactive (heredoc) and interactive chroot workflows, the -p/--add-package flag, and resetting stale chroot state. Triggers include test package, mock shell, inspect rpm, smoke test, chroot, verify build output.
repo: microsoft/azurelinux
लोकप्रियता
- GitHub स्टार
- 5.4k
- रैंकिंग में स्थान
- #14964
- लाइसेंस
- 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यह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।