Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by mail.openembedded.org (Postfix) with ESMTP id 5E5D477A2D for ; Wed, 26 Apr 2017 07:41:55 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id u65so30883260wmu.3 for ; Wed, 26 Apr 2017 00:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jnrs50ti8ksZzyNl2/zDrxn2kYNuWAyo8kBl0WYZmNg=; b=LkCD8E0bEOHeQiTssSyL3A3NQYviuzlQnxV1hsOVWiTqDvHi4XN9eiexLG73gyNL3g WDYTHx4n88Q0gJi7xLNWqiqKd8JYAzbLD5mCuKvIzA0vBv7LMV6YTBwfQXWvftWVPHIZ WiudzmECTi/+y48wkMZ2ihRnTVJY6OQ9I+kLCik3l2cWqZheccsYlusncWyzPKWTxUbb 83YtI3mzmJ8zTWizvYMEkKypYcOEOMluoN0zbp5lWnnQNaWxU3MG/xBoQtg6WorUFrz7 oq8vGvgH/VP0BceaKJGYFIGyFLlNJ1bUS77yyDpOQtgBtm7rdLHdJ5kaUL+L575hsbFF LkEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jnrs50ti8ksZzyNl2/zDrxn2kYNuWAyo8kBl0WYZmNg=; b=fiOe3PTHMd6rfy22pyA2NPqnxFrJpr8EcxOCNRiSU85PuULlXYlvl0xjVRwwJJmq5M 591oYgjl7jfc2EV6Zd4I1md0TGNhf5ehbQ9XT/WHNI6qPMVSq8yKlbW7e5ka0FIfM67V xuzPq94n8oDwcE0dKtNQpSfrmCIqLe2jIdEx24a44vHRwwyv+IVlMZ7b01R70T26WPnQ ZIP0eaqQNAW7Af8ZwF0OqOfcyyXVbnkPBJQWGjlnB428FWfxjYPH/q/cQpqUt9MGSOF4 XoP1WHyVLKYdZ4eE6qhxbwX5MfP0kmDpAnPJmRiUvzeSujcD5JFcZZKiHzN0iL6eUSAd zDNA== X-Gm-Message-State: AN3rC/6NPtWgNkKWSCTXnGAcsPvomxE6I0u3awJ1kC+R116V04E8i9Fq /HFPx/oONOEkJHeN X-Received: by 10.28.68.134 with SMTP id r128mr4691246wma.60.1493192516626; Wed, 26 Apr 2017 00:41:56 -0700 (PDT) Received: from localhost ([217.30.68.212]) by smtp.gmail.com with ESMTPSA id l133sm4186705wmf.17.2017.04.26.00.41.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Apr 2017 00:41:54 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa Date: Wed, 26 Apr 2017 09:42:12 +0200 To: "Bystricky, Juro" Message-ID: <20170426074212.GB3258@jama> References: <1493144048-12455-1-git-send-email-juro.bystricky@intel.com> <6E51916E4A1F32428260031F4C7CD2B61194BE74@ORSMSX112.amr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <6E51916E4A1F32428260031F4C7CD2B61194BE74@ORSMSX112.amr.corp.intel.com> User-Agent: Mutt/1.8.2 (2017-04-18) Cc: "jurobystricky@hotmail.com" , Patches and discussions about the oe-core layer Subject: Re: [PATCH 0/4] Reproducible binaries X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 07:41:58 -0000 X-Groupsio-MsgNum: 96696 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 25, 2017 at 07:24:08PM +0000, Bystricky, Juro wrote: > > > > > > >
The idea is that both builds have reproducible timestamps. So ther= e may be different ways to determine the best way to get the stamp. My rati= onale was that if the builds are from > two different commits, the difference should be reflected in the timesta= mp.  But I agree that two different commits
> may in principle result in the same binary image. But without the last co= mmit you would end up with different binaries anyway, as the timestamp is u= sually taken from the time of the build.
>
>
>
From: Martin Jansa [martin.jansa@gmail.= com]
> Sent: Tuesday, April 25, 2017 11:36 AM
> To: Bystricky, Juro
> Cc: Patches and discussions about the oe-core layer; jurobystricky= @hotmail.com
> Subject: Re: [OE-core] [PATCH 0/4] Reproducible binaries
>

>
>
>
>
Is using the last commit really that useful? >

>
>
I would like to be able to compare 2 subsequent builds (ideally perf= ormed on 2 different hosts with some small modification in metadata layers)= and the binaries not affected by those small metadata modifications should= be the same - which is not the case > if we feed them with the top commit date.
>

>
>
The real world use-case is that we're doing daily official builds (w= hich don't use sstate for some bad reasons) and just comparing files-in-ima= ge.txt file from buildhistory shows that almost all binaries are different = every day (just their size fluctuating > +- 2 bytes from the linker mangling) and when something goes wrong, = it's hard to find "the significant diff" when it's always all dif= ferent even when the 2nd build only had very small change in image recipe.<= /div> >
>

>
On Tue, Apr 25, 2017 at 8:14 PM, Juro Bystrick= y > <juro.by= stricky@intel.com> wrote:
>
> This patch set contains several patches aimed to achieve reproducible bin= aries.
> Building reproducible binaries may remove certain intentional
> randomness intended for increased security. Hence, it is reasonable
> to expect there will be cases where this is not desirable.
> The user can select his/her preferences via the variable
> BUILD_REPRODUCIBLE_BINARIES. The variable defaults to "0" (do n= ot
> build reproducible binaries) in order to minimize any potential
> regressions. (Once the reproducible binaries code is mature enough,
> it can be set to "1".)
>
> The patch set is rather simple, targeting the "low hanging fruit&quo= t;.
> For debian packages we get a lot of binary identical packages simply by > exporting SOURCE_DATE_EPOCH.
> For rootfs we get much fewer differences by modified prelinking and by
> ensuring various timestamps are reproducible.
But not for 2 different builds with slightly modified metadata (e.g. just because top commit is different in whatever build repository you're running from even when it doesn't have any effect in your image), right? So it doesn't fix the files-in-image.txt differences as described in: https://bugzilla.yoctoproject.org/show_bug.cgi?id=3D5866 >
>
> Juro Bystricky (4):
>   bitbake.conf: new variable BUILD_REPRODUCIBLE_BINARIES
>   base.bbclass: initial support for binary reproducibility
>   image-preling.bbclass: support binary reproducibility
>   rootfs-postcommands.bbclass: support binary reproducibility
>
>  meta/classes/base.bbclass            =     | 82 +++++++++++&= #43;++++++++++++++&= #43;+++++
>  meta/classes/image-prelink.bbclass       |=   9 +++-
>  meta/classes/rootfs-postcommands.bbclass | 18 +++&= #43;++-
>  meta/conf/bitbake.conf            &nb= sp;      |  3 ++
>  4 files changed, 109 insertions(+), 3 deletions(-)
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
>
>
>
>
> > --=20 Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQRU+ejDffEzV2Je2oc3VSO3ZXaAHAUCWQBPUwAKCRA3VSO3ZXaA HKY2AJ0SNfNnKcEVe8W4gTl5xKLsI7OkiwCeNe8HgeZpuGH6mVAJaKcwhc0X1zI= =9TA+ -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi--