All of lore.kernel.org
 help / color / mirror / Atom feed
* SPDX 3 generation broken in Scarthgap?
@ 2026-10-20 17:08 Anders Montonen
  2026-10-20 18:18 ` [yocto] " Yoann Congal
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Montonen @ 2026-10-20 17:08 UTC (permalink / raw)
  To: yocto

1. Clone the scarthgap branch of the poky repository (HEAD and 5.0.20 seems to work identically)
2. Run "source oe-init-build-env"
3. Add the lines listed in the documentation to local.conf:
	INHERIT_DISTRO:remove = "create-spdx"
	INHERIT_DISTRO:append = " create-spdx-3.0”
4. Run “bitbake -k core-image-minimal”

I get an endless stream of error messages like the following:
ERROR: zstd-native-1.5.5-r0 do_create_runtime_spdx: Error executing a python function in exec_func_python() autogenerated:                            
                                                                                                                                                      
The stack trace of python calls that resulted in this exception/failure was:                                                                          
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>                                                                               
     0001:                                                                                                                                            
 *** 0002:sstate_task_postfunc(d)                                                                                                                     
     0003:                                                                                                                                            
File: '/home/anders/work/yocto/spdx/poky/meta/classes-global/sstate.bbclass', lineno: 792, function: sstate_task_postfunc                             
     0788:                                                                                                                                            
     0789:    sstateinst = d.getVar("SSTATE_INSTDIR")                                                                                                 
     0790:    d.setVar('SSTATE_FIXMEDIR', shared_state['fixmedir'])                                                                                   
     0791:                                                                                                                                            
 *** 0792:    sstate_installpkgdir(shared_state, d)                                                                                                   
     0793:                                                                                                                                            
     0794:    bb.utils.remove(d.getVar("SSTATE_BUILDDIR"), recurse=True)                                                                              
     0795:}                                                                                                                                           
     0796:sstate_task_postfunc[dirs] = "${WORKDIR}"                                                                                                   
File: '/home/anders/work/yocto/spdx/poky/meta/classes-global/sstate.bbclass', lineno: 408, function: sstate_installpkgdir                             
     0404:        oe.path.remove(dir)                                                                                                                 
     0405:                                                                                                                                            
     0406:    for state in ss['dirs']:                                                                                                                
     0407:        prepdir(state[1])                                                                                                                   
 *** 0408:        bb.utils.rename(sstateinst + state[0], state[1])                                                                                    
     0409:    sstate_install(ss, d)                                                                                                                   
     0410:                                                                                                                                            
     0411:    for plain in ss['plaindirs']:                                                                                                           
     0412:        workdir = d.getVar('WORKDIR')                                                                                                       
File: '/home/anders/work/yocto/spdx/poky/bitbake/lib/bb/utils.py', lineno: 1791, function: rename                                                     
     1787:        if err.errno == 18:                                                                                                                 
     1788:            # Invalid cross-device link error                                                                                               
     1789:            shutil.move(src, dst)                                                                                                           
     1790:        else:                                                                                                                               
 *** 1791:            raise err                                                                                                                       
     1792:                                                                                                                                            
     1793:@contextmanager                                                                                                                             
     1794:def environment(**envvars):                                                                                                                 
     1795:    """                                                                                                                                     
File: '/home/anders/work/yocto/spdx/poky/bitbake/lib/bb/utils.py', lineno: 1785, function: rename                                                     
     1781:# Wrapper around os.rename which can handle cross device problems                                                                           
     1782:# e.g. from container filesystems
     1783:def rename(src, dst):
     1784:    try:
 *** 1785:        os.rename(src, dst) 
     1786:    except OSError as err:
     1787:        if err.errno == 18: 
     1788:            # Invalid cross-device link error
     1789:            shutil.move(src, dst)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/anders/work/yocto/spdx/poky/build/tmp/work/x86_64-linux/zstd-native/1.5.5/sstate-build-create_runtime_spdx/runtime-deploy' -> '/home/anders/work/yocto/spdx/poky/build/tmp/work/x86_64-linux/zstd-native/1.5.5/spdx/3.0.1/runtime-deploy'

ERROR: Logfile of failure stored in: /home/anders/work/yocto/spdx/poky/build/tmp/work/x86_64-linux/zstd-native/1.5.5/temp/log.do_create_runtime_spdx.73188
ERROR: Task (virtual:native:/home/anders/work/yocto/spdx/poky/meta/recipes-extended/zstd/zstd_1.5.5.bb:do_create_runtime_spdx) failed with exit code ‘1'

Any hints or advice? I assume it’s meant to work.

Regards,
Anders Montonen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] SPDX 3 generation broken in Scarthgap?
  2026-10-20 17:08 SPDX 3 generation broken in Scarthgap? Anders Montonen
@ 2026-10-20 18:18 ` Yoann Congal
  2026-10-21 12:01   ` Anders Montonen
  0 siblings, 1 reply; 4+ messages in thread
From: Yoann Congal @ 2026-10-20 18:18 UTC (permalink / raw)
  To: yocto, Anders.Montonen

Hello,

On Tue Oct 20, 2026 at 7:08 PM CEST, Anders Montonen via lists.yoctoproject.org wrote:
> 1. Clone the scarthgap branch of the poky repository (HEAD and 5.0.20 seems to work identically)
> 2. Run "source oe-init-build-env"
> 3. Add the lines listed in the documentation to local.conf:
> 	INHERIT_DISTRO:remove = "create-spdx"
> 	INHERIT_DISTRO:append = " create-spdx-3.0”
> 4. Run “bitbake -k core-image-minimal”

This is the SPDX30Check.test_core_image_minimal testcase that runs as
part of the regular oe-selftest builds: eg:
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/48/builds/4875/steps/18/logs/stdio (line 1764)

But the test does not use INHERIT_DISTRO but :
INHERIT:remove = "create-spdx"
INHERIT += "create-spdx-3.0"

I think this is an issue because the poky DISTRO adds create-spdx to
INHERIT (not INHERIT_DISTRO) in poky.conf. This means that in your
config you have both create-spdx and create-spdx-3.0 in INHERIT, and
that would explain the below issue.

Does changing to INHERIT modification fixes you issue?

> I get an endless stream of error messages like the following:
> ERROR: zstd-native-1.5.5-r0 do_create_runtime_spdx: Error executing a python function in exec_func_python() autogenerated:                            
>                                                                                                                                                       
> The stack trace of python calls that resulted in this exception/failure was:                                                                          
> File: 'exec_func_python() autogenerated', lineno: 2, function: <module>                                                                               
>      0001:                                                                                                                                            
>  *** 0002:sstate_task_postfunc(d)                                                                                                                     
>      0003:                                                                                                                                            
> File: '/home/anders/work/yocto/spdx/poky/meta/classes-global/sstate.bbclass', lineno: 792, function: sstate_task_postfunc                             
>      0788:                                                                                                                                            
>      0789:    sstateinst = d.getVar("SSTATE_INSTDIR")                                                                                                 
>      0790:    d.setVar('SSTATE_FIXMEDIR', shared_state['fixmedir'])                                                                                   
>      0791:                                                                                                                                            
>  *** 0792:    sstate_installpkgdir(shared_state, d)                                                                                                   
>      0793:                                                                                                                                            
>      0794:    bb.utils.remove(d.getVar("SSTATE_BUILDDIR"), recurse=True)                                                                              
>      0795:}                                                                                                                                           
>      0796:sstate_task_postfunc[dirs] = "${WORKDIR}"                                                                                                   
> File: '/home/anders/work/yocto/spdx/poky/meta/classes-global/sstate.bbclass', lineno: 408, function: sstate_installpkgdir                             
>      0404:        oe.path.remove(dir)                                                                                                                 
>      0405:                                                                                                                                            
>      0406:    for state in ss['dirs']:                                                                                                                
>      0407:        prepdir(state[1])                                                                                                                   
>  *** 0408:        bb.utils.rename(sstateinst + state[0], state[1])                                                                                    
>      0409:    sstate_install(ss, d)                                                                                                                   
>      0410:                                                                                                                                            
>      0411:    for plain in ss['plaindirs']:                                                                                                           
>      0412:        workdir = d.getVar('WORKDIR')                                                                                                       
> File: '/home/anders/work/yocto/spdx/poky/bitbake/lib/bb/utils.py', lineno: 1791, function: rename                                                     
>      1787:        if err.errno == 18:                                                                                                                 
>      1788:            # Invalid cross-device link error                                                                                               
>      1789:            shutil.move(src, dst)                                                                                                           
>      1790:        else:                                                                                                                               
>  *** 1791:            raise err                                                                                                                       
>      1792:                                                                                                                                            
>      1793:@contextmanager                                                                                                                             
>      1794:def environment(**envvars):                                                                                                                 
>      1795:    """                                                                                                                                     
> File: '/home/anders/work/yocto/spdx/poky/bitbake/lib/bb/utils.py', lineno: 1785, function: rename                                                     
>      1781:# Wrapper around os.rename which can handle cross device problems                                                                           
>      1782:# e.g. from container filesystems
>      1783:def rename(src, dst):
>      1784:    try:
>  *** 1785:        os.rename(src, dst) 
>      1786:    except OSError as err:
>      1787:        if err.errno == 18: 
>      1788:            # Invalid cross-device link error
>      1789:            shutil.move(src, dst)
> Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/anders/work/yocto/spdx/poky/build/tmp/work/x86_64-linux/zstd-native/1.5.5/sstate-build-create_runtime_spdx/runtime-deploy' -> '/home/anders/work/yocto/spdx/poky/build/tmp/work/x86_64-linux/zstd-native/1.5.5/spdx/3.0.1/runtime-deploy'
>
> ERROR: Logfile of failure stored in: /home/anders/work/yocto/spdx/poky/build/tmp/work/x86_64-linux/zstd-native/1.5.5/temp/log.do_create_runtime_spdx.73188
> ERROR: Task (virtual:native:/home/anders/work/yocto/spdx/poky/meta/recipes-extended/zstd/zstd_1.5.5.bb:do_create_runtime_spdx) failed with exit code ‘1'
>
> Any hints or advice? I assume it’s meant to work.
>
> Regards,
> Anders Montonen


-- 
Yoann Congal
Smile ECS


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] SPDX 3 generation broken in Scarthgap?
  2026-10-20 18:18 ` [yocto] " Yoann Congal
@ 2026-10-21 12:01   ` Anders Montonen
  2026-10-21 13:23     ` Yoann Congal
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Montonen @ 2026-10-21 12:01 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

Hi,

> On 20. Oct 2026, at 21.18, Yoann Congal <yoann.congal@smile.fr> wrote:
> 
> Hello,
> 
> On Tue Oct 20, 2026 at 7:08 PM CEST, Anders Montonen via lists.yoctoproject.org <http://lists.yoctoproject.org/> wrote:
>> 1. Clone the scarthgap branch of the poky repository (HEAD and 5.0.20 seems to work identically)
>> 2. Run "source oe-init-build-env"
>> 3. Add the lines listed in the documentation to local.conf:
>> 	INHERIT_DISTRO:remove = "create-spdx"
>> 	INHERIT_DISTRO:append = " create-spdx-3.0”
>> 4. Run “bitbake -k core-image-minimal”
> 
> This is the SPDX30Check.test_core_image_minimal testcase that runs as
> part of the regular oe-selftest builds: eg:
> https://autobuilder.yoctoproject.org/valkyrie/?#/builders/48/builds/4875/steps/18/logs/stdio (line 1764)
> 
> But the test does not use INHERIT_DISTRO but :
> INHERIT:remove = "create-spdx"
> INHERIT += "create-spdx-3.0"
> 
> I think this is an issue because the poky DISTRO adds create-spdx to
> INHERIT (not INHERIT_DISTRO) in poky.conf. This means that in your
> config you have both create-spdx and create-spdx-3.0 in INHERIT, and
> that would explain the below issue.
> 
> Does changing to INHERIT modification fixes you issue?

That did the trick, thank you. I see that there’s a difference in the documentation between the “Creating a Software Bill of Materials” chapter in the development tasks manual, and the documentation for the create-spdx class. The development tasks manual uses “INHERIT_DISTRO”, while the class documentation just uses “INHERIT”.

Regards,
Anders Montonen

[-- Attachment #2: Type: text/html, Size: 15939 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] SPDX 3 generation broken in Scarthgap?
  2026-10-21 12:01   ` Anders Montonen
@ 2026-10-21 13:23     ` Yoann Congal
  0 siblings, 0 replies; 4+ messages in thread
From: Yoann Congal @ 2026-10-21 13:23 UTC (permalink / raw)
  To: yocto, Anders.Montonen

On Wed Oct 21, 2026 at 2:01 PM CEST, Anders Montonen via lists.yoctoproject.org wrote:
> Hi,
>
>> On 20. Oct 2026, at 21.18, Yoann Congal <yoann.congal@smile.fr> wrote:
>> 
>> Hello,
>> 
>> On Tue Oct 20, 2026 at 7:08 PM CEST, Anders Montonen via lists.yoctoproject.org <http://lists.yoctoproject.org/> wrote:
>>> 1. Clone the scarthgap branch of the poky repository (HEAD and 5.0.20 seems to work identically)
>>> 2. Run "source oe-init-build-env"
>>> 3. Add the lines listed in the documentation to local.conf:
>>> 	INHERIT_DISTRO:remove = "create-spdx"
>>> 	INHERIT_DISTRO:append = " create-spdx-3.0”
>>> 4. Run “bitbake -k core-image-minimal”
>> 
>> This is the SPDX30Check.test_core_image_minimal testcase that runs as
>> part of the regular oe-selftest builds: eg:
>> https://autobuilder.yoctoproject.org/valkyrie/?#/builders/48/builds/4875/steps/18/logs/stdio (line 1764)
>> 
>> But the test does not use INHERIT_DISTRO but :
>> INHERIT:remove = "create-spdx"
>> INHERIT += "create-spdx-3.0"
>> 
>> I think this is an issue because the poky DISTRO adds create-spdx to
>> INHERIT (not INHERIT_DISTRO) in poky.conf. This means that in your
>> config you have both create-spdx and create-spdx-3.0 in INHERIT, and
>> that would explain the below issue.
>> 
>> Does changing to INHERIT modification fixes you issue?
>
> That did the trick, thank you.

Good news!

> I see that there’s a difference in the
> documentation between the “Creating a Software Bill of Materials”
> chapter in the development tasks manual, and the documentation for the
> create-spdx class. The development tasks manual uses “INHERIT_DISTRO”,
> while the class documentation just uses “INHERIT”.

Could you contribute the yocto-docs patch to fix that?

Thanks!
-- 
Yoann Congal
Smile ECS


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-21 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 17:08 SPDX 3 generation broken in Scarthgap? Anders Montonen
2026-10-20 18:18 ` [yocto] " Yoann Congal
2026-10-21 12:01   ` Anders Montonen
2026-10-21 13:23     ` Yoann Congal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.