summaryrefslogtreecommitdiffstats
path: root/handbook/extendpoky.xml
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2010-05-28 15:21:49 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-02 14:06:02 +0100
commit2ccd2e67c5768e59316b086fa70fef837eecb53a (patch)
tree7e988319284e1a7b2ef7fc367e9e8edeb5b22719 /handbook/extendpoky.xml
parent5ae3f6553141aecce3b98e0f06e4b99f36764917 (diff)
downloadpoky-2ccd2e67c5768e59316b086fa70fef837eecb53a.tar.gz
Handbook: Documentation for LIC_FILES_CHKSUM
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'handbook/extendpoky.xml')
-rw-r--r--handbook/extendpoky.xml64
1 files changed, 64 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