]> code.ossystems Code Review - openembedded-core.git/commit
reproducible: Don't look for youngest file when no source tarball
authorDouglas Royds <douglas.royds@taitradio.com>
Thu, 22 Nov 2018 20:41:57 +0000 (09:41 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Nov 2018 23:32:10 +0000 (23:32 +0000)
commitd395bad0179037eb5d0fa4d921985c87ae13f3a4
treed87d0973c27b6bb2dbcfc54c6a9b608d0ecdd9ef
parent4eb6def4fe82959c2a348142b9eada27d3354aef
reproducible: Don't look for youngest file when no source tarball

Some packages (eg. init-ifupdown) take their source files entirely from
openembedded-core, that is, they download no source tarball.
These recipes either don't use S at all (ie. it is empty at unpack time),
or they set S = WORKDIR (as in init-ifupdown).
Looking at the file timestamps in the WORKDIR causes a non-reproducible
SOURCE_DATE_EPOCH, as files taken from file:// URIs do not have
reproducible timestamps.

If S == WORKDIR, we are better to assume that there is no source tarball,
and to fall back to a fixed timestamp for the SOURCE_DATE_EPOCH.
This makes the init-ifupdown build reproducible.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/reproducible_build.bbclass