<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6770</bug_id>
          
          <creation_ts>2014-09-26 17:08:33 +0000</creation_ts>
          <short_desc>Improve storing build information in images</short_desc>
          <delta_ts>2014-11-10 16:18:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Phlip Balister">philip</reporter>
          <assigned_to name="Alejandro Hernandez">alejandro.hernandez</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>doug.geiger</cc>
    
    <cc>kergoth</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45902</commentid>
    <comment_count>0</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2014-09-26 17:08:33 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45903</commentid>
    <comment_count>1</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2014-09-26 17:42:54 +0000</bug_when>
    <thetext>I&apos;d definitely be interesting in steps in this direction. Having a way to identify the rootfs in some way would definitely be useful. I&apos;d be interested in capturing not just layer information but *configuration* as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45904</commentid>
    <comment_count>2</comment_count>
      <attachid>2145</attachid>
    <who name="Doug">doug.geiger</who>
    <bug_when>2014-09-26 17:54:17 +0000</bug_when>
    <thetext>Created attachment 2145
build_info.inc

I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45905</commentid>
    <comment_count>3</comment_count>
    <who name="Doug">doug.geiger</who>
    <bug_when>2014-09-26 18:10:36 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Created attachment 2145 [details]
&gt; build_info.inc

Credit: Marc Ferland posted a similar set of commands in 2012: https://lists.yoctoproject.org/pipermail/yocto/2012-October/010136.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46328</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2014-10-14 20:29:23 +0000</bug_when>
    <thetext>Ok, so I&apos;ll be implementing this as an IMAGE_FEATURE, and this is what I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46639</commentid>
    <comment_count>5</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2014-10-29 10:36:52 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46652</commentid>
    <comment_count>6</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2014-10-29 18:29:10 +0000</bug_when>
    <thetext>1 - No, I hand&apos;t thought of that, but it&apos;d be relatively easy to add its variable to the function.
2 - The layer info would show the latest commit checksum</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46653</commentid>
    <comment_count>7</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2014-10-29 20:22:44 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46658</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-10-29 21:21:11 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46903</commentid>
    <comment_count>9</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2014-11-10 16:12:14 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ed3e25379c22da57a829f323b9404dd240de2272</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2145</attachid>
            <date>2014-09-26 17:54:17 +0000</date>
            <delta_ts>2014-09-26 17:54:17 +0000</delta_ts>
            <desc>build_info.inc</desc>
            <filename>build_info.inc</filename>
            <type>text/plain</type>
            <size>366</size>
            <attacher name="Doug">doug.geiger</attacher>
            
              <data encoding="base64">IyBJbmNsdWRlIGJ1aWxkL3ZlcnNpb24gaW5mbyBpbiBhbGwgaW1hZ2VzCmRlZiBwcmludF9sYXll
cnNfdmVyc2lvbihkKToKICAgIGxheWVydGV4dCA9ICJDb25maWd1cmVkIG1ldGFkYXRhIGxheWVy
czpcbiVzXG4iICUgJ1xuJy5qb2luKGdldF9sYXllcnNfYnJhbmNoX3JldihkKSkKICAgIHJldHVy
biBsYXllcnRleHQKCklNQUdFX1BSRVBST0NFU1NfQ09NTUFORCArPSAicm9vdGZzX3VwZGF0ZV90
aW1lc3RhbXAgO1wKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICcke0BwcmludF9s
YXllcnNfdmVyc2lvbihkKX0nID4gJHtJTUFHRV9ST09URlN9L2V0Yy9idWlsZCA7XAogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICIK
</data>

          </attachment>
      

    </bug>

</bugzilla>