Repository navigation
omamobile-firstboot 0.1.3: seed an offline clock before key setup - #97
Conversation
Phones without an RTC can start before the installed signing keys were created. Use the newest public keyring timestamp in the verified root image as a clock floor before GnuPG creates or imports keys, without moving an accurate clock backwards. The Linux firstboot tests cover an old clock, an accurate clock, absent keyrings, and ordering before pacman-key. Move this shared policy out of the tegu package. Co-Authored-By: Codex <codex@openai.com>
The package check uses cmp, which is absent from the minimal phone root. Declare diffutils as a check dependency so makepkg can run the full tests in a fresh build environment. Built with checks enabled on aarch64 tegu, installed 0.1.3-2, and ran the installed keyring setup against an isolated keyring root. Clock seeding and real pacman-key initialization and population passed. Co-Authored-By: Codex <codex@openai.com>
|
Thanks for splitting this out of the 9a package. It's what I hoped for: a small change in the shared first-boot step, with tests for an old clock, an accurate one, no keyrings and the order before Two things before it can merge, both about numbers:
Smaller things:
Thanks again: this fixes a first boot that could fail on any phone whose clock starts in the past. |
|
Following up on my 10-28 note: if you're busy, I'm happy to finish this myself, since maintainer edits are on. I'd set |
A new version starts at pkgrel=1; the -2 was a local rebuild. Nothing verifies the root image (there is no dm-verity), so the comment no longer calls it verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, done in 496f2e8: |
|
Thanks, h4rkl: 496f2e8 does exactly what I asked. I rechecked it against today's main (it merged cleanly, 0.1.3 was still free, both CI jobs green) and checked the floor itself: |
…rekross#97) A phone without a working RTC can start its first boot with a clock older than the project's signing keys, and gpg then skips them at pacman-key --populate ("created N days in the future"). Before key setup, take the newest mtime of the installed keyrings in /usr/share/pacman/keyrings as a floor and move the clock up to it; never move a clock that is already later, and do nothing without a keyring. The step runs first, so later steps see the corrected date too. Tests cover an old clock, an accurate one, no keyrings, and the order before pacman-key. diffutils is a check dependency for cmp. Fixes derekross#188, fixes derekross#190.
Phones without a working RTC can start before their package signing keys were created, causing offline key setup to fail. Seed the clock to the newest installed public-keyring timestamp before pacman-key runs, while leaving a newer clock unchanged. This shared policy belongs in omamobile-firstboot, separately from tegu support in #74.
Bump omamobile-firstboot to 0.1.3-2 and declare diffutils for package checks. Tests cover an old clock, an accurate clock, absent keyrings, and ordering before key setup.
Validation: native aarch64 makepkg with checks enabled on tegu; installed-package integrity checks; the installed keyring setup advanced the phone clock and successfully ran real pacman-key initialization and population in an isolated test keyring. This has not yet been tested through a clean full-device first boot. PR policy checks passed.