Files
poky/meta/classes
Christopher Clark 2ac00852cd kernel.bbclass: fix SOURCE_DATE_EPOCH for non-git kernel builds
The source directory is not always a git repository, so when querying
git for data to set SOURCE_DATE_EPOCH, specify ${S}/.git as the git
directory to prevent retrieving incorrect data from any parent directory.

Fixes the following errors with the prior logic when building a kernel
that is not obtained from a git repository:

1. With TMPDIR set to a directory outside any git repository on a
mounted filesystem, reproducible builds fail in do_compile with this git
error:

  fatal: not a git repository (or any parent up to mount point <abspath>)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

aborting before the error handling logic.

2. With TMPDIR located within a subdirectory of a git repository, the
SOURCE_DATE_EPOCH timestamp would be that of said repository rather than
that of the kernel.

(From OE-Core rev: 270ae94fe345b9ce98d822034cbfad7e24c5f393)

Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-10 23:20:33 +00:00
..
2020-03-10 23:20:33 +00:00
2020-01-27 16:48:08 +00:00
2020-01-27 16:48:09 +00:00
2020-02-15 22:42:14 +00:00
2020-01-19 13:24:38 +00:00
2020-01-21 12:52:52 +00:00
2019-06-14 22:48:22 +01:00
2020-02-18 23:53:54 +00:00
2019-03-06 23:12:27 +00:00
2019-04-23 23:30:20 +01:00