diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-04-28 09:47:53 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-30 22:00:20 +0100 |
| commit | 5b5ccb7bcedb3e0ef9f7213f93fee8c83c6c7058 (patch) | |
| tree | 8a2a993f38e4dd5e091c8d7089464eb397a4a105 /meta/classes/kernel-yocto.bbclass | |
| parent | 33df924c0029e539748b52a321d3575dfd795fae (diff) | |
| download | poky-5b5ccb7bcedb3e0ef9f7213f93fee8c83c6c7058.tar.gz | |
kernel-yocto: allow patch author date to be commit date
In situations where a buid needs to be reproducible, it is
sometimes desireable to use a patches author date, versus the
time when it is applied. This generates a consistent hash
between different patch applications.
We leverage the existing KERNEL_DEBUG_TIMESTAMPS to trigger
the use of a new option to kgit-s2q. This allows us to use
the author date in a reproducible configuration, but disable
it if we need the current time/date.
(From OE-Core rev: ebe2411ce78d5e4ea49b9b4cb732b461ecc32ca6)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
| -rw-r--r-- | meta/classes/kernel-yocto.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 4cb638864c..fb30c7cc05 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
| @@ -320,7 +320,11 @@ do_patch() { | |||
| 320 | meta_dir=$(kgit --meta) | 320 | meta_dir=$(kgit --meta) |
| 321 | (cd ${meta_dir}; ln -sf patch.queue series) | 321 | (cd ${meta_dir}; ln -sf patch.queue series) |
| 322 | if [ -f "${meta_dir}/series" ]; then | 322 | if [ -f "${meta_dir}/series" ]; then |
| 323 | kgit-s2q --gen -v --patches .kernel-meta/ | 323 | kgit_extra_args="" |
| 324 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then | ||
| 325 | kgit_extra_args="--commit-sha author" | ||
| 326 | fi | ||
| 327 | kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/ | ||
| 324 | if [ $? -ne 0 ]; then | 328 | if [ $? -ne 0 ]; then |
| 325 | bberror "Could not apply patches for ${KMACHINE}." | 329 | bberror "Could not apply patches for ${KMACHINE}." |
| 326 | bbfatal_log "Patch failures can be resolved in the linux source directory ${S})" | 330 | bbfatal_log "Patch failures can be resolved in the linux source directory ${S})" |
