azldev-mock
하는 일
이 스킬은 azldev를 사용해 mock chroot 안에서 패키지를 실행하고 RPM 파일을 점검하는 방법을 보여 줍니다. 출시 전에 빌드된 패키지를 안전하게 확인하려는 개발자를 위한 것입니다.
사용하는 경우
- ✓RPM을 빌드했고 내 컴퓨터에 설치하지 않고 테스트하고 싶을 때.
- ✓RPM이 설치되지 않아 오류 세부 정보를 보고 싶을 때.
- ✓빌드된 패키지의 파일 목록이나 의존성을 확인해야 하는 경우.
스킬 링크
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-mock/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“패키지용 RPM을 빌드했습니다. mock chroot에서 테스트하고 파일 목록과 의존성을 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 비대화형 입력으로 mock 셸에서 명령을 실행하고, 패키지 정보를 읽은 뒤 격리된 환경에서 설치를 다시 시도합니다. 호스트에는 아무것도 설치하지 않습니다.
기술 내용 (원본 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을 제 컴퓨터에 설치하지 않나요?
스킬은 빌드된 패키지가 사용자 컴퓨터가 아니라 빌드 중인 배포판을 대상으로 한다고 설명합니다.
수동 단계 없이 실행할 수 있나요?
네. 스킬은 명령을 셸에 파이프로 전달하는 비대화형 방법을 설명합니다.
특별한 명령이 필요한가요?
표준 도움말 출력에는 나오지 않는 고급 mock 셸 명령을 사용합니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
azldev-add-component
5.4k에이전트가 azldev 배포판 빌드에 새 패키지를 추가하고 결과를 검증하도록 돕습니다.
azldev-build-component
5.4k에이전트가 azldev 패키지를 빌드하고, 실패한 빌드 검사를 고치도록 돕습니다.
azldev-comp-toml
5.4k에이전트가 azldev가 패키지 빌드 방식을 설명하는 구성 요소 정의 파일을 작성, 편집, 검토하도록 돕습니다.
azldev-image
5.4k에이전트가 azldev 이미지 명령을 사용해 컨테이너나 가상 머신 같은 Linux 이미지를 빌드하고, 부팅하고, 테스트하도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.