Currently images contain a file /etc/version in the image that contains a timestamp. root@ettus-e300:/etc/init.d# cat /etc/version 201409231521 It would be helpful to have a standard way of documenting what layers, versions of layers, bitbake versions, etc were used to create the image. From a brief discussion on the list, it seems like there are several ad hoc solutions floating around. It would be nice to have a standard way of doing this for people that need to be able to work backwards from the image to what it was built with.
I'd definitely be interesting in steps in this direction. Having a way to identify the rootfs in some way would definitely be useful. I'd be interested in capturing not just layer information but *configuration* as well.
Created attachment 2145 [details] build_info.inc I've attached a build_info.inc that I have used on some of my images to include a build timestamp, and layer names/version info in /etc/build
(In reply to comment #2) > Created attachment 2145 [details] > build_info.inc Credit: Marc Ferland posted a similar set of commands in 2012: https://lists.yoctoproject.org/pipermail/yocto/2012-October/010136.html
Ok, so I'll be implementing this as an IMAGE_FEATURE, and this is what I'm trying to achieve: /etc/build: ----------------------- Build Configuration: | ----------------------- DISTRO = poky DISTRO_VERSION = 1.7 BB_VERSION = 1.24.0 BUILD_SYS = x86_64-linux TARGET_SYS = x86_64-poky-linux MACHINE = qemux86-64 USER_CLASSES = buildstats image-mklibs image-prelink IMAGE_CLASSES = image_types IMAGE_FEATURES = debug-tweaks buildinfo IMAGE_LINGUAS = IMAGE_INSTALL = packagegroup-core-boot run-postinsts PACKAGE_EXCLUDE = ----------------------- Layer Revisions: | ----------------------- meta = hsalejandro/6770:ccf5a4d2342c4fd40e4e0b332ea7e34e0bf175d4 meta-yocto = hsalejandro/6770:ccf5a4d2342c4fd40e4e0b332ea7e34e0bf175d4 meta-yocto-bsp = hsalejandro/6770:ccf5a4d2342c4fd40e4e0b332ea7e34e0bf175d4
A couple of questions: 1) Have you thought about adding the build hostname? 2) Will the layer info show if the build machine has un-committed changes?
1 - No, I hand't thought of that, but it'd be relatively easy to add its variable to the function. 2 - The layer info would show the latest commit checksum
It would be good to show if the git repos are clean or dirty. One of the things we are worried about is knowing if the build had uncommitted work.
I would agree with the git dirty vs clean additional information, but I would be concerned about the possibility of information leakage including the build hostname
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ed3e25379c22da57a829f323b9404dd240de2272