]> code.ossystems Code Review - openembedded-core.git/commitdiff
reproducible: Improve SOURCE_DATE_EPOCH_FALLBACK handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 Feb 2021 22:12:53 +0000 (22:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 24 Feb 2021 00:15:37 +0000 (00:15 +0000)
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>
meta/classes/reproducible_build.bbclass
meta/conf/abi_version.conf
meta/lib/oe/reproducible.py
meta/recipes-extended/groff/groff_1.22.4.bb
meta/recipes-extended/watchdog/watchdog_5.16.bb
meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb

index 9e806c0b7586b704568a2f09ca6e32e74b35c25a..f06e00d70d7eaf0f8ddc3aa6615d79b549e64c94 100644 (file)
@@ -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:
index 251d43bb218d5e8557ac17e03dd2c11c10747513..35faef9a368a27d6f80c08014673816da5057bed 100644 (file)
@@ -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"
index 0fb02ccdb0be3839a7f5aa573baf3722888854fd..204b9bd734a7e4f5c706d1a3707528086c8cabe4 100644 (file)
@@ -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
     )
 
index 7bb393e09c65ffdc2614a9b8974c8d39d8564b60..983cb9aea6f7233b111fa55098176ff6639c1fe2 100644 (file)
@@ -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"
index a44a459c203bc7acb0983711fc632bbea79446e3..19e94757c7cf1c09dec462ed388c9146b54e79bb 100644 (file)
@@ -21,7 +21,6 @@ SRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a
 # 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+[\.\-_]*)+)/"
index bf8385fe6da208f310d124c4277fb61138861dea..6a91582068d3e770de7a9292950eb1e3f390aa36 100644 (file)
@@ -14,8 +14,6 @@ SOURCE_DATE_EPOCH = "1613559011"
 
 PE = "1"
 PR = "r3"
-HASHEQUIV_HASH_VERSION .= ".1"
-
 
 inherit allarch features_check