Skip to content

[DO NOT MERGE] pkg/uefi: force a rebuild (test authenticated git fetches) - #254

Open
europaul wants to merge 5 commits into
masterfrom
test/force-uefi-rebuild
Open

europaul wants to merge 5 commits into
masterfrom
test/force-uefi-rebuild

Conversation

@europaul

Copy link
Copy Markdown
Collaborator

Test-only PR, do not merge.

Changes pkg/uefi's package hash so that CI builds eve-uefi from source instead of pulling it. That exercises buildkit's authenticated fetches of edk2 and all its nested submodules, via linuxkit pkg build --secret id=GIT_AUTH_TOKEN.github.com,env=GITHUB_TOKEN (lf-edge#6682).

🤖 Generated with Claude Code

europaul and others added 5 commits September 30, 2026 18:37
github.com throttles anonymous fetches per source IP, and the shared
self-hosted runners trip that limit: the git-upload-pack POST comes back
401 while the ref advertisement still succeeds, so clones fail in bursts
with "could not read Username for 'https://github.com'". The build clones
linuxkit on every job, so any job can hit it.

Answer github.com's credential challenge with the job's own token via a
GIT_ASKPASS helper. Git consults askpass only after the server challenges,
so an anonymous fetch is still attempted first and the token is used only
where an anonymous fetch just failed. The helper declines prompts for any
other host, so the token never reaches a third-party remote, and declines
when no token is set, leaving git to fail exactly as it does today.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
Dockerfile git sources (`ADD https://github.com/...git#ref`) are fetched
by buildkitd, not by the runner's git: it runs git with a cleared
environment and HOME=/dev/null, so neither gitconfig nor GIT_ASKPASS
reaches it and these fetches, including recursive submodules, stay
anonymous. GitHub intermittently refuses them; eve-uefi, whose edk2
source pulls in ~40 nested submodules, failed every attempt on a
17.0-stable run.

When GITHUB_TOKEN is set, pass it to `linuxkit pkg build/push` as the
GIT_AUTH_TOKEN.github.com secret, which buildkit's git source uses for
every github.com remote. This needs `pkg build --secret`, not yet in a
linuxkit release, so pin linuxkit to a fork commit carrying it until it
lands upstream.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three Dockerfiles cloned from github.com with `RUN git clone`. That git
runs inside the build container, which sees neither GIT_ASKPASS nor
buildkit's git auth secret, so the clones stayed anonymous and fail
whenever GitHub refuses anonymous fetches. Fetch them with
`ADD <url>.git#<ref>` instead, which buildkit authenticates.

Pass GITHUB_TOKEN as that secret to the builds that don't go through the
top-level Makefile: evetest's protobuilder and SDN VM images, the
cross-compilers workflow, and the yetus image, whose openzfs source was
already an ADD. publish-evetest now builds the SDN image with the pinned
linuxkit instead of one on PATH, which may not support --secret.

protodot was cloned at whatever its default branch pointed to; pin it
to the current head. The scep ref now comes from SCEP_SERVER_VERSION,
which was declared but unused.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
Changes the package hash so CI builds eve-uefi from source instead of
pulling it, exercising buildkit's authenticated edk2 submodule fetches.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Claude finished @europaul's task in 30s —— View job


Review

  • Read PR diff and Dockerfile context
  • Assess change

The diff adds a single comment line to pkg/uefi/Dockerfile:

# [TEST ONLY] force a rebuild to exercise authenticated ADD git fetches

This is a no-op source change whose only effect is to invalidate the linuxkit package hash, forcing CI to build eve-uefi from source (and thus exercise buildkit's authenticated fetches of edk2 + submodules). That matches the PR's stated intent.

No code-quality, correctness, security, or performance issues. The comment is inserted after the # syntax= directive on line 1 (correct — the syntax directive must remain the first line), and it doesn't alter any build behavior beyond cache busting.

One minor housekeeping note: since this is explicitly a [DO NOT MERGE] / test-only PR, remember to drop this commit before the branch is ever merged so the cache-busting comment doesn't land on master.

Nothing to change for the test's purpose. ✅
· branch test/force-uefi-rebuild

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.

2 participants