Hi this is a follow up to another thread called "Unclear sstate-cache dir permissions"
I am trying to share a sstate-cache between two (or more) users in a shared directory. Although I set the directory owner, group and permissions I face to a weird condition that I don't understand and seems to point out a bitbake/class problem. Problem description I have a shared area with the following permissions (g+ws) set up at before the builds ls -al /opt/yocto drwxrwsrwx 4 tux yocto 20480 set 28 14:47 downloads drwxrwsrwx 259 tux yocto 4096 set 28 15:33 sstate-cache This is the common local.conf DL_DIR ?= "/opt/yocto/downloads" SSTATE_DIR ?= "/opt/yocto/sstate-cache" 1. workspace1 with user1 (tux) generates the first build using bitbake core-image-minimal /opt/yocto/sstate-cache (content excerpt) drwxr-xr-x 2 tux yocto 4096 set 28 14:44 94 drwxr-sr-x 2 tux yocto 4096 set 28 14:45 95 drwxr-xr-x 2 tux yocto 4096 set 28 14:46 96 2. build on workspace2 using user2 (devel) faces to the following problem Permission denied: '/opt/yocto/sstate-cache/95/sigtask' because the permissions of directory '95' is 'drwxr-sr-x' $ bitbake core-image-minimal Build Configuration: BB_VERSION = "1.34.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal-4.8" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "qemuarm" DISTRO = "poky" DISTRO_VERSION = "2.3.2" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta meta-poky meta-yocto-bsp = "pyro:30613467d864130202d90e8460f7bbfa4db98397" Initialising tasks: 100% |############################################################################################################| Time: 0:00:04 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: core-image-minimal-1.0-r0 do_image_ext4: Execution of event handler 'sstate_eventhandler' failed Traceback (most recent call last): File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/siggen.py", line 356, in dump_this_task(outfile='/opt/yocto/sstate-cache/95/sstate:core-image-minimal:qemuarm-poky-linux-gnueabi:1.0:r0:qemuarm:3:95da4ea64e782dcc0c8dfb4b9b7c0099_image_ext4.tgz.siginfo', d=<bb.data_smart.DataSmart object at 0x7f0e07567cc0>): referencestamp = bb.build.stamp_internal(task, d, None, True) > bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + referencestamp) File "/home/devel/yocto-pyro-qemuarm2/poky/meta/lib/oe/sstatesig.py", line 184, in SignatureGeneratorOEBasicHash.dump_sigtask(fn='/home/devel/yocto-pyro-qemuarm2/poky/meta/recipes-core/images/core-image-minimal.bb', task='do_image_ext4', stampbase='/opt/yocto/sstate-cache/95/sstate:core-image-minimal:qemuarm-poky-linux-gnueabi:1.0:r0:qemuarm:3:95da4ea64e782dcc0c8dfb4b9b7c0099_image_ext4.tgz.siginfo', runtime='customfile:/home/devel/yocto-pyro-qemuarm2/poky/build/tmp/stamps/qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0'): return > super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/siggen.py", line 300, in SignatureGeneratorOEBasicHash.dump_sigtask(fn='/home/devel/yocto-pyro-qemuarm2/poky/meta/recipes-core/images/core-image-minimal.bb', task='do_image_ext4', stampbase='/opt/yocto/sstate-cache/95/sstate:core-image-minimal:qemuarm-poky-linux-gnueabi:1.0:r0:qemuarm:3:95da4ea64e782dcc0c8dfb4b9b7c0099_image_ext4.tgz.siginfo', runtime='customfile:/home/devel/yocto-pyro-qemuarm2/poky/build/tmp/stamps/qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0'): > fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), prefix="sigtask.") try: File "/usr/lib/python3.4/tempfile.py", line 409, in mkstemp(suffix='', prefix='sigtask.', dir='/opt/yocto/sstate-cache/95', text=False): > return _mkstemp_inner(dir, prefix, suffix, flags) File "/usr/lib/python3.4/tempfile.py", line 339, in _mkstemp_inner(dir='/opt/yocto/sstate-cache/95', pre='sigtask.', suf='', flags=131266): try: > fd = _os.open(file, flags, 0o600) return (fd, _os.path.abspath(file)) PermissionError: [Errno 13] Permission denied: '/opt/yocto/sstate-cache/95/sigtask._nk80whe' ERROR: core-image-minimal-1.0-r0 do_image_ext4: Build of do_image_ext4 failed ERROR: core-image-minimal-1.0-r0 do_image_ext4: Traceback (most recent call last): File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/build.py", line 644, in exec_task return _exec_task(fn, task, d, quieterr) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/build.py", line 618, in _exec_task event.fire(TaskSucceeded(task, logfn, localdata), localdata) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/event.py", line 211, in fire fire_class_handlers(event, d) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/event.py", line 134, in fire_class_handlers execute_handler(name, handler, event, d) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/event.py", line 106, in execute_handler ret = handler(event) File "/home/devel/yocto-pyro-qemuarm2/poky/meta/classes/sstate.bbclass", line 1003, in sstate_eventhandler bb.siggen.dump_this_task(sstatepkg + '_' + taskname + ".tgz" ".siginfo", d) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/siggen.py", line 356, in dump_this_task bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + referencestamp) File "/home/devel/yocto-pyro-qemuarm2/poky/meta/lib/oe/sstatesig.py", line 184, in dump_sigtask super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime) File "/home/devel/yocto-pyro-qemuarm2/poky/bitbake/lib/bb/siggen.py", line 300, in dump_sigtask fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), prefix="sigtask.") File "/usr/lib/python3.4/tempfile.py", line 409, in mkstemp return _mkstemp_inner(dir, prefix, suffix, flags) File "/usr/lib/python3.4/tempfile.py", line 339, in _mkstemp_inner fd = _os.open(file, flags, 0o600) PermissionError: [Errno 13] Permission denied: '/opt/yocto/sstate-cache/95/sigtask._nk80whe' ERROR: Task (/home/devel/yocto-pyro-qemuarm2/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_ext4) failed with exit code '1' NOTE: Tasks Summary: Attempted 2254 tasks of which 2063 didn't need to be rerun and 1 failed. Summary: 1 task failed: /home/devel/yocto-pyro-qemuarm2/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_ext4 Summary: There was 1 WARNING message shown. Summary: There were 3 ERROR messages shown, returning a non-zero exit code. -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto