]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-yocto: allow patch author date to be commit date
authorBruce Ashfield <bruce.ashfield@gmail.com>
Thu, 28 Apr 2022 13:47:53 +0000 (09:47 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 30 Apr 2022 20:59:32 +0000 (21:59 +0100)
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.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass
meta/recipes-kernel/kern-tools/kern-tools-native_git.bb

index 4cb638864c4c1d46fc776647dd5c97e5749d8a46..fb30c7cc055e6c65b22ce6e9c6eeeb22d754287c 100644 (file)
@@ -320,7 +320,11 @@ do_patch() {
        meta_dir=$(kgit --meta)
        (cd ${meta_dir}; ln -sf patch.queue series)
        if [ -f "${meta_dir}/series" ]; then
-               kgit-s2q --gen -v --patches .kernel-meta/
+               kgit_extra_args=""
+               if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then
+                   kgit_extra_args="--commit-sha author"
+               fi
+               kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/
                if [ $? -ne 0 ]; then
                        bberror "Could not apply patches for ${KMACHINE}."
                        bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
index a6ab9ca56d19d543d17dbf91a5ffc5aef216b8b7..11613ab3b6d9dc4ffb1beb296a866c892e2d7d8d 100644 (file)
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\
 
 DEPENDS = "git-native"
 
-SRCREV = "90598a5fae1172e3f7782a1b02f7b7518efd32c8"
+SRCREV = "f70b1d52f4706a263ae22e2c61039ccd875e97b6"
 PV = "0.3+git${SRCPV}"
 
 inherit native