Added functions to generate unique spdx doc namespace and generate a
clean document name
Test: m compliance_sbom
Bug: 265472710
Change-Id: I86ea9ddf50d066e139b757e8a093f98b8df8c81f
This reverts commit 928ee9d9f7.
Reason for revert: Fixed the initial cause of the revert. Added spdx-tools to the missing branches. See b/276427351
Change-Id: I7bd0b3f194b27dc9a255ccadeb2a9a12a3d59f66
This reverts commit e97adc5db9.
Reason for revert: Roll back until the kernel manifests are updated with the spdx-tools library.
Change-Id: Ib2327862acd928ebcea0f328daecc162b46d2c78
Concurrency is hard, and now that we no longer track origin it doesn't
improve performance in any meaningful way.
Bug: 261787132
Test: m droid dist compliance_dumpgraph compliance_dumpresolutions \
compliance_sbom compliance_listshare compliance_rtrace \
compliance_checkshare xmlnotice textnotice htmlnotice \
compliancenotice_shippedlibs compliancenotice_bom
Test: m compliance_checkshare cts && \
out/host/linux-x86/bin/compliance_checkshare out/host/linux-x86/gen/META/lic_intermediates/out/host/linux-x86/cts/android-cts.zip.meta_lic
Test: similar command as above for gts on internal
Test: m compliance_checksare droid dist && \
out/host/linux-x86/bin/compliance_checkshare out/target/product/sunfish/gen/META/lic_intermediates/out/target/product/sunfish/obj/PACKAGING/systemimage_intermediates/system.img.meta_lic
Change-Id: I57a75927bf879c3ce6603049d8d583211dc0ce29
Resolutions map back to the root, but actions do not. An iteration
works just fine.
Simplify TargetNodeSet so that it is directly iterable.
Bug: 261787132
Test: m droid dist compliance_dumpgraph compliance_dumpresolutions \
compliance_sbom compliance_listshare compliance_rtrace \
compliance_checkshare xmlnotice textnotice htmlnotice \
compliancenotice_shippedlibs compliancenotice_bom
Test: m compliance_checkshare cts && \
out/host/linux-x86/bin/compliance_checkshare out/host/linux-x86/gen/META/lic_intermediates/out/host/linux-x86/cts/android-cts.zip.meta_lic
Change-Id: Ic5a2d809b5a9a47b5d85f61e3a4a790dbe8f5fd2
The bottom-up walk to resolve conditions treats "already started" as
"alreay finished".
Bug: 261787132
Test: m compliance_checkshare
Change-Id: Ibb548bd4f5464b47682633878d475dfe011df3e1
Expected values were overwriting actual values.
Origin no longer tracked.
Bug: 261787132
Test: m droid dist
Test: m compliance_checkshare
Change-Id: Ie1fbc3d596cb08c6f0935a79441d8b00a4d1eb97
utility bill of material
Added methods to graph.go to extract the annotation types
Test: m compliance_sbom
Test: tested against real targets, see go/paste/4932131502424064
Bug: 241591242
Change-Id: I344c15d64cd034d72076f9d9a677e593e288e3a6
Simplifies synchronization and eliminates lock for nil waitroup.
Test: m droid
Test: m out/soong/.intermediates/packages/modules/StatsD/apex/com.android.os.statsd/android_common_com.android.os.statsd_image/NOTICE.html.gz
Change-Id: I381ee79e142214e7331241071f076db2f7960ba6
Firing off multiple concurrent walks of the same sub-tree with the same
conditions. Data race meant every walk would proceed. Move the logic to
entry of walk function and compare under lock.
Bug: 255526010
Test: m droid
Test: m out/soong/.intermediates/packages/modules/StatsD/apex/com.android.os.statsd/android_common_com.android.os.statsd_image/NOTICE.html.gz
Change-Id: Ie30edbb2ac9eaa9aa55badfc518d51eaadbb6be6
Improve METADATA parsing error message.
Example error message (for an unqoted string url starting with ssh:):
============
error in project "<redacted>" METADATA "<redacted>/METADATA": proto: (line 4:12): invalid value for string type: ssh
METADATA and METADATA.android files must parse as text protobufs
defined by
build/soong/compliance/project_metadata_proto/project_metadata.proto
* unknown fields don't matter
* check invalid ENUM names
* check quoting
* check unescaped nested quotes
* check the comment marker for protobuf is '#' not '//'
if importing a library that uses a different sort of METADATA file, add
a METADATA.android file beside it to parse instead
============
Bug: 254534552
Test: m droid dist cts alllicensemetadata
Change-Id: Ie5c0adc7362941e455dd522baaa31f2913d7db5f
Replace regular expressions to extract fields from a text proto with
and actual parsed protobuf.
Refactor TestFS into its own package, and implement StatFS.
Test: m droid dist cts alllicensemetadata
Test: repo forall -c 'echo -n "$REPO_PATH " && $ANDROID_BUILD_TOP/out/host/linux-x86/bin/compliance_checkmetadata . 2>&1' | fgrep -v PASS
Change-Id: Icd17a6a2b6a4e2b6ffded48e964b9c9d6e4d64d6
SafePathPrefixes contains "prebuilts/" which is a prefix of another
entry "prebuilts/module_sdk" which can both match the same path.
SafePathPrefixes is a map, so the iteration order is nondeterminisitic.
Move both SafePathPrefixes and SafePrebuiltPrefixes into lists that
will always have a deterministic iteration order.
Bug: 230357391
Test: build NOTICE.xml.gz multiple times
Change-Id: Ibfcd6715b70f26164e0ef4d59f73b240f47f8db7
Including code built from restricted sources in a distribution medium
does not require sharing the code for building the distribution medium.
Test: m cts dist
Test: m cts dist gts (requires cherry-pick to internal)
Change-Id: I7fcd889b11a97f8deaf4de9d72fdadd09deebe30
The prior interface to make supported only a single package name per
target; although, a target might have multiple licenses each with its
own package name.
Bug: 151177513
Bug: 210912771
Test: m all dist
Test: flash; About Phone -> Legal Information -> Third-party licenses
Change-Id: I5cf1964ec18af91ec7e258a1c6722527e3596cf3
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771
Test: m all
Test: m systemlicense
Test: m htmlnotice; out/soong/host/linux-x85/htmlnotice ...
Test: m textnotice; out/soong/host/linux-x85/textnotice ...
Test: m xmlnotice; out/soong/host/linux-x85/xmlnotice ...
where ... is the path to the .meta_lic file for the system image. In my
case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
... can be expressed as:
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: Id5b2ebe3752081e3a89bba1d717cf103f7846043
All the notice binaries have -title
All the binaries that can -stripPrefix can strip multiple.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771
Test: m all
Test: m systemlicense
Test: m bom; out/soong/host/linux-x85/bom ...
Test: m dumpgraph; out/soong/host/linux-x85/dumpgraph ...
Test: m dumpresolutions; out/soong/host/linux-x85/dumpresolutions ...
Test: m htmlnotice; out/soong/host/linux-x85/htmlnotice ...
Test: m rtrace; out/soong/host/linux-x85/rtrace ...
Test: m textnotice; out/soong/host/linux-x85/textnotice ...
Test: m xmlnotice; out/soong/host/linux-x85/xmlnotice ...
where ... is the path to the .meta_lic file for the system image. In my
case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
... can be expressed as:
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: I08357bf1adb048abba6563cf3cea6ee6d60405e0
Introduce the below command-line tool:
xmlnotice outputs a NOTICE.xml file constructed from the license
texts of the transitive closure of dependencies.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771
Test: m all
Test: m systemlicense
Test: m xmlnotice; out/soong/host/linux-x85/xmlnotice ...
where ... is the path to the .meta_lic file for the system image. In my
case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
... can be expressed as:
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: I267effd3a1c1b981bcdc5e058dce561a2d4a7948
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771
Test: m all
Test: m systemlicense
Test: m htmlnotice; out/soong/host/linux-x85/htmlnotice ...
where ... is -o=html.gz followed by the path to the .meta_lic file for
the system image. In my case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
the rest of ... can be expressed as:
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: I7a42d5186876609a401956754e3dcff64211fb15
Introduce the below command-line tool:
rtrace outputs a list of targets and conditions causing one or more
projects or target nodes to require sharing to resolve a restricted
condition.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771
Test: m all
Test: m systemlicense
Test: m rtrace; out/soong/host/linux-x85/rtrace -rtrace=...
where ... is a project or license metadata file followed by the path to
the .meta_lic file for the system image. In my case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
... can be expressed as:
system/core ${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
or
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic ${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: I40a0586699d9b8a8dd2bd4ba26756c9649ebf964
The tool under test is dumpresolutions not listshare.
Test: m dumpresolutions; out/soong/host/linux-x85/dumpresolutions ...
where ... is the path to the .meta_lic file for the system image. In my
case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
... can be expressed as:
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: Id3d6e701ebd3dab03f407116d85a5e2aab8c5c59
Track which files are read by the notice file indexer and add a flag
to textnotice and htmlnotice to support writing them out.
Bug: 207445310
Test: textnotice_test
Test: htmlnotice_test
Change-Id: Ib74706b8a87a5ed9268a0fe37982ecf89f4e227d