[yocto] License information of tasks
Paul Eggleton
paul.eggleton at linux.intel.com
Fri Aug 24 03:39:10 PDT 2012
On Friday 24 August 2012 12:05:41 Markus Hubig wrote:
> Hi @all,
>
> I'm building a layer to provide a customized image. Now I'm struggling
> a bit by the license informations one have to provide for a task.
>
> First: tasks are packages without content.
>
> | rpm -qpl task-core-boot-1.0-r9.stamp9g20.rpm
> | (contains no files)
>
> ... so why do they need some license information in the first place?
This is something that annoys me as well. I have thought about adding the
ability to declare that a license is not applicable for those recipes that
don't actually distribute any files, in which case a check during do_deploy,
do_package and do_populate_sysroot would be enabled that would fail if the
recipe ended up distributing anything. Unfortunately we don't have hooks in
all of the necessary places to make this practical, but it is still something
I would like to resolve.
> Second: OK if there are some reasons to provide license informations,
> how do I include them?
>
> In task-core-boot there are included like this:
> | LICENSE = "MIT"
> | LIC_FILES_CHKSUM =
> | "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \|
> | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c8
> | 0a0384361b4de20420"
>
> No I wanna do the same, but of course relative to the base dir of my layer.
> But I don't find a way of doing this ...
>
> | LICENSE = "LGPL-3.0"
> | LIC_FILES_CHKSUM =
> | "file://${LAYERDIR}/LICENSE;md5=5b241fa147528c635da6d1598c4a4056 \|
> | file://${LAYERDIR}/COPYING;md5=c79ff39f19dfec6d293b95d
> | ea7b07891 \
> | file://${LAYERDIR}/COPYING.LESSER;md5=bfccfe952269fff2
> | b407dd11f2f3083b"
>
> ... which looks good but don't work (I'm on 1.3_M3).
This doesn't work because LAYERDIR is not valid outside of layer.conf.
Some possible solutions:
1) Use something like e.g. ${THISDIR}/../../COPYING.LESSER; seems quite clunky
though.
2) Set your own variable to the value of LAYERDIR in layer.conf and then use
that in the recipe; however that would make the recipe even more hardwired to
the specific layer.
3) Refer to a license file in ${COMMON_LICENSE_DIR}; this is discouraged as it
may break if files in there are moved around although I think that is less
likely in future.
4) Copy the license file into the directory containing the recipe. This is the
recommended method for recipes that do actually distribute files, but seems
excessive for a task.
Ultimately though is it really important that the license for a recipe that
distributes no files be any particular license?
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list