fix: let the app update the startup.sh our builds ship #5

Open
oap wants to merge 1 commit from fix/startup-script-checksum into mainline
Owner

What

  • patches/0002-startup-script-update-checksums.patch adds dcb85142…, the hash of the startup.sh shipped in v0.7.3.1 (stock v0.7.3 plus 0001-), to updatableChecksums in services/service.ts.
  • Workflow: after applying patches, the build fails if the shipped startup.sh's hash isn't in that list. Upstream follows the same convention: its own current hash is always listed.
  • README: after an update, open the app once and do a real reboot, or call updateStartupScript with luna-send. patches/README.md explains the checksum rule.

Why

On the TV, v0.7.3.1 installed fine, but dropbear still offered passwords. The boot hook runs /var/lib/webosbrew/startup.sh, a copy that only updateStartupScript refreshes. That call happens when the app's frontend starts, and the update was started from the old app, so the copy stayed stock until updateStartupScript was run by hand.

The copy is only replaced if its current hash is in updatableChecksums. Stock v0.7.3's hash is on that list, which is why the manual call worked. Ours isn't, so the next build would report the TV's copy as "manually modified" and never replace it.

Testing

  • Both patches apply cleanly to upstream v0.7.3, and the patched startup.sh hashes to dcb85142…, which matches the TV.
  • The new check passes on that tree and fails once startup.sh is modified.
  • Not run in CI. This PR changes service.ts, not startup.sh, so the next rebuild (v0.7.3.2) ships the same boot script, and the TV should see no change there.

🤖 Generated with Claude Code

## What - **`patches/0002-startup-script-update-checksums.patch`** adds `dcb85142…`, the hash of the `startup.sh` shipped in v0.7.3.1 (stock v0.7.3 plus `0001-`), to `updatableChecksums` in `services/service.ts`. - **Workflow:** after applying patches, the build fails if the shipped `startup.sh`'s hash isn't in that list. Upstream follows the same convention: its own current hash is always listed. - **README:** after an update, open the app once and do a real reboot, or call `updateStartupScript` with `luna-send`. `patches/README.md` explains the checksum rule. ## Why On the TV, v0.7.3.1 installed fine, but dropbear still offered passwords. The boot hook runs `/var/lib/webosbrew/startup.sh`, a copy that only `updateStartupScript` refreshes. That call happens when the app's frontend starts, and the update was started from the old app, so the copy stayed stock until `updateStartupScript` was run by hand. The copy is only replaced if its current hash is in `updatableChecksums`. Stock v0.7.3's hash is on that list, which is why the manual call worked. Ours isn't, so the next build would report the TV's copy as "manually modified" and never replace it. ## Testing - Both patches apply cleanly to upstream v0.7.3, and the patched `startup.sh` hashes to `dcb85142…`, which matches the TV. - The new check passes on that tree and fails once `startup.sh` is modified. - Not run in CI. This PR changes `service.ts`, not `startup.sh`, so the next rebuild (`v0.7.3.2`) ships the same boot script, and the TV should see no change there. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The TV boots from a copy of startup.sh at /var/lib/webosbrew/startup.sh,
and updateStartupScript only replaces that copy if its sha256 is in
updatableChecksums. Our patched script is not upstream's, so the next
build would have called the TV's copy "manually modified" and kept it,
leaving later startup.sh changes stuck.

Patch 0002 adds the hash of the startup.sh we shipped in v0.7.3.1. The
workflow now fails if the shipped startup.sh's hash is not listed, so a
future change to it cannot strand the TV's copy.

The README now says to open the app once and reboot after an update,
because the update runs from the old app and copies the old script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request has changes conflicting with the target branch.
  • README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/startup-script-checksum:fix/startup-script-checksum
git switch fix/startup-script-checksum
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
oap/webos-homebrew-channel-builder!5
No description provided.