Repository navigation
fix(library): pin the three remaining registry framework archives - #2158
Conversation
sam-core 1.6.12, framework-arduinoteensy 1.160.0 and framework-cmsis-atmel 1.2.2 still unpacked an unverified download (checksum: None). Each now carries a SHA-256 const taken 2026-11-22 from the exact dl.registry.platformio.org URL the module builds, passed from every constructor, with a test proving the pin reaches PackageBase::install. Continues the #2128 checksum work (#2130/#2137).
|
Full |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
What
Three framework/header packages still constructed
PackageBasewithchecksum: None, so a truncated or substituted download was unpackedunverified — the same integrity gap #2130 and #2137 closed for AVR, SAMD,
RP2040, ESP8266, Apollo3, STM32, mbed and SiLabs. This pins the remaining
three, all of them
dl.registry.platformio.orgartifacts:library/sam_core.rsframework-arduino-samc657856d…94b9library/teensy_core.rsframework-arduinoteensyb1c21d18…e34dlibrary/cmsis_atmel.rsframework-cmsis-atmelde7778f0…a60cEach module gains a
*_SHA256const with a provenance comment (byte size anddate), the const is passed from every constructor (
new,with_override,with_cache_root), and one test per module asserts the pin is wired throughboth
newandwith_cache_root— a test that calls the constant directlywould prove the value, not the wiring.
Why these are safe to pin
Registry artifacts are immutable per version and the modules build their URL
from a const version, so the pin cannot drift without a version bump — and a
bump that forgets the digest now fails the test instead of silently unpacking
something new.
PackageBase::installverifiesself.checksumon the wholearchive before extraction (
crates/fbuild-packages-fetch/src/lib.rs:551-560),so the pin is enforced, not decorative.
Verification (real output)
https://api.registry.platformio.org/v3/packages/platformio/tool/{framework-arduino-sam,framework-arduinoteensy,framework-cmsis-atmel}resolves the same three download URLs for those versions, so the hashes
describe the canonical artifacts.
soldr cargo test -p fbuild-library --lib— full suite result is in thefirst comment on this PR (posted from the run).
soldr cargo fmtclean on the three files.Deliberately not touched
esp32_framework/,esp32_platform.rs,esptool.rs— resolved at runtimefrom mutable platform metadata / a moving
stabletag, which audit: hard-coded vendor download URLs that bypass the fbuild mirror bucket (#2029 leftover) #2128's tablealready classifies as intentionally direct.
ch32v_core.rs,nrf52_core.rs— need their own URL/submodule work; keptout to keep this PR one class of change.
#2128 stays open (remaining cells: bucket uploads for the non-GitHub vendor
hosts, which need maintainer approval, and the pinned-GitHub-release-asset
prefix-allowlist decision, which reverses part of #1815).