summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDorinda <dorindabassey@gmail.com>2021-01-26 01:53:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-05 23:35:18 +0000
commit0504472517e171e7a2bcbf96917facc67631ffd0 (patch)
tree131eea472968529a6283cdcbc35e76759620f933 /meta
parent75c020c4b1e43c4059974dfc1d6743457670b2ae (diff)
downloadpoky-0504472517e171e7a2bcbf96917facc67631ffd0.tar.gz
sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHS
If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS. [YOCTO #14179] (From OE-Core rev: 7a681525e904914e938de25df5cc64209097d15d) (From OE-Core rev: 35f3e08c52e163e4496c0222896c49888ad5c960) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bfeeaf9ff148a61868e0c882b7455dc02ca8ed76) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 3262d08fbf..0e7ad45c94 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -703,6 +703,13 @@ def check_sanity_version_change(status, d):
703 if (tmpdirmode & stat.S_ISUID): 703 if (tmpdirmode & stat.S_ISUID):
704 status.addresult("TMPDIR is setuid, please don't build in a setuid directory") 704 status.addresult("TMPDIR is setuid, please don't build in a setuid directory")
705 705
706 # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS
707 pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
708 workdir = d.getVar('WORKDIR', expand=True)
709 for i in pseudoignorepaths:
710 if i and workdir.startswith(i):
711 status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n")
712
706 # Some third-party software apparently relies on chmod etc. being suid root (!!) 713 # Some third-party software apparently relies on chmod etc. being suid root (!!)
707 import stat 714 import stat
708 suid_check_bins = "chown chmod mknod".split() 715 suid_check_bins = "chown chmod mknod".split()