From 402fc5a6000bf0ec12f05d4aa2b3e250ec85a60a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 2 Aug 2019 11:41:36 +0200 Subject: Implement support for SOURCE_DATE_EPOCH environment variable reproducible-builds.org suggests the use of an environment variable as a source for time stamps: https://reproducible-builds.org/specs/source-date-epoch/ This commit adds support for setting the default mtime from the variable, if it is set and only defaulting to 0 if not. The timestamp given by the command line switch takes precedence. Signed-off-by: David Oberhollenzer --- doc/tar2sqfs.1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc/tar2sqfs.1') diff --git a/doc/tar2sqfs.1 b/doc/tar2sqfs.1 index 76178bf..7965a26 100644 --- a/doc/tar2sqfs.1 +++ b/doc/tar2sqfs.1 @@ -52,7 +52,7 @@ rd. uid=;0 gid=;0 mode=;0755 -mtime=;0 +mtime=;\fB$SOURCE\_DATE\_EPOCH\fR if set, 0 otherwise .TE .TP .TP @@ -95,6 +95,13 @@ If any unsupported section or extended attribute key is encountered in an archive a warning message is written to stderr. If the \fB\-\-no\-skip\fR option is set, processing aborts. By default, unknown sections and unsupported extended attributes are simply skipped after issuing a warning. +.SH ENVIRONEMNT VARIABLES +If the command line switch \fB\-\-defaults\fR is not used or no default mtime +is specified, the value of the environment variable \fBSOURCE\_DATE\_EPOCH\fR +is used for all file and filesystem timestamps. + +If \fBSOURCE\_DATE\_EPOCH\fR is not set, not a parsable number or it is out of +range, the timestamps default to 0. .SH EXAMPLES .TP Turn an uncompressed tar archive into a squashfs image: -- cgit v1.2.3