diff options
author | Ross Burton <ross@burtonini.com> | 2020-09-28 17:18:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-28 17:29:53 +0100 |
commit | 75d9ef04a908e366633b255d23ab3275f6860d3a (patch) | |
tree | ff508c723b71f746e0afa578d0978ed0d1699724 | |
parent | 6c601e68a27e1c60b04c2a61830d1812cc883e09 (diff) | |
download | bitbake-75d9ef04a908e366633b255d23ab3275f6860d3a.tar.gz |
siggen: use correct umask when writing siginfo
We try to write sstate with group-write permissions so that sstate-cache
can be shared between multiple users. However the siginfo files are
created in various tasks which may set their own umask (such as
do_populate_sysroot, 0022). This results in no group write permission
on the intermediate directories, which is fatal when sharing a cache.
Fix this by wrapping the siginfo mkdir in a umask change to 0002.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/siggen.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py index 1456324a7..86e0e16f3 100644 --- a/lib/bb/siggen.py +++ b/lib/bb/siggen.py @@ -358,7 +358,8 @@ class SignatureGeneratorBasic(SignatureGenerator): else: sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[tid] - bb.utils.mkdirhier(os.path.dirname(sigfile)) + with bb.utils.umask(0o002): + bb.utils.mkdirhier(os.path.dirname(sigfile)) data = {} data['task'] = task |