bitbake: 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.

(Bitbake rev: 75d9ef04a908e366633b255d23ab3275f6860d3a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2020-09-28 17:18:59 +01:00
committed by Richard Purdie
parent f3b0d3eeae
commit afb863afc3

View File

@@ -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