Record the Windows packaging decisions and today's install run (#57)
ADR-0005: Velopack packer only, our own Ed25519 manifest, full packages, accepted root-launcher path (same-user write), static C runtime. The guide records the 1.0.0 run: non-elevated silent install, Start Menu shortcut opening the installed exe with existing data, uninstall and reinstall keeping config, Seasons and Parties, tampered package refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit was merged in pull request #65.
This commit is contained in:
1 parent
611a19ce28
commit
c5ed246668
2 files changed
+28
-1
No files matched your search
@@ -0,0 +1,25 @@
|
||||
---
|
||||
status: accepted
|
||||
---
|
||||
|
||||
# Package with Velopack's packer and authenticate updates with our own signed manifest
|
||||
|
||||
Arena Tracker installs per user with Velopack 1.2.161 (`scripts/package`), but only its packer is used: the app never calls the Velopack SDK. In that version the SDK's startup path opens cached packages to read their manifests even with auto-apply disabled, and nothing in Velopack checks a package against a project key. Each release therefore carries a manifest signed with the project's Ed25519 key, binding the app, the Windows target, the version, the channel and the source commit to the SHA-256 of one full package. The core's `verify_release` checks it before anything opens the package as an archive. Releases contain full packages only.
|
||||
|
||||
Velopack also installs a root launcher, `Arena Tracker.exe`, which runs `Update.exe start`. If the installed manifest is unreadable, that command opens the latest `packages\*.nupkg` to read its manifest, and if an `app-*` folder exists it applies that package without any signature check. Our Start Menu shortcut targets `current\arena-tracker.exe` and never runs the launcher. Both paths need a file written into `%LOCALAPPDATA%\ArenaTracker` by the same Windows account, which could equally replace the app's executable. We accept this residual path (decided on 2026-11-20, as #57 required before adopting Velopack).
|
||||
|
||||
The MSVC C runtime is linked statically (`.cargo/config.toml`), so a package ships no `vcruntime140.dll` that would vary with the build machine's Visual Studio redistributable.
|
||||
|
||||
## Considered Options
|
||||
|
||||
- **Velopack SDK at startup**: automatic updates for free, but it opens unauthenticated local packages before the app can check them.
|
||||
- **Delete the installer's package copy after each install or update**: leaves the launcher nothing to open, at the cost of altering files Velopack manages; it protects only against a writer who can already replace the app.
|
||||
- **Our own installer and updater**: no residual path, but a much larger amount of code to write and maintain.
|
||||
- **Packer only, own signed manifest, accepted launcher path** (chosen).
|
||||
|
||||
## Consequences
|
||||
|
||||
- The updater must download into a folder outside the installation and Velopack's cache, call `verify_release` there, and hand exactly those verified bytes to Velopack; unverified bytes never enter `%LOCALAPPDATA%\ArenaTracker`, even after an interrupted download.
|
||||
- Delta packages stay off (`--delta None`) until their preparation path can be authenticated too.
|
||||
- Upgrading Velopack means re-reading its startup, locator and install code for new paths that open local packages.
|
||||
- The private key never enters the repository, the app or the artefacts; only its public key is built into the executable.
|
||||
Reference in new issue
Block a user