#yocto -third party licensimg #yocto


Monsees, Steven C (US)
 

 

Hello:

 

I am running zeus 3.0.4…

 

A vendor has supplied us with a generic license.txt file, which we were able to add to the acexpci recipe we use to build in their package.

The license provided to us by the vendor is not part of the generic licenses list that yocto recognizes.

 

We get a warning though which says:

 

WARNING: aiox-defaultfs-1.0-r0 do_rootfs: The license listed DataDeviceCorporation was not in the licenses collected for recipe acexpci

 

Though the warning occurs, I can see the license.txt being saved inside the rootfs on and is saved under tmp/deploy/licenses/acexpci.

I’ve been trying to get rid of this warning when the image builds, but I can’t seem to find anything in the manuals or online.

 

The one solution I found says : Add LICENSE_PATH += "${LAYERDIR}/custom-licenses" under conf/layer.conf, this does not resolve this warning.

 

This is a new item being added to our Yocto build.

The Data Direct vendor does not submit their code to Yocto because they sell thier code.

We are adding code to Yocto that has a private license and we are attempting to have Yocto accept the license, is this proper way to handle this ?

 

Can you tell me the proper way to add a custom license to a recipe in yocto ?

 

Thanks,

Steve


Robert Berger
 

Hi Steven,

Please see my comments inline

On 24/09/2021 14:10, Monsees, Steven C (US) via lists.yoctoproject.org wrote:
The one solution I found says : Add *LICENSE_PATH += "${LAYERDIR}/custom-licenses"* under conf/layer.conf, *this does not resolve this warning*.
This is a new item being added to our Yocto build.
The Data Direct vendor does not submit their code to Yocto because they sell thier code.
We are adding code to Yocto that has a private license and we are attempting to have Yocto accept the license, *is this proper way to handle this ?*
I am a bit confused, but can try to show you what I typically do.
In my custom meta-my-layer I add to layer.conf:

#-->
LICENSE_PATH += " ${LAYERDIR}/custom-licenses"

CUSTOM_COMMON_LICENSE_DIR := '${@os.path.normpath("${LAYERDIR}/custom-licenses")}'
BB_HASHBASE_WHITELIST_append = " CUSTOM_COMMON_LICENSE_DIR"
#<--

underneath the custom-licenses dir in this meta-my-layer I put the custom "hello-license".

*Can you tell me the proper way to add a custom license to a recipe in yocto ?*
Once you did something like mentioned above you can add the license to the recipe you use to build the funny component of your supplier.

example_0.1.bb:

LICENSE = "hello-license"
LIC_FILES_CHKSUM = "file://${CUSTOM_COMMON_LICENSE_DIR}/hello-license;beginline=5;endline=12;md5=36e6988a930e054886e6af19372edb07"

If you want to get fancy, since it does not seem to be an open source license, you can mark it also as:

LICENSE_FLAGS = "commercial" in the recipe

but then you need to whitelist e.g. in your local.conf to be able to bitbake it:

# whitelist example recipe, which is under a commercial license
LICENSE_FLAGS_WHITELIST = "commercial_example"

Thanks,
Steve
Hope this helps,

Regards,

Robert