strip-nondeterminism
Remove non-deterministic data for reproducible builds
TLDR
Strip file
SYNOPSIS
strip-nondeterminism [--type type] [--timestamp ts] [options] files
DESCRIPTION
strip-nondeterminism removes sources of non-determinism from files to enable reproducible builds. Build artifacts often contain embedded timestamps, user IDs, file ordering variations, and other metadata that differ between builds even when the source code is identical. This tool normalizes those elements so that building the same source always produces bit-identical output.
The tool supports multiple file formats including ZIP archives, JAR files, PNG images, gzip files, and ar archives. For each format, it identifies and strips or normalizes the specific metadata fields that introduce non-determinism, such as modification timestamps in archive entries or creation dates in PNG headers.
It is part of the Debian Reproducible Builds infrastructure and is commonly integrated into build systems as a post-processing step. A fixed timestamp can be provided to replace variable ones, typically sourced from the SOURCEDATEEPOCH environment variable.
PARAMETERS
--type TYPE
File type.--timestamp TS
Set timestamp.-v
Verbose output.-n
Dry run.--help
Show help.
CAVEATS
Format-specific. May need type hint. Part of Debian reproducible builds.
HISTORY
strip-nondeterminism was created for the Reproducible Builds project to make build outputs deterministic.
