You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/general.rst
+48-16Lines changed: 48 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,19 +12,33 @@ inside your codebase, typically in preparation for a product release, side-by-si
12
12
actual code. ABOUT file(s) have a simple, standard format that identifies components and their
13
13
associated licenses. The current AboutCode Toolkit subcommands are:
14
14
15
-
- **attrib**: Generate a Product Attribution notice document from your ABOUT file(s), JSON, CSV or XLSX. You can also generate documents for other purposes (such as a License Reference) by varying your input control file and your template.
15
+
- **attrib**: Generate a Product Attribution notice document from your ABOUT
16
+
file(s), JSON, CSV or XLSX. You can also generate documents for other
17
+
purposes (such as a License Reference) by varying your input control file
18
+
and your template.
16
19
17
-
- **check**: A simple command to validate the ABOUT file(s) and output errors/warnings on the terminal.
20
+
- **check**: A simple command to validate the ABOUT file(s) and output
21
+
errors/warnings on the terminal.
18
22
19
-
- **collect_redist_src**: A command to collect and copy sources that have the 'redistribute' flagged as 'True' in ABOUT file(s) or from an inventory.
23
+
- **collect_redist_src**: A command to collect and copy sources that have
24
+
the 'redistribute' flagged as 'True' in ABOUT file(s) or from an inventory.
20
25
21
-
- **gen**: Create ABOUT file(s) from a Software Inventory file (.csv, .json or .xlsx format) which is typically created from a software audit, and insert these AboutCode Toolkit files into your codebase. You can regenerate the AboutCode Toolkit files from a new Software Inventory file whenever you make changes.
26
+
- **gen**: Create ABOUT file(s) from a Software Inventory file (.csv, .json or .xlsx format)
27
+
which is typically created from a software audit, and insert these AboutCode Toolkit files
28
+
into your codebase. You can regenerate the AboutCode Toolkit files from a new
29
+
Software Inventory file whenever you make changes.
22
30
23
-
- **gen_license**: Fetch licenses in the license_expression field and save to the output location.
31
+
- **gen_license**: Fetch licenses in the license_expression field and
32
+
save to the output location.
24
33
25
-
- **inventory**: Generate a Software Inventory list (.csv, .json or .xlsx format) from your codebase based on ABOUT file(s). Note that this Software Inventory will only include components that have AboutCode Toolkit data. In another word, if you do not create AboutCode Toolkit files for your own original software components, these components will not show up in the generated inventory.
34
+
- **inventory**: Generate a Software Inventory list (.csv, .json or .xlsx format)
35
+
from your codebase based on ABOUT file(s). Note that this Software Inventory will
36
+
only include components that have AboutCode Toolkit data. In another word, if you do
37
+
not create AboutCode Toolkit files for your own original software components,
38
+
these components will not show up in the generated inventory.
26
39
27
-
- **transform**: A command to transform an input CSV/JSON/XLSX by applying renaming and/or filtering and then output to a new CSV/JSON/XLSX file.
40
+
- **transform**: A command to transform an input CSV/JSON/XLSX by applying
41
+
renaming and/or filtering and then output to a new CSV/JSON/XLSX file.
28
42
29
43
Additional AboutCode Toolkit information is available at:
30
44
@@ -36,9 +50,14 @@ Key Terminology
36
50
===============
37
51
Some key terminology that applies to AboutCode Toolkit tool usage:
38
52
39
-
- **Software Inventory or Inventory** - means a list of all of the components in a Development codebase and the associated data about those components with a focus on software pedigree/provenance- related data for open source and third-party components.
53
+
- **Software Inventory or Inventory** - means a list of all of the components
54
+
in a Development codebase and the associated data about those components with a
55
+
focus on software pedigree/provenance- related data for open source and
56
+
third-party components.
40
57
41
-
- **Product BOM or BOM** - means a subset list of the components in a Development codebase (Software Inventory) that are Deployed on a particular Product Release (a Product Bill of Materials).
58
+
- **Product BOM or BOM** - means a subset list of the components in a Development
59
+
codebase (Software Inventory) that are Deployed on a particular Product
60
+
Release (a Product Bill of Materials).
42
61
43
62
Using gen to Generate ABOUT file(s)
44
63
===================================
@@ -187,7 +206,8 @@ using the same format as an .ABOUT file.
187
206
188
207
The attributes that can be set in a configuration file are:
189
208
190
-
- field_renamings: An optional map of source field name to target new field name that is used to rename CSV/JSON/XLSX fields.
209
+
- field_renamings: An optional map of source field name to target new field
210
+
name that is used to rename CSV/JSON/XLSX fields.
191
211
192
212
.. code-block:: none
193
213
@@ -201,7 +221,9 @@ field names referenced below are AFTER the renaming have been applied.
201
221
For instance with this configuration, the field "Directory/Location" will be
202
222
renamed to "about_resource" and "foo" to "bar":
203
223
204
-
- required_fields: An optional list of required field names that must have a value, beyond the standard field names. If a source CSV/JSON/XLSX does not have such a field or an entry is missing a value for a required field, an error is reported.
224
+
- required_fields: An optional list of required field names that must have a value,
225
+
beyond the standard field names. If a source CSV/JSON/XLSX does not have such a field or
226
+
an entry is missing a value for a required field, an error is reported.
205
227
206
228
For instance with this configuration, an error will be reported if the fields "name"
207
229
and "version" are missing, or if any entry does not have a value set for these fields:
@@ -212,17 +234,24 @@ and "version" are missing, or if any entry does not have a value set for these f
212
234
- name
213
235
- version
214
236
215
-
- field_filters: An optional list of fields that should be kept in the transformed file. If this list is provided, only the fields that are in the list will be kept. All others will be filtered out even if they are AboutCode Toolkit standard fields. If this list is not provided, all source fields are kept in the transformed target file.
237
+
- field_filters: An optional list of fields that should be kept in the transformed file.
238
+
If this list is provided, only the fields that are in the list will be kept. All others will
239
+
be filtered out even if they are AboutCode Toolkit standard fields. If this list is not
240
+
provided, all source fields are kept in the transformed target file.
216
241
217
-
For instance with this configuration, the target file will only contains the "name" and "version" fields:
242
+
For instance with this configuration, the target file will only contains the "name" and
243
+
"version" fields:
218
244
219
245
.. code-block:: none
220
246
221
247
field_filters:
222
248
- name
223
249
- version
224
250
225
-
- exclude_fields: An optional list of field names that should be excluded in the transformed file. If this list is provided, all the fields from the source file that should be excluded in the target file must be listed. Excluding required fields will cause an error. If this list is not provided, all source fields are kept in the transformed target file.
251
+
- exclude_fields: An optional list of field names that should be excluded in the transformed
252
+
file. If this list is provided, all the fields from the source file that should be
253
+
excluded in the target file must be listed. Excluding required fields will cause an error.
254
+
If this list is not provided, all source fields are kept in the transformed target file.
226
255
227
256
For instance with this configuration, the target file will not contain the "type" and "temp" fields:
228
257
@@ -249,7 +278,9 @@ This gen example command does the following:
249
278
250
279
- Activates the --fetch-license option to get license information from ScanCode LicenseDB.
251
280
252
-
- Activates the --reference option to get license text files and notice text files that you have specified in your software inventory to be copied next to the associated .ABOUT files when those are created.
281
+
- Activates the --reference option to get license text files and notice text files that
282
+
you have specified in your software inventory to be copied next to the
283
+
associated .ABOUT files when those are created.
253
284
254
285
- Specifies the path of the software inventory to control the processing.
255
286
@@ -431,7 +462,8 @@ Note that this example attrib command does the following:
431
462
432
463
- Specifies the full path (include file name) of the output document to be generated.
433
464
434
-
A successful execution of attrib will create a .html (or .json depends on the template) file that is ready to use to meet your attribution requirements.
465
+
A successful execution of attrib will create a .html (or .json depends on the template)
466
+
file that is ready to use to meet your attribution requirements.
Copy file name to clipboardExpand all lines: docs/source/reference.rst
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,8 @@ Details
157
157
The following data are passed to jinja2 and, therefore, can be used for a custom template:
158
158
* about object: the about objects
159
159
* common_licenses: a common license keys list in licenses.py
160
-
* licenses_list: a license object list contains all the licenses found in about objects. It contains the following attribute: key, name, filename, url, text
160
+
* licenses_list: a license object list contains all the licenses found in about objects.
161
+
It contains the following attribute: key, name, filename, url, text
Copy file name to clipboardExpand all lines: docs/source/specification.rst
+54-22Lines changed: 54 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,11 +44,13 @@ A simple and valid ABOUT file named httpd-2.4.3.tar.gz.ABOUT may look like this:
44
44
45
45
The meaning of this ABOUT file is:
46
46
47
-
- The file "httpd-2.4.3.tar.gz" is stored in the same directory and side-by-side with the ABOUT file "httpd-2.4.3.tar.gz.ABOUT" that documents it.
47
+
- The file "httpd-2.4.3.tar.gz" is stored in the same directory and side-by-side with
48
+
the ABOUT file "httpd-2.4.3.tar.gz.ABOUT" that documents it.
48
49
- The name of this component is "Apache HTTP Server" with version "2.4.3".
49
50
- The home URL for this component is http://httpd.apache.org
50
51
- The file "httpd-2.4.3.tar.gz" was originally downloaded from http://archive.apache.org/dist/httpd/httpd-2.4.3.tar.gz
51
-
- In the same directory, "apache-2.0.LICENSE" and "httpd.NOTICE" are files that contain respectively the license text and the notice text for this component.
52
+
- In the same directory, "apache-2.0.LICENSE" and "httpd.NOTICE" are files
53
+
that contain respectively the license text and the notice text for this component.
52
54
- This component is licensed under "apache-2.0"
53
55
- The license for this component is defined in the SPDX License List at https://spdx.org/licenses/Apache-2.0.html
54
56
@@ -70,7 +72,11 @@ A file name can contain only these US-ASCII characters:
70
72
- digits from 0 to 9
71
73
- uppercase and lowercase letters from A to Z
72
74
- the following symbols: ``"_", "-", "+", ".", "(", ")", "~", "[", "]", "{", "}", "@", "%"``
73
-
- The case of a file name is not significant. On case-sensitive file systems (such as on Linux), a tool must report an error if two ABOUT files stored in the same directory have the same lowercase file name. This is to ensure that ABOUT files can be used across file systems. The convention is to use a lowercase file name and an uppercase ABOUT extension.
75
+
- The case of a file name is not significant. On case-sensitive file systems
76
+
(such as on Linux), a tool must report an error if two ABOUT files stored in the same
77
+
directory have the same lowercase file name. This is to ensure that ABOUT files can be
78
+
used across file systems. The convention is to use a lowercase file name and an uppercase
79
+
ABOUT extension.
74
80
75
81
Lines of text
76
82
-------------
@@ -90,8 +96,11 @@ A field name can contain only these US-ASCII characters:
90
96
- digits from 0 to 9
91
97
- uppercase and lowercase letters from A to Z
92
98
- the ``"_"`` underscore sign.
93
-
- Field names are not case sensitive. For example, "HOMEPAGE_URL" and "HomePage_url" represent the same field name.
94
-
- A field name must start at the beginning of a new line. No spaces is allowed in the field name. It can be followed by one or more spaces that must be ignored. These spaces are commonly used to improve the readability of an ABOUT file.
99
+
- Field names are not case sensitive. For example, "HOMEPAGE_URL" and "HomePage_url"
100
+
represent the same field name.
101
+
- A field name must start at the beginning of a new line. No spaces is allowed in
102
+
the field name. It can be followed by one or more spaces that must be ignored.
103
+
These spaces are commonly used to improve the readability of an ABOUT file.
95
104
96
105
Field value
97
106
-----------
@@ -254,10 +263,16 @@ mandatory field are missing.
254
263
Optional Information fields
255
264
---------------------------
256
265
257
-
- version: Component or package version. A component or package usually has a version, such as a revision number or hash from a version control system (for a snapshot checked out from VCS such as Subversion or Git). If not available, the version should be the date the component was provisioned, in an ISO date format such as 'YYYY-MM-DD'.
258
-
- spec_version: The version of the ABOUT file format specification used for this file. This is provided as a hint to readers and tools in order to support future versions of this specification.
266
+
- version: Component or package version. A component or package usually has a version,
267
+
such as a revision number or hash from a version control system (for a snapshot checked
268
+
out from VCS such as Subversion or Git). If not available, the version should be the date
269
+
the component was provisioned, in an ISO date format such as 'YYYY-MM-DD'.
270
+
- spec_version: The version of the ABOUT file format specification used for this file.
271
+
This is provided as a hint to readers and tools in order to support future versions
272
+
of this specification.
259
273
- description: Component description, as a short text.
260
-
- download_url: A direct URL to download the original file or archive documented by this ABOUT file.
274
+
- download_url: A direct URL to download the original file or archive documented
275
+
by this ABOUT file.
261
276
- homepage_url: URL to the homepage for this component.
262
277
- changelog_file: Changelog file for the component.
263
278
- package_url: Package URL for the package.
@@ -266,9 +281,11 @@ Optional Information fields
266
281
Optional Owner and Author fields
267
282
--------------------------------
268
283
269
-
- owner: The name of the primary organization or person(s) that owns or provides the component.
284
+
- owner: The name of the primary organization or person(s) that owns or
285
+
provides the component.
270
286
- owner_url: URL to the homepage for the owner.
271
-
- contact: Contact information (such as an email address or physical address) for the component owner.
287
+
- contact: Contact information (such as an email address or physical address)
288
+
for the component owner.
272
289
- author: Name of the organization(s) or person(s) that authored the component.
273
290
- author_file: Author file for the component.
274
291
@@ -278,21 +295,33 @@ Optional Licensing fields
278
295
- copyright: Copyright statement for the component.
279
296
- notice_file: Legal notice or credits for the component.
280
297
- notice_url: URL to a legal notice for the component.
281
-
- license_file: License file that applies to the component. For example, the name of a license file such as LICENSE or COPYING file extracted from a downloaded archive.
298
+
- license_file: License file that applies to the component. For example, the
299
+
name of a license file such as LICENSE or COPYING file extracted from a
300
+
downloaded archive.
282
301
- license_url: URL to the license text for the component.
283
-
- license_expression: The DejaCode license expression that apply to the component. You can separate each identifier using " or " and " and " to document the relationship between multiple license identifiers, such as a choice among multiple licenses (No special characters are allowed).
284
-
- license_name: The DejaCode license short name for the license (No special characters are allowed).
285
-
- license_key: The DejaCode license key(s) for the component (No special characters are allowed).
286
-
- spdx_license_key: The ScanCode LicenseDB spdx_license_key defined for the license at https://scancode-licensedb.aboutcode.org/index.html
302
+
- license_expression: The DejaCode license expression that apply to
303
+
the component. You can separate each identifier using " or " and " and " to
304
+
document the relationship between multiple license identifiers, such as a choice
305
+
among multiple licenses (No special characters are allowed).
306
+
- license_name: The DejaCode license short name for the license
307
+
(No special characters are allowed).
308
+
- license_key: The DejaCode license key(s) for the component
309
+
(No special characters are allowed).
310
+
- spdx_license_key: The ScanCode LicenseDB spdx_license_key defined
311
+
for the license at https://scancode-licensedb.aboutcode.org/index.html
287
312
288
313
Optional Boolean flag fields
289
314
----------------------------
290
315
291
-
- redistribute: Set this flag to yes if the component license requires source code redistribution. Defaults to no when absent.
292
-
- attribute: Set this flag to yes if the component license requires publishing an attribution or credit notice. Defaults to no when absent.
293
-
- track_changes: Set this flag to yes if the component license requires tracking changes made to a the component. Defaults to no when absent.
316
+
- redistribute: Set this flag to yes if the component license requires source code
317
+
redistribution. Defaults to no when absent.
318
+
- attribute: Set this flag to yes if the component license requires publishing an attribution
319
+
or credit notice. Defaults to no when absent.
320
+
- track_changes: Set this flag to yes if the component license requires tracking changes made to
321
+
a the component. Defaults to no when absent.
294
322
- modified: Set this flag to yes if the component has been modified. Defaults to no when absent.
295
-
- internal_use_only: Set this flag to yes if the component is used internal only. Defaults to no when absent.
323
+
- internal_use_only: Set this flag to yes if the component is used internal only.
324
+
Defaults to no when absent.
296
325
297
326
Optional Extension fields
298
327
-------------------------
@@ -312,8 +341,10 @@ prefix and a few common fields to handle the diversity of ways that VCS
312
341
tools reference files and directories under version control:
313
342
314
343
- vcs_tool: VCS tool such as git, svn, cvs, etc.
315
-
- vcs_repository: Typically a URL or some other identifier used by a VCS tool to point to a repository such as an SVN or Git repository URL.
316
-
- vcs_path: Path used by a particular VCS tool to point to a file, directory or module inside a repository.
344
+
- vcs_repository: Typically a URL or some other identifier used by a
345
+
VCS tool to point to a repository such as an SVN or Git repository URL.
346
+
- vcs_path: Path used by a particular VCS tool to point to a file,
347
+
directory or module inside a repository.
317
348
- vcs_tag: tag name or path used by a particular VCS tool.
318
349
- vcs_branch: branch name or path used by a particular VCS tool.
319
350
- vcs_revision: revision identifier such as a revision hash or version number.
@@ -344,7 +375,8 @@ to verify the integrity of a file documented by an ABOUT file.
344
375
345
376
- checksum_md5: MD5 for the file documented by this ABOUT file in the "about_resource" field.
346
377
- checksum_sha1: SHA1 for the file documented by this ABOUT file in the "about_resource" field.
347
-
- checksum_sha256: SHA256 for the file documented by this ABOUT file in the "about_resource" field.
378
+
- checksum_sha256: SHA256 for the file documented by this ABOUT file in
0 commit comments