diff options
author | Nitin A Kamble <nitin.a.kamble@intel.com> | 2010-05-28 15:21:49 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-06-02 14:06:02 +0100 |
commit | 2ccd2e67c5768e59316b086fa70fef837eecb53a (patch) | |
tree | 7e988319284e1a7b2ef7fc367e9e8edeb5b22719 /handbook/extendpoky.xml | |
parent | 5ae3f6553141aecce3b98e0f06e4b99f36764917 (diff) | |
download | poky-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.xml | 64 |
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 @@ | |||
56 | DESCRIPTION = "Simple helloworld application" | 56 | DESCRIPTION = "Simple helloworld application" |
57 | SECTION = "examples" | 57 | SECTION = "examples" |
58 | LICENSE = "MIT" | 58 | LICENSE = "MIT" |
59 | LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd" | ||
59 | 60 | ||
60 | SRC_URI = "file://helloworld.c" | 61 | SRC_URI = "file://helloworld.c" |
61 | 62 | ||
@@ -99,6 +100,7 @@ do_install() { | |||
99 | DESCRIPTION = "GNU Helloworld application" | 100 | DESCRIPTION = "GNU Helloworld application" |
100 | SECTION = "examples" | 101 | SECTION = "examples" |
101 | LICENSE = "GPLv2" | 102 | LICENSE = "GPLv2" |
103 | LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd" | ||
102 | 104 | ||
103 | SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2" | 105 | SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2" |
104 | 106 | ||
@@ -139,6 +141,7 @@ SECTION = "base" | |||
139 | DEPENDS = "zlib" | 141 | DEPENDS = "zlib" |
140 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" | 142 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" |
141 | LICENSE = "GPLv2" | 143 | LICENSE = "GPLv2" |
144 | LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd" | ||
142 | 145 | ||
143 | SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz" | 146 | SRC_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 | ||
175 | DESCRIPTION = "X11 Pixmap library" | 178 | DESCRIPTION = "X11 Pixmap library" |
176 | LICENSE = "X-BSD" | 179 | LICENSE = "X-BSD" |
180 | LIC_FILES_CHKSUM = "file://COPYING;md5=ae764cfda68da96df20af9fbf9fe49bd" | ||
177 | DEPENDS += "libxext" | 181 | DEPENDS += "libxext" |
178 | 182 | ||
179 | XORG_PN = "libXpm" | 183 | XORG_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> | ||
838 | LIC_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 | ||
850 | of licenses for the | ||
851 | source code. It is also possible to specify on which line the license text | ||
852 | starts 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 | ||
854 | text begins from the 1st line is assumed. Similarly if "endline" parameter is | ||
855 | not specified then the license text ends at the last line in the file is | ||
856 | assumed. So if a file contains only licensing information, then there is no need | ||
857 | to specify "beginline" and "endline" parameters. | ||
858 | </para> | ||
859 | <para> | ||
860 | The "md5" parameter stores the md5 checksum of the license text. So if | ||
861 | the license text changes in any way from a file, then it's md5 sum will differ and will not | ||
862 | match with the previously stored md5 checksum. This mismatch will trigger build | ||
863 | failure, notifying developer about the license text md5 mismatch, and allowing | ||
864 | the developer to review the license text changes. Also note that if md5 checksum | ||
865 | is not matched while building, the correct md5 checksum is printed in the build | ||
866 | log. | ||
867 | </para> | ||
868 | <para> | ||
869 | There is no limit on how many files can be specified on this parameter. But generally every | ||
870 | project would need specifying of just one or two files for license tracking. | ||
871 | Many projects would have a "COPYING" file which will store all the | ||
872 | license information for all the source code files. If the "COPYING" file | ||
873 | is valid then tracking only that file would be enough. | ||
874 | </para> | ||
875 | <tip> | ||
876 | <para> | ||
877 | 1. If you specify empty or invalid "md5" parameter; then while building | ||
878 | the 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> | ||
882 | 2. If the whole file contains only license text, then there is no need to | ||
883 | specify "beginline" and "endline" parameters. | ||
884 | </para> | ||
885 | </tip> | ||
886 | </section> | ||
887 | </section> | ||
824 | </chapter> | 888 | </chapter> |
825 | <!-- | 889 | <!-- |
826 | vim: expandtab tw=80 ts=4 | 890 | vim: expandtab tw=80 ts=4 |