Expand description
Repo-metadata resolution: from a distro spec to concrete kernel package URLs + sha256 checksums, pulled from each distro’s official repository metadata.
This module resolves metadata ONLY — it never downloads the kernel
packages themselves. Extraction of the resolved packages and the
download/cache integration are handled elsewhere; the seam between
them is the ResolvedDistroKernel this module returns.
§Endpoint choices
- Fedora — latest stable release number from
https://fedoraproject.org/releases.json(official, stable JSON, served by fedoraproject.org). It lists only shipped GA releases with numericversionfields, so filtering to all-digit versions and taking the max yields the current stable release without the Rawhide/Branched noise a mirror directory listing would carry. Kernel packages come from theupdatesrepo (falling back to the GAreleases/.../osrepo), debuginfo from the matchingdebugrepo. Package selection is by RPM EVR (rpmvercmp). - Ubuntu — latest LTS from
https://changelogs.ubuntu.com/meta-release-lts(official, plain text, carries the codename). Kernel = the HWE stack: thelinux-image-generic-hwe-{YY.MM}meta package’sDependspins the concretelinux-image-{kver}-generic, whose modules live inlinux-modules{,-extra}-{kver}-generic. debuginfo is the-dbgsymddeb fromddebs.ubuntu.com, with Launchpad’s primary archive API and file store as an independent resolution/download provider when the DDEB archive is unavailable. - Amazon Linux 2023 — repo base from
https://cdn.amazonlinux.com/al2023/core/mirrors/latest/{arch}/mirror.list. AL2023 carries parallel kernel STREAMS as differently-named packages — the defaultkernel(6.1) plus versionedkernel6.12/kernel6.18— with no Fedora-style kernel-core/modules split; each stream splits a handful of extra drivers,virtio_consoleamong them, into a<stream>-modules-extrasubpackage (verified against the live filelists metadata). The resolver picks the stream with the newest kernel by RPM EVR and pairs it with its modules-extra at the same EVR; debuginfo (<stream>-debuginfo, which carries the full vmlinux on its own) comes from the siblingdebuginfomirror. - SteamOS — Valve’s official package mirror
https://steamdeck-packages.steamos.cloud/archlinux-mirror/. The kernel lives in thejupiter-<MAJOR.MINOR>channels (Valve’s per-release trains; verified live:jupiter-3.7,jupiter-3.8). A baresteamospicks the highest version-numbered jupiter channel — the newest release train Valve publishes — because the mirror exposes no machine-readable stable pointer:jupiter-relis the legacy 3.0-era channel (its newest kernel is 5.13) and-main/-staging/-ci-testare development churn, so the numbered trains are the only sane axis; pinsteamos-3.7to hold an older train. The channel’s pacman database (jupiter-<v>.db, a compressed tar of per-packagedescfiles) declares name/version/sha256/filename; the kernel package islinux-neptune[-<series>](linux-neptune-618today) and the newest series wins by kernel version (compared withrpmvercmp, whose plain alnum-segment ordering matches pacman’svercmpfor these dotted versions). x86_64 only — Valve publishes no other architecture. No debug packages exist for linux-neptune anywhere on the mirror (the*-debug-*repos only mirror Arch’s own core/extra split), so SteamOS resolves with NO debuginfo — the one distro exempt from the mandatory-vmlinux policy; acquisition warns about what that degrades.
All metadata fetches ride the shared HTTP client and transient-retry
seam via crate::fetch::fetch_metadata_bytes /
crate::fetch::fetch_metadata_text. Parsing/selection is factored
into pure functions over &[u8] / &str so the unit tests exercise
them on small fixtures without touching the network.
Re-exports§
pub use crate::kernel_path::DistroKind;
Structs§
- Package
Ref - A single resolved package: name, version, ordered official download URLs, and the sha256 the repository metadata declares for it.
- Resolved
Distro Kernel - The resolved kernel for a distro spec: the packages that carry the kernel image + modules, plus the vmlinux-bearing debuginfo packages.
Functions§
- resolve_
distro_ kernel - Resolve a distro spec to concrete kernel package URLs + checksums for the host architecture.