hi!
> Do you have a specific suggestion for how to use SOURCE_DATE_EPOCH
> here? I don't want to fake the time when all the files were created to
> 1970 or anything else. Having real mtimes seems useful.
You don't need to worry about the value, this variable is meant to be
set externally. From the reproducible-builds.org documentation, this is
suggested for shell scripts on GNU systems:
BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"
+%Y-%m-%d)"
(You can of course tweak this to your needs, the important part is
`--utc` and the construct for `--date="..."`)
https://reproducible-builds.org/docs/source-date-epoch/
From your build script's point of view, if $SOURCE_DATE_EPOCH is not
set, you may use the current time.
If it is set, it is supposed to contain a unix timestamp you can use.
How this value is derived is specific to the individual (Linux)
distributions, for example the Debian build system parses the datetime
out of the latest `debian/changelog` entry, Arch Linux picks the current
time at the start of the "official" build and documents this in build
metadata (that is parsed and used when attempting to reproduce the package).
Let me know if you have further questions. :)
Happy to help,
kpcyrd