diff options
author | Michal Sieron <michalwsieron@gmail.com> | 2024-02-12 10:09:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-13 13:51:41 +0000 |
commit | 80396cc72ac7c03c79af7a69da926227fbac86e9 (patch) | |
tree | 7a5687c1222c28cd7245ee70ed054bc2a08246bc /meta | |
parent | 83d5c123d3c509f6ad00492b4f00f73474e89842 (diff) | |
download | poky-80396cc72ac7c03c79af7a69da926227fbac86e9.tar.gz |
sanity.bbclass: raise_sanity_error if /tmp is noexec
Older meson versions save temporary scripts in /tmp.
Similarly some recipies also do that (e.g. ccan in sbsigntool).
As this can lead to unexpected build failures with no simple way
to workaround, make such setup a fatal error.
(From OE-Core rev: ee93a8e89322143252040bd5bc99259c5efff831)
Signed-off-by: Michal Sieron <michalwsieron@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes-global/sanity.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index 1bd74e1935..bbbc41ddae 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass | |||
@@ -840,6 +840,10 @@ def check_sanity_everybuild(status, d): | |||
840 | status.addresult("Please use a umask which allows a+rx and u+rwx\n") | 840 | status.addresult("Please use a umask which allows a+rx and u+rwx\n") |
841 | os.umask(omask) | 841 | os.umask(omask) |
842 | 842 | ||
843 | # Ensure /tmp is NOT mounted with noexec | ||
844 | if os.statvfs("/tmp").f_flag & os.ST_NOEXEC: | ||
845 | raise_sanity_error("/tmp shouldn't be mounted with noexec.", d) | ||
846 | |||
843 | if d.getVar('TARGET_ARCH') == "arm": | 847 | if d.getVar('TARGET_ARCH') == "arm": |
844 | # This path is no longer user-readable in modern (very recent) Linux | 848 | # This path is no longer user-readable in modern (very recent) Linux |
845 | try: | 849 | try: |