<div dir="ltr">I think you can define them in bitbake.conf, but then export them only where needed.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 2:35 AM, Bystricky, Juro <span dir="ltr">&lt;<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I see your point. The original idea was to keep all related variables in one place. There is<br>
one variable ( BUILD_REPRODUCIBLE_BINARIES ) that I think should be global,<br>
as it should be visible by all tasks (well, a lot of tasks). The rest can be moved to more appropriate places.<br>
<br>
<br>
______________________________<wbr>__________<br>
From: Richard Purdie [<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@<wbr>linuxfoundation.org</a>]<br>
Sent: Monday, May 01, 2017 4:13 PM<br>
To: Bystricky, Juro; <a href="mailto:openembedded-core@lists.openembedded.org">openembedded-core@lists.<wbr>openembedded.org</a><br>
Cc: <a href="mailto:joshua.g.lock@linux.intel.com">joshua.g.lock@linux.intel.com</a>; Burton, Ross; <a href="mailto:martin.jansa@gmail.com">martin.jansa@gmail.com</a>; <a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>; <a href="mailto:jurobystricky@hotmail.com">jurobystricky@hotmail.com</a><br>
Subject: Re: [PATCH v2 1/6] bitbake.conf: new variable BUILD_REPRODUCIBLE_BINARIES<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, 2017-05-01 at 13:58 -0700, Juro Bystricky wrote:<br>
&gt; Building reproducible binaries may remove certain intentional<br>
&gt; randomness intended for increased security. Hence, it is reasonable<br>
&gt; to expect there will be cases where this is not desirable.<br>
&gt; The user can select his/her preferences via the variable<br>
&gt; BUILD_REPRODUCIBLE_BINARIES. The variable defaults to &quot;0&quot; (do not<br>
&gt; build reproducible binaries) in order to minimize any potential<br>
&gt; regressions. (Once the reproducible binaries code is mature enough,<br>
&gt; it can be set to &quot;1&quot;.)<br>
&gt; If the variable BUILD_REPRODUCIBLE_BINARIES is set to &quot;1&quot;,<br>
&gt; timestamp values taken from additional variables will be optionally<br>
&gt; used<br>
&gt; when building binary reproducible images:<br>
&gt;<br>
&gt;     REPRODUCIBLE_TIMESTAMP_ROOTFS<br>
&gt;         If the value is specified, all files mtime will be set to<br>
&gt; this value.<br>
&gt;         In addition, /etc/timestamp and /etc/version will both<br>
&gt; contain the value.<br>
&gt;         If no value is specified, timestamp will be derived from the<br>
&gt; top git commit.<br>
&gt;<br>
&gt;     REPRODUCIBLE_TIMESTAMP_IMAGE_<wbr>PRELINK<br>
&gt;         Value passed via environment variable PRELINK_TIMESTAMP to<br>
&gt; the prelink program.<br>
&gt;         If the value is specified, the value will be used.<br>
&gt;         If no value is specified, timestamp will be derived from the<br>
&gt; top git commit.<br>
&gt;<br>
&gt; Signed-off-by: Juro Bystricky &lt;<a href="mailto:juro.bystricky@intel.com">juro.bystricky@intel.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/conf/bitbake.conf | 11 +++++++++++<br>
&gt;  1 file changed, 11 insertions(+)<br>
&gt;<br>
&gt; diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf<br>
&gt; index 227babd..6ce1a1a 100644<br>
&gt; --- a/meta/conf/bitbake.conf<br>
&gt; +++ b/meta/conf/bitbake.conf<br>
&gt; @@ -859,3 +859,14 @@ BB_SIGNATURE_EXCLUDE_FLAGS ?= &quot;doc deps depends<br>
&gt; \<br>
&gt;<br>
&gt;  MLPREFIX ??= &quot;&quot;<br>
&gt;  MULTILIB_VARIANTS ??= &quot;&quot;<br>
&gt; +<br>
&gt; +BUILD_REPRODUCIBLE_BINARIES ??= &quot;0&quot;<br>
&gt; +BUILD_REPRODUCIBLE_BINARIES[<wbr>export] = &quot;1&quot;<br>
&gt; +<br>
&gt; +# Unix timestamp<br>
&gt; +REPRODUCIBLE_TIMESTAMP_ROOTFS ??= &quot;&quot;<br>
&gt; +REPRODUCIBLE_TIMESTAMP_<wbr>ROOTFS[export] = &quot;1&quot;<br>
&gt; +<br>
&gt; +# Unix timestamp<br>
&gt; +REPRODUCIBLE_TIMESTAMP_IMAGE_<wbr>PRELINK ??= &quot;&quot;<br>
&gt; +REPRODUCIBLE_TIMESTAMP_IMAGE_<wbr>PRELINK[export] = &quot;1&quot;<br>
<br>
Please don&#39;t add new global exports in bitbake.conf. Changing the value<br>
of this will cause everything to rebuild (e.g. recompile) since the<br>
exported environment goes to all tasks. We really don&#39;t want to do that<br>
if it only affects the image generation.<br>
<br>
I&#39;ll give this a bit more thought/review but wanted to comment on this<br>
whilst I see it/remember.<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</div></div></blockquote></div><br></div>