Repository navigation
The ESP's records reach a terminal and update.log only in the shape Kryptik writes them - #234
Merged
Merged
Conversation
…ryptik writes them: kryptik-update status and rollback and kryptik-recover printed committed-slot and version-a/b as found, so whoever held the disk could put terminal sequences on root's screen or a false version in status build/service-scripts/esp-records.sh reads them for every tool that shows them: esp_slot gives a or b, esp_version a release's version (MAJOR.MINOR.PATCH as release-keys.sh numbers a release, then a development build's dated parts), each from a bounded first line, and unknown otherwise; a missing record reads as the caller says. kryptik-update status and rollback, kryptik-recover --status and its commit message, and the medium's install verify line use them; boot-check lists the file. boot-success's read of committed-slot is left as #226 has it, a or b or nothing. tools/tests/esp-records.sh covers the shapes (terminal sequences, words after a version, a second line, overlong, empty, absent); tools/tests/update-esp.sh runs the tool's own cmd_status on rewritten records.
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.
The ESP is plain FAT, and only its kernels are signed. Its records (
kryptik/committed-slot,kryptik/version-a,kryptik/version-b) were printed as found:kryptik-update status(lines 103 and 105), the slot's version thatkryptik-update rollbackwrites toupdate.logand the terminal,kryptik-recover --statusand its commit message, and the medium's install verify line. Whoever held the disk could rewrite them to carry terminal control sequences onto root's screen, or to makestatusname a version that is not there.What changed:
build/service-scripts/esp-records.shis the one reader for all of them.esp_slot FILE [ABSENT]printsaorb.esp_version FILE [ABSENT]prints a version in the shape the release flow produces: MAJOR.MINOR.PATCH without leading zeros, asbuild/lib/release-keys.shnumbers a release, optionally followed by a development build's parts, such as0.1.20261007.1a2b3c4d.1from stage 06 and the Distro workflow.unknownfor anything else. A missing record prints what the caller asks (nonewhere status said so before).kryptik-updatesources the reader withdevices.sh;kryptik-recoverandinstaller-run.shsource it at the top; boot-check lists it.boot-success.shis untouched: its read ofcommitted-slotis only compared, and #226 already narrows it toa,bor nothing.How it is proven: the new
tools/tests/esp-records.shcovers each shape: releases and development builds taken; terminal sequences, words after a version, a version on the second line, overlong, empty and absent records refused.tools/tests/update-esp.shruns the tool's owncmd_statuson rewritten records and expectsunknownand no escape byte in its output. The Distro run's update suite readskryptik-update status("committed slot: b") and passes through every rollback and recovery. Locally the new fixture passes 21 of 22: Git for Windows' sed strips the carriage return in one case, which sed on Linux keeps.Distro run 37571834362 at b756538: every part green (install, update, integrity and zones, inputs, boot, desktop, production update-test 27/0) except build/host-suites, whose one failing check is tools/tests/glibc-branch-patch.sh; #233 fixes that on main, and this branch predates it. Taken on that basis by the integrator. CI green.