diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-10-26 22:39:25 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-11-10 08:50:47 +0100 |
commit | d6e148c60b71ab2ea28e59a35e7e8ab168e3d329 (patch) | |
tree | 269d6c00963b78ed87516b03532c2fdf7ef0e4ec /scripts | |
parent | d258243cb7bd9919c81f33a21273b867d3d81283 (diff) | |
download | ptxdist-d6e148c60b71ab2ea28e59a35e7e8ab168e3d329.tar.gz ptxdist-d6e148c60b71ab2ea28e59a35e7e8ab168e3d329.tar.xz |
ptxd_make_world_init: define variables for more reproducible kbuild packages
These variables are used by kernel and barebox packages. Define those to
get more reproducible results.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_world_common.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh index a61e9c910..4b8afb0c0 100644 --- a/scripts/lib/ptxd_make_world_common.sh +++ b/scripts/lib/ptxd_make_world_common.sh @@ -413,6 +413,13 @@ ptxd_make_world_init() { *) ptxd_bailout "<PKG>_MAKE_PAR: please set to YES or NO" ;; esac + # + # reproducible builds for kbuild + # + # use a date/time format without spaces to avoid problems + local kbuild_date="$(date --utc --date=@${SOURCE_DATE_EPOCH} -Iseconds)" + pkg_env="${pkg_env} KBUILD_BUILD_TIMESTAMP=${kbuild_date} KBUILD_BUILD_USER=ptxdist KBUILD_BUILD_HOST=ptxdist" + exec 2>&${PTXDIST_FD_LOGERR} if [ -n "${PTXDIST_QUIET}" ]; then exec 9>&1 |