On Thu, 2020-11-12 at 15:43 -0800, Jate Sujjavanich wrote:
> 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.

Thanks for mentioning that, it does sound like that is doing something
we no longer should be doing now source_date_epoch is working in most
packages properly.

There are some files such as the rpm database and any other files not
under control of package management which would need this handling to
have the images be 100% reproducible so its not entirely
straightforward though.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51377): https://lists.yoctoproject.org/g/yocto/message/51377
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