[oe-commits] [openembedded-core] 43/56: libjpeg-turbo: improve reproducibility

git at git.openembedded.org git at git.openembedded.org
Sat Mar 3 09:14:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 374e5c6bfda95eab7768de8b6c7037db66e45285
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Thu Mar 1 14:53:18 2018 -0800

    libjpeg-turbo: improve reproducibility
    
    Build date ends up embbedded in binary images, breaking reproducibility
    of jpeg-tools and libturbojpeg. To enable reproducible builds, build date can be
    specified during configuration, via "--with_build_date=<date>".
    If SOURCE_DATE_EPOCH is specified we configure libjpeg-turbo with this value as
    build date. Although the build date is a generic string, we keep it in the same
    format YYYYMMDD.
    
    [YOCTO #12526]
    
    Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
index 8809f2c..50a5ae0 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
@@ -40,6 +40,14 @@ EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf
 EXTRA_OECONF_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 EXTRA_OECONF_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 
+def get_build_time(d):
+    if d.getVar('SOURCE_DATE_EPOCH') != None:
+        import datetime
+        return " --with-build-date="+ datetime.datetime.fromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
+    return ""
+
+EXTRA_OECONF_append_class-target = "${@get_build_time(d)}"
+
 PACKAGES =+ "jpeg-tools libturbojpeg"
 
 DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality.  These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list