The SOURCE_DATE_EPOCH[1] environment variable can be used as part of a strategy for reproducible ports builds[2]. Building sysutils/u-boot-rpi without the coreutils package (which provides GNU date installed as gdate) fails with: CHK include/generated/timestamp_autogenerated.h Makefile:1317: recipe for target 'include/generated/timestamp_autogenerated.h' failed gmake[1]: *** [include/generated/timestamp_autogenerated.h] Error 42 gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/u-boot-rpi/work/u-boot-2016.01' *** Error code 1 The Makefile notes that GNU date is required if using SOURCE_DATE_EPOCH: # The SOURCE_DATE_EPOCH mechanism requires a date that behaves like GNU date. # The BSD date on the other hand behaves different and would produce errors # with the misused '-d' switch. Respect that and search a working date with # well known pre- and suffixes for the GNU variant of date. define filechk_timestamp.h (if test -n "$${SOURCE_DATE_EPOCH}"; then \ ... The ReproducibleBuilds wiki describes a technique[3] for supporting BSD date, summarized here: 13:11 < mapreri> date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT" [1] https://reproducible-builds.org/specs/source-date-epoch/ [2] https://reproducible-builds.org/ [3] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell
Maintainer feedback?
Assign to current maintainer. (manu: is this PR still relevant?)