From 91e1e65c873291d11495730d8ce6df5940706c2b Mon Sep 17 00:00:00 2001 From: Roland Clobus Date: Sat, 2 Jan 2021 17:41:50 +0100 Subject: Apply SOURCE_DATE_EPOCH to newly generated files and create a log --- scripts/build/binary | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/build/binary') diff --git a/scripts/build/binary b/scripts/build/binary index aa1d06ab2..971e28b95 100755 --- a/scripts/build/binary +++ b/scripts/build/binary @@ -68,6 +68,9 @@ if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then lb chroot_prep install "${CHROOT_PREP_MOUNTS}" "${@}" fi +# Apply SOURCE_DATE_EPOCH to all modified and created files +find binary -newermt "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" -printf "%y %p\n" -exec touch '{}' -d@${SOURCE_DATE_EPOCH} --no-dereference ';' > binary.modified_timestamps + # Building images lb binary_iso "${@}" lb binary_onie "${@}" -- cgit v1.2.3