summaryrefslogtreecommitdiffstats
path: root/handbook
diff options
context:
space:
mode:
Diffstat (limited to 'handbook')
-rw-r--r--handbook/extendpoky.xml64
-rw-r--r--handbook/ref-variables.xml13
-rw-r--r--handbook/ref-varlocality.xml3
3 files changed, 80 insertions, 0 deletions
diff --git a/handbook/extendpoky.xml b/handbook/extendpoky.xml
index b6a8c786af..9d98a3bcca 100644
--- a/handbook/extendpoky.xml
+++ b/handbook/extendpoky.xml
@@ -56,6 +56,7 @@
56DESCRIPTION = "Simple helloworld application" 56DESCRIPTION = "Simple helloworld application"
57SECTION = "examples" 57SECTION = "examples"
58LICENSE = "MIT" 58LICENSE = "MIT"
59LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd"
59 60
60SRC_URI = "file://helloworld.c" 61SRC_URI = "file://helloworld.c"
61 62
@@ -99,6 +100,7 @@ do_install() {
99DESCRIPTION = "GNU Helloworld application" 100DESCRIPTION = "GNU Helloworld application"
100SECTION = "examples" 101SECTION = "examples"
101LICENSE = "GPLv2" 102LICENSE = "GPLv2"
103LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd"
102 104
103SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2" 105SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
104 106
@@ -139,6 +141,7 @@ SECTION = "base"
139DEPENDS = "zlib" 141DEPENDS = "zlib"
140HOMEPAGE = "http://www.linux-mtd.infradead.org/" 142HOMEPAGE = "http://www.linux-mtd.infradead.org/"
141LICENSE = "GPLv2" 143LICENSE = "GPLv2"
144LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd"
142 145
143SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz" 146SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz"
144 147
@@ -174,6 +177,7 @@ require xorg-lib-common.inc
174 177
175DESCRIPTION = "X11 Pixmap library" 178DESCRIPTION = "X11 Pixmap library"
176LICENSE = "X-BSD" 179LICENSE = "X-BSD"
180LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd"
177DEPENDS += "libxext" 181DEPENDS += "libxext"
178 182
179XORG_PN = "libXpm" 183XORG_PN = "libXpm"
@@ -820,7 +824,67 @@ SRC_URI += "file://NAME-OF-PATCH.patch;patch=1"
820 </section> 824 </section>
821 825
822 </section> 826 </section>
827 <section id='usingpoky-configuring-LIC_FILES_CHKSUM'>
828 <title>configuring the LIC_FILES_CHKSUM variable</title>
829 <para>
830 The changes in the license text inside source code files is tracked
831 using the LIC_FILES_CHKSUM metadata variable.
832 </para>
833
834 <section id='usingpoky-specifying-LIC_FILES_CHKSUM'>
835 <title>Specifying the LIC_FILES_CHKSUM variable </title>
823 836
837 <programlisting>
838LIC_FILES_CHKSUM = "file://COPYING; md5=xxxx \
839 file://licfile1.txt; beginline=5; endline=29;md5=yyyy \
840 file://licfile2.txt; endline=50;md5=zzzz \
841 ..."
842 </programlisting>
843 </section>
844
845 <section id='usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax'>
846 <title>Explanation of syntax</title>
847
848 <para>
849 This parameter lists all the important files containing the text
850of licenses for the
851source code. It is also possible to specify on which line the license text
852starts and on which line it ends within that file using the "beginline" and
853"endline" parameters. If the "beginline" parameter is not specified then license
854text begins from the 1st line is assumed. Similarly if "endline" parameter is
855not specified then the license text ends at the last line in the file is
856assumed. So if a file contains only licensing information, then there is no need
857to specify "beginline" and "endline" parameters.
858 </para>
859 <para>
860The "md5" parameter stores the md5 checksum of the license text. So if
861the license text changes in any way from a file, then it's md5 sum will differ and will not
862match with the previously stored md5 checksum. This mismatch will trigger build
863failure, notifying developer about the license text md5 mismatch, and allowing
864the developer to review the license text changes. Also note that if md5 checksum
865is not matched while building, the correct md5 checksum is printed in the build
866log.
867 </para>
868 <para>
869There is no limit on how many files can be specified on this parameter. But generally every
870project would need specifying of just one or two files for license tracking.
871Many projects would have a "COPYING" file which will store all the
872license information for all the source code files. If the "COPYING" file
873is valid then tracking only that file would be enough.
874 </para>
875 <tip>
876 <para>
8771. If you specify empty or invalid "md5" parameter; then while building
878the package, bitbake will give md5 not matched error, and also show the correct
879"md5" parameter value in the build log
880 </para>
881 <para>
8822. If the whole file contains only license text, then there is no need to
883specify "beginline" and "endline" parameters.
884 </para>
885 </tip>
886 </section>
887 </section>
824</chapter> 888</chapter>
825<!-- 889<!--
826vim: expandtab tw=80 ts=4 890vim: expandtab tw=80 ts=4
diff --git a/handbook/ref-variables.xml b/handbook/ref-variables.xml
index 6e8c91b305..b4d5639ec1 100644
--- a/handbook/ref-variables.xml
+++ b/handbook/ref-variables.xml
@@ -395,6 +395,19 @@
395 <para>List of package source licenses.</para> 395 <para>List of package source licenses.</para>
396 </glossdef> 396 </glossdef>
397 </glossentry> 397 </glossentry>
398 <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
399 <glossdef>
400 <para>Checksums of the license text in the recipe source code.
401 </para>
402 <para>This variables tracks changes in license text of the source
403 code files. If the license text is changed it triggers the build
404 failure. Which gives developer an oppurtunity to review any
405 license changes</para>
406 <para> This is an optional variable now. And the plan is to make
407 it a required variable in the future </para>
408 <para>See the "meta/package/zlib/zlib_${PV}.bb" file for an example</para>
409 </glossdef>
410 </glossentry>
398 411
399 </glossdiv> 412 </glossdiv>
400 413
diff --git a/handbook/ref-varlocality.xml b/handbook/ref-varlocality.xml
index a0c185694b..f8cfc4fad4 100644
--- a/handbook/ref-varlocality.xml
+++ b/handbook/ref-varlocality.xml
@@ -128,6 +128,9 @@
128 <para><glossterm><link linkend='var-LICENSE'>LICENSE</link></glossterm></para> 128 <para><glossterm><link linkend='var-LICENSE'>LICENSE</link></glossterm></para>
129 </listitem> 129 </listitem>
130 <listitem> 130 <listitem>
131 <para><glossterm><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></glossterm></para>
132 </listitem>
133 <listitem>
131 <para><glossterm><link linkend='var-SECTION'>SECTION</link></glossterm></para> 134 <para><glossterm><link linkend='var-SECTION'>SECTION</link></glossterm></para>
132 </listitem> 135 </listitem>
133 <listitem> 136 <listitem>