summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-06 14:02:14 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-08 15:43:59 (GMT)
commit58c97902933cced2981dfc7480fc0a458b4fb900 (patch)
treef06b908e0318238156662badf6b82344664e0e56 /meta/lib
parenta56aad137ba2b0c3825c9882be4b35ab1f6b3c94 (diff)
downloadpoky-58c97902933cced2981dfc7480fc0a458b4fb900.tar.gz
sstatesig: Only apply group/other permissions to pseudo files
We hardlink some files into the build, such as licence files in do_populate_lic tasks. Depending on the umask that the source tree was checked out with, the group permissions would vary. This results in inconsistent task outhashes. Avoid this by ignoring the group/other bits unless we're under pseudo context. Bump the ABI numbers to ensure we don't see cache corruption from earlier builds. (From OE-Core rev: 2bd9c806de7e5197168360e3bd1d223a04a92291) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/sstatesig.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 0c3b458..c2e3e2f 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -552,21 +552,22 @@ def OEOuthashBasic(path, sigfile, task, d):
552 else: 552 else:
553 add_perm(stat.S_IXUSR, 'x') 553 add_perm(stat.S_IXUSR, 'x')
554 554
555 add_perm(stat.S_IRGRP, 'r') 555 if include_owners:
556 add_perm(stat.S_IWGRP, 'w') 556 # Group/other permissions are only relevant in pseudo context
557 if stat.S_ISGID & s.st_mode: 557 add_perm(stat.S_IRGRP, 'r')
558 add_perm(stat.S_IXGRP, 's', 'S') 558 add_perm(stat.S_IWGRP, 'w')
559 else: 559 if stat.S_ISGID & s.st_mode:
560 add_perm(stat.S_IXGRP, 'x') 560 add_perm(stat.S_IXGRP, 's', 'S')
561 else:
562 add_perm(stat.S_IXGRP, 'x')
561 563
562 add_perm(stat.S_IROTH, 'r') 564 add_perm(stat.S_IROTH, 'r')
563 add_perm(stat.S_IWOTH, 'w') 565 add_perm(stat.S_IWOTH, 'w')
564 if stat.S_ISVTX & s.st_mode: 566 if stat.S_ISVTX & s.st_mode:
565 update_hash('t') 567 update_hash('t')
566 else: 568 else:
567 add_perm(stat.S_IXOTH, 'x') 569 add_perm(stat.S_IXOTH, 'x')
568 570
569 if include_owners:
570 try: 571 try:
571 update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name) 572 update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
572 update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name) 573 update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)