[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7190/8267] image-prelink.bbclass: support binary reproducibility
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7190/8267] image-prelink.bbclass: support binary reproducibility
- Date: Sun, 17 Dec 2017 05:54:01 +0000 (UTC)
commit f3da1613c4d19f599ecea34fc9ea7b9935a8a26a
Author: Juro Bystricky <juro bystricky intel com>
Date: Wed Aug 9 10:48:24 2017 -0700
image-prelink.bbclass: support binary reproducibility
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.
(From OE-Core rev: 40ce3db222f8557a01d041f8115d531cc90a54e8)
Signed-off-by: Juro Bystricky <juro bystricky intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/image-prelink.bbclass | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index 6fcd699..f3bb68b 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 `
+ 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]