[oe-commits] [openembedded-core] 10/12: rootfs: Make BUILDNAME a weak default in reproducible_build_simple

git at git.openembedded.org git at git.openembedded.org
Sun Jan 19 23:51:16 UTC 2020


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

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

commit bbf28ea9100a4f86b052c5cd53c77f9e1c03fb09
Author: Alex Kiernan <alex.kiernan at gmail.com>
AuthorDate: Sat Jan 18 05:41:07 2020 +0000

    rootfs: Make BUILDNAME a weak default in reproducible_build_simple
    
    11e45082ad00 ("rootfs-postcommands.bbclass: improve binary
    reproducibility") fixed binary reproducibility of /etc/version, but with
    the move to reproducibilty in all builds, setting /etc/version to
    anything other than the default fixed timestamp is tricky because
    rootfs_reproducible() runs very late.
    
    rootfs.py uses BUILDNAME if set for /etc/version, so introduce a weak
    default for BUILDNAME of "REPRODUCIBLE_TIMESTAMP_ROOTFS", when enabling
    reproducible builds hence allowing BUILDNAME to be overridden elsewhere.
    
    Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/reproducible_build_simple.bbclass | 1 +
 meta/classes/rootfs-postcommands.bbclass       | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/classes/reproducible_build_simple.bbclass b/meta/classes/reproducible_build_simple.bbclass
index d0842f0..153a076 100644
--- a/meta/classes/reproducible_build_simple.bbclass
+++ b/meta/classes/reproducible_build_simple.bbclass
@@ -7,5 +7,6 @@ export PERL_HASH_SEED = "0"
 export SOURCE_DATE_EPOCH ??= "1520598896"
 
 REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+BUILDNAME ??= "${REPRODUCIBLE_TIMESTAMP_ROOTFS}"
 
 inherit podfix
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 2f17183..e400974 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -356,11 +356,6 @@ python rootfs_log_check_recommends() {
 # Perform any additional adjustments needed to make rootf binary reproducible
 rootfs_reproducible () {
 	if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
-		# Convert UTC into %4Y%2m%2d%2H%2M%2S
-		sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
-		echo $sformatted > ${IMAGE_ROOTFS}/etc/version
-		bbnote "rootfs_reproducible: set /etc/version to $sformatted"
-
 		if [ -d ${IMAGE_ROOTFS}${sysconfdir}/gconf ]; then
 			find ${IMAGE_ROOTFS}${sysconfdir}/gconf -name '%gconf.xml' -print0 | xargs -0r \
 			sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g'

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


More information about the Openembedded-commits mailing list