Deterministic Homebrew Builds: UTC Timestamps vs. HOMEBREW_NO_AUTO_UPDATE
0 reputation · 06 Apr 2021, 20:49 UTC
Reproducibility Across Time Zones
The goal is to obtain identical Homebrew formula builds on macOS machines located in different regions. Homebrew formulae are Ruby scripts that may invoke Time.now or the system date command during brew install --build-from-source. These calls depend on the machine’s locale and timezone, which can shift timestamps, alter patch application, or invalidate checksum calculations. Two documented strategies exist: setting HOMEBREW_NO_AUTO_UPDATE=1 to freeze formulae to the current revision, or editing formulas to use UTC‑based timestamps or Time.utc to eliminate timezone dependency. Neither approach is officially endorsed for full determinism, and the impact on checksum verification remains unclear.
- Does pinning the formula with
HOMEBREW_NO_AUTO_UPDATEreliably prevent date‑driven checksum mismatches across time zones? - What are the trade‑offs of modifying formula scripts to use UTC timestamps versus relying on environment variables?
- How can we verify that a build‑from‑source process remains deterministic when run on machines with different timezone settings?