[OE-core] [OE-Core][PATCH 2/2] kernel: Set SOURCE_DATE_EPOCH to kernel git timestamp if not set

Martin Jansa martin.jansa at gmail.com
Tue Jun 26 19:14:48 UTC 2018


Thanks, this seems to be fixing the issue I've reported long time ago:
http://lists.openembedded.org/pipermail/openembedded-commits/2018-March/220579.html



On Tue, Jun 26, 2018 at 2:10 PM Alex Kiernan <alex.kiernan at gmail.com> wrote:

> If SOURCE_DATE_EPOCH is unset (in addition to the existing "0" behaviour)
> parse out the top most commit timestamp from the kernel tree to use as the
> timestamp.
>
> Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> ---
>
>  meta/classes/kernel.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 972ac52..3213b93 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -288,7 +288,7 @@ kernel_do_compile() {
>         if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
>                 # kernel sources do not use do_unpack, so
> SOURCE_DATE_EPOCH may not
>                 # be set....
> -               if [ "$SOURCE_DATE_EPOCH" = "0" ]; then
> +               if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}"
> = "0" ]; then
>                         olddir=`pwd`
>                         cd ${S}
>                         SOURCE_DATE_EPOCH=`git log  -1 --pretty=%ct`
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180626/ae628058/attachment-0002.html>


More information about the Openembedded-core mailing list