diff options
author | Dorinda <dorindabassey@gmail.com> | 2021-01-26 01:53:47 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-05 23:37:03 +0000 |
commit | f3828150832cc8d888add8f5e6a7a16c5ef47892 (patch) | |
tree | 980e9c032681734a83618339c59ccfdea183d264 /meta/classes/sanity.bbclass | |
parent | 977b7268bf4fd425cb86d4a57500350c9b829162 (diff) | |
download | poky-f3828150832cc8d888add8f5e6a7a16c5ef47892.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: a20b0f80c2d169115a0336f155a834a5801982f9)
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7a681525e904914e938de25df5cc64209097d15d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index cdef8e0c7d..4dc21bf0a9 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() |