Identifying Inputs to a Reproducible Build

A reproducible build needs documented source, tool versions, dependencies, relevant settings, and enough environment information to produce the expected artifact.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Start with one output
  2. Verify under another work directory
  3. Identify invisible configuration in a reproducibility problem
  4. Verify independent builds from the same declared set

Start with one output

A packaged command may include a timestamp or generated order from directory traversal. Recording only the source commit will not account for those differences. Stable file order handles one common source of drift.

Verify under another work directory

Build twice from fresh inputs in different local paths and compare the chosen outputs. If paths appear in the artifact, document whether that is expected. Reproducible program runs explain how to inventory such ambient inputs.[1]

Identify invisible configuration in a reproducibility problem

An archive builder that sorts filenames using a process locale can produce different order under another locale, even when every input file matches. Record the sort rule or set an explicit one. An output that writes the current timestamp has another environmental input. See stable file order.

Declared bytes: source and manifest
Additional inputs: tool version, sort behavior, timestamp policy
Record or control any of them that can affect artifact bytes

Verify independent builds from the same declared set

Matching source revisions are a starting point. Build in two fresh directories and compare results. If they differ, inspect ordered entries, metadata and generated content to find which undeclared input leaks into output.

References

  1. Free Software Foundation, GNU Make Manual ↩