[2/2] do not log clamped file mtimes

Message ID 20240422185843.550406-2-felix.moessbauer@siemens.com
State Accepted, archived
Headers show
Series [1/2] remove conditional SDE paths | expand

Commit Message

MOESSBAUER, Felix April 22, 2024, 6:58 p.m. UTC
Modified file timestamps are expected in Debian and need to be clamped
to a fixed value to get reproducible builds. Explicitly logging which
files were touched does not add any value, as these lists are huge and
not related to any packages. By that, just don't log it.

This change is in sync with the reproducible debian installer, as well
as the rootfs handling in OE.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/image.bbclass | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 34faa6af..ff039438 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -439,14 +439,8 @@  EOSUDO
 
     # Set same time-stamps to the newly generated file/folders in the
     # rootfs image for the purpose of reproducible builds.
-    fn="${DEPLOY_DIR_IMAGE}/files.modified_timestamps"
-    if sudo find ${ROOTFSDIR} -newermt "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" \
-        -printf "%y %p\n" -exec touch '{}' -h -d@${SOURCE_DATE_EPOCH} ';' | egrep ^f >"$fn"; then
-        if [ -e "$fn" ]; then
-            bbwarn "modified timestamp (${SOURCE_DATE_EPOCH}) of $(cat "$fn" | wc -l) files for image reproducibly." \
-                    "List of files modified can be found in: .${DEPLOY_DIR_IMAGE}/files.modified_timestamps"
-        fi
-    fi
+    sudo find ${ROOTFSDIR} -newermt "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" \
+        -exec touch '{}' -h -d@${SOURCE_DATE_EPOCH} ';'
 }
 do_rootfs_finalize[network] = "${TASK_USE_SUDO}"
 addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess