Skip to content

ci: Publish a signed Windows update manifest on obs-rust's feed (#1736) - #1740

Closed
zackees wants to merge 2 commits into
fix/1730-obs-rust-update-feedfrom
fix/1736-windows-update-manifest
Closed

zackees wants to merge 2 commits into
fix/1730-obs-rust-update-feedfrom
fix/1736-windows-update-manifest

Conversation

@zackees

@zackees zackees commented Oct 22, 2026

Copy link
Copy Markdown
Member

Refs #1736. Stacked on #1737 (fix/1730-obs-rust-update-feed, itself on #1733 and #1727). Base is that branch, so no auto-merge; retarget to master once the stack lands.

What this does

  • ci/win_update_manifest.py (stdlib + openssl, run with uv run): unzips the release's OBS-Studio-Rust-<ver>-windows-x64.zip (rejects ../absolute entries) and writes manifest.json in the frontend/updater/manifest.hpp schema: one core package with every file's BLAKE2b-160 hash, size, empty compressed_hash (so the updater fetches the raw file, no .zst), the version as uint8 fields (daily beta.YYYYMMDD counts as beta 1), the tag's commit and a release-notes link. File names the updater's IsSafeFilename would refuse fail the build. It signs with hex RSA-SHA512 PKCS#1 v1.5 into manifest.json.sig, the detached form FetchAndVerifyFile reads since build: publish an obs-rust update feed and re-enable the in-app updaters #1730. If the build ships bin/64bit/updater.exe it is published signed too.
  • publish.yaml update-feed job: new step downloads the x64 zip, runs the script with OBS_RUST_UPDATE_RSA_PRIVATE_KEY, and the existing upload step puts manifest.json(.sig) on the update-feed release.
  • AutoUpdateThread.cpp.hpp: WIN_MANIFEST_URL, WIN_MANIFEST_BASE_URL, WIN_BRANCHES_URL, WIN_UPDATER_URL now point at releases/download/update-feed/. That code is only compiled with ENABLE_WIN_UPDATER.
  • Tests: ci/test_win_update_manifest.py (schema, hashes, sizes, unsafe names, zip-slip, signature verified with openssl dgst -verify against a throwaway key and rejected after tampering, updater.exe handling). ci/test_no_upstream_updater.py asserts the frontend URLs and the publish step. RED commit first.

Why ENABLE_WIN_UPDATER stays OFF

Turning it on would offer updates that fail. What's left:

  1. Per-file payloads aren't hosted. updater.exe downloads kCDNUpdateBaseUrl/<branch>/core/<name> from its built-in cdn-fastly.obsproject.com host (updater.cpp.hpp). A release can't host that: the x64 zip has 2,255 files (2,070 unique), more than a release's asset limit, and asset names can't contain folders. Options: a static host with a stable/core/<path> tree (GitHub Pages, R2/S3), or an updater change (content-addressed assets, or a few pack assets read with HTTP Range). Each needs a Windows run to verify, so I didn't make either change here.
  2. updater.exe isn't in the release zip. Only ENABLE_WIN_UPDATER builds produce it, so WIN_UPDATER_URL returns 404 for now. The client treats that as "no update", which is safe.
  3. kPatchManifestURL still POSTs to obsproject.com for deltas. It should be disabled or repointed so the updater always takes full files.
  4. Version comparison. Daily tags are all 0.1.0-beta.<date>, and OBS_COMMIT is empty unless OBS_VERSION contains g<sha>. So the manifest's version/commit can't tell one daily build from the next. Releases need a distinguishing version or commit baked in.
  5. A packaged test that installs an old build and updates it to the new one on a Windows runner.

Verified locally: the script on the real obs-studio-rust-v0.1.0-beta.20261020 x64 zip produced a 385 KB manifest of 2,255 files and a 512-byte hex signature. ./lint passes.

#1736)

Writes manifest.json (BLAKE2b-160 hash and size of every file in the release's
x64 zip) and its detached hex RSA-SHA512 signature to the update-feed release,
and points AutoUpdateThread's manifest, branches and updater.exe URLs at it.
ENABLE_WIN_UPDATER stays OFF: updater.exe still downloads per-file payloads
from its built-in CDN, which obs-rust does not host yet.
@zackees

zackees commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

Superseded by #1742. Per the maintainer's decision, the updaters stay on and offer only certified obs-rust releases (daily builds are pre-releases; a certify dispatch promotes one and attaches a signed feed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant