azldev-mock
Qué hace
Esta skill muestra cómo ejecutar paquetes e inspeccionar archivos RPM dentro de un chroot mock con azldev. Es para desarrolladores que quieren revisar paquetes compilados de forma segura antes de publicarlos.
Cuándo usarla
- ✓Cuando has compilado un RPM y quieres probarlo sin instalarlo en tu equipo.
- ✓Cuando un RPM no se instala y quieres ver los detalles del error.
- ✓Cuando necesitas revisar la lista de archivos o las dependencias de un paquete compilado.
Link de la skill
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-mock/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Compilé un RPM para mi paquete. ¿Puedes probarlo en un chroot mock y revisar su lista de archivos y sus dependencias?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente ejecuta comandos en una shell mock mediante entrada no interactiva, lee la información del paquete y vuelve a intentar la instalación dentro del entorno aislado. Nada se instala en el equipo anfitrión.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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.
Preguntas frecuentes
¿Por qué no instalar los RPM en mi equipo?
La skill indica que los paquetes compilados van dirigidos a la distribución que se compila, no a tu propio equipo.
¿Puede funcionar sin pasos manuales?
Sí. La skill describe una forma no interactiva de enviar comandos a la shell.
¿Necesita un comando especial?
Usa el comando avanzado de shell de mock, que no aparece en la ayuda estándar.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 5,4 mil
- Posición en el ranking
- #14964
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
azldev-add-component
5,4 milAyuda a tu agente a añadir un componente nuevo a una distribución Linux con azldev, desde revisar la especificación original hasta validar el resultado.
azldev-build-component
5,4 milAyuda a tu agente a compilar y depurar un paquete de azldev, con el ciclo de render, compilación y pruebas, y a corregir fallos en las comprobaciones.
azldev-comp-toml
5,4 milAyuda a tu agente a escribir, editar y revisar los archivos de definición de componentes que azldev usa para describir cómo se compila cada paquete.
azldev-image
5,4 milAyuda a tu agente a compilar, arrancar y probar una imagen de Linux, como una imagen de contenedor o de máquina virtual, con los comandos de imagen de azldev.
Skills parecidas
openclaw-update
394 milAyuda a tu agente a actualizar una Gateway de OpenClaw que ya existe, eligiendo el método de actualización que encaja con cómo se instaló y manteniendo tu sesión activa.
diagnose-gateway
394 milAyuda a tu agente a averiguar por qué falla tu Gateway de OpenClaw, revisando ajustes, canales y puertos sin cambiar nada.
crabbox-apps
394 milAyuda a tu agente a abrir y ejecutar una app en una máquina temporal en la nube y mostrar su vista en el panel lateral de tu chat.