<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Martin,<br>
thanks for your feedback.<br>
I will send to ML a new version of the patch within a day or two. The patch you mentioned (v2) had a few short-comings, hopefully fixed in the next one (currently being tested).<br>
Meanwhile, you may want to have a look at the recently updated wiki page (and it will be updated again) how to build reproducible builds with "hard-coded" SOURCE_DATE_EPOCH:<br>
<a href="https://wiki.yoctoproject.org/wiki/Reproducible_Builds" target="_blank">https://wiki.yoctoproject.org/wiki/Reproducible_Builds</a><br>
<br>
<br>
Thanks<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF587482" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>From:</b> Martin Jansa [martin.jansa@gmail.com]<br>
<b>Sent:</b> Sunday, March 18, 2018 7:22 AM<br>
<b>To:</b> Bystricky, Juro; Patches and discussions about the oe-core layer<br>
<b>Cc:</b> openembedded-commits@lists.openembedded.org<br>
<b>Subject:</b> Re: [oe-commits] [openembedded-core] 02/03: reproducible_build_simple.bbclass: simple environment for reproducible binaries<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">SOURCE_DATE_EPOCH
was supposed to be exported in this review:</span><br>
</div>
<a href="https://patchwork.openembedded.org/patch/139558/" target="_blank">https://patchwork.openembedded.org/patch/139558/</a><br>
<div>but it wasn't merged to master nor rocko.<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Mar 18, 2018 at 3:13 PM, Martin Jansa <span dir="ltr">
<<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">I've also noticed that the kernel.bbclass says:
<div>
<div><br>
</div>
<div> # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not</div>
<div> # be set....</div>
</div>
<div><br>
</div>
<div>but with git grep <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">SOURCE_DATE_EPOCH
I don't see any code in bitbake or oe-core where this would be set in do_unpack (in oe-core/master and oe-core/rocko). Is this part still only in one of your contrib branches for reproducible?</span></div>
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline"><br>
</span></div>
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">Regards,</span></div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Mar 18, 2018 at 3:06 PM, Martin Jansa <span dir="ltr">
<<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
There seems to be small issue when people set <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">BUILD_REPRODUCIBLE_BINARIE<wbr>S
= "1" without exporting <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">SOURCE_DATE_EPOCH
like this .bbclass does</span></span>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">In kernel.bbclass change from:<br>
</span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline"></span>
<div><a href="http://git.openembedded.org/openembedded-core/commit/meta/classes/kernel.bbclass?id=012a70da7ae0617740cd0cf807d01c3cd912c823" target="_blank">http://git.openembedded.org/op<wbr>enembedded-core/commit/meta/cl<wbr>asses/kernel.bbclass?id=012a70<wbr>da7ae0617740cd0cf807d01c3cd912<wbr>c823</a><br>
</div>
</div>
<div><br>
</div>
<div>you're comparing <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">SOURCE_DATE_EPOCH
with 0 which doesn't seem to be set anywhere, so by default it's empty which leads to kernel build failure like this:</span></div>
<div><span style="text-align:start; text-indent:0px; background-color:rgb(255,255,255); float:none; display:inline">
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">DEBUG: Executing shell function do_compile</span></div>
<div><span style="font-size:12.8px">date: invalid date '@'</span></div>
<div><span style="font-size:12.8px">WARNING: exit code 1 from a shell command.</span></div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px">
<br>
</div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px">
because empty SOURCE_DATE_EPOCH is used in "ts=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH`". Testing SOURCE_DATE_EPOCH for empty or "0" allows to use REPRODUCIBLE_TIMESTAMP_ROO<wbr>TFS as a default value again.</div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px">
<br>
</div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px">
These build failures seem to be triggered in all my builds since kernel.bbclass was fixed to respect BUILD_REPRODUCIBLE_BINARIES in:</div>
<div><span style="font-size:12.8px"><a href="http://git.openembedded.org/openembedded-core/commit/meta/classes/kernel.bbclass?id=27f87bbc8395a2481ef808465a62d213a6b678ac" target="_blank">http://git.openembedded.org/op<wbr>enembedded-core/commit/meta/cl<wbr>asses/kernel.bbclass?id=27f87b<wbr>bc8395a2481ef808465a62d213a6b6<wbr>78ac</a></span><br>
</div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">One way to fit it would be to inherit <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">reproducible_</span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">build_sim<wbr>ple.bbclass,
but this requirement to set exported SOURCE_DATE_EPOCH doesn't seem to be documented anywhere and looking at kernel.bbclass changes it probably wasn't even intended like that.</span></span></div>
<div><span style="font-size:12.8px"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline"><br>
</span></span></div>
<div><span style="font-size:12.8px"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; background-color:rgb(255,255,255); float:none; display:inline">Thanks</span></span></div>
</span></div>
</div>
<div class="m_-8114575700723207354HOEnZb">
<div class="m_-8114575700723207354h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Mar 12, 2018 at 11:06 PM, <span dir="ltr"><<a href="mailto:git@git.openembedded.org" target="_blank">git@git.openembedded.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
This is an automated email from the git hooks/post-receive script.<br>
<br>
rpurdie pushed a commit to branch master<br>
in repository openembedded-core.<br>
<br>
commit 5c2685c5ee2f8210a36b9a8591491b<wbr>6af0482084<br>
Author: Juro Bystricky <<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>><br>
AuthorDate: Sat Mar 10 10:57:49 2018 -0800<br>
<br>
reproducible_build_simple.bbcl<wbr>ass: simple environment for reproducible binaries<br>
<br>
Export environmental variables needed for binary reproducibility with consistent values.<br>
<br>
This class can be used either directly via:<br>
INHERIT += "reproducible_build_simple"<br>
<br>
or can be inherited by a more complex/complete bbclass, for example a bblass which<br>
will crack SOURCE_DATE_EPOCH for each recipe.<br>
<br>
Signed-off-by: Juro Bystricky <<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>><br>
Signed-off-by: Richard Purdie <<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundatio<wbr>n.org</a>><br>
---<br>
meta/classes/reproducible_bui<wbr>ld_simple.bbclass | 11 +++++++++++<br>
1 file changed, 11 insertions(+)<br>
<br>
diff --git a/meta/classes/reproducible_bu<wbr>ild_simple.bbclass b/meta/classes/reproducible_bu<wbr>ild_simple.bbclass<br>
new file mode 100644<br>
index 0000000..dd11cd9<br>
--- /dev/null<br>
+++ b/meta/classes/reproducible_bu<wbr>ild_simple.bbclass<br>
@@ -0,0 +1,11 @@<br>
+# Setup default environment for reproducible builds.<br>
+<br>
+BUILD_REPRODUCIBLE_BINARIES = "1"<br>
+<br>
+export PYTHONHASHSEED = "0"<br>
+export PERL_HASH_SEED = "0"<br>
+export TZ = 'UTC'<br>
+export SOURCE_DATE_EPOCH ??= "1520598896"<br>
+<br>
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"<br>
+<br>
<span class="m_-8114575700723207354m_-2939368165476955101HOEnZb"><font color="#888888"><br>
--<br>
To stop receiving notification emails like this one, please contact<br>
the administrator of this repository.<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-commits mailing list<br>
<a href="mailto:Openembedded-commits@lists.openembedded.org" target="_blank">Openembedded-commits@lists.ope<wbr>nembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-commits" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>commits</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>