LinuxCommandLibrary

strip-nondeterminism

A tool to remove non-deterministic information (e.g. timestamps) from files.

TLDR

Strip nondeterministic information from a file

$ strip-nondeterminism [path/to/file]
copy


Strip nondeterministic information from a file manually specifying the filetype
$ strip-nondeterminism --type [filetype] [path/to/file]
copy


Strip nondeterministic information from a file; instead of removing timestamps set them to the specified UNIX timestamp
$ strip-nondeterminism --timestamp [unix_timestamp] [path/to/file]
copy

SYNOPSIS

strip-nondeterminism [-t filetype] filename ...

DESCRIPTION

strip-nondeterminism is a tool to strip bits of nondeterministic information, such as timestamps, from files. It can be used as a post-processing step to make a build reproducible, when the build process itself cannot be made deterministic.

OPTIONS

-t filetype, --type filetype

Use the normalizer for the given file type (ar, gzip, jar, zip). If this option is not specified, the file type is detected automatically based on the file name extension.

-T seconds, --timestamp seconds

Instead of stripping timestamps from files, set them to the given number of seconds since January 1, 1970.

--clamp-timestamp

Only replace timestamps if they are later than the time specified to --timestamp. You can use this option to ensure that only timestamps introduced as part of the build process are replaced. NOT YET IMPLEMENTED FOR ALL FILE FORMATS.

--normalizers SPEC

Enable or disable specific normalizers separated by a comma (eg. +foo,-bar. The magic values +all and -all will enable and disable all normalizers.

-h, --help

Display this help message.

-V, --version

Print only the version string and then quit.

AUTHORS

Andrew Ayer Chris Lamb

COPYRIGHT

strip-nondeterminism is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License, version 3.

Copied to clipboard