Skip to content

fix(updater): set the real Sparkle EdDSA public key (was a placeholder)#6

Merged
BlackHole1 merged 1 commit into
mainfrom
fix/sparkle-eddsa-public-key
Jun 30, 2026
Merged

fix(updater): set the real Sparkle EdDSA public key (was a placeholder)#6
BlackHole1 merged 1 commit into
mainfrom
fix/sparkle-eddsa-public-key

Conversation

@BlackHole1

Copy link
Copy Markdown
Member

What

0.1.0-beta.1 opened with 「无法启动更新程序 / Failed to start updater」 on every launch. Root cause: Sources/CloseUp/Info.plist shipped SUPublicEDKey as the literal REPLACE_WITH_GENERATED_ED25519_PUBLIC_KEY placeholder, so Sparkle could not decode it at startUpdater.

Live Sparkle log from the installed beta.1:

[org.sparkle-project.Sparkle:Sparkle] The provided EdDSA key could not be decoded.
[org.sparkle-project.Sparkle:Sparkle] Fatal updater error (1): The EdDSA public key is not valid for CloseUp.

This sets the real ed25519 public key — the shared signing key whose private half is the SPARKLE_EDDSA_PRIVATE_KEY CI secret; LockIME ships the identical SUPublicEDKey.

Verification

  • The key decodes to exactly 32 bytes (the exact check Sparkle does at startUpdater); sign_update --verify of a beta.1 signature against it passes.
  • A local Release build embedding it launches with no EdDSA could not be decoded / Fatal updater error in the Sparkle log (vs. beta.1 which logs both).

Out of scope / operational (not in this diff)

Two further one-time release-setup gaps that were also undone (mirrors what LockIME has correct) — handled operationally, not in code:

  • CI secret SPARKLE_EDDSA_PRIVATE_KEY value did not sign (both 0.1.0 and beta.1 appcasts shipped without sparkle:edSignature) → re-set from the keychain.
  • GitHub Pages was disabled (feed 404'd) → enabled (gh-pages / root); feed now serves 200.

⚠️ 0.1.0-beta.1 and the universal 0.1.0 cannot auto-update to the fix (their embedded key is broken) — those users must download the next build by hand.

0.1.0-beta.1 shipped `SUPublicEDKey` as the literal
`REPLACE_WITH_GENERATED_ED25519_PUBLIC_KEY` placeholder, so Sparkle could
not decode it at `startUpdater` and showed "无法启动更新程序 / Failed to
start updater" on every launch (Release sets `startingUpdater: true`;
Debug never starts it, so this only bit Release and was never caught
locally).

Use the real ed25519 public key — the shared signing key whose private
half is the `SPARKLE_EDDSA_PRIVATE_KEY` CI secret; LockIME ships the same
`SUPublicEDKey`. Verified: it decodes to exactly 32 bytes, and a Release
build embedding it no longer logs "The provided EdDSA key could not be
decoded / Fatal updater error" on launch.

Note: 0.1.0-beta.1 (and the universal 0.1.0) cannot auto-update to this —
their embedded key is broken — so those users must download the next
build by hand.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e27154e-f9af-47c5-9766-73c514a6a286

📥 Commits

Reviewing files that changed from the base of the PR and between e8a65f4 and b15e36d.

📒 Files selected for processing (2)
  • Sources/CloseUp/Info.plist
  • Sources/CloseUp/Updates/UpdateController.swift

Summary by CodeRabbit

  • Bug Fixes
    • Updated the app’s update configuration to use a valid signing key, improving updater reliability for release builds.
    • Clarified update behavior so debug builds remain inactive, preventing unintended update checks during development.

Walkthrough

The SUPublicEDKey value in Info.plist is changed from a placeholder string to a real base64-encoded Ed25519 public key, with the adjacent comment updated to describe CI-generated EdDSA signing. The top-of-file documentation comment in UpdateController.swift is reworded to reflect that Release builds require a valid SUPublicEDKey or Sparkle refuses to start, and that Debug builds never start the updater because startingUpdater: false.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required type(scope): subject format and accurately describes the key update.
Description check ✅ Passed The description is clearly related to the Sparkle updater key fix and its validation, so it passes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/sparkle-eddsa-public-key

Comment @coderabbitai help to get the list of available commands.

@BlackHole1 BlackHole1 merged commit 6668cd5 into main Jun 30, 2026
3 checks passed
@BlackHole1 BlackHole1 deleted the fix/sparkle-eddsa-public-key branch June 30, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant