Re: [yocto] Permission denied with NFS shared download and sstate-cache

2021-09-22 Thread Richard Purdie
On Wed, 2021-09-22 at 09:51 -0700, Khem Raj wrote:
> On Wed, Sep 22, 2021 at 9:47 AM Bel Hadj Salem Talel  
> wrote:
> > 
> > Hi All,
> > 
> > I have a server that's holding downloads and sstate-cache.
> > 
> > I have a docker-compose file with nfs server that exposes the 
> > dowloads/sstate-cache volume.
> > 
> > When I mount that in my PC and set the path into DL_DIR and SSTATE_DIR, I 
> > get this error :
> > 
> > ---
> > ERROR: grub-efi-native-2.04-r0 do_configure: Build of do_configure failed
> > ERROR: grub-efi-native-2.04-r0 do_configure: Traceback (most recent call 
> > last):
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/build.py", line 
> > 644, in exec_task
> > return _exec_task(fn, task, d, quieterr)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/build.py", line 
> > 618, in _exec_task
> > event.fire(TaskSucceeded(task, fn, logfn, localdata), localdata)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", line 
> > 215, in fire
> > fire_class_handlers(event, d)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", line 
> > 122, in fire_class_handlers
> > execute_handler(name, handler, event, d)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", line 
> > 94, in execute_handler
> > ret = handler(event)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/meta/classes/sstate.bbclass", 
> > line 1094, in sstate_eventhandler
> > bb.siggen.dump_this_task(sstatepkg + '_' + taskname + ".tgz" 
> > ".siginfo", d)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/siggen.py", line 
> > 648, in dump_this_task
> > bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + 
> > referencestamp)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/meta/lib/oe/sstatesig.py", line 
> > 202, in dump_sigtask
> > super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, 
> > task, stampbase, runtime)
> >   File 
> > "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/siggen.py", line 
> > 362, in dump_sigtask
> > fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), 
> > prefix="sigtask.")
> >   File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
> > return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
> >   File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
> > fd = _os.open(file, flags, 0o600)
> 
> its trying to create the file with 0600 mask. I wonder whats your
> global umask set to. and perhaps the user is not same when bitbake it
> running ?

The file is being created with python's tempfile function which will make it
secure. Secure in this context means 00600...

I suspect you're right that creating a file securely here with this permissions
likely can't work.

Cheers,

Richard


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



Re: [yocto] Permission denied with NFS shared download and sstate-cache

2021-09-22 Thread Khem Raj
On Wed, Sep 22, 2021 at 9:47 AM Bel Hadj Salem Talel  wrote:
>
> Hi All,
>
> I have a server that's holding downloads and sstate-cache.
>
> I have a docker-compose file with nfs server that exposes the 
> dowloads/sstate-cache volume.
>
> When I mount that in my PC and set the path into DL_DIR and SSTATE_DIR, I get 
> this error :
>
> ---
> ERROR: grub-efi-native-2.04-r0 do_configure: Build of do_configure failed
> ERROR: grub-efi-native-2.04-r0 do_configure: Traceback (most recent call 
> last):
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/build.py", 
> line 644, in exec_task
> return _exec_task(fn, task, d, quieterr)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/build.py", 
> line 618, in _exec_task
> event.fire(TaskSucceeded(task, fn, logfn, localdata), localdata)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", 
> line 215, in fire
> fire_class_handlers(event, d)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", 
> line 122, in fire_class_handlers
> execute_handler(name, handler, event, d)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", 
> line 94, in execute_handler
> ret = handler(event)
>   File 
> "/home/talel/Desktop/YoctoWork/sources/poky/meta/classes/sstate.bbclass", 
> line 1094, in sstate_eventhandler
> bb.siggen.dump_this_task(sstatepkg + '_' + taskname + ".tgz" ".siginfo", 
> d)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/siggen.py", 
> line 648, in dump_this_task
> bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + 
> referencestamp)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/meta/lib/oe/sstatesig.py", 
> line 202, in dump_sigtask
> super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, 
> stampbase, runtime)
>   File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/siggen.py", 
> line 362, in dump_sigtask
> fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), 
> prefix="sigtask.")
>   File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
> return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
>   File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
> fd = _os.open(file, flags, 0o600)

its trying to create the file with 0600 mask. I wonder whats your
global umask set to. and perhaps the user is not same when bitbake it
running ?

> PermissionError: [Errno 13] Permission denied: 
> '/home/talel/Desktop/YoctoShare/tethys-cache/ubuntu-20.04/dd/sigtask.dgjx7ngq'
>
> ERROR: Task 
> (virtual:native:/home/talel/Desktop/YoctoWork/sources/poky/meta/recipes-bsp/grub/grub-efi_2.04.bb:do_configure)
>  failed with exit code '1'
> ---
>
> I can modify the mounted folder by creating a directory or a file, but it 
> fails with yocto.
>
> How can I solve the issue?
>
> Thanks,
> Talel
> 
>

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



[yocto] Permission denied with NFS shared download and sstate-cache

2021-09-22 Thread Bel Hadj Salem Talel
Hi All,

I have a server that's holding downloads and sstate-cache.

I have a docker-compose file with nfs server that exposes the 
dowloads/sstate-cache volume.

When I mount that in my PC and set the path into DL_DIR and SSTATE_DIR, I get 
this error :

---
ERROR: grub-efi-native-2.04-r0 do_configure: Build of do_configure failed
ERROR: grub-efi-native-2.04-r0 do_configure: Traceback (most recent call last):
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/build.py", line 
644, in exec_task
return _exec_task(fn, task, d, quieterr)
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/build.py", line 
618, in _exec_task
event.fire(TaskSucceeded(task, fn, logfn, localdata), localdata)
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", line 
215, in fire
fire_class_handlers(event, d)
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", line 
122, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/event.py", line 
94, in execute_handler
ret = handler(event)
File "/home/talel/Desktop/YoctoWork/sources/poky/meta/classes/sstate.bbclass", 
line 1094, in sstate_eventhandler
bb.siggen.dump_this_task(sstatepkg + '_' + taskname + ".tgz" ".siginfo", d)
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/siggen.py", 
line 648, in dump_this_task
bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + referencestamp)
File "/home/talel/Desktop/YoctoWork/sources/poky/meta/lib/oe/sstatesig.py", 
line 202, in dump_sigtask
super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, 
stampbase, runtime)
File "/home/talel/Desktop/YoctoWork/sources/poky/bitbake/lib/bb/siggen.py", 
line 362, in dump_sigtask
fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), prefix="sigtask.")
File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
PermissionError: [Errno 13] Permission denied: 
'/home/talel/Desktop/YoctoShare/tethys-cache/ubuntu-20.04/dd/sigtask.dgjx7ngq'

ERROR: Task 
(virtual:native:/home/talel/Desktop/YoctoWork/sources/poky/meta/recipes-bsp/grub/grub-efi_2.04.bb:do_configure)
 failed with exit code '1'
---

I can modify the mounted folder by creating a directory or a file, but it fails 
with yocto.

How can I solve the issue?

Thanks,
Talel

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