The LIC_FILES_CHKSUM
variable contains checksums of the license text in the source
code for the recipe.
Following is an example of how to specify
LIC_FILES_CHKSUM
:
LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \ file://licfile1.txt;beginline=5;endline=29;md5=yyyy \ file://licfile2.txt;endline=50;md5=zzzz \ ..."
When using "beginline" and "endline", realize that
line numbering begins with one and not zero.
Also, the included lines are inclusive (i.e. lines
five through and including 29 in the previous
example for licfile1.txt
).
When a license check fails, the selected license text is included as part of the QA message. Using this output, you can determine the exact start and finish for the needed license text.
The build system uses the
S
variable as
the default directory when searching files listed in
LIC_FILES_CHKSUM
.
The previous example employs the default directory.
Consider this next example:
LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\ md5=bb14ed3c4cda583abc85401304b5cd4e" LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
The first line locates a file in
${S}/src/ls.c
and isolates lines five
through 16 as license text.
The second line refers to a file in
WORKDIR
.
Note that LIC_FILES_CHKSUM
variable is
mandatory for all recipes, unless the
LICENSE
variable is set to "CLOSED".