summaryrefslogtreecommitdiff
path: root/scripts/build/binary
diff options
context:
space:
mode:
authorRoland Clobus <rclobus@rclobus.nl>2021-01-02 17:41:50 +0100
committerLuca Boccassi <bluca@debian.org>2021-01-15 09:22:29 +0000
commit91e1e65c873291d11495730d8ce6df5940706c2b (patch)
tree98a1571299f411b85e92cee9e76ad4e5e203d822 /scripts/build/binary
parent5636820be5ee2d247cba30876fc67ae27f295ed8 (diff)
downloadvyos-live-build-91e1e65c873291d11495730d8ce6df5940706c2b.tar.gz
vyos-live-build-91e1e65c873291d11495730d8ce6df5940706c2b.zip
Apply SOURCE_DATE_EPOCH to newly generated files and create a log
Diffstat (limited to 'scripts/build/binary')
-rwxr-xr-xscripts/build/binary3
1 files changed, 3 insertions, 0 deletions
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 "${@}"