]> code.ossystems Code Review - openembedded-core.git/commitdiff
Revert "rootfs: Make BUILDNAME a weak default in reproducible_build_simple"
authorPeter Kjellerstedt <pkj@axis.com>
Sun, 9 Feb 2020 06:06:58 +0000 (07:06 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Feb 2020 17:46:46 +0000 (17:46 +0000)
This reverts commit 8380df6566db49ef184b837432558750f77f592f.

Giving BUILDNAME a static default in reproducible_build_simple.bbclass
to have /etc/version be generated with that name lead to other users
of BUILDNAME no longer working as expected. E.g., buildstats.bcclass
would now write its information in a single directory, overwriting the
statistics for each build.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/reproducible_build_simple.bbclass
meta/classes/rootfs-postcommands.bbclass

index 3e5fd82432886140af6ec9f06e358dad49910cfc..393372993d029b87228d7e748adfd261e3bab556 100644 (file)
@@ -7,4 +7,3 @@ export PERL_HASH_SEED = "0"
 export SOURCE_DATE_EPOCH ??= "1520598896"
 
 REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
-BUILDNAME ??= "${REPRODUCIBLE_TIMESTAMP_ROOTFS}"
index e40097444d596abad46edc2de9fd9f045bd1306c..2f171836fa0cce8d662619a00a0f1ad2a4659087 100644 (file)
@@ -356,6 +356,11 @@ 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'