Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)5.4k · #14960

azldev-add-component

Ce qu’il fait

Cette compétence guide l'ajout d'un paquet à une compilation de distribution Linux basée sur azldev. Elle s'adresse aux développeurs qui empaquettent des logiciels pour une distribution construite avec azldev.

Quand l’utiliser

  • ✓Quand vous voulez ajouter un nouveau paquet à une compilation de distribution azldev.
  • ✓Quand vous devez importer un paquet amont et décider si ses modifications vont en ligne ou dans un fichier dédié.
  • ✓Quand vous validez un nouveau composant avec les étapes de rendu, de comparaison et de compilation.

Lien du skill

https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-add-component/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-add-component/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“J'ai besoin d'ajouter le paquet jq à notre distribution azldev. Peux-tu me guider pour examiner la spécification amont et valider la compilation ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent vérifie que le composant n'existe pas, fixe sa source, lit la spécification amont, puis configure le fichier et vérifie le rendu et la compilation. Il suit les étapes du flux de travail propre à l'outil.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Add a component

Before you start

Confirm the component does not already exist:

azldev comp list -p <name> -q -O json

Inspect the upstream spec first

The reliable way to see what you are importing (direct web fetches of upstream dist-git often fail bot detection):

  1. Add a bare entry so azldev can resolve the component: run azldev comp add <name> (it appends [components.<name>] to the root config file), or hand-add [components.<name>] to an included config file if you want it to live elsewhere. A bare root entry is perfect for initial testing, but real distros will usually segment the configuration into included files. Once the initial pass is done, ensure the component is in the right place and remove the root entry.

  2. Create the initial lock so source resolution is pinned before inspection:

    azldev comp update -p <name>
    
  3. Pull the sources without overlays into a scratch dir under the work dir:

    azldev comp prep-sources -p <name> --skip-overlays --force -o base/build/work/scratch/<name> -q
    
  4. Read the spec and plan any overlays.

Inline vs dedicated file

  • Inline — a bare upstream import with no changes stays in a shared config file:

    [components.jq]
    
  • Dedicated — anything that needs overlays, build config, or a local spec gets its own <name>/<name>.comp.toml. Rule of thumb: more than [components.<name>] earns a dedicated file. An includes = ["**/*.comp.toml"] glob picks it up automatically.

azldev comp add <name> [<name>...] adds bare [components.<name>] entries that inherit the distro defaults; it writes to the root config file and does not scaffold spec or source files. If your distro keeps components in included or dedicated files, move the entry there afterward.

Customize

For spec source types and overlays, read the azldev-comp-toml and azldev-overlays skills. Key points when adding a component:

  • Prefer overlays over forking the spec — overlays get upstream updates for free. Forking a spec is a last resort and a long-term maintenance commitment. Get explicit user sign-off first, document every change, and keep the delta minimal.
  • Every overlay needs a description explaining why it is needed.
  • Keep %check enabled. Disable it only as a last resort via build.check.skip = true with a required build.check.skip_reason (see the azldev-build-component skill).

Validate

The initial lock pins the upstream revision you inspected. Refresh it after the component inputs settle, then validate:

azldev comp update -p <name>          # resolve the upstream commit and write the lock
azldev comp render -p <name>          # apply overlays and write the rendered spec
azldev comp diff-sources -p <name>    # see exactly what the overlays change
azldev comp build -p <name>           # build the RPMs

Inspect the rendered spec under specs/. A new component always needs a smoke test — see the azldev-build-component and azldev-mock skills.

After all component inputs are final, run azldev comp update -p <name> again and re-render. Stage the component definition and sources, locks/<name>.lock, and the rendered output before committing. Then re-render, stage specs/<first-char>/<name>/, and amend the commit so %changelog and Release: reflect it. See the azldev-update-component skill for the complete finalization workflow.

Generated by azldev docs agent; do not hand-edit.

Questions fréquentes

Dois-je deviner les détails amont ?

Non. La compétence indique d'examiner d'abord la spécification amont plutôt que de deviner à partir de la mémoire.

Quand un fichier dédié est-il nécessaire ?

La compétence indique qu'un composant qui a besoin de surcouches, de paramètres de compilation ou d'une spécification locale reçoit son propre dossier de configuration.

Installe-t-elle les paquets compilés sur mon ordinateur ?

Non. La compétence indique que les paquets compilés doivent être testés dans un environnement de compilation simulé, et non installés sur la machine hôte.

Détails

Description originale de l’auteur

Read this before adding or importing a component; follow the workflow instead of guessing. Explains how to add a new component to an azldev distro, covering inspecting the upstream spec, the inline-versus-dedicated-file decision, and validating with render, diff-sources, and build. Triggers include add component, new package, import package, create comp.toml, new component.

repo: microsoft/azurelinux

Popularité

Étoiles GitHub
5.4k
Position au classement
#14960
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires