[yocto] Add custom license to layer

Jonas Andersson jonaskgandersson at gmail.com
Thu Jan 17 23:13:18 PST 2019


Hi,

I have an recipe created from npm with devtool, when i build it generates
the warning:

do_rootfs: The license listed Unlicense was not in the licenses collected
for recipe my-recipe

I have tried to include the license in my layer with "LICENSE_PATH", with
no success.
"Unlicense" is listed in https://spdx.org/licenses/ so maybe it should be
in meta, but that is another discussion.

My setup is following
_____________________________________________________________________________________
Build Configuration:
BB_VERSION           = "1.38.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-xx"
MACHINE              = "xxx"
DISTRO               = "xxxx"
DISTRO_VERSION       = "2.5.1.0"
TUNE_FEATURES        = "arm armv7a vfp neon callconvention-hard cortexa9"
TARGET_FPU           = "hard"
meta                 = "sumo:78020fb6395c73d9ea0ce8e3ad8767d6e55021ee"
meta-oe
meta-python
meta-networking
meta-filesystems     = "sumo:8760facba1bceb299b3613b8955621ddaa3d4c3f"
meta-yocto-bsp       = "sumo:78020fb6395c73d9ea0ce8e3ad8767d6e55021ee"


My layer configuration is as following
_____________________________________________________________________________________
meta-my-layer/conf/layer.conf

# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/custom-licenses"

#Need this???
#SPDXLICENSEMAP[Unlicense-X] = "Unlicense"

_____________________________________________________________________________________
meta-my-layer/custom-licenses/Unlicense

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>

_____________________________________________________________________________________
meta-my-layer/recipes-my-recipe/my-recpie/my-recipe_2.0.0.bb

LICENSE = "BSD-3-Clause & Unlicense & Apache-2.0 & \
BSD-2-Clause & ISC & MIT"


LICENSE_${PN}-package = "Unlicense"
_____________________________________________________________________________________

Best regards
Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190118/6d181480/attachment.html>


More information about the yocto mailing list