On 1/13/22 23:20, Richard Purdie wrote:
> On Thu, 2022-01-13 at 23:11 +0100, Jacob Kroon wrote:
>> On 1/13/22 23:07, Richard Purdie wrote:
>>> On Thu, 2022-01-13 at 16:44 +0100, Jacob Kroon wrote:
>>>> 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 ?
>>>
>>> Is this with master?
>>>
>>> I'm wondering if your code has:
>>>
>>> https://git.yoctoproject.org/poky/commit/?id=c4ecf7c1122380cdbc74fe692aa91756dc5bdf6b
>>>
>>> applied?
>>>
>>
>> Yes, this is with master branches of bitbake/openembedded-core as of
>> right now.
>>
>> So yes, I do have that patch applied.
> 
> I guess that whilst the default task umask is 022, some chmod operations may 
> be
> run to change permissions that don't match the umask. These are correctly
> captured by the sstate archive but not preserved by tar at extraction.
> 
> I wonder if the correct fix is to all -p to the tar unpack command in
> sstate.bbclass?
> 
> In many cases it would execute under pseudo so there wouldn't be this issue 
> but
> a native populate_sysroot wouldn't be under pseudo do we'd only see that 
> here...
> 

Thanks Richard, passing -p in sstate_unpack_package() also fixes the
issue. If it is run as root under pseudo for target packages, then the
-p is implicit according to the tar docs, which would explain why the
issue isn't seen there.

I'll send a new patch.

Jacob
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160558): 
https://lists.openembedded.org/g/openembedded-core/message/160558
Mute This Topic: https://lists.openembedded.org/mt/88399226/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to