summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-22 22:12:53 +0000
committerSteve Sakoman <steve@sakoman.com>2021-03-05 04:40:01 -1000
commit1f218351c2ef702c76b1d1e793a624e1a4f5079b (patch)
tree12c8d2d14eac638e2df279e8fa472c1a70bf1e72
parent72daea3a413ff0a8ded76a494d673c5264535426 (diff)
downloadopenembedded-core-contrib-1f218351c2ef702c76b1d1e793a624e1a4f5079b.tar.gz
openembedded-core-contrib-1f218351c2ef702c76b1d1e793a624e1a4f5079b.tar.bz2
openembedded-core-contrib-1f218351c2ef702c76b1d1e793a624e1a4f5079b.zip
reproducible: Improve SOURCE_DATE_EPOCH_FALLBACK handling
Ensure the fallback value if used is written to the SDE file and hence stored in sstate, reducing any confusion within the code over '0' values. Bump the HASHEQUIV_VERSION since we've had a ton of trouble with ensuring this rolls out correctly on the autobuilder so others may too, take a clean slate for it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 53ffffa32b76330835287dfc05d4e4796841af08) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/reproducible_build.bbclass4
-rw-r--r--meta/conf/abi_version.conf2
-rw-r--r--meta/lib/oe/reproducible.py8
-rw-r--r--meta/recipes-extended/groff/groff_1.22.4.bb1
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.15.bb1
-rw-r--r--meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb2
6 files changed, 7 insertions, 11 deletions
diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass
index 9e806c0b75..f06e00d70d 100644
--- a/meta/classes/reproducible_build.bbclass
+++ b/meta/classes/reproducible_build.bbclass
@@ -84,10 +84,6 @@ python create_source_date_epoch_stamp() {
source_date_epoch = oe.reproducible.get_source_date_epoch(d, d.getVar('S'))
- if source_date_epoch == 0 :
- bb.debug(1, "source_date_epoch is 0, using SOURCE_DATE_EPOCH_FALLBACK instead.")
- source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK'))
-
bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
bb.utils.mkdirhier(d.getVar('SDE_DIR'))
with open(epochfile, 'w') as f:
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf
index 251d43bb21..35faef9a36 100644
--- a/meta/conf/abi_version.conf
+++ b/meta/conf/abi_version.conf
@@ -12,4 +12,4 @@ OELAYOUT_ABI = "14"
# a reset of the equivalence, for example when reproducibility issues break the
# existing match data. Distros can also append to this value for the same effect.
#
-HASHEQUIV_HASH_VERSION = "4"
+HASHEQUIV_HASH_VERSION = "5"
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index 0fb02ccdb0..204b9bd734 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -90,8 +90,12 @@ def get_source_date_epoch_from_youngest_file(d, sourcedir):
bb.debug(1, "Newest file found: %s" % newest_file)
return source_date_epoch
-def fixed_source_date_epoch():
+def fixed_source_date_epoch(d):
bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
+ source_date_epoch = d.getVar('SOURCE_DATE_EPOCH_FALLBACK')
+ if source_date_epoch:
+ bb.debug(1, "Using SOURCE_DATE_EPOCH_FALLBACK")
+ return int(source_date_epoch)
return 0
def get_source_date_epoch(d, sourcedir):
@@ -99,6 +103,6 @@ def get_source_date_epoch(d, sourcedir):
get_source_date_epoch_from_git(d, sourcedir) or
get_source_date_epoch_from_known_files(d, sourcedir) or
get_source_date_epoch_from_youngest_file(d, sourcedir) or
- fixed_source_date_epoch() # Last resort
+ fixed_source_date_epoch(d) # Last resort
)
diff --git a/meta/recipes-extended/groff/groff_1.22.4.bb b/meta/recipes-extended/groff/groff_1.22.4.bb
index 7bb393e09c..983cb9aea6 100644
--- a/meta/recipes-extended/groff/groff_1.22.4.bb
+++ b/meta/recipes-extended/groff/groff_1.22.4.bb
@@ -20,7 +20,6 @@ SRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1b
# Remove at the next upgrade
PR = "r1"
-HASHEQUIV_HASH_VERSION .= ".1"
DEPENDS = "bison-native"
RDEPENDS_${PN} += "perl sed"
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index beebb5b004..0adf1fbb41 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -21,7 +21,6 @@ SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c
# Can be dropped when the output next changes, avoids failures after
# reproducibility issues
PR = "r1"
-HASHEQUIV_HASH_VERSION .= ".1"
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
diff --git a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
index bf8385fe6d..6a91582068 100644
--- a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
+++ b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
@@ -14,8 +14,6 @@ SOURCE_DATE_EPOCH = "1613559011"
PE = "1"
PR = "r3"
-HASHEQUIV_HASH_VERSION .= ".1"
-
inherit allarch features_check