Skip to contentSkip to conversation

docs: Updated the status of spdx module.

PATCH In review leimaohui 4 participants 7 messages Oct 12, 2020 – Oct 26, 2020

lore
Share & tools
lore

leimaohui

author
#0 lore raw

PATCH 1/1 docs: Updated the status of spdx module.

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

---
 .../dev-manual/dev-manual-common-tasks.rst    | 38 +++++++++++++++++++
 documentation/ref-manual/ref-classes.rst      | 13 -------
 documentation/ref-manual/ref-tasks.rst        | 14 -------
 3 files changed, 38 insertions(+), 27 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.rst +38 -0
index bef8bf840f..80fd23e960 100644
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main areas of concern exist:
 -  Compilation scripts and modifications to the source code must be
    provided.
 
+-  spdx files can be provided.
+
 There are other requirements beyond the scope of these three and the
 methods described in this section (e.g. the mechanism through which
 source code is distributed).
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and so forth) enables you to meet
 your requirements to include the scripts to control compilation as well
 as any modifications to the original source.
 
+Providing spdx files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The spdx module has been integrated to a layer named meta-spdxscanner.
+meta-spdxscanner provides several kinds of scanner. If you want to enable
+this function, you have to do the following steps:
+
+1. Added meta-spdxscanner layer into ``bblayers.conf``. 
+
+2. Reference to README of meta-spdxscanner, setup the environment(e.g, 
+   setup a fossology server) of scanner.
+
+3. Meta-spdxscanner provids several methods(bbclass) to create spdx files.
+   Please choose one that you want to use and enable the spdx task. You have to
+   add some config options in 
+``local.conf`` file in your
+:term:`Build Directory`.
+The following is an example about how to get spdx files during bitbake 
+by fossology-python.bbclass:
+::
+
+   # Selet fossology-python.bbclass.
+   INHERIT += "fossology-python"
+   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a 
+   # Fossology server, you have to create a token.
+   TOKEN = "eyJ0eXAiO..."
+   # The fossology server is necessary for fossology-python.bbclass.
+   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo" //Optional
+   # If you want to upload the source code to a special folder.
+   FOLDER_NAME = "xxxx" //Optional
+   # If you don't want to put spdx files in tmp/deploy/spdx, you can change.
+   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+
+More usage of meta-spdxscanner, which you can find at:
+https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
+
 Copying Licenses that Do Not Exist
 ----------------------------------
 
documentation/ref-manual/ref-classes.rst +0 -13
index 756df2a60f..7277c6bb9d 100644
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
 The class also provides variables like ``SITEINFO_ENDIANNESS`` and
 ``SITEINFO_BITS`` that can be used elsewhere in the metadata.
 
-.. _ref-classes-spdx:
-
-``spdx.bbclass``
-================
-
-The ``spdx`` class integrates real-time license scanning, generation of
-SPDX standard output, and verification of license information during the
-build.
-
-.. note::
-
-   This class is currently at the prototype stage in the 1.6 release.
-
 .. _ref-classes-sstate:
 
 ``sstate.bbclass``
documentation/ref-manual/ref-tasks.rst +0 -14
index 2569306fc5..ea145644f7 100644
@@ -859,17 +859,3 @@ sure that the machine and metadata branches as specified by the
 branches. If these branches do not exist and
 :term:`AUTOREV` is not being used, the
 ``do_validate_branches`` task fails during the build.
-
-Miscellaneous Tasks
-===================
-
-The following sections describe miscellaneous tasks.
-
-.. _ref-tasks-spdx:
-
-``do_spdx``
------------
-
-A build stage that takes the source code and scans it on a remote
-FOSSOLOGY server in order to produce an SPDX document. This task applies
-only to the :ref:`spdx <ref-classes-spdx>` class.
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · leimaohui

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

Do we want to go down this road? Will we be adding other scanning layers in YP docs?  It seems out of scope for the Yocto Project.

-armin

Quoted 113 lines
---
 .../dev-manual/dev-manual-common-tasks.rst    | 38 +++++++++++++++++++
 documentation/ref-manual/ref-classes.rst      | 13 -------
 documentation/ref-manual/ref-tasks.rst        | 14 -------
 3 files changed, 38 insertions(+), 27 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.rst +38 -0
index bef8bf840f..80fd23e960 100644
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main areas of concern exist:
 -  Compilation scripts and modifications to the source code must be
    provided.
 
+-  spdx files can be provided.
+
 There are other requirements beyond the scope of these three and the
 methods described in this section (e.g. the mechanism through which
 source code is distributed).
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and so forth) enables you to meet
 your requirements to include the scripts to control compilation as well
 as any modifications to the original source.
 
+Providing spdx files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The spdx module has been integrated to a layer named meta-spdxscanner.
+meta-spdxscanner provides several kinds of scanner. If you want to enable
+this function, you have to do the following steps:
+
+1. Added meta-spdxscanner layer into ``bblayers.conf``. 
+
+2. Reference to README of meta-spdxscanner, setup the environment(e.g, 
+   setup a fossology server) of scanner.
+
+3. Meta-spdxscanner provids several methods(bbclass) to create spdx files.
+   Please choose one that you want to use and enable the spdx task. You have to
+   add some config options in 
+``local.conf`` file in your
+:term:`Build Directory`.
+The following is an example about how to get spdx files during bitbake 
+by fossology-python.bbclass:
+::
+
+   # Selet fossology-python.bbclass.
+   INHERIT += "fossology-python"
+   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a 
+   # Fossology server, you have to create a token.
+   TOKEN = "eyJ0eXAiO..."
+   # The fossology server is necessary for fossology-python.bbclass.
+   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo" //Optional
+   # If you want to upload the source code to a special folder.
+   FOLDER_NAME = "xxxx" //Optional
+   # If you don't want to put spdx files in tmp/deploy/spdx, you can change.
+   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+
+More usage of meta-spdxscanner, which you can find at:
+https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
+
 Copying Licenses that Do Not Exist
 ----------------------------------
 
documentation/ref-manual/ref-classes.rst +0 -13
index 756df2a60f..7277c6bb9d 100644
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
 The class also provides variables like ``SITEINFO_ENDIANNESS`` and
 ``SITEINFO_BITS`` that can be used elsewhere in the metadata.
 
-.. _ref-classes-spdx:
-
-``spdx.bbclass``
-================
-
-The ``spdx`` class integrates real-time license scanning, generation of
-SPDX standard output, and verification of license information during the
-build.
-
-.. note::
-
-   This class is currently at the prototype stage in the 1.6 release.
-
 .. _ref-classes-sstate:
 
 ``sstate.bbclass``
documentation/ref-manual/ref-tasks.rst +0 -14
index 2569306fc5..ea145644f7 100644
@@ -859,17 +859,3 @@ sure that the machine and metadata branches as specified by the
 branches. If these branches do not exist and
 :term:`AUTOREV` is not being used, the
 ``do_validate_branches`` task fails during the build.
-
-Miscellaneous Tasks
-===================
-
-The following sections describe miscellaneous tasks.
-
-.. _ref-tasks-spdx:
-
-``do_spdx``
------------
-
-A build stage that takes the source code and scans it on a remote
-FOSSOLOGY server in order to produce an SPDX document. This task applies
-only to the :ref:`spdx <ref-classes-spdx>` class.
#2 lore raw
Quoted 7 lines · akuster
Quoted 2 lines · leimaohui

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

Do we want to go down this road? Will we be adding other scanning layers in YP docs? It seems out of scope for the Yocto Project.

We do need to remove the spdx class from the docs since it was removed from OE-Core. At request from members, we do host meta-spdxscanner, we do support SPDX as a project and I think at least putting a pointer to it in the docs is probably fine?

I make some minor tweaks to some of the language to make it more consistent with the rest of the docs and put that patch in master-next for further review.

Cheers,

Richard

#3 lore raw
In reply to leimaohui

hey Lei,

Quoted 38 lines · leimaohui

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

---
 .../dev-manual/dev-manual-common-tasks.rst    | 38 +++++++++++++++++++
 documentation/ref-manual/ref-classes.rst      | 13 -------
 documentation/ref-manual/ref-tasks.rst        | 14 -------
 3 files changed, 38 insertions(+), 27 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.rst +12 -0
index bef8bf840f..80fd23e960 100644
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main areas of concern exist:
 -  Compilation scripts and modifications to the source code must be
    provided.
 
+-  spdx files can be provided.
+
 There are other requirements beyond the scope of these three and the
 methods described in this section (e.g. the mechanism through which
 source code is distributed).
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and so forth) enables you to meet
 your requirements to include the scripts to control compilation as well
 as any modifications to the original source.
 
+Providing spdx files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The spdx module has been integrated to a layer named meta-spdxscanner.
+meta-spdxscanner provides several kinds of scanner. If you want to enable
+this function, you have to do the following steps:
+
+1. Added meta-spdxscanner layer into ``bblayers.conf``.
+
+2. Reference to README of meta-spdxscanner, setup the environment(e.g,

documentation/dev-manual/dev-manual-common-tasks.rst layers (recipes, configuration files, and so forth) enables you to meet · line 11619

Quoted 10 lines
documentation/dev-manual/dev-manual-common-tasks.rst +10 -0
+   setup a fossology server) of scanner.
+
+3. Meta-spdxscanner provids several methods(bbclass) to create spdx files.
+   Please choose one that you want to use and enable the spdx task. You have to
+   add some config options in
+``local.conf`` file in your
+:term:`Build Directory`.
+The following is an example about how to get spdx files during bitbake
+by fossology-python.bbclass:
+::

this causes the following new warning:
WARNING: Enumerated list ends without a blank line; unexpected unindent.

I believe the code-block belongs to the #3 item in the list, in which case this patch is needed:

documentation/dev-manual/dev-manual-common-tasks.rst +0 -1
@@ -11487,26 +11487,23 @@ this function, you have to follow the following steps:
 2. Refer to the README in meta-spdxscanner to setup the environment (e.g,
    setup a fossology server) needed for the scanner.
 
-3. Meta-spdxscanner provids several methods within the bbclass to

create spdx files.
+3. Meta-spdxscanner provides several methods within the bbclass to create spdx files.
Please choose one that you want to use and enable the spdx task. You have to
- add some config options in
-``local.conf`` file in your
-:term:Build Directory.
-The following is an example showing how to generate spdx files during bitbake -using the fossology-python.bbclass:
-::
-

-   # Selet fossology-python.bbclass.
-   INHERIT += "fossology-python"
-   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
-   # Fossology server, you have to create a token.
-   TOKEN = "eyJ0eXAiO..."
-   # The fossology server is necessary for fossology-python.bbclass.
-   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
-   # If you want to upload the source code to a special folder:
-   FOLDER_NAME = "xxxx" //Optional
-   # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
-   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+   add some config options in ``local.conf`` file in your :term:`Build
+   Directory`. The following is an example showing how to generate spdx files
+   during bitbake using the fossology-python.bbclass::
+
+      # Selet fossology-python.bbclass.
+      INHERIT += "fossology-python"
+      # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+      # Fossology server, you have to create a token.
+      TOKEN = "eyJ0eXAiO..."
+      # The fossology server is necessary for fossology-python.bbclass.
+      FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
+      # If you want to upload the source code to a special folder:
+      FOLDER_NAME = "xxxx" //Optional
+      # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
+      SPDX_DEPLOY_DIR = "${DeployDir}" //Optional

Note: I fixed a typo as well.

Quoted 71 lines
documentation/dev-manual/dev-manual-common-tasks.rst +16 -0
+
+   # Selet fossology-python.bbclass.
+   INHERIT += "fossology-python"
+   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+   # Fossology server, you have to create a token.
+   TOKEN = "eyJ0eXAiO..."
+   # The fossology server is necessary for fossology-python.bbclass.
+   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo" //Optional
+   # If you want to upload the source code to a special folder.
+   FOLDER_NAME = "xxxx" //Optional
+   # If you don't want to put spdx files in tmp/deploy/spdx, you can change.
+   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+
+More usage of meta-spdxscanner, which you can find at:
+https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
+
 Copying Licenses that Do Not Exist
 ----------------------------------
 
documentation/ref-manual/ref-classes.rst +0 -13
index 756df2a60f..7277c6bb9d 100644
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
 The class also provides variables like ``SITEINFO_ENDIANNESS`` and
 ``SITEINFO_BITS`` that can be used elsewhere in the metadata.
 
-.. _ref-classes-spdx:
-
-``spdx.bbclass``
-================
-
-The ``spdx`` class integrates real-time license scanning, generation of
-SPDX standard output, and verification of license information during the
-build.
-
-.. note::
-
-   This class is currently at the prototype stage in the 1.6 release.
-
 .. _ref-classes-sstate:
 
 ``sstate.bbclass``
documentation/ref-manual/ref-tasks.rst +0 -15
index 2569306fc5..ea145644f7 100644
@@ -859,17 +859,3 @@ sure that the machine and metadata branches as specified by the
 branches. If these branches do not exist and
 :term:`AUTOREV` is not being used, the
 ``do_validate_branches`` task fails during the build.
-
-Miscellaneous Tasks
-===================
-
-The following sections describe miscellaneous tasks.
-
-.. _ref-tasks-spdx:
-
-``do_spdx``
------------
-
-A build stage that takes the source code and scans it on a remote
-FOSSOLOGY server in order to produce an SPDX document. This task applies
-only to the :ref:`spdx <ref-classes-spdx>` class.
--

2.25.1

author
#4 lore raw

Hi, nico

Thanks for your comment, I'm sorry that I'm not very familiar with syntax of doc. So, do I need to submit patch again? Or you have updated this patch?

Best regards
Lei

Quoted 192 lines

-----Original Message-----
From: Nicolas Dechesne <[email protected]>
Sent: Friday, October 23, 2020 10:44 PM
To: Lei, Maohui <[email protected]>
Cc: [email protected]
Subject: Re: [docs] [PATCH] docs: Updated the status of spdx module.

hey Lei,

documentation/dev-manual/dev-manual-common-tasks.rst to be covered by assuming that three main

Quoted 17 lines · leimaohui

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

---
 .../dev-manual/dev-manual-common-tasks.rst    | 38 +++++++++++++++++++
 documentation/ref-manual/ref-classes.rst      | 13 -------
 documentation/ref-manual/ref-tasks.rst        | 14 -------
 3 files changed, 38 insertions(+), 27 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
index bef8bf840f..80fd23e960 100644
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main

areas of concern exist:

Quoted 16 lines
documentation/dev-manual/dev-manual-common-tasks.rst +2 -0
 -  Compilation scripts and modifications to the source code must be
    provided.
 
+-  spdx files can be provided.
+
 There are other requirements beyond the scope of these three and the

methods described in this section (e.g. the mechanism through which source code is distributed).

documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and so

forth) enables you to meet your requirements to include the scripts to control compilation as well as any modifications to the original source.

documentation/dev-manual/dev-manual-common-tasks.rst +4 -0
+Providing spdx files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The spdx module has been integrated to a layer named meta-spdxscanner.

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 10 lines
documentation/dev-manual/dev-manual-common-tasks.rst +10 -0
+meta-spdxscanner provides several kinds of scanner. If you want to
+enable this function, you have to do the following steps:
+
+1. Added meta-spdxscanner layer into ``bblayers.conf``.
+
+2. Reference to README of meta-spdxscanner, setup the environment(e.g,
+   setup a fossology server) of scanner.
+
+3. Meta-spdxscanner provids several methods(bbclass) to create spdx files.
+   Please choose one that you want to use and enable the spdx task. You

have to

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 6 lines
documentation/dev-manual/dev-manual-common-tasks.rst +6 -0
+   add some config options in
+``local.conf`` file in your
+:term:`Build Directory`.
+The following is an example about how to get spdx files during
+bitbake by fossology-python.bbclass:
+::

this causes the following new warning:
WARNING: Enumerated list ends without a blank line; unexpected unindent.

I believe the code-block belongs to the #3 item in the list, in which case this patch is needed:

documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
@@ -11487,26 +11487,23 @@ this function, you have to follow the following

steps:
2. Refer to the README in meta-spdxscanner to setup the environment (e.g, setup a fossology server) needed for the scanner.

-3. Meta-spdxscanner provids several methods within the bbclass to create spdx files.
+3. Meta-spdxscanner provides several methods within the bbclass to create spdx files.
Please choose one that you want to use and enable the spdx task. You have
to

documentation/dev-manual/dev-manual-common-tasks.rst +0 -4
-   add some config options in
-``local.conf`` file in your
-:term:`Build Directory`.
-The following is an example showing how to generate spdx files during

bitbake -using the fossology-python.bbclass:
-::

documentation/dev-manual/dev-manual-common-tasks.rst +15 -12
-
-   # Selet fossology-python.bbclass.
-   INHERIT += "fossology-python"
-   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
-   # Fossology server, you have to create a token.
-   TOKEN = "eyJ0eXAiO..."
-   # The fossology server is necessary for fossology-python.bbclass.
-   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
-   # If you want to upload the source code to a special folder:
-   FOLDER_NAME = "xxxx" //Optional
-   # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
-   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+   add some config options in ``local.conf`` file in your :term:`Build
+   Directory`. The following is an example showing how to generate spdx files
+   during bitbake using the fossology-python.bbclass::
+
+      # Selet fossology-python.bbclass.
+      INHERIT += "fossology-python"
+      # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+      # Fossology server, you have to create a token.
+      TOKEN = "eyJ0eXAiO..."
+      # The fossology server is necessary for fossology-python.bbclass.
+      FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
+      # If you want to upload the source code to a special folder:
+      FOLDER_NAME = "xxxx" //Optional
+      # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
+      SPDX_DEPLOY_DIR = "${DeployDir}" //Optional

Note: I fixed a typo as well.

Quoted 73 lines
documentation/dev-manual/dev-manual-common-tasks.rst +16 -0
+
+   # Selet fossology-python.bbclass.
+   INHERIT += "fossology-python"
+   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+   # Fossology server, you have to create a token.
+   TOKEN = "eyJ0eXAiO..."
+   # The fossology server is necessary for fossology-python.bbclass.
+   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo" //Optional
+   # If you want to upload the source code to a special folder.
+   FOLDER_NAME = "xxxx" //Optional
+   # If you don't want to put spdx files in tmp/deploy/spdx, you can change.
+   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+
+More usage of meta-spdxscanner, which you can find at:
+https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
+
 Copying Licenses that Do Not Exist
 ----------------------------------
documentation/ref-manual/ref-classes.rst +0 -0
index 756df2a60f..7277c6bb9d 100644
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
 The class also provides variables like ``SITEINFO_ENDIANNESS`` and

``SITEINFO_BITS`` that can be used elsewhere in the metadata.

-.. _ref-classes-spdx:

documentation/ref-manual/ref-classes.rst +0 -5
-
-``spdx.bbclass``
-================
-
-The ``spdx`` class integrates real-time license scanning, generation

of -SPDX standard output, and verification of license information during the -build.

documentation/ref-manual/ref-classes.rst +0 -5
-
-.. note::
-
-   This class is currently at the prototype stage in the 1.6 release.
-
 .. _ref-classes-sstate:
 
 ``sstate.bbclass``
documentation/ref-manual/ref-tasks.rst +0 -0
index 2569306fc5..ea145644f7 100644
@@ -859,17 +859,3 @@ sure that the machine and metadata branches as

specified by the branches. If these branches do not exist and :term:AUTOREV is not being used, the ``do_validate_branches`` task fails during the build.

documentation/ref-manual/ref-tasks.rst +0 -13
-
-Miscellaneous Tasks
-===================
-
-The following sections describe miscellaneous tasks.
-
-.. _ref-tasks-spdx:
-
-``do_spdx``
------------
-
-A build stage that takes the source code and scans it on a remote
-FOSSOLOGY server in order to produce an SPDX document. This task

applies -only to the :ref:spdx <ref-classes-spdx> class. --
2.25.1

#5 lore raw

hi Lei,

Quoted 4 lines · Maohui

Hi, nico

Thanks for your comment, I'm sorry that I'm not very familiar with syntax of doc.

Not a problem, we just missed that during the review process!

Quoted 1 line

So, do I need to submit patch again? Or you have updated this patch?

Your patch was merged, so we need a new patch on top of current branch to fix the issue. If you confirm that the patch I put in my previous email is good, then I can submit it, otherwise, feel free to submit a patch directly.

Quoted 200 lines

Best regards
Lei

Quoted 192 lines

-----Original Message-----
From: Nicolas Dechesne <[email protected]>
Sent: Friday, October 23, 2020 10:44 PM
To: Lei, Maohui <[email protected]>
Cc: [email protected]
Subject: Re: [docs] [PATCH] docs: Updated the status of spdx module.

hey Lei,

documentation/dev-manual/dev-manual-common-tasks.rst to be covered by assuming that three main

Quoted 17 lines · leimaohui

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

---
 .../dev-manual/dev-manual-common-tasks.rst    | 38 +++++++++++++++++++
 documentation/ref-manual/ref-classes.rst      | 13 -------
 documentation/ref-manual/ref-tasks.rst        | 14 -------
 3 files changed, 38 insertions(+), 27 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
index bef8bf840f..80fd23e960 100644
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main

areas of concern exist:

Quoted 16 lines
documentation/dev-manual/dev-manual-common-tasks.rst +2 -0
 -  Compilation scripts and modifications to the source code must be
    provided.
 
+-  spdx files can be provided.
+
 There are other requirements beyond the scope of these three and the

methods described in this section (e.g. the mechanism through which source code is distributed).

documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and so

forth) enables you to meet your requirements to include the scripts to control compilation as well as any modifications to the original source.

documentation/dev-manual/dev-manual-common-tasks.rst +4 -0
+Providing spdx files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The spdx module has been integrated to a layer named meta-spdxscanner.

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 10 lines
documentation/dev-manual/dev-manual-common-tasks.rst +10 -0
+meta-spdxscanner provides several kinds of scanner. If you want to
+enable this function, you have to do the following steps:
+
+1. Added meta-spdxscanner layer into ``bblayers.conf``.
+
+2. Reference to README of meta-spdxscanner, setup the environment(e.g,
+   setup a fossology server) of scanner.
+
+3. Meta-spdxscanner provids several methods(bbclass) to create spdx files.
+   Please choose one that you want to use and enable the spdx task. You

have to

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 6 lines
documentation/dev-manual/dev-manual-common-tasks.rst +6 -0
+   add some config options in
+``local.conf`` file in your
+:term:`Build Directory`.
+The following is an example about how to get spdx files during
+bitbake by fossology-python.bbclass:
+::

this causes the following new warning:
WARNING: Enumerated list ends without a blank line; unexpected unindent.

I believe the code-block belongs to the #3 item in the list, in which case this patch is needed:

documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
@@ -11487,26 +11487,23 @@ this function, you have to follow the following

steps:
2. Refer to the README in meta-spdxscanner to setup the environment (e.g, setup a fossology server) needed for the scanner.

-3. Meta-spdxscanner provids several methods within the bbclass to create spdx files.
+3. Meta-spdxscanner provides several methods within the bbclass to create spdx files.
Please choose one that you want to use and enable the spdx task. You have
to

documentation/dev-manual/dev-manual-common-tasks.rst +0 -4
-   add some config options in
-``local.conf`` file in your
-:term:`Build Directory`.
-The following is an example showing how to generate spdx files during

bitbake -using the fossology-python.bbclass:
-::

documentation/dev-manual/dev-manual-common-tasks.rst +15 -12
-
-   # Selet fossology-python.bbclass.
-   INHERIT += "fossology-python"
-   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
-   # Fossology server, you have to create a token.
-   TOKEN = "eyJ0eXAiO..."
-   # The fossology server is necessary for fossology-python.bbclass.
-   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
-   # If you want to upload the source code to a special folder:
-   FOLDER_NAME = "xxxx" //Optional
-   # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
-   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+   add some config options in ``local.conf`` file in your :term:`Build
+   Directory`. The following is an example showing how to generate spdx files
+   during bitbake using the fossology-python.bbclass::
+
+      # Selet fossology-python.bbclass.
+      INHERIT += "fossology-python"
+      # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+      # Fossology server, you have to create a token.
+      TOKEN = "eyJ0eXAiO..."
+      # The fossology server is necessary for fossology-python.bbclass.
+      FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
+      # If you want to upload the source code to a special folder:
+      FOLDER_NAME = "xxxx" //Optional
+      # If you don't want to put spdx files in tmp/deploy/spdx, you can enable:
+      SPDX_DEPLOY_DIR = "${DeployDir}" //Optional

Note: I fixed a typo as well.

Quoted 73 lines
documentation/dev-manual/dev-manual-common-tasks.rst +16 -0
+
+   # Selet fossology-python.bbclass.
+   INHERIT += "fossology-python"
+   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+   # Fossology server, you have to create a token.
+   TOKEN = "eyJ0eXAiO..."
+   # The fossology server is necessary for fossology-python.bbclass.
+   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo" //Optional
+   # If you want to upload the source code to a special folder.
+   FOLDER_NAME = "xxxx" //Optional
+   # If you don't want to put spdx files in tmp/deploy/spdx, you can change.
+   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+
+More usage of meta-spdxscanner, which you can find at:
+https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
+
 Copying Licenses that Do Not Exist
 ----------------------------------
documentation/ref-manual/ref-classes.rst +0 -0
index 756df2a60f..7277c6bb9d 100644
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
 The class also provides variables like ``SITEINFO_ENDIANNESS`` and

``SITEINFO_BITS`` that can be used elsewhere in the metadata.

-.. _ref-classes-spdx:

documentation/ref-manual/ref-classes.rst +0 -5
-
-``spdx.bbclass``
-================
-
-The ``spdx`` class integrates real-time license scanning, generation

of -SPDX standard output, and verification of license information during the -build.

documentation/ref-manual/ref-classes.rst +0 -5
-
-.. note::
-
-   This class is currently at the prototype stage in the 1.6 release.
-
 .. _ref-classes-sstate:
 
 ``sstate.bbclass``
documentation/ref-manual/ref-tasks.rst +0 -0
index 2569306fc5..ea145644f7 100644
@@ -859,17 +859,3 @@ sure that the machine and metadata branches as

specified by the branches. If these branches do not exist and :term:AUTOREV is not being used, the ``do_validate_branches`` task fails during the build.

documentation/ref-manual/ref-tasks.rst +0 -13
-
-Miscellaneous Tasks
-===================
-
-The following sections describe miscellaneous tasks.
-
-.. _ref-tasks-spdx:
-
-``do_spdx``
------------
-
-A build stage that takes the source code and scans it on a remote
-FOSSOLOGY server in order to produce an SPDX document. This task

applies -only to the :ref:spdx <ref-classes-spdx> class. --
2.25.1

author
#6 lore raw

Hi, nico

Quoted 3 lines

Your patch was merged, so we need a new patch on top of current branch to fix the issue. If you confirm that the patch I put in my previous email is good, then I can submit it, otherwise, feel free to submit a patch directly.

Thank you, I have no more questions about your email. Please submit it directly.

Best regards
Lei

Quoted 240 lines

-----Original Message-----
From: Nicolas Dechesne <[email protected]>
Sent: Monday, October 26, 2020 3:16 PM
To: Lei, Maohui <[email protected]>
Cc: [email protected]
Subject: Re: [docs] [PATCH] docs: Updated the status of spdx module.

hi Lei,

Quoted 4 lines · Maohui

Hi, nico

Thanks for your comment, I'm sorry that I'm not very familiar with syntax of

doc.

Not a problem, we just missed that during the review process!

Quoted 1 line

So, do I need to submit patch again? Or you have updated this patch?

Your patch was merged, so we need a new patch on top of current branch to fix the issue. If you confirm that the patch I put in my previous email is good, then I can submit it, otherwise, feel free to submit a patch directly.

Quoted 23 lines

Best regards
Lei

Quoted 18 lines

-----Original Message-----
From: Nicolas Dechesne <[email protected]>
Sent: Friday, October 23, 2020 10:44 PM
To: Lei, Maohui <[email protected]>
Cc: [email protected]
Subject: Re: [docs] [PATCH] docs: Updated the status of spdx module.

hey Lei,

Quoted 7 lines · leimaohui

- Deleted content about old spdx.bbclass.
- Added usage of meta-spdxscanner.

---
 .../dev-manual/dev-manual-common-tasks.rst    | 38

+++++++++++++++++++

Quoted 14 lines
Quoted 14 lines

documentation/dev-manual/dev-manual-common-tasks.rst to be covered by assuming that three main

Quoted 10 lines
 documentation/ref-manual/ref-classes.rst      | 13 -------
 documentation/ref-manual/ref-tasks.rst        | 14 -------
 3 files changed, 38 insertions(+), 27 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
index bef8bf840f..80fd23e960 100644
@@ -11401,6 +11401,8 @@ to be covered by assuming that three main

areas of concern exist:

Quoted 3 lines
documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
 -  Compilation scripts and modifications to the source code must be
    provided.
 
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
documentation/dev-manual/dev-manual-common-tasks.rst +2 -0
+-  spdx files can be provided.
+
 There are other requirements beyond the scope of these three and

the methods described in this section (e.g. the mechanism through which source code is distributed).

documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
@@ -11595,6 +11597,42 @@ layers (recipes, configuration files, and

so
forth) enables you to meet your requirements to include the scripts to control compilation as well as any modifications to the original

source.

Quoted 5 lines
Quoted 5 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 5 lines
documentation/dev-manual/dev-manual-common-tasks.rst +4 -0
+Providing spdx files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The spdx module has been integrated to a layer named meta-

spdxscanner.

Quoted 6 lines
Quoted 6 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 6 lines
documentation/dev-manual/dev-manual-common-tasks.rst +6 -0
+meta-spdxscanner provides several kinds of scanner. If you want
+to enable this function, you have to do the following steps:
+
+1. Added meta-spdxscanner layer into ``bblayers.conf``.
+
+2. Reference to README of meta-spdxscanner, setup the

environment(e.g,

Quoted 3 lines
Quoted 3 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 3 lines
documentation/dev-manual/dev-manual-common-tasks.rst +3 -0
+   setup a fossology server) of scanner.
+
+3. Meta-spdxscanner provids several methods(bbclass) to create spdx

files.

Quoted 12 lines
Quoted 12 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 2 lines
documentation/dev-manual/dev-manual-common-tasks.rst +2 -0
+   Please choose one that you want to use and enable the spdx
+task. You

have to

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 6 lines
documentation/dev-manual/dev-manual-common-tasks.rst +6 -0
+   add some config options in
+``local.conf`` file in your
+:term:`Build Directory`.
+The following is an example about how to get spdx files during
+bitbake by fossology-python.bbclass:
+::

this causes the following new warning:
WARNING: Enumerated list ends without a blank line; unexpected

unindent.

Quoted 10 lines
Quoted 10 lines

I believe the code-block belongs to the #3 item in the list, in which case this patch is needed:

documentation/dev-manual/dev-manual-common-tasks.rst +0 -0
@@ -11487,26 +11487,23 @@ this function, you have to follow the

following
steps:
2. Refer to the README in meta-spdxscanner to setup the environment

(e.g,

Quoted 17 lines
Quoted 17 lines

setup a fossology server) needed for the scanner.

-3. Meta-spdxscanner provids several methods within the bbclass to create spdx files.
+3. Meta-spdxscanner provides several methods within the bbclass to create spdx files.
Please choose one that you want to use and enable the spdx task.
You have to

documentation/dev-manual/dev-manual-common-tasks.rst +0 -4
-   add some config options in
-``local.conf`` file in your
-:term:`Build Directory`.
-The following is an example showing how to generate spdx files

during bitbake -using the fossology-python.bbclass:
-::

documentation/dev-manual/dev-manual-common-tasks.rst +0 -3
-
-   # Selet fossology-python.bbclass.
-   INHERIT += "fossology-python"
Quoted 8 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 8 lines
documentation/dev-manual/dev-manual-common-tasks.rst +0 -8
-   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
-   # Fossology server, you have to create a token.
-   TOKEN = "eyJ0eXAiO..."
-   # The fossology server is necessary for fossology-python.bbclass.
-   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
-   # If you want to upload the source code to a special folder:
-   FOLDER_NAME = "xxxx" //Optional
-   # If you don't want to put spdx files in tmp/deploy/spdx, you can

enable:

Quoted 3 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 3 lines
documentation/dev-manual/dev-manual-common-tasks.rst +2 -1
-   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+   add some config options in ``local.conf`` file in your :term:`Build
+   Directory`. The following is an example showing how to generate spdx

files

Quoted 4 lines
Quoted 4 lines
documentation/dev-manual/dev-manual-common-tasks.rst +4 -0
+   during bitbake using the fossology-python.bbclass::
+
+      # Selet fossology-python.bbclass.
+      INHERIT += "fossology-python"
Quoted 8 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 8 lines
documentation/dev-manual/dev-manual-common-tasks.rst +8 -0
+      # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+      # Fossology server, you have to create a token.
+      TOKEN = "eyJ0eXAiO..."
+      # The fossology server is necessary for fossology-python.bbclass.
+      FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo"
+      # If you want to upload the source code to a special folder:
+      FOLDER_NAME = "xxxx" //Optional
+      # If you don't want to put spdx files in tmp/deploy/spdx, you can

enable:

Quoted 4 lines
Quoted 4 lines

+ SPDX_DEPLOY_DIR = "${DeployDir}" //Optional

Note: I fixed a typo as well.

Quoted 11 lines
Quoted 11 lines

documentation/dev-manual/dev-manual-common-tasks.rst

Quoted 11 lines
documentation/dev-manual/dev-manual-common-tasks.rst +11 -0
+
+   # Selet fossology-python.bbclass.
+   INHERIT += "fossology-python"
+   # For fossology-python.bbclass, TOKEN is necessary, so, after setup a
+   # Fossology server, you have to create a token.
+   TOKEN = "eyJ0eXAiO..."
+   # The fossology server is necessary for fossology-python.bbclass.
+   FOSSOLOGY_SERVER = "http://xx.xx.xx.xx:8081/repo" //Optional
+   # If you want to upload the source code to a special folder.
+   FOLDER_NAME = "xxxx" //Optional
+   # If you don't want to put spdx files in tmp/deploy/spdx, you can

change.

Quoted 66 lines
Quoted 63 lines
Quoted 62 lines
documentation/dev-manual/dev-manual-common-tasks.rst +5 -0
+   SPDX_DEPLOY_DIR = "${DeployDir}" //Optional
+
+More usage of meta-spdxscanner, which you can find at:
+https://git.yoctoproject.org/cgit/cgit.cgi/meta-spdxscanner/.
+
 Copying Licenses that Do Not Exist
 ----------------------------------
documentation/ref-manual/ref-classes.rst +0 -0
index 756df2a60f..7277c6bb9d 100644
@@ -2380,19 +2380,6 @@ Autotools automatically picks up.
 The class also provides variables like ``SITEINFO_ENDIANNESS``

and ``SITEINFO_BITS`` that can be used elsewhere in the metadata.

-.. _ref-classes-spdx:

documentation/ref-manual/ref-classes.rst +0 -5
-
-``spdx.bbclass``
-================
-
-The ``spdx`` class integrates real-time license scanning,

generation of -SPDX standard output, and verification of license information during the -build.

documentation/ref-manual/ref-classes.rst +0 -5
-
-.. note::
-
-   This class is currently at the prototype stage in the 1.6 release.
-
 .. _ref-classes-sstate:
 
 ``sstate.bbclass``
documentation/ref-manual/ref-tasks.rst +0 -0
index 2569306fc5..ea145644f7 100644
@@ -859,17 +859,3 @@ sure that the machine and metadata branches

as specified by the branches. If these branches do not exist and :term:AUTOREV is not being used, the ``do_validate_branches`` task fails during the build.

documentation/ref-manual/ref-tasks.rst +0 -13
-
-Miscellaneous Tasks
-===================
-
-The following sections describe miscellaneous tasks.
-
-.. _ref-tasks-spdx:
-
-``do_spdx``
------------
-
-A build stage that takes the source code and scans it on a remote
-FOSSOLOGY server in order to produce an SPDX document. This task

applies -only to the :ref:spdx <ref-classes-spdx> class. --
2.25.1