Hi,

I often see this diff churn in my buildistory for shadow-native (and
similar issues with icedtea7-native from meta-java):

-drwxr-xr-x -          -                  40 ./var/spool/mail
+drwxrwxr-x -          -                  40 ./var/spool/mail

One can reproduce it with:

# bitbake -c cleansstate shadow-native && \
  bitbake shadow-native && \
  bitbake -c clean shadow-native && \
  bitbake shadow-native

I see that the sstate package contains the correct permissions for
'mail', 775. So it would seem to me that it is the unpacking from sstate
that strips the group write permission.

Testing with the attached patch and the problem goes away.

Is something like this the correct solution ?

Jacob
From dcebf2977cb6bdc5198ab13272cf358c9ecd6b32 Mon Sep 17 00:00:00 2001
From: Jacob Kroon <[email protected]>
Date: Thu, 13 Jan 2022 16:31:47 +0100
Subject: [PATCH] sstate.bbclass: Zero umask when unpacking from sstate cache

Signed-off-by: Jacob Kroon <[email protected]>
---
 meta/classes/sstate.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 645377fdd8..0c32387f43 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -793,7 +793,9 @@ pstaging_fetch[vardepsexclude] += "SRCPV"
 
 def sstate_setscene(d):
     shared_state = sstate_state_fromvars(d)
+    omask = os.umask(0)
     accelerate = sstate_installpkg(shared_state, d)
+    os.umask(omask)
     if not accelerate:
         bb.fatal("No suitable staging package found")
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160525): 
https://lists.openembedded.org/g/openembedded-core/message/160525
Mute This Topic: https://lists.openembedded.org/mt/88399226/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to