From: Simone Weiß <[email protected]>

In sanity.bbclass the tar version is checked as tar needs to be recent enough
for reproducible builds. Tar could also be provided by other means then gnutar,
but we mean the version of gnutar in the check. Hence we also should ensure
that the installed tar is gnutar.

[YOCTO #14205]

Signed-off-by: Simone Weiß <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit bdef30bd887cd208d7822dd7853d33e24a6b7a4c)
Signed-off-by: Steve Sakoman <[email protected]>
---
 meta/classes-global/sanity.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes-global/sanity.bbclass 
b/meta/classes-global/sanity.bbclass
index 180c6b77d8..1d242f0f0a 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -495,12 +495,15 @@ def check_gcc_version(sanity_data):
 # Tar version 1.24 and onwards handle overwriting symlinks correctly
 # but earlier versions do not; this needs to work properly for sstate
 # Version 1.28 is needed so opkg-build works correctly when reproducible 
builds are enabled
+# Gtar is assumed at to be used as tar in poky
 def check_tar_version(sanity_data):
     import subprocess
     try:
         result = subprocess.check_output(["tar", "--version"], 
stderr=subprocess.STDOUT).decode('utf-8')
     except subprocess.CalledProcessError as e:
         return "Unable to execute tar --version, exit code %d\n%s\n" % 
(e.returncode, e.output)
+    if not "GNU" in result:
+        return "Your version of tar is not gtar. Please install gtar (you 
could use the project's buildtools-tarball from our last release or use 
scripts/install-buildtools).\n"
     version = result.split()[3]
     if bb.utils.vercmp_string_op(version, "1.28", "<"):
         return "Your version of tar is older than 1.28 and does not have the 
support needed to enable reproducible builds. Please install a newer version of 
tar (you could use the project's buildtools-tarball from our last release or 
use scripts/install-buildtools).\n"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#202359): 
https://lists.openembedded.org/g/openembedded-core/message/202359
Mute This Topic: https://lists.openembedded.org/mt/107504038/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to