All of lore.kernel.org
 help / color / mirror / Atom feed
* how to solve the error that basehash value changed from 'xxx' to 'aaaa' ?
@ 2019-11-13  7:38 www
  2019-11-16 21:50 ` Joseph Reynolds
  0 siblings, 1 reply; 16+ messages in thread
From: www @ 2019-11-13  7:38 UTC (permalink / raw)
  To: openbmc

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

Dear all,


When I modify the os-release file in my yocto project, it appear some error, and how can I solve it ? Who can give me some help or advice? Thank you!
I execute the recommended command on the console and it didn't work.


ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
ERROR: Taskhash mismatch ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
ERROR: When reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the basehash value changed from 99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake os-release -cdo_compile -Snone
ERROR: Then:
ERROR: $ bitbake os-release -cdo_compile -Sprintdiff


ERROR: When reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the basehash value changed from 99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake os-release -cdo_compile -Snone
ERROR: Then:
ERROR: $ bitbake os-release -cdo_compile -Sprintdiff


thanks,
Byron

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: how to solve the error that basehash value changed from 'xxx' to 'aaaa' ?
  2019-11-13  7:38 how to solve the error that basehash value changed from 'xxx' to 'aaaa' ? www
@ 2019-11-16 21:50 ` Joseph Reynolds
  2019-11-16 21:56   ` How to add build date? (was: ... basehash value changed...) Joseph Reynolds
  2019-11-18  1:52   ` Re:Re: how to solve the error that basehash value changed from 'xxx' to 'aaaa' ? www
  0 siblings, 2 replies; 16+ messages in thread
From: Joseph Reynolds @ 2019-11-16 21:50 UTC (permalink / raw)
  To: www, openbmc

Byron,

What modification did you put into the os-release recipe?  It would help 
us help you if you put that in your email.


Are you adding the build date to the generated os-release file?  If so, 
be aware that might cause the issues with the shared state cache you are 
experiencing.  Also be aware this practice wrecks reproducible builds.

A better way to get the same effect might be to create a git tag with 
the information you want to appear in the generated os-release file.  
When you buld with this tag is then picked up by the OpenBMC 
meta-phosphor os-release.bbappend (via `git describe`) and included in 
the genersted os-release file as the BUILD_ID.  See:
https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
(But I have not tried that.)

A way to work around the hash change is to add a line to your recipe 
like: PR[vardepsxeclude]="DATETIME"
As suggested by: 
https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/


My apologies for top posting -- my email reader was not quoting the 
message properly, so I cut/pasted it below.

- Joseph


On 11/13/19 1:38 AM, www wrote:

When I modify the os-release file in my yocto project, it appear some 
error, and how can I solve it ? Who can give me some help or advice? 
Thank you!
I execute the recommended command on the console and it didn't work.

ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch 
ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
ERROR: Taskhash mismatch 
ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
ERROR: When reparsing 
/home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
basehash value changed from 
99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The 
metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake os-release -cdo_compile -Snone
ERROR: Then:
ERROR: $ bitbake os-release -cdo_compile -Sprintdiff

ERROR: When 
reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
basehash value changed from 
99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The 
metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake os-release -cdo_compile -Snone
ERROR: Then:
ERROR: $ bitbake os-release -cdo_compile -Sprintdiff

thanks,
Byron

^ permalink raw reply	[flat|nested] 16+ messages in thread

* How to add build date? (was: ... basehash value changed...)
  2019-11-16 21:50 ` Joseph Reynolds
@ 2019-11-16 21:56   ` Joseph Reynolds
  2019-11-17 21:19     ` Alexander Kanavin
  2019-11-18  9:53     ` Ross Burton
  2019-11-18  1:52   ` Re:Re: how to solve the error that basehash value changed from 'xxx' to 'aaaa' ? www
  1 sibling, 2 replies; 16+ messages in thread
From: Joseph Reynolds @ 2019-11-16 21:56 UTC (permalink / raw)
  To: openembedded-core


Is there a best practice for folks who want to put the build date into 
their generated os-release file?  I've seen this question come up at 
least 3 times in my brief involvement with OE.  I could perhaps add 
comment to the OpenBMC os-release.bbappend file to provide the proper 
guidance.  I would like to hear your ideas.

- Joseph


-------- Forwarded Message --------
Subject: 	Re: how to solve the error that basehash value changed from 
'xxx' to 'aaaa' ?
Date: 	Sat, 16 Nov 2019 15:50:38 -0600
From: 	Joseph Reynolds <jrey@linux.ibm.com>
To: 	www <ouyangxuan10@163.com>, openbmc@lists.ozlabs.org 
<openbmc@lists.ozlabs.org>



Byron,

What modification did you put into the os-release recipe?  It would help 
us help you if you put that in your email.


Are you adding the build date to the generated os-release file? If so, 
be aware that might cause the issues with the shared state cache you are 
experiencing.  Also be aware this practice wrecks reproducible builds.

A better way to get the same effect might be to create a git tag with 
the information you want to appear in the generated os-release file.  
When you buld with this tag is then picked up by the OpenBMC 
meta-phosphor os-release.bbappend (via `git describe`) and included in 
the genersted os-release file as the BUILD_ID. See:
https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
(But I have not tried that.)

A way to work around the hash change is to add a line to your recipe 
like: PR[vardepsxeclude]="DATETIME"
As suggested by: 
https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/


My apologies for top posting -- my email reader was not quoting the 
message properly, so I cut/pasted it below.

- Joseph


On 11/13/19 1:38 AM, www wrote:

When I modify the os-release file in my yocto project, it appear some 
error, and how can I solve it ? Who can give me some help or advice? 
Thank you!
I execute the recommended command on the console and it didn't work.

ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch 
ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
ERROR: Taskhash mismatch 
ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
ERROR: When reparsing 
/home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
basehash value changed from 
99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The 
metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake os-release -cdo_compile -Snone
ERROR: Then:
ERROR: $ bitbake os-release -cdo_compile -Sprintdiff

ERROR: When 
reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
basehash value changed from 
99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The 
metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake os-release -cdo_compile -Snone
ERROR: Then:
ERROR: $ bitbake os-release -cdo_compile -Sprintdiff

thanks,
Byron



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to add build date? (was: ... basehash value changed...)
  2019-11-16 21:56   ` How to add build date? (was: ... basehash value changed...) Joseph Reynolds
@ 2019-11-17 21:19     ` Alexander Kanavin
  2019-11-18  8:58       ` Mikko.Rapeli
  2019-11-20 16:28       ` How to add build date? Joseph Reynolds
  2019-11-18  9:53     ` Ross Burton
  1 sibling, 2 replies; 16+ messages in thread
From: Alexander Kanavin @ 2019-11-17 21:19 UTC (permalink / raw)
  To: Joseph Reynolds; +Cc: OE-core

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

I'd write the date into the file at image creation, via
ROOTFS_POSTPROCESS_COMMAND.

Having it in a recipe means that you either force the recipe to not be a
part of sstate cache, always rebuilding it and its dependencies (bad idea),
or accept that the date comes from a previously built cache object, which
means it will mismatch the actual image creation date.

A bit of context would help: why would you want that info in os-release?
Who would use that information and how?

Alex

On Sat, 16 Nov 2019 at 23:14, Joseph Reynolds <jrey@linux.ibm.com> wrote:

>
> Is there a best practice for folks who want to put the build date into
> their generated os-release file?  I've seen this question come up at
> least 3 times in my brief involvement with OE.  I could perhaps add
> comment to the OpenBMC os-release.bbappend file to provide the proper
> guidance.  I would like to hear your ideas.
>
> - Joseph
>
>
> -------- Forwarded Message --------
> Subject:        Re: how to solve the error that basehash value changed
> from
> 'xxx' to 'aaaa' ?
> Date:   Sat, 16 Nov 2019 15:50:38 -0600
> From:   Joseph Reynolds <jrey@linux.ibm.com>
> To:     www <ouyangxuan10@163.com>, openbmc@lists.ozlabs.org
> <openbmc@lists.ozlabs.org>
>
>
>
> Byron,
>
> What modification did you put into the os-release recipe?  It would help
> us help you if you put that in your email.
>
>
> Are you adding the build date to the generated os-release file? If so,
> be aware that might cause the issues with the shared state cache you are
> experiencing.  Also be aware this practice wrecks reproducible builds.
>
> A better way to get the same effect might be to create a git tag with
> the information you want to appear in the generated os-release file.
> When you buld with this tag is then picked up by the OpenBMC
> meta-phosphor os-release.bbappend (via `git describe`) and included in
> the genersted os-release file as the BUILD_ID. See:
>
> https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
> (But I have not tried that.)
>
> A way to work around the hash change is to add a line to your recipe
> like: PR[vardepsxeclude]="DATETIME"
> As suggested by:
> https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/
>
>
> My apologies for top posting -- my email reader was not quoting the
> message properly, so I cut/pasted it below.
>
> - Joseph
>
>
> On 11/13/19 1:38 AM, www wrote:
>
> When I modify the os-release file in my yocto project, it appear some
> error, and how can I solve it ? Who can give me some help or advice?
> Thank you!
> I execute the recommended command on the console and it didn't work.
>
> ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch
> ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus
> 7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f
>
> for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
> ERROR: Taskhash mismatch
> ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus
> 7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f
>
> for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
> ERROR: When reparsing
> /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the
>
> basehash value changed from
> 99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to
> 4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake os-release -cdo_compile -Snone
> ERROR: Then:
> ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>
> ERROR: When
> reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the
>
> basehash value changed from
> 99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to
> 47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake os-release -cdo_compile -Snone
> ERROR: Then:
> ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>
> thanks,
> Byron
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re:Re: how to solve the error that basehash value changed from 'xxx' to 'aaaa' ?
  2019-11-16 21:50 ` Joseph Reynolds
  2019-11-16 21:56   ` How to add build date? (was: ... basehash value changed...) Joseph Reynolds
@ 2019-11-18  1:52   ` www
  2019-11-18 16:02     ` Add build date to image (was: error basehash value changed) Joseph Reynolds
  1 sibling, 1 reply; 16+ messages in thread
From: www @ 2019-11-18  1:52 UTC (permalink / raw)
  To: Joseph Reynolds; +Cc: openbmc

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

Dear Joseph,


Thank you for your reference and suggestions. "DATETIME" is not local time,so I need add a new one. 
I added a new variable to get local time without reporting an error.
The current problem is, how can I make this task compile every time even without modification, and store the latest time?
Do you have any suggestions?


thanks,
Byron











At 2019-11-17 05:50:38, "Joseph Reynolds" <jrey@linux.ibm.com> wrote:
>Byron,
>
>What modification did you put into the os-release recipe?  It would help 
>us help you if you put that in your email.
>
>
>Are you adding the build date to the generated os-release file?  If so, 
>be aware that might cause the issues with the shared state cache you are 
>experiencing.  Also be aware this practice wrecks reproducible builds.
>
>A better way to get the same effect might be to create a git tag with 
>the information you want to appear in the generated os-release file.  
>When you buld with this tag is then picked up by the OpenBMC 
>meta-phosphor os-release.bbappend (via `git describe`) and included in 
>the genersted os-release file as the BUILD_ID.  See:
>https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
>(But I have not tried that.)
>
>A way to work around the hash change is to add a line to your recipe 
>like: PR[vardepsxeclude]="DATETIME"
>As suggested by: 
>https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/
>
>
>My apologies for top posting -- my email reader was not quoting the 
>message properly, so I cut/pasted it below.
>
>- Joseph
>
>
>On 11/13/19 1:38 AM, www wrote:
>
>When I modify the os-release file in my yocto project, it appear some 
>error, and how can I solve it ? Who can give me some help or advice? 
>Thank you!
>I execute the recommended command on the console and it didn't work.
>
>ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch 
>ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
>7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
>for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
>ERROR: Taskhash mismatch 
>ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
>7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
>for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
>ERROR: When reparsing 
>/home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
>basehash value changed from 
>99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
>4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The 
>metadata is not deterministic and this needs to be fixed.
>ERROR: The following commands may help:
>ERROR: $ bitbake os-release -cdo_compile -Snone
>ERROR: Then:
>ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>
>ERROR: When 
>reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
>basehash value changed from 
>99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
>47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The 
>metadata is not deterministic and this needs to be fixed.
>ERROR: The following commands may help:
>ERROR: $ bitbake os-release -cdo_compile -Snone
>ERROR: Then:
>ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>
>thanks,
>Byron

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to add build date? (was: ... basehash value changed...)
  2019-11-17 21:19     ` Alexander Kanavin
@ 2019-11-18  8:58       ` Mikko.Rapeli
  2019-11-20 16:28       ` How to add build date? Joseph Reynolds
  1 sibling, 0 replies; 16+ messages in thread
From: Mikko.Rapeli @ 2019-11-18  8:58 UTC (permalink / raw)
  To: alex.kanavin; +Cc: openembedded-core, jrey

On Sun, Nov 17, 2019 at 10:19:32PM +0100, Alexander Kanavin wrote:
> I'd write the date into the file at image creation, via
> ROOTFS_POSTPROCESS_COMMAND.
> 
> Having it in a recipe means that you either force the recipe to not be a
> part of sstate cache, always rebuilding it and its dependencies (bad idea),
> or accept that the date comes from a previously built cache object, which
> means it will mismatch the actual image creation date.

This is the approach I use. Also, the need of build time stamp is usually not what
users need. They likely need the latest time stamp in meta layer commits,
or similar. I use git submodules for them so a "git describe --tags --always --dirty" will
generate a unique tag and hash combination for all builds. The commit time
can be queried with 'git log HEAD~1.. --format="%cD"'.

-Mikko

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to add build date?
  2019-11-16 21:56   ` How to add build date? (was: ... basehash value changed...) Joseph Reynolds
  2019-11-17 21:19     ` Alexander Kanavin
@ 2019-11-18  9:53     ` Ross Burton
  2019-11-18 16:07       ` Joseph Reynolds
  1 sibling, 1 reply; 16+ messages in thread
From: Ross Burton @ 2019-11-18  9:53 UTC (permalink / raw)
  To: Joseph Reynolds, openembedded-core

On 16/11/2019 21:56, Joseph Reynolds wrote:
> 
> Is there a best practice for folks who want to put the build date into 
> their generated os-release file?  I've seen this question come up at 
> least 3 times in my brief involvement with OE.  I could perhaps add 
> comment to the OpenBMC os-release.bbappend file to provide the proper 
> guidance.  I would like to hear your ideas.

There's an image-buildinfo class that can inject build-specific 
information of your chosing into the image.

Ross



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Add build date to image (was: error basehash value changed)
  2019-11-18  1:52   ` Re:Re: how to solve the error that basehash value changed from 'xxx' to 'aaaa' ? www
@ 2019-11-18 16:02     ` Joseph Reynolds
  2019-11-19  1:23       ` www
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Reynolds @ 2019-11-18 16:02 UTC (permalink / raw)
  To: www; +Cc: openbmc

On 11/17/19 7:52 PM, www wrote:
> Dear Joseph,
>
> Thank you for your reference and suggestions. "DATETIME" is not local 
> time,so I need add a new one.
> I added a new variable to get local time without reporting an error.
> The current problem is, how can I make this task compile every time 
> even without modification, and store the latest time?
> Do you have any suggestions?

I re-asked your question on the openembedded-core email list.  See 
replies to 
http://lists.openembedded.org/pipermail/openembedded-core/2019-November/289259.html

There were two answers:

1.
There's an image-buildinfo class that can inject build-specific 
information of your choosing into the image.

2.

I'd write the date into the file at image creation, via
ROOTFS_POSTPROCESS_COMMAND.

Having it in a recipe means that you either force the recipe to not be a
part of sstate cache, always rebuilding it and its dependencies (bad idea),
or accept that the date comes from a previously built cache object, which
means it will mismatch the actual image creation date.

A bit of context would help: why would you want that info in os-release?
Who would use that information and how?



For item 2, I also found:
In the Yocto Project Reference Manual, https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html
, "If you need the build date recorded in|/etc/issue*|  or anywhere else in your image...."

And use a recipe like:
  add_build_time_to_etc() {
         date >> ${IMAGE_ROOTFS}/etc/image-build-date
  }
  ROOTFS_POSTPROCESS_COMMAND += "add_build_time_to_etc; "

However, I have not tested this.


Also I don't fully understand this use case.  Maybe there is a better way to do what you need.  Why do you need the driver build date?  Is it to learn how old your driver is?  Most projects use driver versions for that purpose (which is in the driver's /etc/os-release file), and then your can look up that driver version on a list.  For OpenBMC, we use https://github.com/openbmc/docs/blob/master/release/release-notes.md

Please note that adding the build date to the driver image breaks reproducible builds.  Reproducible builds are desired to support the use case of digitally signing the firmware image.  Can you use an alternative date?  Instead of using your build host's current date, can you use the date of the most recent commit the source was build from?

- Joseph

>
> thanks,
> Byron
>
>
> At 2019-11-17 05:50:38, "Joseph Reynolds" <jrey@linux.ibm.com> wrote:
> >Byron,
> >
> >What modification did you put into the os-release recipe?  It would help 
> >us help you if you put that in your email.
> >
> >
> >Are you adding the build date to the generated os-release file?  If so, 
> >be aware that might cause the issues with the shared state cache you are 
> >experiencing.  Also be aware this practice wrecks reproducible builds.
> >
> >A better way to get the same effect might be to create a git tag with 
> >the information you want to appear in the generated os-release file.  
> >When you buld with this tag is then picked up by the OpenBMC 
> >meta-phosphor os-release.bbappend (via `git describe`) and included in 
> >the genersted os-release file as the BUILD_ID.  See:
> >https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
> >(But I have not tried that.)
> >
> >A way to work around the hash change is to add a line to your recipe 
> >like: PR[vardepsxeclude]="DATETIME"
> >As suggested by: 
> >https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/
> >
> >
> >My apologies for top posting -- my email reader was not quoting the 
> >message properly, so I cut/pasted it below.
> >
> >- Joseph
> >
> >
> >On 11/13/19 1:38 AM, www wrote:
> >
> >When I modify the os-release file in my yocto project, it appear some 
> >error, and how can I solve it ? Who can give me some help or advice? 
> >Thank you!
> >I execute the recommended command on the console and it didn't work.
> >
> >ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch 
> >ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
> >7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
> >for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
> >ERROR: Taskhash mismatch 
> >ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
> >7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
> >for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
> >ERROR: When reparsing 
> >/home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
> >basehash value changed from 
> >99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
> >4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The 
> >metadata is not deterministic and this needs to be fixed.
> >ERROR: The following commands may help:
> >ERROR: $ bitbake os-release -cdo_compile -Snone
> >ERROR: Then:
> >ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
> >
> >ERROR: When 
> >reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
> >basehash value changed from 
> >99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
> >47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The 
> >metadata is not deterministic and this needs to be fixed.
> >ERROR: The following commands may help:
> >ERROR: $ bitbake os-release -cdo_compile -Snone
> >ERROR: Then:
> >ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
> >
> >thanks,
> >Byron
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to add build date?
  2019-11-18  9:53     ` Ross Burton
@ 2019-11-18 16:07       ` Joseph Reynolds
  0 siblings, 0 replies; 16+ messages in thread
From: Joseph Reynolds @ 2019-11-18 16:07 UTC (permalink / raw)
  To: Ross Burton, openembedded-core

On 11/18/19 3:53 AM, Ross Burton wrote:
> On 16/11/2019 21:56, Joseph Reynolds wrote:
>>
>> Is there a best practice for folks who want to put the build date 
>> into their generated os-release file?  I've seen this question come 
>> up at least 3 times in my brief involvement with OE.  I could perhaps 
>> add comment to the OpenBMC os-release.bbappend file to provide the 
>> proper guidance.  I would like to hear your ideas.
>
> There's an image-buildinfo class that can inject build-specific 
> information of your chosing into the image.

Thank you, I was not aware of that.  That makes perfect sense.  I've 
added that to my answer in the OpenBMC email list, and hope to have a 
answer I can just refer to, for the next time someone asks this question.

Link to OpenBMC email thread: 
https://lists.ozlabs.org/pipermail/openbmc/2019-November/019479.html

- Joseph

>
> Ross
>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re:Add build date to image (was: error basehash value changed)
  2019-11-18 16:02     ` Add build date to image (was: error basehash value changed) Joseph Reynolds
@ 2019-11-19  1:23       ` www
  2019-11-20 16:38         ` Add build date to image Joseph Reynolds
  0 siblings, 1 reply; 16+ messages in thread
From: www @ 2019-11-19  1:23 UTC (permalink / raw)
  To: Joseph Reynolds; +Cc: openbmc

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

Dear Joseph,


Thank you very much for your help. I just want to show the compile time of firmware to the user. If  only show the version, it can't correspond to the time. When both are displayed at the same time, the information will be clearer. thanks again.


thanks,
Byron







At 2019-11-19 00:02:12, "Joseph Reynolds" <jrey@linux.ibm.com> wrote:
>On 11/17/19 7:52 PM, www wrote:
>> Dear Joseph,
>>
>> Thank you for your reference and suggestions. "DATETIME" is not local 
>> time,so I need add a new one.
>> I added a new variable to get local time without reporting an error.
>> The current problem is, how can I make this task compile every time 
>> even without modification, and store the latest time?
>> Do you have any suggestions?
>
>I re-asked your question on the openembedded-core email list.  See 
>replies to 
>http://lists.openembedded.org/pipermail/openembedded-core/2019-November/289259.html
>
>There were two answers:
>
>1.
>There's an image-buildinfo class that can inject build-specific 
>information of your choosing into the image.
>
>2.
>
>I'd write the date into the file at image creation, via
>ROOTFS_POSTPROCESS_COMMAND.
>
>Having it in a recipe means that you either force the recipe to not be a
>part of sstate cache, always rebuilding it and its dependencies (bad idea),
>or accept that the date comes from a previously built cache object, which
>means it will mismatch the actual image creation date.
>
>A bit of context would help: why would you want that info in os-release?
>Who would use that information and how?
>
>
>
>For item 2, I also found:
>In the Yocto Project Reference Manual, https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html
>, "If you need the build date recorded in|/etc/issue*|  or anywhere else in your image...."
>
>And use a recipe like:
>  add_build_time_to_etc() {
>         date >> ${IMAGE_ROOTFS}/etc/image-build-date
>  }
>  ROOTFS_POSTPROCESS_COMMAND += "add_build_time_to_etc; "
>
>However, I have not tested this.
>
>
>Also I don't fully understand this use case.  Maybe there is a better way to do what you need.  Why do you need the driver build date?  Is it to learn how old your driver is?  Most projects use driver versions for that purpose (which is in the driver's /etc/os-release file), and then your can look up that driver version on a list.  For OpenBMC, we use https://github.com/openbmc/docs/blob/master/release/release-notes.md
>
>Please note that adding the build date to the driver image breaks reproducible builds.  Reproducible builds are desired to support the use case of digitally signing the firmware image.  Can you use an alternative date?  Instead of using your build host's current date, can you use the date of the most recent commit the source was build from?
>
>- Joseph
>
>>
>> thanks,
>> Byron
>>
>>
>> At 2019-11-17 05:50:38, "Joseph Reynolds" <jrey@linux.ibm.com> wrote:
>> >Byron,
>> >
>> >What modification did you put into the os-release recipe?  It would help 
>> >us help you if you put that in your email.
>> >
>> >
>> >Are you adding the build date to the generated os-release file?  If so, 
>> >be aware that might cause the issues with the shared state cache you are 
>> >experiencing.  Also be aware this practice wrecks reproducible builds.
>> >
>> >A better way to get the same effect might be to create a git tag with 
>> >the information you want to appear in the generated os-release file.  
>> >When you buld with this tag is then picked up by the OpenBMC 
>> >meta-phosphor os-release.bbappend (via `git describe`) and included in 
>> >the genersted os-release file as the BUILD_ID.  See:
>> >https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
>> >(But I have not tried that.)
>> >
>> >A way to work around the hash change is to add a line to your recipe 
>> >like: PR[vardepsxeclude]="DATETIME"
>> >As suggested by: 
>> >https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/
>> >
>> >
>> >My apologies for top posting -- my email reader was not quoting the 
>> >message properly, so I cut/pasted it below.
>> >
>> >- Joseph
>> >
>> >
>> >On 11/13/19 1:38 AM, www wrote:
>> >
>> >When I modify the os-release file in my yocto project, it appear some 
>> >error, and how can I solve it ? Who can give me some help or advice? 
>> >Thank you!
>> >I execute the recommended command on the console and it didn't work.
>> >
>> >ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch 
>> >ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
>> >7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
>> >for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
>> >ERROR: Taskhash mismatch 
>> >ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201 versus 
>> >7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f 
>> >for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
>> >ERROR: When reparsing 
>> >/home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
>> >basehash value changed from 
>> >99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
>> >4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The 
>> >metadata is not deterministic and this needs to be fixed.
>> >ERROR: The following commands may help:
>> >ERROR: $ bitbake os-release -cdo_compile -Snone
>> >ERROR: Then:
>> >ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>> >
>> >ERROR: When 
>> >reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the 
>> >basehash value changed from 
>> >99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to 
>> >47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The 
>> >metadata is not deterministic and this needs to be fixed.
>> >ERROR: The following commands may help:
>> >ERROR: $ bitbake os-release -cdo_compile -Snone
>> >ERROR: Then:
>> >ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>> >
>> >thanks,
>> >Byron
>>
>>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to add build date?
  2019-11-17 21:19     ` Alexander Kanavin
  2019-11-18  8:58       ` Mikko.Rapeli
@ 2019-11-20 16:28       ` Joseph Reynolds
  1 sibling, 0 replies; 16+ messages in thread
From: Joseph Reynolds @ 2019-11-20 16:28 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

On 11/17/19 3:19 PM, Alexander Kanavin wrote:
> I'd write the date into the file at image creation, via 
> ROOTFS_POSTPROCESS_COMMAND.
>
> Having it in a recipe means that you either force the recipe to not be 
> a part of sstate cache, always rebuilding it and its dependencies (bad 
> idea), or accept that the date comes from a previously built cache 
> object, which means it will mismatch the actual image creation date.

Got it, thanks. I was unaware of ROOTFS_POSTPROCESS_COMMAND.


>
> A bit of context would help: why would you want that info in 
> os-release? Who would use that information and how?

I don't fully understand the use case for adding a build date to the image.  I don't have a use for it, but this question keeps coming up in the OpenBMC community, so I want to address it.  I am imagining a naive continuous delivery process where the build date is used as a substitute for a software version.  That is easier than keeping track of software versions, but (as I mentioned before) does not meet my needs.

I've re-asked the question to the original poster in the OpenBMC email list:
https://lists.ozlabs.org/pipermail/openbmc/2019-November/019493.html

The response so far is: I just want to show the compile time of firmware to the user. If  only show the version, it can't correspond to the time. When both are displayed at the same time, the information will be clearer.

I'll continue the conversation in that email thread.  Thanks for your help!

  - Joseph


>
> Alex
>
> On Sat, 16 Nov 2019 at 23:14, Joseph Reynolds <jrey@linux.ibm.com 
> <mailto:jrey@linux.ibm.com>> wrote:
>
>
>     Is there a best practice for folks who want to put the build date
>     into
>     their generated os-release file?  I've seen this question come up at
>     least 3 times in my brief involvement with OE.  I could perhaps add
>     comment to the OpenBMC os-release.bbappend file to provide the proper
>     guidance.  I would like to hear your ideas.
>
>     - Joseph
>
>
>     -------- Forwarded Message --------
>     Subject:        Re: how to solve the error that basehash value
>     changed from
>     'xxx' to 'aaaa' ?
>     Date:   Sat, 16 Nov 2019 15:50:38 -0600
>     From:   Joseph Reynolds <jrey@linux.ibm.com
>     <mailto:jrey@linux.ibm.com>>
>     To:     www <ouyangxuan10@163.com <mailto:ouyangxuan10@163.com>>,
>     openbmc@lists.ozlabs.org <mailto:openbmc@lists.ozlabs.org>
>     <openbmc@lists.ozlabs.org <mailto:openbmc@lists.ozlabs.org>>
>
>
>
>     Byron,
>
>     What modification did you put into the os-release recipe?  It
>     would help
>     us help you if you put that in your email.
>
>
>     Are you adding the build date to the generated os-release file? If
>     so,
>     be aware that might cause the issues with the shared state cache
>     you are
>     experiencing.  Also be aware this practice wrecks reproducible builds.
>
>     A better way to get the same effect might be to create a git tag with
>     the information you want to appear in the generated os-release file.
>     When you buld with this tag is then picked up by the OpenBMC
>     meta-phosphor os-release.bbappend (via `git describe`) and
>     included in
>     the genersted os-release file as the BUILD_ID. See:
>     https://github.com/ibm-openbmc/openbmc/blob/d1c59b7a36c10c18838c07af10b18080174cd61d/meta-phosphor/recipes-core/os-release/os-release.bbappend
>     (But I have not tried that.)
>
>     A way to work around the hash change is to add a line to your recipe
>     like: PR[vardepsxeclude]="DATETIME"
>     As suggested by:
>     https://forums.openpli.org/topic/41447-how-to-get-rid-of-taskhash-mismatch/
>
>
>     My apologies for top posting -- my email reader was not quoting the
>     message properly, so I cut/pasted it below.
>
>     - Joseph
>
>
>     On 11/13/19 1:38 AM, www wrote:
>
>     When I modify the os-release file in my yocto project, it appear some
>     error, and how can I solve it ? Who can give me some help or advice?
>     Thank you!
>     I execute the recommended command on the console and it didn't work.
>
>     ERROR: os-release-1.0-r0 do_compile: Taskhash mismatch
>     ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201
>     versus
>     7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f
>     for  /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
>     ERROR: Taskhash mismatch
>     ce133f0458608e03aa55224df28156e523e54903115efbbcd62946f84a867201
>     versus
>     7269881f0eb1759ed420a2db4c04fb477cd8c1288bc5f82df5c8161bb926ea1f
>     for /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile
>     ERROR: When reparsing
>     /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the
>
>     basehash value changed from
>     99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to
>     4f3288a8763e2e1af78e4b3cdd9c0c0ccb3b0d5c78a3073c188b22200df2a9b0. The
>     metadata is not deterministic and this needs to be fixed.
>     ERROR: The following commands may help:
>     ERROR: $ bitbake os-release -cdo_compile -Snone
>     ERROR: Then:
>     ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>
>     ERROR: When
>     reparsing /home/temp/xxx/wsp/obmc-source/entity_xxx/meta/recipes-core/os-release/os-release.bb.do_compile, the
>
>     basehash value changed from
>     99a42a1a3b1a151de604267b159558ecaf1031a3bec8917df132c81302e729a5 to
>     47c30012daa6aa77be09a93fe21e66995361ef26b4487111005617db8cb4de59. The
>     metadata is not deterministic and this needs to be fixed.
>     ERROR: The following commands may help:
>     ERROR: $ bitbake os-release -cdo_compile -Snone
>     ERROR: Then:
>     ERROR: $ bitbake os-release -cdo_compile -Sprintdiff
>
>     thanks,
>     Byron
>
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Add build date to image
  2019-11-19  1:23       ` www
@ 2019-11-20 16:38         ` Joseph Reynolds
  2019-11-20 18:08           ` Vijay Khemka
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Reynolds @ 2019-11-20 16:38 UTC (permalink / raw)
  To: www; +Cc: openbmc


On 11/18/19 7:23 PM, www wrote:
> Dear Joseph,
>
> Thank you very much for your help. I just want to show the compile 
> time of firmware to the user. If  only show the version, it can't 
> correspond to the time. When both are displayed at the same time, the 
> information will be clearer. thanks again.
>

Byron, thanks for that.  I think I understand your use case. However, 
does this practice assume the build date is close to the date when the 
software version was created?
- For example, I assume you'll merge a git commit to create a new 
software version, and then build an image based on that commit.  In this 
way, the build date correlates closely with the version.
- However, if you build an image from an older commit, or wait a long 
time before building an image, the build date will not correlate closely 
with the version.  This can be misleading and lead to errors in handling 
images.

Is that a concern for you?

- Joseph

> thanks,
> Byron
>
...snip...

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Add build date to image
  2019-11-20 16:38         ` Add build date to image Joseph Reynolds
@ 2019-11-20 18:08           ` Vijay Khemka
  2019-11-21  1:02             ` www
  0 siblings, 1 reply; 16+ messages in thread
From: Vijay Khemka @ 2019-11-20 18:08 UTC (permalink / raw)
  To: Joseph Reynolds, www; +Cc: openbmc



On 11/20/19, 8:40 AM, "openbmc on behalf of Joseph Reynolds" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jrey@linux.ibm.com> wrote:

    
    On 11/18/19 7:23 PM, www wrote:
    > Dear Joseph,
    >
    > Thank you very much for your help. I just want to show the compile 
    > time of firmware to the user. If  only show the version, it can't 
    > correspond to the time. When both are displayed at the same time, the 
    > information will be clearer. thanks again.
    >
    
    Byron, thanks for that.  I think I understand your use case. However, 
    does this practice assume the build date is close to the date when the 
    software version was created?
    - For example, I assume you'll merge a git commit to create a new 
    software version, and then build an image based on that commit.  In this 
    way, the build date correlates closely with the version.
    - However, if you build an image from an older commit, or wait a long 
    time before building an image, the build date will not correlate closely 
    with the version.  This can be misleading and lead to errors in handling 
    images.

I guess build date should be the date version was released or created.
    
    Is that a concern for you?
    
    - Joseph
    
    > thanks,
    > Byron
    >
    ...snip...
    
    


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re:Re: Add build date to image
  2019-11-20 18:08           ` Vijay Khemka
@ 2019-11-21  1:02             ` www
  2019-11-22  9:06               ` rgrs
  0 siblings, 1 reply; 16+ messages in thread
From: www @ 2019-11-21  1:02 UTC (permalink / raw)
  To: Vijay Khemka; +Cc: Joseph Reynolds, openbmc

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

Dear Joseph & Vijay Khemka,


No matter what your version is, build date only represents the time when the image was created.


thanks,
Byron






At 2019-11-21 02:08:40, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
>
>
>On 11/20/19, 8:40 AM, "openbmc on behalf of Joseph Reynolds" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jrey@linux.ibm.com> wrote:
>
>    
>    On 11/18/19 7:23 PM, www wrote:
>    > Dear Joseph,
>    >
>    > Thank you very much for your help. I just want to show the compile 
>    > time of firmware to the user. If  only show the version, it can't 
>    > correspond to the time. When both are displayed at the same time, the 
>    > information will be clearer. thanks again.
>    >
>    
>    Byron, thanks for that.  I think I understand your use case. However, 
>    does this practice assume the build date is close to the date when the 
>    software version was created?
>    - For example, I assume you'll merge a git commit to create a new 
>    software version, and then build an image based on that commit.  In this 
>    way, the build date correlates closely with the version.
>    - However, if you build an image from an older commit, or wait a long 
>    time before building an image, the build date will not correlate closely 
>    with the version.  This can be misleading and lead to errors in handling 
>    images.
>
>I guess build date should be the date version was released or created.
>    
>    Is that a concern for you?
>    
>    - Joseph
>    
>    > thanks,
>    > Byron
>    >
>    ...snip...
>    
>    
>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re:Re: Add build date to image
  2019-11-21  1:02             ` www
@ 2019-11-22  9:06               ` rgrs
  2019-11-22  9:17                 ` www
  0 siblings, 1 reply; 16+ messages in thread
From: rgrs @ 2019-11-22  9:06 UTC (permalink / raw)
  To: www; +Cc: Vijay Khemka, openbmc, Joseph Reynolds

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

Hi Byron,

We had a similiar need, and we use IPMI aux version for this purpose.

To get the behavior you describe, you can change [your platform's phosphor-ipmi-config.bbappend](https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend)

Witherspoon for example, calculates Aux rev info from VERSION_ID (git tag, I guess).
In our platforms, we instead write DDMMYYYY into IPMI Get Dev ID's aux rev info (4bytes, BCD)

"ipmitool mc info" would looks something like below:
Aux Firmware Rev Info     :
    0x22
    0x11
    0x19
    0x20

Thanks,

Raj

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, November 21, 2019 6:32 AM, www <ouyangxuan10@163.com> wrote:

> Dear Joseph & Vijay Khemka,
>
> No matter what your version is, build date only represents the time when the image was created.
>
> thanks,
> Byron
>
> At 2019-11-21 02:08:40, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
>>
>>
>>On 11/20/19, 8:40 AM, "openbmc on behalf of Joseph Reynolds" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jrey@linux.ibm.com> wrote:
>>
>>
>>    On 11/18/19 7:23 PM, www wrote:
>>    > Dear Joseph,
>>    >
>>    > Thank you very much for your help. I just want to show the compile
>>    > time of firmware to the user. If  only show the version, it can't
>>    > correspond to the time. When both are displayed at the same time, the
>>    > information will be clearer. thanks again.
>>    >
>>
>>    Byron, thanks for that.  I think I understand your use case. However,
>>    does this practice assume the build date is close to the date when the
>>    software version was created?
>>    - For example, I assume you'll merge a git commit to create a new
>>    software version, and then build an image based on that commit.  In this
>>    way, the build date correlates closely with the version.
>>    - However, if you build an image from an older commit, or wait a long
>>    time before building an image, the build date will not correlate closely
>>    with the version.  This can be misleading and lead to errors in handling
>>    images.
>>
>>I guess build date should be the date version was released or created.
>>
>>    Is that a concern for you?
>>
>>    - Joseph
>>
>>    > thanks,
>>    > Byron
>>    >
>>    ...snip...
>>
>>
>>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re:Re:Re: Add build date to image
  2019-11-22  9:06               ` rgrs
@ 2019-11-22  9:17                 ` www
  0 siblings, 0 replies; 16+ messages in thread
From: www @ 2019-11-22  9:17 UTC (permalink / raw)
  To: rgrs; +Cc: Vijay Khemka, openbmc, Joseph Reynolds

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

hi ,


thank you for your help. I didn't test this, but I want ask a question, if this package hasn't been updated, the time will be updated automatically or not?


Thanks,
Byron






At 2019-11-22 17:06:04, "rgrs" <rgrs@protonmail.com> wrote:

Hi Byron,



We had a similiar need, and we use IPMI aux version for this purpose.



To get the behavior you describe, you can change your platform's phosphor-ipmi-config.bbappend



Witherspoon for example, calculates Aux rev info from VERSION_ID (git tag, I guess).

In our platforms, we instead write DDMMYYYY into IPMI Get Dev ID's aux rev info (4bytes, BCD)



"ipmitool mc info" would looks something like below:

Aux Firmware Rev Info     :

    0x22

    0x11

    0x19

    0x20



Thanks,



Raj



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, November 21, 2019 6:32 AM, www <ouyangxuan10@163.com> wrote:



Dear Joseph & Vijay Khemka,



No matter what your version is, build date only represents the time when the image was created.



thanks,

Byron













At 2019-11-21 02:08:40, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
>
>
>On 11/20/19, 8:40 AM, "openbmc on behalf of Joseph Reynolds" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jrey@linux.ibm.com> wrote:
>
>
>    On 11/18/19 7:23 PM, www wrote:
>    > Dear Joseph,
>    >
>    > Thank you very much for your help. I just want to show the compile
>    > time of firmware to the user. If  only show the version, it can't
>    > correspond to the time. When both are displayed at the same time, the
>    > information will be clearer. thanks again.
>    >
>
>    Byron, thanks for that.  I think I understand your use case. However,
>    does this practice assume the build date is close to the date when the
>    software version was created?
>    - For example, I assume you'll merge a git commit to create a new
>    software version, and then build an image based on that commit.  In this
>    way, the build date correlates closely with the version.
>    - However, if you build an image from an older commit, or wait a long
>    time before building an image, the build date will not correlate closely
>    with the version.  This can be misleading and lead to errors in handling
>    images.
>
>I guess build date should be the date version was released or created.
>
>    Is that a concern for you?
>
>    - Joseph
>
>    > thanks,
>    > Byron
>    >
>    ...snip...
>
>
>







 




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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-11-22  9:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13  7:38 how to solve the error that basehash value changed from 'xxx' to 'aaaa' ? www
2019-11-16 21:50 ` Joseph Reynolds
2019-11-16 21:56   ` How to add build date? (was: ... basehash value changed...) Joseph Reynolds
2019-11-17 21:19     ` Alexander Kanavin
2019-11-18  8:58       ` Mikko.Rapeli
2019-11-20 16:28       ` How to add build date? Joseph Reynolds
2019-11-18  9:53     ` Ross Burton
2019-11-18 16:07       ` Joseph Reynolds
2019-11-18  1:52   ` Re:Re: how to solve the error that basehash value changed from 'xxx' to 'aaaa' ? www
2019-11-18 16:02     ` Add build date to image (was: error basehash value changed) Joseph Reynolds
2019-11-19  1:23       ` www
2019-11-20 16:38         ` Add build date to image Joseph Reynolds
2019-11-20 18:08           ` Vijay Khemka
2019-11-21  1:02             ` www
2019-11-22  9:06               ` rgrs
2019-11-22  9:17                 ` www

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.