Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
To: Juro Bystricky <juro.bystricky@intel.com>
Cc: jurobystricky@hotmail.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v3 02/11] image-prelink.bbclass: support binary reproducibility
Date: Thu, 17 Aug 2017 14:54:17 -0500	[thread overview]
Message-ID: <1502999657.28682.22.camel@linux.intel.com> (raw)
In-Reply-To: <1502300913-40295-3-git-send-email-juro.bystricky@intel.com>

On Wed, 2017-08-09 at 10:48 -0700, Juro Bystricky wrote:
> Conditionally support binary reproducibility in built images.
> If BUILD_REPRODUCIBLE_BINARIES = 1 then:
> 
> 1. Do not randomize library addresses
> 2. Set/export PRELINK_TIMESTAMP to a reproducible value.
>    If REPRODUCIBLE_TIMESTAMP_ROOTFS is specified, then the value will
>    be used. Otherwise the timestamp will be derived from the top git commit.
> 
> Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
> ---
>  meta/classes/image-prelink.bbclass | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
> index 4157df0..e833d47 100644
> --- a/meta/classes/image-prelink.bbclass
> +++ b/meta/classes/image-prelink.bbclass
> @@ -36,7 +36,17 @@ prelink_image () {
>  	dynamic_loader=$(linuxloader)
>  
>  	# prelink!
> -	${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
> +	if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
> +		bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..."
> +		if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
> +			export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct `


as Chris suggested in other email, better to used $() instead of ``



> +		else
> +			export PRELINK_TIMESTAMP=$REPRODUCIBLE_TIMESTAMP_ROOTFS
> +		fi
> +		${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -am -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
> +	else
> +		${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
> +	fi
>  
>  	# Remove the prelink.conf if we had to add it.
>  	if [ "$dummy_prelink_conf" = "true" ]; then
> -- 
> 2.7.4
> 




  reply	other threads:[~2017-08-17 19:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 17:48 [PATCH v3 00/11] Reproducible binaries Juro Bystricky
2017-08-09 17:48 ` [PATCH v3 01/11] reproducible_build.bbclass: initial support for binary reproducibility Juro Bystricky
2017-08-19  8:25   ` Martin Jansa
2017-08-19 16:08     ` Bystricky, Juro
2017-08-09 17:48 ` [PATCH v3 02/11] image-prelink.bbclass: support " Juro Bystricky
2017-08-17 19:54   ` Leonardo Sandoval [this message]
2017-08-09 17:48 ` [PATCH v3 03/11] rootfs-postcommands.bbclass: " Juro Bystricky
2017-08-09 17:48 ` [PATCH v3 04/11] busybox.inc: improve reproducibility Juro Bystricky
2017-08-09 17:48 ` [PATCH v3 05/11] image.bbclass: support binary reproducibility Juro Bystricky
2017-08-09 17:48 ` [PATCH v3 06/11] cpio: provide cpio-replacement-native Juro Bystricky
2017-08-09 17:48 ` [PATCH v3 07/11] image_types.bbclass: improve cpio image reproducibility Juro Bystricky
2017-08-09 18:06   ` Andre McCurdy
2017-08-10 19:35     ` Bystricky, Juro
2017-08-10 20:06       ` Andre McCurdy
2017-08-10 20:36         ` Bystricky, Juro
2017-08-09 17:48 ` [PATCH v3 08/11] python2.7: improve reproducibility Juro Bystricky
2017-08-17 19:39   ` Leonardo Sandoval
2017-08-19 16:39     ` Bystricky, Juro
2017-08-09 17:48 ` [PATCH v3 09/11] python3: " Juro Bystricky
2017-08-09 17:48 ` [PATCH v3 10/11] kernel.bbclass: " Juro Bystricky
2017-08-17 16:14   ` Christopher Larson
2017-08-17 18:18     ` Bystricky, Juro
2017-08-09 17:48 ` [PATCH v3 11/11] poky-reproducible.conf: Initial version Juro Bystricky
2017-08-09 19:09   ` Andre McCurdy
2017-08-18 18:11 ` [PATCH v3 00/11] Reproducible binaries Martin Jansa
2017-08-18 18:27   ` Bystricky, Juro
2017-08-18 20:32     ` Martin Jansa
2017-08-18 20:42       ` Bystricky, Juro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1502999657.28682.22.camel@linux.intel.com \
    --to=leonardo.sandoval.gonzalez@linux.intel.com \
    --cc=juro.bystricky@intel.com \
    --cc=jurobystricky@hotmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox