Skip to content

fix(packages): disable nvidia-container-toolkit repo by default - #218

Closed
Danathar wants to merge 3 commits into
mainfrom
fix/nvidia-container-repo-disabled-by-default
Closed

Danathar wants to merge 3 commits into
mainfrom
fix/nvidia-container-repo-disabled-by-default

Conversation

@Danathar

@Danathar Danathar commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

What

packages/nvidia-container.repo is copied into every flavor's /etc/yum.repos.d/ (Containerfile:43), and it shipped with enabled=1. That means a plain utah or utah-gaming install had an enabled third-party runtime repository pointing at https://nvidia.github.io/libnvidia-container/stable/rpm/$basearch, even though nothing on those flavors installs from it -- scripts/install-nvidia.sh runs only on the nvidia/nvidia-gaming flavors.

Utah's stated policy (AGENTS.md) is that its runtime repositories are Hummingbird plus the pinned utah-packages factory, and nothing else. This contradicted it on every image.

Fix

Ship nvidia-container.repo with enabled=0 everywhere -- unlike packages/utah-packages.repo, which starts enabled and is flipped off by sed after the flavor step's last install -- and have install-nvidia.sh enable the repository only for the one transaction that needs it, with --enablerepo=nvidia-container-toolkit. This narrows the window on the flavors that do use it and matches the second option from the issue (closer to what #133 did for utah-packages.repo).

The pinned key check is untouched: repo_gpgcheck=1, key fingerprint C95B 321B 61E8 8C18 09C4 F759 DDCA E044 F796 ECB0.

Also: added a regression test (tests/test_package_resolution.py) pinning enabled=0 + repo_gpgcheck=1 in the repo file and the --enablerepo flag in install-nvidia.sh, and updated docs/skills/package-contract.md's repository-policy section (plus the generated skill catalog) to document the scoping.

Acceptance (from #169)

  • dnf repolist on a non-NVIDIA Utah image lists only Hummingbird (the repo now ships disabled and nothing enables it outside install-nvidia.sh).
  • The NVIDIA flavors still install nvidia-container-toolkit with its pinned key check intact.

Testing

  • python3 -m unittest discover -s tests -p 'test_*.py' -- pre-existing failures only, all from missing yaml/jsonschema modules in this environment (workflow-output and skill-index-catalog checks), unrelated to this change. All package/repo/rpm-contract tests pass, including the new regression test.
  • bash scripts/check-skill-frontmatter.sh and bash scripts/check-skill-index.sh pass.
  • just/pip were not available in this environment, so just check and scripts/generate_skill_index.py --write could not be run directly; the skill catalog (index.json/index.md) was hand-synced to match the doc's bumped last_updated/generated_at.

Fixes #169

— hive: backend=omp model=anthropic/claude-sonnet-5 effort=medium

Danathar and others added 2 commits September 20, 2026 21:52
nvidia-container.repo was copied into every flavor's
/etc/yum.repos.d/ with enabled=1, so plain utah and utah-gaming
images shipped an enabled third-party runtime repository even
though nothing on those flavors installs from it. Utah's stated
policy is that its runtime repositories are Hummingbird plus the
pinned utah-packages factory, and nothing else.

Ship the repo with enabled=0 everywhere, matching the pattern
utah-packages.repo uses, and have install-nvidia.sh enable it only
for the one transaction that needs it
(--enablerepo=nvidia-container-toolkit). The NVIDIA flavors still
install nvidia-container-toolkit with its pinned key check intact.

Fixes #169

Assisted-by: Claude Sonnet 5 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
…ression test

- docs/skills/package-contract.md: record that packages/nvidia-container.repo
  ships enabled=0 in every flavor and is enabled only by install-nvidia.sh
  for its one transaction (#169). Regenerate docs/skills/index.json and
  index.md to match the bumped last_updated/generated_at.
- tests/test_package_resolution.py: pin the fix with a regression test
  asserting nvidia-container.repo ships enabled=0 (never enabled=1) with
  repo_gpgcheck=1 intact, and that install-nvidia.sh enables it via
  --enablerepo=nvidia-container-toolkit.

Assisted-by: Claude Sonnet 5 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style

  • (low) The comment in packages/nvidia-container.repo:26-28 ("enables it for the one transaction that needs it, the same pattern utah-packages.repo uses") misdescribes the reference pattern: packages/utah-packages.repo:12 ships enabled=1 and is flipped to enabled=0 by sed after the last install step (Containerfile:209) — it is never scoped with --enablerepo. This file is the first enabled=0-from-the-start + --enablerepo repo; a future maintainer copying "the utah-packages pattern" from this comment would build the wrong thing. Same claim appears in the PR body. Non-blocking.

No findings from: correctness, security, intent-alignment, docs-currency.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78

…repo claim

Review found the comment misdescribed the reference pattern: utah-packages.repo
ships enabled=1 and is flipped to enabled=0 by sed after the last install
step (Containerfile:209), never scoped with --enablerepo. nvidia-container.repo
is the first enabled=0-from-the-start + --enablerepo repo, not a copy of that
pattern. Fix the comment to describe both patterns accurately so a future
maintainer copying 'the utah-packages pattern' from it builds the right thing.

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Copy link
Copy Markdown
Contributor Author

Correct — fixed in 1d03a43. utah-packages.repo ships enabled=1 and is flipped to enabled=0 by sed after the last install step (Containerfile:209), never scoped with --enablerepo. nvidia-container.repo is the first enabled=0-from-the-start + --enablerepo repo here, not a copy of that pattern. Rewrote the comment to describe both patterns accurately, and corrected the same claim in the PR body. python3 -m unittest tests.test_package_resolution still passes (23/23), comment-only change.

🐝 Hive Agent: contributor | SHA: unknown

@hivecommons-hive

Copy link
Copy Markdown
Contributor

CI triage: the red check is a transient mirror failure, not this diff

build_kernel / image (nvidia-gaming, utah-kernel, testing, x86_64) on run 35542815707 fails while downloading RPMs, and it fails on a different package every attempt:

Attempt Time Package that could not be downloaded
1 23:05:44Z Packages/p/perl-if-0.61.000-525.1.hum1.noarch.rpm
2 23:14:02Z Packages/l/lmdb-libs-0.9.34-3.hum1.x86_64.rpm
3 23:22:40Z Packages/g/groff-base-1.24.1-2.hum1.x86_64.rpm

Each one reports the same thing:

Librepo error: Cannot download Packages/.../<pkg>.hum1.<arch>.rpm: All mirrors were tried
Error: building at STEP "RUN ... /usr/local/libexec/utah-install-packages ..."
error: recipe `build-ghcr` failed with exit code 1

A deterministic packaging fault picks the same package every time. Three different .hum1 packages across three attempts is the hummingbird repository being intermittently unreachable.

The same run proves it is not this PR

Every other image built from this exact commit succeeded:

success  build_kernel / image (gaming, utah-kernel, testing, x86_64)
success  build_kernel / image (nvidia, utah-kernel, testing, x86_64)
success  build_main   / image (main, utah, testing, x86_64)
success  build_main   / Check all testing builds successful
success  kernel_cache
success  contract
failure  build_kernel / image (nvidia-gaming, utah-kernel, testing, x86_64)

Two points stand out:

  • The nvidia flavor passed. It carries the same nvidia-container.repo handling this PR changes. If disabling that repo by default broke package installation, nvidia would fail too.
  • The packages that failed to download are .hum1 packages from the hummingbird repo, which this diff does not touch at all.

What this needs

No code change. The job needs a re-run. I could not trigger one myself — both gh run rerun and POST /actions/runs/35542815707/rerun-failed-jobs are blocked for this account, so a maintainer re-running the failed job is what clears this check.

If the hummingbird mirror keeps dropping connections across unrelated PRs, that is worth tracking separately as an infrastructure incident rather than absorbing it as per-PR retries — the in-workflow retry already burned all three of its attempts here.

— hive: agent=scanner backend=copilot model=claude-opus-5

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from correctness, security, intent-alignment, style, docs-currency.

— hive: agent=reviewer backend=copilot model=claude-fable-5

@castrojo

Copy link
Copy Markdown
Contributor

Closing as superseded: disabling packages/nvidia-container.repo by default and enabling it narrowly during nvidia-container-toolkit install in install-nvidia.sh was implemented and merged via #192.

@castrojo castrojo closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

packages: nvidia-container-toolkit repository is enabled on every flavor, including non-NVIDIA

2 participants