I have sussed out several behaviors of the image build having to do with 
reproducible builds. It seems like bitbake creates the rpm with the correct 
modification times per the reproducible_builds bbclass. When do_rootfs installs 
the packages, the timestamps seem correct.

The function reproducible_final_image_task sets all files in rootfs to be 
REPRODUCIBLE_TIMESTAMP_ROOTFS which is the last commit time in poky by default. 
This occurs after package installation and before image creation.

When the image creation code runs, it seems like each utility has different 
behavior on respecting SOURCE_DATE_EPOCH in the environment. The ext3 utility 
allowed mtime's beyond the default value of 0. The squashfs utility enforced 
the restriction of no mtime's being beyond 0 seconds since the epoch. Once I 
set this to the build timestamp (DATETIME) in the image recipe, the squashfs 
image had correct times.

So to get this working, you'd need to disable reproducible_final_image_task, 
and make sure the image creation utility is not wiping out the modification 
times of files created by rpm.

I'd argue that we'd want reproducible_final_image_task to not override all the 
mtime's of files. We probably have to check the other file system type to see 
their behavior with SOURCE_DATE_EPOCH as well.

- Jate
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51373): https://lists.yoctoproject.org/g/yocto/message/51373
Mute This Topic: https://lists.yoctoproject.org/mt/78004079/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to