diff options
| -rw-r--r-- | handbook/extendpoky.xml | 64 | ||||
| -rw-r--r-- | handbook/ref-variables.xml | 13 | ||||
| -rw-r--r-- | handbook/ref-varlocality.xml | 3 |
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 @@ | |||
| 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 |
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> |
