Repository navigation
K2GO-549 fix(rootfs): ship no per-box secrets; the box makes them at first start - #742
Merged
Merged
Conversation
…first start The published rootfs carried the Forgejo secrets and signing keys, the Calibre-Web keys, the Kolibri facility root key, machine-id and the IIAB uuid of the CI bake, so every box shared them. The bake now strips them, and a one-shot PDSM entry makes the missing ones on the box before the services start.
Match the Kolibri pid by its command line, drop a stale pid before deprovision, read quoted IIAB vars, limit Forgejo secrets to the generate-secret kinds, and check the strip against the app.ini paths.
If first-start provisioning fails, its setup wizard would let any network client create the superuser. The pdsm kolibri start now checks Kolibri's own provisioned flag and stays down; the next box start provisions again.
A killed run can leave a read-only temp file (machine-id is 0444) that a non-root app uid cannot truncate, so every later start failed for that item.
The installer and its /opt/iiab-android clone came from main, so a branch bake did not test the branch. The builder takes --k2go-ref (default main); test and dev dispatches pass their branch, publish keeps main.
The app kills a booting box after 60 s with no output. Kolibri provisioning on a slow phone can be longer, so each run prints a line every 10 s.
…eneration The app shows a boot screen while the box makes its per-box values. A start that makes nothing prints neither line.
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.
What changes
static/box-identity/k2go_box_identity.py(stdlib only) is the one list of these values.--stripremoves them in the bake. With no argument, it runs at each box start and makes only the missing values. It never changes a present value, uses no marker file, and never prints a value.00-k2go-box-identityruns the step before any service starts (pdsm starts entries in lexical order). If the step fails, the box still starts.iiab-androidinstalls and enables the step. On a device install, the roles already made the values, so the step has nothing to do.build-iiab-rootfs.sh: six new checks fail the bake if a secret ships or the step is not enabled.Why
Verifications
provisiondevicefails. First-start time on a slow phone against the app's 45 s start wait.Notes