Bug 12524

Summary: (reproducibility) autoconf-info contains build date
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liezhi.yang, meta.mr.watcher, meta.watcher, randy.macleod, ross.burton
Version: 2.5   
Target Milestone: 2.7 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: reproducibility
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
diffoscope output comparing two builds on two diffarent dates none

Description Juro Bystricky 2018-02-01 18:56:28 UTC
Created attachment 4195 [details]
diffoscope output comparing two builds on two diffarent dates

autoconf-doc package contains autoconf.info. This file contains date when this file was created, i.e. "This manual (31 January 2018) .."
Therefore, two builds done on two different dates will embed different dates, hence breaking reproducibility. The date is obtained from mtime of "autoconf.texi", unfortunately we patch this file and change the mtime as a consequence. The remedy would be to set the mtime to SOURCE_DATE_EPOCH, as  preserving the mtime of a file we explicitly modified by patching would hide/mislead the fact the file was truly modified.
Comment 2 Hongxu Jia 2018-12-06 01:28:14 UTC
Merged to oe-corecommit 1eaa918ae3663e3f863c025744a9ced0300b6b78
Author: Hongxu Jia <hongxu.jia@windriver.com>
Date:   Wed Dec 5 10:11:48 2018 +0800

    autoconf-doc: improve reproducibility
    
    autoconf-doc package contains autoconf.info.
    This file contains date when this file was created, i.e:
    
         "This manual (31 January 2018) .."
    
    Therefore, two builds done on two different days will show different dates for
    otherwise identical files, hence breaking reproducibility.
    The date is obtained from mtime of "autoconf.texi", unfortunately we patch this
    file and change the mtime as a consequence.
    We restore reproducibility by removing the patch modifying "autoconf.texi".
    As a consequence certain supplemental information will be not added to the documentation.
    In particular:  more details on usage, and on workarounds for non-updated projects.
    
    [YOCTO #12524]
    
    Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
    
    With applying this fix:
    
        "This manual (24 April 2012) .."
    
    Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>