<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/reproducible_build.bbclass, branch yocto-3.0.3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.0.3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.0.3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2020-02-11T23:05:12+00:00</updated>
<entry>
<title>classes/reproducible_build: Read SDE file later</title>
<updated>2020-02-11T23:05:12+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2020-01-31T19:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=632bbf4bd78690d787a188ca1185f46c5dca1d98'/>
<id>urn:sha1:632bbf4bd78690d787a188ca1185f46c5dca1d98</id>
<content type='text'>
Defers the resolution of the SOURCE_DATE_EPOCH until the variable needs
to be actually realized with a value. The previous method of loading the
value in anonymous python had issues because it could occur before other
anonymous python functions that affect the location of the epoch file,
such as when a recipe uses AUTOINC/AUTOREV or allarch.bbclass.

Also adds more logging to help diagnose issues in the future.

[YOCTO #13763]

(From OE-Core rev: b3313a10a3eb93f0a3710a35de0404fb49cd6202)

(From OE-Core rev: 10515e5f7e38edbc4430e2599062a9ce6fdb42a8)

(From OE-Core rev: 81d3832728aeae0e02e775bab9fc13e159fb61d3)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Armin Kuster &lt;akuster808@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/reproducible_build: Create SDE destination</title>
<updated>2019-10-02T19:22:25+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2019-09-27T18:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4148650475de8e1ec003acd53f75bd7000db7652'/>
<id>urn:sha1:4148650475de8e1ec003acd53f75bd7000db7652</id>
<content type='text'>
Creates the source data epoch file destination directory when restoring
from sstate

(From OE-Core rev: f5259a62d444dfc221a9ba592dbca35564f794ac)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/reproducible_build: Move SDE deploy to another directory</title>
<updated>2019-09-27T12:02:16+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2019-09-26T17:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=68092163cccb23ed943facea77600c02e95192c4'/>
<id>urn:sha1:68092163cccb23ed943facea77600c02e95192c4</id>
<content type='text'>
The deployment of the source date epoch file had a race condition where
any task attempting to read from the file would race with creation of
the sstate archive for the do_deploy_source_date_epoch task. The
creation of the sstate archive requires moving the directory to a
temporary location, then moving it back. This means that the file
disappears for a short period of time, which will cause a failure if any
other task is running and trying to open the file to get the current
source date epoch.

The solution is to copy the source date epoch file to a separate
directory when deploying so the file never disappears. When the file is
restored from sstate, it is moved to the correct location after being
extracted.

[YOCTO #13501]

(From OE-Core rev: ac27d12fe5480e9b8cc93de6a32bf9631c52d7f4)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible: Don't look for youngest file when no source tarball</title>
<updated>2018-11-23T23:35:19+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-11-22T20:41:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=721c000b0075034e3dcc2bdc28b80cf05aa50b5f'/>
<id>urn:sha1:721c000b0075034e3dcc2bdc28b80cf05aa50b5f</id>
<content type='text'>
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.

(From OE-Core rev: d395bad0179037eb5d0fa4d921985c87ae13f3a4)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible: Refactor: Break out fixed_source_date_epoch() function</title>
<updated>2018-11-23T23:35:19+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-11-22T20:41:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=59c8937095484af986469a2aa65fb729202327a2'/>
<id>urn:sha1:59c8937095484af986469a2aa65fb729202327a2</id>
<content type='text'>
(From OE-Core rev: 4eb6def4fe82959c2a348142b9eada27d3354aef)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible_build: update do_deploy_source_date_epoch commment</title>
<updated>2018-11-07T23:08:54+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-11-05T05:39:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=87b140abdb071e35cc0c58a60f5e905446192e24'/>
<id>urn:sha1:87b140abdb071e35cc0c58a60f5e905446192e24</id>
<content type='text'>
Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe's SDE_FILE.
If none of the existing mechanisms are suitable, replace the do_deploy_source_date_epoch task
with recipe-specific functionality to write the appropriate SOURCE_DATE_EPOCH into the SDE_FILE.

(From OE-Core rev: e7b891b76954c784f5a93bd0a1c91315673ce40d)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible: Consistent debug logging</title>
<updated>2018-09-22T01:45:46+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-09-14T02:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fdc018106297c2fdb849e97cba494153b217d6a7'/>
<id>urn:sha1:fdc018106297c2fdb849e97cba494153b217d6a7</id>
<content type='text'>
Log both the source of the source_date_epoch and the resulting
source_date_epoch in all cases.

Also, now that we are determining the source_date_epoch successfully for both
yocto and non-yocto kernels, remove the inherits_class('kernel') exception.
We will log a failure to find a source_date_epoch for kernels as well.

(From OE-Core rev: 48fe0e83435f9fb53b1e5b37d5d9f1c2caccd22d)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible: Don't enforce existence of ${S} dir</title>
<updated>2018-09-22T01:45:46+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-09-14T02:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d6f2ffb5c766d3295863f3a5d9ae47c1b7b14067'/>
<id>urn:sha1:d6f2ffb5c766d3295863f3a5d9ae47c1b7b14067</id>
<content type='text'>
Unnecessary.

(From OE-Core rev: 75d5a9d72566aca7a9f08bea21523b3c66bddeae)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible: Find the git repo in WORKDIR/git or S first</title>
<updated>2018-09-22T01:45:46+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-09-14T02:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=73ba6051bebe901b7aac07cbffb2d368ca8408ea'/>
<id>urn:sha1:73ba6051bebe901b7aac07cbffb2d368ca8408ea</id>
<content type='text'>
Change the search regime for find_git_folder():

1. WORKDIR/git: This is the default git fetcher unpack path
2. ${S}
3. Go looking for .git/ under the WORKDIR as a last resort.

linux-yocto:
We had an existing (silent) defect. The linux-yocto recipes all specify
two git SRC_URIs, one for the kernel source itself, the other for the
kmeta data (config fragments and friends). find_git_folder() was finding
the git checkout for the kmeta data, but due to a typo in the git log -1
--pretty=%ct line, we were (silently) reading the source_date_epoch from
the ${S} directory = STAGING_KERNEL_DIR, which is empty. If your
build/ happened to be inside a git checkout, git would walk up the
directory tree, and silently read the commit timestamp from this other
git checkout. The correct path to read the git commit timestamp from is
the "gitpath", being that found by find_git_folder(), though this
function was incorrectly finding the kmeta data checkout, not the kernel
source tree.

Non-kernel git recipes:
The default git fetcher clones and checks out the sources at
WORKDIR/git/ regardless of the setting of S (unless subpath or
destsuffix is set). find_git_folder() now looks for the
WORKDIR/git/.git/ directory first.

Non-yocto linux kernels:
Kernel recipes that don't inherit kernel-yocto should always set
S = ${WORKDIR}/git, so that when base_do_unpack_append() in
kernel.bbclass moves the checkout down to the STAGING_KERNEL_DIR and
symlinks it as WORKDIR/git, the build can still work by following the
symlink. We were previously failing to follow the symlink in the
os.walk(), but we now look first for WORKDIR/git/.git/, and find it due
to the symlink.

If none of the above mechanisms work for finding the git checkout,
perhaps there was a subpath or destsuffix specified in the SRC_URI.
We go looking for the git checkout under the WORKDIR as a last resort.

(From OE-Core rev: b0ddb141d36853447f85ecaac07dbc9c5779627f)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>reproducible: Rename ambiguous "path" var to sourcedir or workdir as appropriate</title>
<updated>2018-09-22T01:45:46+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2018-09-14T02:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=526276a74d1bc4f75885a5573ab0b1086f8f2f35'/>
<id>urn:sha1:526276a74d1bc4f75885a5573ab0b1086f8f2f35</id>
<content type='text'>
(From OE-Core rev: 01358d6a89623a38e66969daa431d2eecb1ce8a2)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
