Skip to content

Build the Windows binaries on a tag, as a second witness - #35

Merged
NiKrause merged 1 commit into
mainfrom
ci/release-binaries
Sep 18, 2026
Merged

NiKrause merged 1 commit into
mainfrom
ci/release-binaries

Conversation

@NiKrause

Copy link
Copy Markdown
Collaborator

Answers a question worth asking: the Windows binaries have only ever been built on one machine.

The exes users download are connected to the source by exactly one thing — a SHA256SUMS file signed with the maintainer's key. That is the same trust model Electrum uses, with one part missing: upstream has several people building the same tag and comparing hashes. That comparison is what makes a deterministic build worth anything.

The pieces are already here, unexercised

base image debian:trixie@sha256:13f29b68…, pinned by digest
packages Debian snapshot 20260227T144551Z
timestamps everything set to 2000-11-11T11:11:11Z, before and after the build
pyinstaller deterministic.spec

Two independent builds should therefore produce byte-identical binaries. Nobody has ever checked.

What this does

Builds the tag on a runner, uploads the artifacts, and prints the hashes into the log — a log line needs no download to compare.

It deliberately attaches nothing to the release. What ships is still built locally and signed locally; the trust model does not change. What this adds is the ability to say the two builds agree, or to discover that they do not.

Triggered by a dc* tag and by workflow_dispatch for an arbitrary ref, so it does not depend on whether the tag or this file lands first.

One detail that shaped the workflow: build-electrum-git.sh takes its version from git describe --tags, so the checkout uses fetch-depth: 0 — a shallow clone would name the binaries after the previous tag.

Not included

macOS, Android, AppImage and the tarball. The old Travis file described all of them; macOS was already disabled there (if: false, "travis started to always time out").

🤖 Generated with Claude Code

This project has only ever built on one machine. The binaries users download
are connected to the source by one thing: a SHA256SUMS file signed with the
maintainer's key. That is the same trust model Electrum uses -- except that
upstream has several people building the same tag and comparing hashes, which
is what makes a deterministic build worth anything.

The pieces for that are already here and have never been exercised: the
builder image pins its base by digest and its packages to a dated Debian
snapshot, every timestamp in the tree is set to 2000-11-11 before and after
the build, and pyinstaller runs from deterministic.spec. Two independent
builds should produce byte-identical binaries.

So this builds the tag on a runner and prints the hashes. It deliberately
attaches nothing to the release: what ships is still built locally and signed
locally. What this adds is the ability to say the two agree -- or to find out
that they do not, which would be worth knowing.

Triggered by a dc* tag, and by hand for a ref, so it is not tied to the order
in which a tag and this file arrive.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@NiKrause
NiKrause merged commit 6d50ffb into main Sep 18, 2026
4 checks passed
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