lib/bb/siggen.py: ensure dumped signatures have group R/W
PATCH 2/2 lib/bb/siggen.py: ensure dumped signatures have group R/W
We anticipate signatures being shared amongst peers in a group so ensure they have rw-rw-r-- permissions to facilitate this.
Signed-off-by Joshua Lock <[email protected]>
--- lib/bb/siggen.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
lib/bb/siggen.py +4 -2
@@ -201,8 +201,10 @@ class SignatureGeneratorBasic(SignatureGenerator): for dep in data['runtaskdeps']: data['runtaskhashes'][dep] = self.taskhash[dep] - p = pickle.Pickler(open(sigfile, "wb"), -1) - p.dump(data) + with open(sigfile, "wb") as f: + p = pickle.Pickler(f, -1) + p.dump(data) + os.chmod(sigfile, 0664) def dump_sigs(self, dataCache): for fn in self.taskdeps:
Signature · 1 line
1.7.7.6
Richard Purdie
AppliedQuoted 7 lines · Joshua Lock
We anticipate signatures being shared amongst peers in a group so ensure they have rw-rw-r-- permissions to facilitate this.
Signed-off-by Joshua Lock <[email protected]>--- lib/bb/siggen.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
Merged to master (along with 1/2) thanks.
Richard