Commit 796873cf by Evgeni Golov Committed by Stéphane Graber

nicer date format and support for SOURCE_DATE_EPOCH in LXC_GENERATE_DATE

Using $(date) for LXC_GENERATE_DATE has various flaws: * formating depends on the locale of the system we execute configure on * the output is not really a date but more a timestamp Let's use $(date --utc '+%Y-%m-%d') instead. While at it, also support SOURCE_DATE_EPOCH [1] to make the build reproducible [1] https://reproducible-builds.org/specs/source-date-epoch/Signed-off-by: 's avatarEvgeni Golov <evgeni@debian.org>
parent 58325fd7
......@@ -502,7 +502,7 @@ AS_AC_EXPAND(LXC_DEFAULT_CONFIG, "$sysconfdir/lxc/default.conf")
AS_AC_EXPAND(DATADIR, "$datadir")
AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
AS_AC_EXPAND(DOCDIR, "$docdir")
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')")
AS_AC_EXPAND(LXCPATH, "$with_config_path")
AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf")
AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment