konflux-ci/clair-in-ci-db/hermetic-build-deps

Claude Code and agent skill by konflux-ci/clair-in-ci-db

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when adding, updating, or troubleshooting RPM or artifact dependencies for the hermetic build. Covers rpms.in.yaml, rpms.lock.yaml, artifacts.lock.yaml, epel.repo, Cachi2 prefetching, and the Dockerfile install step.

Install

npx vskill@latest install konflux-ci/clair-in-ci-db/hermetic-build-deps

SKILL.md

Hermetic Build Dependencies

Overview

This repo uses Konflux hermetic builds — the build-container task runs with no network access. All external dependencies (RPMs, GPG keys) must be prefetched by Cachi2 during the prefetch-dependencies task and made available offline. Four files control this system and must stay in sync.

When to Use

  • Adding a new RPM package to the image
  • Updating a pinned RPM version
  • Prefetch-dependencies task is failing
  • Understanding how Dockerfile installs relate to lock files
  • Updating the EPEL GPG key or repository configuration

Dependency Files

FilePurposeFormat
rpms.in.yamlDeclares which packages to installpackages: [jq] + repo config pointer
rpms.lock.yamlPinned RPM versions, repos, checksumsAuto-generated lock file
artifacts.lock.yamlPinned generic artifacts (GPG keys, individual RPMs)Manual checksums for non-repo downloads
epel.repoEPEL 8 yum/dnf repository configurationStandard repo file format

How They Work Together

rpms.in.yaml ─── declares "I need jq" + points to epel.repo
│
├─ rpms.lock.yaml ─── resolves jq to exact version + checksum from repos
│
└─ epel.repo ─── provides the EPEL 8 metalink URL for resolution
artifacts.lock.yaml ─── pins the EPEL GPG key + individual RPM downloads
(these are fetched as "generic" artifacts by Cachi2)
In the Tekton Pipeline

The prefetch-input parameter tells Cachi2 what to prefetch:

yaml
prefetch-input: '[{"type": "rpm", "path": "."}, {"type": "generic", "path": "."}]'
  • type: rpm — reads rpms.in.yaml → resolves via rpms.lock.yaml → downloads RPMs
  • type: generic — reads artifacts.lock.yaml → downloads listed artifacts by URL + checksum
In the Dockerfile

Prefetched artifacts land in /cachi2/output/deps/:

dockerfile
RUN rpm --import /cachi2/output/deps/generic/RPM-GPG-KEY-EPEL-8 && \
microdnf -y --setopt=tsflags=nodocs install \
--setopt=install_weak_deps=0 \
jq-1.6-11.el8_10 && \
microdnf clean all

Key points:

  • GPG key is imported from the Cachi2 generic artifacts path
  • microdnf install uses exact version (jq-1.6-11.el8_10) matching rpms.lock.yaml
  • --setopt=tsflags=nodocs and --setopt=install_weak_deps=0 minimize image size

Current Dependencies

RPMs (via rpms.in.yaml + rpms.lock.yaml)
PackagePinned Version
jq1.6-11.el8_10
Generic Artifacts (via artifacts.lock.yaml)
ArtifactSource
RPM-GPG-KEY-EPEL-8dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8
jq-1.6-11.el8_10.x86_64.rpmcdn-ubi.redhat.com (UBI 8 appstream)
oniguruma-6.8.2-3.el8.x86_64.rpmcdn-ubi.redhat.com (UBI 8 appstream, jq dependency)

How to Add a New RPM

  1. Add the package name to rpms.in.yaml:

``yaml packages: [jq, newpackage] ``

  1. Regenerate the lock file using rpm-lockfile-prototype:

``bash rpm-lockfile-prototype --image <BASE_IMAGE> rpms.in.yaml ` This resolves packages against the base image, producing rpms.lock.yaml` with exact versions and checksums. See Konflux docs for details.

  1. If the RPM or its dependencies need to be pinned as generic artifacts, add entries to artifacts.lock.yaml with the download URL and SHA-256 checksum
  1. Update the Dockerfile to install the new package with its exact version:

``dockerfile microdnf -y --setopt=tsflags=nodocs install \ --setopt=install_weak_deps=0 \ jq-1.6-11.el8_10 \ newpackage-x.y-z.el8 ``

  1. Keep it as a single RUN layer to minimize image size

How to Update an Existing RPM Version

  1. Update the version in rpms.lock.yaml (or regenerate with Cachi2)
  2. Update the checksum in artifacts.lock.yaml if the RPM is also listed there
  3. Update the exact version string in the Dockerfile microdnf install command
  4. All three must match

Common Mistakes

ProblemFix
prefetch-dependencies fails with checksum mismatchChecksums in artifacts.lock.yaml or rpms.lock.yaml are stale — regenerate or update
Build fails with "package not found"RPM version in Dockerfile doesn't match rpms.lock.yaml pinned version
GPG key import failsartifacts.lock.yaml checksum for RPM-GPG-KEY-EPEL-8 is wrong or key URL changed
New package not installedAdded to rpms.in.yaml but didn't regenerate rpms.lock.yaml
Transitive dependency missingAdd the dependency RPM to artifacts.lock.yaml as a generic artifact (like oniguruma for jq)
Hermetic build fails with network errorVerify all deps are in lock files — hermetic builds have no network access

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/konflux-ci/clair-in-ci-db/hermetic-build-deps/badge)](https://verified-skill.com/skills/konflux-ci/clair-in-ci-db/hermetic-build-deps)

Something wrong with this skill or its page? Tell us.