All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: Douglas Royds <douglas.royds@taitradio.com>,
	Jacob Kroon <jacob.kroon@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: Overriding SDE_FILE
Date: Thu, 27 Feb 2020 10:45:02 -0600	[thread overview]
Message-ID: <e2a17625-3a90-6482-5af3-61a82ac04dcc@gmail.com> (raw)
In-Reply-To: <cce62b8e-b135-6daa-0c47-3e91955d248c@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]


On 2/27/20 9:01 AM, Joshua Watt wrote:
>
>
> On 2/26/20 11:46 PM, Douglas Royds wrote:
>>
>> On 26/02/20 4:53 am, Jacob Kroon wrote:
>>
>>> On 2/24/20 8:25 AM, Jacob Kroon wrote:
>>>> Hi Douglas,
>>>>
>>>> You updated a comment in reproducible_build.bbclass, commit 
>>>> e7b891b76954c784f5a93bd0a1c91315673ce40d:
>>>>
>>>>> -# Once the value of SOURCE_DATE_EPOCH is determined, it is stored 
>>>>> in the recipe's ${SDE_FILE}.
>>>>> +# Once the value of SOURCE_DATE_EPOCH is determined, it is stored 
>>>>> in the recipe's SDE_FILE.
>>>>> +# If none of these 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.
>>>>> +#
>>>>
>>>> But I can't really get this to work. What did work for me was to 
>>>> replace "do_create_source_date_epoch_stamp()" in my recipe:
>>>>
>>>> do_create_source_date_epoch_stamp() {
>>>>      mkdir -p ${SDE_DIR}
>>>>      date -d "1981-03-03" "+%s" > ${SDE_FILE}
>>>> }
>>>>
>>>> What is the intended way to achieve the thing I'm trying to do here ?
>>>>
>>>
>>> FYI, JPEW has a proposed patch here
>>>
>>> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=jpew/reproducible&id=d091d2aa53ea417f70c10f5ce89151820c3db9ce 
>>>
>>>
>>> for allowing a recipe to just set SOURCE_DATE_EPOCH directly.
>>>
>>> But maybe that currently is at odds with SOURCE_DATE_EPOCH being in 
>>> BB_HASHBASE_WHITELIST ?
>>>
>>> /Jacob
>>
>>
>> On the surface of it, my comment appears to be just wrong: It does 
>> make sense to replace do_create_source_date_epoch_stamp() as you suggest.
>>
>> Joshua's proposed patch looks promising:
>>
>>   * Should the new function not be called first, so that it takes
>>     priority over the git, known files, and youngest file functions?
>>     If someone has explicitly set SOURCE_DATE_EPOCH, then they want
>>     it to take priority.
>>
> Having that be the first option makes sense. The only case in which 
> that might not work, is if a recipe does something like:
>
>  SOURCE_DATE_EPOCH = "${@my_awesome_sde_calculation(d)}"
>
> e.g. uses a function to get the SDE instead of setting to a fixed 
> value, but that's probably going to be extremely rare.
>
>
>>  *
>>
>>
>>
>>   * As you observe, SOURCE_DATE_EPOCH would need to be removed from
>>     BB_HASHBASE_WHITELIST. I'm not sure why it was in the whitelist
>>     in the first place.
>>
> I'm not sure why exactly it is whitelisted; I didn't write the 
> original code that whitelisted it, but I've CC'd Juro in case he 
> happens to remember.
>
After a discussion with Richard, we figured out why SOURCE_DATE_EPOCH 
has to be whitelisted. The value of the variable *must* be calculable at 
parse time before any task is ran, but in practice it's value is only 
available once the __source_date_epoch.txt file is present, which is 
after parsing. This causes the taskhash to be calculated differently 
during parsing and task execution which causes taskhash mismatch errors.



[-- Attachment #2: Type: text/html, Size: 5126 bytes --]

  reply	other threads:[~2020-02-27 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24  7:25 Overriding SDE_FILE Jacob Kroon
2020-02-25 15:53 ` Jacob Kroon
2020-02-27  5:46   ` Douglas Royds
2020-02-27 15:01     ` Joshua Watt
2020-02-27 16:45       ` Joshua Watt [this message]
2020-02-27 21:22         ` Douglas Royds
2020-02-27 21:49           ` Joshua Watt
2020-02-27 22:29             ` Douglas Royds
2020-02-27 22:34               ` Joshua Watt
2020-02-27 22:35                 ` Douglas Royds
2020-02-28 13:39                   ` Jacob Kroon
2020-02-28 13:41                     ` Jacob Kroon
2020-02-28 14:18                       ` Joshua Watt
2020-02-28 14:32                         ` Jacob Kroon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2a17625-3a90-6482-5af3-61a82ac04dcc@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=douglas.royds@taitradio.com \
    --cc=jacob.kroon@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.