Skip to content

build: make Windows archive builds reproducible - #4642

Open
benma-agent wants to merge 7 commits into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/reproducible-windows-archive-2
Open

benma-agent wants to merge 7 commits into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/reproducible-windows-archive-2

Conversation

@benma-agent

@benma-agent benma-agent commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Use one pinned build pipeline for local and CI Windows archives on Windows 10/11,
including Home.

  • make windows-check-toolchain: verify dependencies and show installation guidance.
    CI provisions pinned tools, including through Chocolatey.
  • make qt-windows: build from the physical checkout at C:\bitbox-wallet-app, with
    controlled runtime deployment and normalized archive metadata. CI keeps building the unsigned installer so build artifacts can be used for testing.
  • Share reproducibility settings through env.mk.inc and isolate npm configuration
    across platforms.
  • ./scripts/compare-builds.sh <tar1> <tar2>: extract and compare directories with diff -qr.

Document setup, building, and same-commit comparisons in docs/BUILD.md.

Prepare the manifest and discovery helpers for the pinned Windows build.
Match installed compilers, SDKs, Qt and runtimes by their pinned files and
report installation instructions for missing or mismatched dependencies.

Follow-up commits provision these versions in CI and enforce the checks
in the Windows archive build.
Install the manifest versions, including Chocolatey MinGW and Visual Studio
Build Tools, and keep installation logs out of Go source metadata.

Prepare CI for the archive build toolchain checks. Keep the Visual Studio
edition alias until the build selects its compiler from the verified roots.
@benma-agent
benma-agent force-pushed the benma-agent/reproducible-windows-archive-2 branch from 2eb9594 to fba2c83 Compare November 26, 2026 12:50
windeployqt includes Qt Positioning's NMEA plug-in through Qt WebEngine.
That plug-in imports Qt6SerialPort.dll, which is also in the Windows v4.53.1
release. Require the serialport module in BitBox.pro so a missing module
fails at configuration time even though the app does not use its API.

Install Qt Serial Port in CI and list it in the local setup instructions.
Pin its DLL and include it in the expected runtime files. This prepares
the archive pipeline to use normal NMEA deployment without excluding the
plug-in from dependency discovery and manually copying it afterward.
@benma-agent
benma-agent force-pushed the benma-agent/reproducible-windows-archive-2 branch 2 times, most recently from 3ac16cf to f8c7b4e Compare November 26, 2026 14:02
@benma
benma requested a review from sutterseba November 26, 2026 14:03
@benma
benma marked this pull request as ready for review November 26, 2026 14:03
@benma
benma requested a review from a team as a code owner November 26, 2026 14:03
Build a physical checkout at C:\bitbox-wallet-app with pinned tools.
Use the verified installations directly and keep temporary files, caches
and native outputs under frontends/qt/build. Clear previous outputs
without following linked directories.

Require the physical checkout path before tool discovery or cleanup.
It stabilizes gnark-crypto's shared assembly include paths that Go's
-trimpath does not cover. Control the compiler environment, Qt deployment
and archive metadata so host configuration does not change the payload.

Use the same checked entry point locally and in CI. Copy the complete CI
checkout with robocopy to preserve the dangling Linux packaging symlink.
Include .git and initialized submodules, leaving the original workspace
intact for actions/checkout cleanup. Handle robocopy's nonzero success
codes explicitly.

Quote Make's path for recursive recipes and select Bash through the
verified PATH so installation paths containing spaces remain usable.
Use the checked Qt installation configuration directly.

Package the optional installer from the same app files. Start PowerShell
through Bash so a 32-bit bootstrap Make does not select 32-bit PowerShell
through Windows filesystem redirection.
Use the checked CRT file list to copy the runtime DLLs after the native
build. This keeps deployment and verification in sync when the pins change.

Remove the duplicated list from compile_windows.bat and its CRT path
variable so the batch script only compiles the Qt application.
Compare every extracted file with GNU diff, ignoring archive metadata
but preserving binary and line-ending differences. Accept local Windows
paths and remove temporary files after success or failure.
@benma-agent
benma-agent force-pushed the benma-agent/reproducible-windows-archive-2 branch from f8c7b4e to c4a918d Compare November 26, 2026 14:17
Export shared Go configuration, locale, timezone, and Qt hash seed from
env.mk.inc on all platforms. Preserve these settings through the Windows
environment reset, and include them in direct Android and iOS builds.

Scope npm user/global configuration isolation to buildweb on every
platform. Use absent configuration paths under the freshly cleared web
output directory; keep Windows cache placement in the Windows wrapper.

Remove the unused CXX setting, global npm prefix, and duplicate LANG.
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