poky/meta/classes-global
Richard Purdie 8c3866aa53 do_package/sstate/sstatesig: Change timestamp clamping to hash output only
The code was changing the timestamps of the files in the do_package output,
particularly the files added for debug sources. This was to do two things:

a) make do_package sstate more reproducible
b) ensure better hash equivalence matching

Unfortuately the debug source files are hardlinks into the source tree for
efficiency so touching these, touches a lot of files in ${B} and ${S}. This
causes unpredictable effects if compile is run again for example, or could
cause compiling in the install task.

The hash equivalence matching is of key importance but we can mimic that
using clamping of the file timestamps in the depsig output used to generate
the hashes.

This patch drops the global timestamp clamping, instead allowing the files
to retain their creation timestamps into sstate. This makes do_package sstate
slightly less reproducibile. We could clamp the sstate timestamps but that
would lead to two different sets of timestamps depending on whether the
data came from sstate or not. I'd prefer to have consistent code behaviour,
rather than differing behavhour depending on whether data came from sstate
or not.

If we wanted to have reproducibiliy and fix the "corruption" of S/B and have
consistent codepaths, the only other option would be two copies of the
sources, which could end up huge and seems the least desireable option.

This patch therefore drops the timestamp clamping in the sstate files
and tweaks the depsig data generation to clamp the timestamps for do_package
instead since this seems the best compromise.

I validated that rpm/deb/ipk files still generate correctly as before.

(From OE-Core rev: 0e6b2c761f6d727fe21a0ce2803a0f0aef236f59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 475759fdab7200488b2a568b2ba1aa31a456d113)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-12-09 06:25:53 -08:00
..
base.bbclass base/insane: Move S/B checks to more logical place in insane class 2024-05-23 11:26:39 +01:00
buildstats.bbclass classes: Update classes to match new bitbake class scope functionality 2022-08-12 15:27:17 +01:00
debian.bbclass package/package_write: Improve packagedata code location 2023-11-08 10:56:35 +00:00
devshell.bbclass devshell: Do not add scripts/git-intercept to PATH 2023-02-10 09:25:44 +00:00
insane.bbclass insane: Remove dependency on TCLIBC from QA test 2024-09-05 21:50:10 +01:00
license.bbclass license: Fix directory layout issues 2024-09-05 21:48:47 +01:00
logging.bbclass classes: Update classes to match new bitbake class scope functionality 2022-08-12 15:27:17 +01:00
mirrors.bbclass binutils-cross-testsuite: Rename to binutils-testsuite 2024-06-27 13:03:34 +01:00
package_deb.bbclass package/package_write: Improve packagedata code location 2023-11-08 10:56:35 +00:00
package_ipk.bbclass ipk: Switch to using zstd compression 2023-12-23 08:46:00 +00:00
package_pkgdata.bbclass classes: Update classes to match new bitbake class scope functionality 2022-08-12 15:27:17 +01:00
package_rpm.bbclass package_rpm: restrict rpm to 4 threads 2024-11-30 05:41:59 -08:00
package.bbclass abi_version/package: Bump hashequiv version and package class version 2024-07-05 10:23:05 +01:00
packagedata.bbclass classes: Update classes to match new bitbake class scope functionality 2022-08-12 15:27:17 +01:00
patch.bbclass patch.bbclass: Make use of oe.patch.GitApplyTree.commitIgnored() 2024-02-19 16:03:22 +00:00
retain.bbclass classes: add new retain class for retaining build results 2024-08-03 07:56:10 +01:00
sanity.bbclass sanity: check for working user namespaces 2024-09-13 10:28:10 +01:00
sstate.bbclass do_package/sstate/sstatesig: Change timestamp clamping to hash output only 2024-12-09 06:25:53 -08:00
staging.bbclass classes-global/staging: Exclude do_create_spdx from automatic sysroot extension 2024-07-13 23:28:31 +01:00
uninative.bbclass uninative: Add pthread linking workaround 2024-03-19 15:25:12 +00:00
utility-tasks.bbclass classes: Update classes to match new bitbake class scope functionality 2022-08-12 15:27:17 +01:00
utils.bbclass utils.bbclass: Use objdump instead of readelf to compute SONAME 2024-07-01 13:56:02 +01:00