]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstatesig: Only apply group/other permissions to pseudo files
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Oct 2021 14:02:14 +0000 (15:02 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Oct 2021 15:43:23 +0000 (16:43 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass
meta/conf/abi_version.conf
meta/lib/oe/sstatesig.py

index 7f4b1f6804cc42ba4d72073beeca08f89c342241..860122a0cdfe7c134596f75c6270e7d0268974be 100644 (file)
@@ -1,4 +1,4 @@
-SSTATE_VERSION = "5"
+SSTATE_VERSION = "6"
 
 SSTATE_MANIFESTS ?= "${TMPDIR}/sstate-control"
 SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-${PN}"
index e84cad1019a44bc5337cfad733c78ca10de7415c..62714f5e613937cdbebbc95df095df3f64388aac 100644 (file)
@@ -12,4 +12,4 @@ OELAYOUT_ABI = "14"
 # a reset of the equivalence, for example when reproducibility issues break the
 # existing match data. Distros can also append to this value for the same effect.
 #
-HASHEQUIV_HASH_VERSION  = "8"
+HASHEQUIV_HASH_VERSION  = "9"
index 0c3b4589c577dd60df7e51416131cb801aa6f669..c2e3e2f4f58cace9f43e3f314dede96203cfa22f 100644 (file)
@@ -552,21 +552,22 @@ def OEOuthashBasic(path, sigfile, task, d):
                 else:
                     add_perm(stat.S_IXUSR, 'x')
 
-                add_perm(stat.S_IRGRP, 'r')
-                add_perm(stat.S_IWGRP, 'w')
-                if stat.S_ISGID & s.st_mode:
-                    add_perm(stat.S_IXGRP, 's', 'S')
-                else:
-                    add_perm(stat.S_IXGRP, 'x')
+                if include_owners:
+                    # Group/other permissions are only relevant in pseudo context
+                    add_perm(stat.S_IRGRP, 'r')
+                    add_perm(stat.S_IWGRP, 'w')
+                    if stat.S_ISGID & s.st_mode:
+                        add_perm(stat.S_IXGRP, 's', 'S')
+                    else:
+                        add_perm(stat.S_IXGRP, 'x')
 
-                add_perm(stat.S_IROTH, 'r')
-                add_perm(stat.S_IWOTH, 'w')
-                if stat.S_ISVTX & s.st_mode:
-                    update_hash('t')
-                else:
-                    add_perm(stat.S_IXOTH, 'x')
+                    add_perm(stat.S_IROTH, 'r')
+                    add_perm(stat.S_IWOTH, 'w')
+                    if stat.S_ISVTX & s.st_mode:
+                        update_hash('t')
+                    else:
+                        add_perm(stat.S_IXOTH, 'x')
 
-                if include_owners:
                     try:
                         update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
                         update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)