Bug 8138

Summary: BuildHistory: additional detailed information about builds needed to be stored.
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Alexander Kanevskiy <alexander.kanevskiy>
Component: coreAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Daniel Istrate <daniel.alexandrux.istrate>
Severity: normal    
Priority: High CC: alexandru.c.georgescu, bluelightning, bogdanx.a.voiculescu, markus.lehtonen, meta.mr.watcher, meta.watcher, otavio, poky.bs.watcher, poky.watcher, richard.purdie, ross.burton
Version: 1.9   
Target Milestone: 1.9 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Attachments:
Description Flags
buildhistory extension bbclass
none
buildhistory extension bbclass v2 none

Description Alexander Kanevskiy 2015-08-10 14:35:27 UTC
There is a need in several enhancements in the buildhistory to preserve technical information about official builds done in the past and tracking changes in key aspects of that information.

For every single official build we need to store information about:
- set of recipes that we used in builds, including information like checksum, originated layer(s), .bbappend and other overrides.

- information about source/patch files used in recipes (URLs, layers originating from, checksums).
- for images, links to source recipe names/versions that was used in image.

Rationale: provide information for debugging if something in environment was altered via *.conf in the build system.
Comment 1 Richard Purdie 2015-08-12 21:18:58 UTC
To be honest, this sounds like significant feature creep compared to what buildhistory was designed/intended for. My suggestion is we'd look at a way to extend buildhistory so that you can customise the data it logs from an additional layer rather than add this to the core directly.
Comment 2 Paul Eggleton 2015-08-26 15:35:06 UTC
Created attachment 2689 [details]
buildhistory extension bbclass
Comment 3 Paul Eggleton 2015-08-26 15:37:08 UTC
I have sent one change that is needed to make this possible to extend, it's part of this patchset:

http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/buildhistory-fixes10

I've also attached an extension class that does as this bug requests.
Comment 4 Paul Eggleton 2015-08-26 15:39:13 UTC
Note that the only fix required from the above patchset is this one:

http://cgit.openembedded.org/openembedded-core-contrib/commit/?h=paule/buildhistory-fixes10&id=09068165771ebdfde43d13b08e757e49c3e56750
Comment 5 Paul Eggleton 2015-08-31 21:44:58 UTC
The aforementioned patchset has been merged to master.
Comment 6 Alexander Kanevskiy 2015-09-30 15:51:47 UTC
Paul, we have tried that class, looks great from first look.

Few comments:

1. sha256 sums to be used instead of md5. or both. we have in recipes both, it make sense to have matching information stored in history.


2. common path from top build dir should be stripped. doesn’t make sense to report
 /home/user/git/distro/meta/recipes-core/something/files/xxx.patch
where most relevant information is 
 ./meta/recipes-core/something/files/xxx.patch

I think having relative path against build root directory has more value than absolute paths, in most cases. Absolute path only make sense if some files are located outside of build top dir.

3. in image data, installed-package-recipes.txt seems doesn’t have revision (and maybe epoch?) field

$ grep shadow-securetty installed-package-recipes.txt installed-packages.txt
installed-package-recipes.txt:shadow-securetty 4.2.1 shadow-securetty
installed-packages.txt:shadow-securetty-4.2.1-r3.qemux86.rpm
$

shouldn't it be something similar to $PF format ?
Comment 7 Paul Eggleton 2015-10-01 08:42:41 UTC
Created attachment 2780 [details]
buildhistory extension bbclass v2

OK, updated class with requested changes attached.
Comment 8 Daniel Istrate 2015-11-03 14:45:42 UTC
Verified on master: e1aa897beb33171bc902207b98c8f666b9e97ad3
Additional detailed information about builds is stored.