summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleimaohui <leimaohui@cn.fujitsu.com>2020-10-12 12:42:53 +0900
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-20 11:12:06 +0100
commitc7e06033bbd074b973f57a37cdc752649ca5eb61 (patch)
tree7280843393977a256700fbd3bda517a767741ea2
parentabf85840ab9925825d9d5148f0baf6eb504236ef (diff)
downloadpoky-c7e06033bbd074b973f57a37cdc752649ca5eb61.tar.gz
docs: Updated the status of spdx module.
- Deleted content about old spdx.bbclass. - Added usage of meta-spdxscanner. (From yocto-docs rev: 59908cecb5283ebdea1800c4d86a6310a45159bf) Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.rst38
-rw-r--r--documentation/ref-manual/ref-classes.rst13
-rw-r--r--documentation/ref-manual/ref-tasks.rst14
3 files changed, 38 insertions, 27 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.rst b/documentation/dev-manual/dev-manual-common-tasks.rst
index 43fe972ef4..943180296c 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.rst
+++ b/documentation/dev-manual/dev-manual-common-tasks.rst
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main areas of concern exist:
11401- Compilation scripts and modifications to the source code must be 11401- Compilation scripts and modifications to the source code must be
11402 provided. 11402 provided.
11403 11403
11404- spdx files can be provided.
11405
11404There are other requirements beyond the scope of these three and the 11406There are other requirements beyond the scope of these three and the
11405methods described in this section (e.g. the mechanism through which 11407methods described in this section (e.g. the mechanism through which
11406source code is distributed). 11408source code is distributed).
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and so forth) enables you to meet
11595your requirements to include the scripts to control compilation as well 11597your requirements to include the scripts to control compilation as well
11596as any modifications to the original source. 11598as any modifications to the original source.
11597 11599
11600Providing spdx files
11601~~~~~~~~~~~~~~~~~~~~~~~~~
11602
11603The spdx module has been integrated to a layer named meta-spdxscanner.
11604meta-spdxscanner provides several kinds of scanner. If you want to enable
11605this function, you have to follow the following steps:
11606
116071. Add meta-spdxscanner layer into ``bblayers.conf``.
11608
116092. Refer to the README in meta-spdxscanner to setup the environment (e.g,
11610 setup a fossology server) needed for the scanner.
11611
116123. Meta-spdxscanner provids several methods within the bbclass to create spdx files.
11613 Please choose one that you want to use and enable the spdx task. You have to
11614 add some config options in
11615``local.conf`` file in your
11616:term:`Build Directory`.
11617The following is an example showing how to generate spdx files during bitbake
11618using the fossology-python.bbclass:
11619::
11620
11621 # Selet fossology-python.bbclass.
11622 INHERIT += "fossology-python"
11623 # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
11624 # Fossology server, you have to create a token.
11625 TOKEN = "eyJ0eXAiO..."
11626 # The fossology server is necessary for fossology-python.bbclass.
11627 FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
11628 # If you want to upload the source code to a special folder:
11629 FOLDER_NAME = "xxxx" //Optional
11630 # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
11631 SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
11632
11633For more usage information on meta-spdxscanner, refer to the repsoitory which you can find at:
11634https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
11635
11598Copying Licenses that Do Not Exist 11636Copying Licenses that Do Not Exist
11599---------------------------------- 11637----------------------------------
11600 11638
diff --git a/documentation/ref-manual/ref-classes.rst b/documentation/ref-manual/ref-classes.rst
index 756df2a60f..7277c6bb9d 100644
--- a/documentation/ref-manual/ref-classes.rst
+++ b/documentation/ref-manual/ref-classes.rst
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
2380The class also provides variables like ``SITEINFO_ENDIANNESS`` and 2380The class also provides variables like ``SITEINFO_ENDIANNESS`` and
2381``SITEINFO_BITS`` that can be used elsewhere in the metadata. 2381``SITEINFO_BITS`` that can be used elsewhere in the metadata.
2382 2382
2383.. _ref-classes-spdx:
2384
2385``spdx.bbclass``
2386================
2387
2388The ``spdx`` class integrates real-time license scanning, generation of
2389SPDX standard output, and verification of license information during the
2390build.
2391
2392.. note::
2393
2394 This class is currently at the prototype stage in the 1.6 release.
2395
2396.. _ref-classes-sstate: 2383.. _ref-classes-sstate:
2397 2384
2398``sstate.bbclass`` 2385``sstate.bbclass``
diff --git a/documentation/ref-manual/ref-tasks.rst b/documentation/ref-manual/ref-tasks.rst
index 2569306fc5..ea145644f7 100644
--- a/documentation/ref-manual/ref-tasks.rst
+++ b/documentation/ref-manual/ref-tasks.rst
@@ -859,17 +859,3 @@ sure that the machine and metadata branches as specified by the
859branches. If these branches do not exist and 859branches. If these branches do not exist and
860:term:`AUTOREV` is not being used, the 860:term:`AUTOREV` is not being used, the
861``do_validate_branches`` task fails during the build. 861``do_validate_branches`` task fails during the build.
862
863Miscellaneous Tasks
864===================
865
866The following sections describe miscellaneous tasks.
867
868.. _ref-tasks-spdx:
869
870``do_spdx``
871-----------
872
873A build stage that takes the source code and scans it on a remote
874FOSSOLOGY server in order to produce an SPDX document. This task applies
875only to the :ref:`spdx <ref-classes-spdx>` class.