<?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>12422</bug_id>
          
          <creation_ts>2017-12-13 22:23:53 +0000</creation_ts>
          <short_desc>Support reproducible build for core-image-minimal images</short_desc>
          <delta_ts>2018-04-27 13:20:21 +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>core</component>
          <version>2.5</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>2.5 M4</target_milestone>
          <dependson>1176</dependson>
    
    <dependson>1177</dependson>
    
    <dependson>1178</dependson>
    
    <dependson>1179</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>stephano</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>78692</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-12-13 22:23:53 +0000</bug_when>
    <thetext>This is an offshoot of
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5866

providing a better specified deliverable.

The goal of this enhancement is to build reproducible images for:

$ MACHINE=qemux86 bitbake core-image-minimal


The resulting images of this build are placed in the folder &lt;builddir&gt;/tmp/deploy/images/qemux86

Repeating the build in a different folder will place the images in:
&lt;builddir-different&gt;/tmp/deploy/images/qemux86

The build is deemed reproducible if the following files in both build folders are binary identical:

bzImage-qemux86.bin
core-image-minimal-qemux86.tar.bz2
modules-qemux86.tgz</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80446</commentid>
    <comment_count>1</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2018-04-27 13:20:21 +0000</bug_when>
    <thetext>I built two different core-image-minimal images in two different folders and at two different times.

local conf:
INHERIT+=&quot;reproducible_build&quot;
PACKAGE_CLASSES=&quot;package_deb package_rpm package_ipk&quot;
MACHINE=&quot;qemux86-64&quot;

Build Configuration:
BB_VERSION           = &quot;1.37.0&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;ubuntu-16.04&quot;
TARGET_SYS           = &quot;x86_64-poky-linux&quot;
MACHINE              = &quot;qemux86-64&quot;
DISTRO               = &quot;poky&quot;
DISTRO_VERSION       = &quot;2.5&quot;
TUNE_FEATURES        = &quot;m64 core2&quot;
TARGET_FPU           = &quot;&quot;
meta                 
meta-poky            
meta-yocto-bsp       = &quot;HEAD:b6bc5b2840246ac0f0e5d8cebcdffc1a0ca2518f&quot;

$ bitbake core-image-minimal

Then I ran binary comparisons:
SAME: /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27-again/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193430.rootfs.manifest  /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193330.rootfs.manifest

SAME: /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27-again/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193430.rootfs.tar.bz2  /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193330.rootfs.tar.bz2

SAME: /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27-again/tmp/deploy/images/qemux86-64/bzImage--4.14.30+git0+ea9330894e_74f6cd2b69-r0-qemux86-64-20180427193430.bin  /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27/tmp/deploy/images/qemux86-64/bzImage--4.14.30+git0+ea9330894e_74f6cd2b69-r0-qemux86-64-20180427193330.bin


Note modules-qemux86.tgz differed. This is rather easy to fix, providing the build host has &quot;tar&quot; that supports &quot;--sort=name&quot; and &quot;--clamp-mtime&quot; support.
Unfortunately, at this time it is not guaranteed.
Nevertheless, I will close this as resolve, as the both images and kernel are binary reproducible. (I will open a new bug dealing with modules.tgz)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>