build: fetch kernel from cdn.kernel.org static mirror - #23
Merged
Conversation
toksdotdev
force-pushed
the
toks/kernel-src-cdn-mirror
branch
from
July 27, 2026 07:27
095a5fe to
36a394f
Compare
toksdotdev
added a commit
to superradcompany/microsandbox
that referenced
this pull request
Jul 27, 2026
## Problem `Build kernel.c` fails intermittently across CI with a 502 while fetching the kernel: ``` curl: (22) The requested URL returned error: 502 make: *** [Makefile:134: tarballs/linux-<ver>.tar.gz] Error 22 ``` libkrunfw fetched the kernel from the **git.kernel.org cgit `/snapshot/` endpoint**, which regenerates a ~250 MB tarball from the git tree per request. It's slow (~50s even when healthy) and rate-limited, so under CI concurrency the cgit backend overloads and the gateway 502s. kernel.org itself is up — only that dynamic endpoint flakes. ## Fix — mirror swap only Bump `vendor/libkrunfw` `e0d29a8a → 56bd24f6`, which changes exactly one thing: `KERNEL_REMOTE` from the git.kernel.org cgit snapshot to the static **cdn.kernel.org** release tarball. **Same kernel (`linux-6.12.95`, unchanged), same patches, same `.tar.gz` / `linux-6.12.95/` layout** — the only delta vs `main` is where the tarball is fetched from. The CDN mirror is cached and instant. ## Notes - Points at libkrunfw branch commit `56bd24f6` until the cdn change lands on `krunfw` (superradcompany/libkrunfw#23); re-point to the `krunfw` commit after that merges. - Fixes the recurring `Build kernel.c` 502s for all builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Build kernel.cfails intermittently with a 502 while fetching the kernel:KERNEL_REMOTEpoints at the git.kernel.org cgit/snapshot/endpoint, which regenerates a ~250 MB tarball from the git tree per request — slow (~50s even when healthy), rate-limited, and 502-prone under CI concurrency. kernel.org itself is up; only this dynamic endpoint flakes.Fix
Fetch the static release tarball from the kernel.org CDN instead:
Same
.tar.gz, same top-levellinux-<ver>/dir, soKERNEL_TARBALLandtar xfare unchanged — a pure URL swap. The kernel source is identical (both are the release tag), so the patch set applies unchanged.CI note (pre-existing, unrelated to this change)
This branch sits on
krunfwHEAD (linux-6.12.96).check-kernel-version.shnow flags6.12.98as the latest stable and gates the build jobs. Bumping to6.12.98, however, breaks the out-of-tree vsock-dgram patch —virtio_transport_alloc_skbgained an argument in 6.12.98:That patch update is separate maintenance, independent of this mirror swap. The cdn change itself is validated end to end:
Fetch kernel sourcepasses from the CDN, and the kernel builds from the CDN on 6.12.95 in superradcompany/microsandbox#1217's CI.