aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2020-10-30 20:30:18 +0800
committerGao Xiang <hsiangkao@redhat.com>2020-11-01 23:44:29 +0800
commit4d109df7f04264eb17892ad0fd2928a1d2bc4542 (patch)
tree55a6f954a4ba56d4f636c6842f98616bfee39427 /include
parent10d529afab6e708a7aeaceb1fc0bfba6668fa9d6 (diff)
downloaderofs-utils-4d109df7f04264eb17892ad0fd2928a1d2bc4542.tar.gz
erofs-utils: support $SOURCE_DATE_EPOCH
Currently, we use -T to set a given UNIX timestamp for all files, yet reproducible builds [1] requires what is called "timestamp clamping", IOW, a timestamp must be used no later than the value of this variable. Let's support $SOURCE_DATE_EPOCH as well. [1] https://reproducible-builds.org/specs/source-date-epoch/ Link: https://lore.kernel.org/r/20201030123020.133084-2-hsiangkao@redhat.com Suggested-by: nl6720 <nl6720@gmail.com> Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/erofs/config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/erofs/config.h b/include/erofs/config.h
index e425ce2..02ddf59 100644
--- a/include/erofs/config.h
+++ b/include/erofs/config.h
@@ -29,11 +29,18 @@ enum {
FORCE_INODE_EXTENDED,
};
+enum {
+ TIMESTAMP_NONE,
+ TIMESTAMP_FIXED,
+ TIMESTAMP_CLAMPING,
+};
+
struct erofs_configure {
const char *c_version;
int c_dbg_lvl;
bool c_dry_run;
bool c_legacy_compress;
+ char c_timeinherit;
#ifdef HAVE_LIBSELINUX
struct selabel_handle *sehnd;