Skip to content

build.sh: fail on source-download errors; fetch kernel from cdn.kernel.org#115

Open
mastacontrola wants to merge 4 commits into
masterfrom
ci-download-robustness
Open

build.sh: fail on source-download errors; fetch kernel from cdn.kernel.org#115
mastacontrola wants to merge 4 commits into
masterfrom
ci-download-robustness

Conversation

@mastacontrola

@mastacontrola mastacontrola commented Jul 5, 2026

Copy link
Copy Markdown
Member

What happened today

CI run 28741856230 (kernel-6.18 experimental) failed in a way worth fixing at the root:

  1. kernel.org's www.kernel.org frontend started timing out. Buildroot's internal wget (--tries=2 --timeout=10) gave up, and its fallback mirror sources.buildroot.net returned 404 (it only mirrors kernel versions pinned in Buildroot's own hash files, so a custom 6.18.38 headers version isn't there).
  2. ./build.sh -i --fs-download-only ran make source for all three arches, all three failed to download linux-6.18.38.tar.xz — and the job still exited 0, because the exit status of make source was never checked. The half-empty dl directory got saved into the Actions cache, and all three build_initrd_* jobs then failed on the same download.

Changes

  • Propagate make source failures in --fs-download-only mode, using the same status/exit pattern the script already uses for the main build. A failed download job now fails visibly instead of poisoning the dl cache.
  • kernelURL: www.kernel.orgcdn.kernel.org. The CDN is what kernel.org recommends for automated downloads and is also modern Buildroot's default BR2_KERNEL_MIRROR. (The kernel jobs on today's run survived only because build.sh's wget uses default retry settings — same fragile host, more patience.)
  • dependencies.sh: fix the dependency check on Fedora/RHEL. The check greps installed package names, and autopoint is a Debian package name — on RHEL-family distros the binary ships inside gettext-devel, so the check always failed (and --install-dep tried dnf install autopoint, which doesn't exist). autopoint now lives in the Debian list and RHEL-family checks/installs gettext-devel instead. Also added automake to the list — partclone's AUTORECONF = YES configure step needs aclocal and fails without it. Both gaps were found doing a local build on Fedora 44; CI never hits them because Ubuntu runner images ship automake preinstalled and use apt package names.
  • dependencies.sh: query the package manager per package instead of grepping the installed-package list. The old check was an unanchored grep over all installed package names, so any package containing a dependency's name satisfied it — on Fedora, libtool-ltdl passed the libtool check while libtoolize was actually missing (found the hard way: partclone's configure died mid-build). Anchoring the grep would break the other direction (wget on Fedora 40+ is provided by the package wget2-wget). The check now asks the package manager directly: rpm -q --whatprovides on RHEL-family (resolves virtual provides) and dpkg -s + installed-status on Debian-family. Verified against all 23 dependencies on Fedora 44: exactly the genuinely-missing package is flagged, no false positives or negatives.

The Buildroot-side counterpart (the fs configs carry a legacy BR2_KERNEL_MIRROR="http://www.kernel.org/pub/") is fixed on the kernel-6.18 branch in 572c994; if this PR is wanted on master too I can cherry-pick that one-liner onto master separately.

Note: changing build.sh re-keys the buildroot-dl-* Actions cache (keyed on hashFiles('**/build.sh')); the prefix restore-key means the first run after merge restores the old cache and only downloads what's missing. I also deleted today's poisoned cache entry so it can't be restored again.

🤖 Generated with Claude Code

mastacontrola and others added 4 commits July 5, 2026 08:30
…l.org

--fs-download-only ignored the exit status of 'make source', so the CI
download_filesystem_packages job went green today (run 28741856230)
despite failing to download linux-6.18.38.tar.xz for all three arches —
which then poisoned the Buildroot dl cache and failed every init build
downstream. Propagate the failure.

Also fetch the kernel tarball from cdn.kernel.org instead of
www.kernel.org: the www frontend is what was timing out today, and the
CDN is the endpoint kernel.org documentation recommends for downloads
(it's also Buildroot's default BR2_KERNEL_MIRROR these days).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s it in gettext-devel

The dependency check greps installed package names, so on Fedora/RHEL
it always reported autopoint missing (and --install-dep tried to
'dnf install autopoint', which doesn't exist). Move autopoint to the
Debian list and check/install gettext-devel on RHEL-family instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
partclone (PARTCLONE_AUTORECONF = YES) fails at configure with
"Can't exec aclocal" on hosts without automake. Ubuntu CI runners
ship it preinstalled, which masked the missing entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pping name lists

The check piped the full installed-package list through an unanchored
grep, so any package whose name contains a dependency's name satisfied
the check: libtool-ltdl passed for libtool while libtoolize was
actually missing. Anchoring the match instead would break names that
are provided by a differently-named package (wget via wget2-wget on
Fedora 40+).

Ask the package manager directly instead: rpm -q --whatprovides on
RHEL-family (resolves virtual provides) and dpkg -s with an
installed-status check on Debian-family.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant