diff --git a/src/formattedcode/output_spdx.py b/src/formattedcode/output_spdx.py index 2e334c178f5..67fc36f23f1 100644 --- a/src/formattedcode/output_spdx.py +++ b/src/formattedcode/output_spdx.py @@ -249,8 +249,7 @@ def write_spdx(output_file, files, tool_name, tool_version, notice, input_file, spdx_license = License.from_identifier(spdx_id) else: license_key = file_license.get('key') - # FIXME: we should prefix this with ScanCode- - licenseref_id = 'LicenseRef-' + license_key + licenseref_id = 'LicenseRef-scancode-' + license_key spdx_license = ExtractedLicense(licenseref_id) spdx_license.name = file_license.get('short_name') comment = ('See details at https://github.com/nexB/scancode-toolkit' diff --git a/tests/formattedcode/data/spdx/license_ref/expected.rdf b/tests/formattedcode/data/spdx/license_ref/expected.rdf index 9a33f2e0ba5..7ba55da992b 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected.rdf +++ b/tests/formattedcode/data/spdx/license_ref/expected.rdf @@ -31,21 +31,21 @@ { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml", - "ns1:licenseId": "LicenseRef-other-copyleft", + "ns1:licenseId": "LicenseRef-scancode-other-copyleft", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml", - "ns1:licenseId": "LicenseRef-other-permissive", + "ns1:licenseId": "LicenseRef-scancode-other-permissive", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml", - "ns1:licenseId": "LicenseRef-scancode-acknowledgment", + "ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml" } } @@ -57,21 +57,21 @@ { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml", - "ns1:licenseId": "LicenseRef-other-copyleft", + "ns1:licenseId": "LicenseRef-scancode-other-copyleft", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml", - "ns1:licenseId": "LicenseRef-other-permissive", + "ns1:licenseId": "LicenseRef-scancode-other-permissive", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml", - "ns1:licenseId": "LicenseRef-scancode-acknowledgment", + "ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml" } } @@ -99,21 +99,21 @@ { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml", - "ns1:licenseId": "LicenseRef-other-copyleft", + "ns1:licenseId": "LicenseRef-scancode-other-copyleft", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml", - "ns1:licenseId": "LicenseRef-other-permissive", + "ns1:licenseId": "LicenseRef-scancode-other-permissive", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml", - "ns1:licenseId": "LicenseRef-scancode-acknowledgment", + "ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml" } } diff --git a/tests/formattedcode/data/spdx/license_ref/expected.tv b/tests/formattedcode/data/spdx/license_ref/expected.tv index 3d9fd5857e4..2ec4312fee0 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected.tv +++ b/tests/formattedcode/data/spdx/license_ref/expected.tv @@ -16,9 +16,9 @@ PackageLicenseDeclared: NOASSERTION PackageLicenseConcluded: NOASSERTION PackageLicenseInfoFromFiles: Apache-2.0 PackageLicenseInfoFromFiles: CC0-1.0 -PackageLicenseInfoFromFiles: LicenseRef-other-copyleft -PackageLicenseInfoFromFiles: LicenseRef-other-permissive -PackageLicenseInfoFromFiles: LicenseRef-scancode-acknowledgment +PackageLicenseInfoFromFiles: LicenseRef-scancode-other-copyleft +PackageLicenseInfoFromFiles: LicenseRef-scancode-other-permissive +PackageLicenseInfoFromFiles: LicenseRef-scancode-scancode-acknowledgment PackageCopyrightText: Copyright (c) 2017 nexB Inc. and others. # File @@ -27,23 +27,23 @@ FileChecksum: SHA1: f9c28fa2714ad0c2e36d3e5561afb0031fa76831 LicenseConcluded: NOASSERTION LicenseInfoInFile: Apache-2.0 LicenseInfoInFile: CC0-1.0 -LicenseInfoInFile: LicenseRef-other-copyleft -LicenseInfoInFile: LicenseRef-other-permissive -LicenseInfoInFile: LicenseRef-scancode-acknowledgment +LicenseInfoInFile: LicenseRef-scancode-other-copyleft +LicenseInfoInFile: LicenseRef-scancode-other-permissive +LicenseInfoInFile: LicenseRef-scancode-scancode-acknowledgment FileCopyrightText: Copyright (c) 2017 nexB Inc. and others. # Extracted Licenses -LicenseID: LicenseRef-other-copyleft +LicenseID: LicenseRef-scancode-other-copyleft LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml ExtractedText: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml -LicenseID: LicenseRef-other-permissive +LicenseID: LicenseRef-scancode-other-permissive LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml ExtractedText: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml -LicenseID: LicenseRef-scancode-acknowledgment +LicenseID: LicenseRef-scancode-scancode-acknowledgment LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml ExtractedText: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml diff --git a/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf b/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf index d587455e7a3..ef9d4b38248 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf +++ b/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf @@ -31,21 +31,21 @@ { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-other-copyleft", + "ns1:licenseId": "LicenseRef-scancode-other-copyleft", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-other-permissive", + "ns1:licenseId": "LicenseRef-scancode-other-permissive", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-scancode-acknowledgment", + "ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml" } } @@ -57,21 +57,21 @@ { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-other-copyleft", + "ns1:licenseId": "LicenseRef-scancode-other-copyleft", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-other-permissive", + "ns1:licenseId": "LicenseRef-scancode-other-permissive", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-scancode-acknowledgment", + "ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml" } } @@ -99,21 +99,21 @@ { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-other-copyleft", + "ns1:licenseId": "LicenseRef-scancode-other-copyleft", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-other-permissive", + "ns1:licenseId": "LicenseRef-scancode-other-permissive", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml" } }, { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "Software license\n================\n\n[Copyright] ([c]) [2017] [nexB] [Inc]. [and] [others]. [All] [rights] [reserved].\n[http]://[nexb].[com] [and] [https]://[github].[com]/[nexB]/[scancode]-[toolkit]/\nThe ScanCode software is licensed under the Apache License version 2.0.\nData generated with ScanCode require an acknowledgment.\nScanCode is a trademark of nexB Inc.\n\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\nWhen you publish or redistribute any data created with ScanCode or any ScanCode\nderivative work, you must accompany this data with the following acknowledgment:\n\n Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n OR CONDITIONS OF ANY KIND, either express or implied. No content created from\n ScanCode should be considered or used as legal advice. Consult an Attorney\n for any legal advice.\n ScanCode is a free software code scanning tool from nexB Inc. and others.\n Visit https://github.com/nexB/scancode-toolkit/ for support and download.\n\n\nThird-party software licenses\n=============================\n\nScanCode embeds third-party free and open source software packages under various\nlicenses including copyleft licenses. Some of the third-party software packages\nare delivered as pre-built binaries. The origin and license of these packages is\ndocumented by .ABOUT files.\n\nThe corresponding source code for pre-compiled third-party software is available\nfor immediate download from the same release page where you obtained ScanCode at:\nhttps://github.com/nexB/scancode-toolkit/\nor https://github.com/nexB/scancode-thirdparty-src/\n\nYou may also contact us to request the source code by email at info@nexb.com or\nby postal mail at:\n\n [nexB] [Inc]., [ScanCode] [open] [source] [code] [request]\n [735] [Industrial] [Road], [Suite] #[101], [94070] [San] [Carlos], [CA], [USA]\n\nPlease indicate in your communication the ScanCode version for which you are\nrequesting source code.\n\n\nLicense for ScanCode datasets\n=============================\n\nScanCode includes datasets (e.g. for license detection) that are dedicated\nto the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0)\nPublic Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0", - "ns1:licenseId": "LicenseRef-scancode-acknowledgment", + "ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml" } } diff --git a/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv b/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv index ebee5d5e580..87463801abd 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv +++ b/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv @@ -16,9 +16,9 @@ PackageLicenseDeclared: NOASSERTION PackageLicenseConcluded: NOASSERTION PackageLicenseInfoFromFiles: Apache-2.0 PackageLicenseInfoFromFiles: CC0-1.0 -PackageLicenseInfoFromFiles: LicenseRef-other-copyleft -PackageLicenseInfoFromFiles: LicenseRef-other-permissive -PackageLicenseInfoFromFiles: LicenseRef-scancode-acknowledgment +PackageLicenseInfoFromFiles: LicenseRef-scancode-other-copyleft +PackageLicenseInfoFromFiles: LicenseRef-scancode-other-permissive +PackageLicenseInfoFromFiles: LicenseRef-scancode-scancode-acknowledgment PackageCopyrightText: Copyright (c) 2017 nexB Inc. and others. # File @@ -27,13 +27,13 @@ FileChecksum: SHA1: f9c28fa2714ad0c2e36d3e5561afb0031fa76831 LicenseConcluded: NOASSERTION LicenseInfoInFile: Apache-2.0 LicenseInfoInFile: CC0-1.0 -LicenseInfoInFile: LicenseRef-other-copyleft -LicenseInfoInFile: LicenseRef-other-permissive -LicenseInfoInFile: LicenseRef-scancode-acknowledgment +LicenseInfoInFile: LicenseRef-scancode-other-copyleft +LicenseInfoInFile: LicenseRef-scancode-other-permissive +LicenseInfoInFile: LicenseRef-scancode-scancode-acknowledgment FileCopyrightText: Copyright (c) 2017 nexB Inc. and others. # Extracted Licenses -LicenseID: LicenseRef-other-copyleft +LicenseID: LicenseRef-scancode-other-copyleft LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml ExtractedText: Software license @@ -78,7 +78,7 @@ License for ScanCode datasets ScanCode includes datasets (e.g. for license detection) that are dedicated to the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0 -LicenseID: LicenseRef-other-permissive +LicenseID: LicenseRef-scancode-other-permissive LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml ExtractedText: Software license @@ -123,7 +123,7 @@ License for ScanCode datasets ScanCode includes datasets (e.g. for license detection) that are dedicated to the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0 -LicenseID: LicenseRef-scancode-acknowledgment +LicenseID: LicenseRef-scancode-scancode-acknowledgment LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml ExtractedText: Software license diff --git a/tests/formattedcode/data/spdx/unicode/expected.rdf b/tests/formattedcode/data/spdx/unicode/expected.rdf index 89592719834..3d9ada09f39 100644 --- a/tests/formattedcode/data/spdx/unicode/expected.rdf +++ b/tests/formattedcode/data/spdx/unicode/expected.rdf @@ -24,7 +24,7 @@ "ns1:licenseInfoFromFiles": { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "SOFTWARE LICENSE\n *\n * This software is provided subject to the following terms and conditions,\n * which you should read carefully before using the software. Using this\n * software indicates your acceptance of these terms and conditions. If you do\n * not agree with these terms and conditions, do not use the software.\n *\n * [Copyright] \u00a9 [2005] [Agere] [Systems] [Inc].\n * [All] [rights] [reserved].\n *\n * Redistribution and use in source or binary forms, with or without\n * modifications, are permitted provided that the following conditions are met:\n *\n * . Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following Disclaimer as comments in the code as\n * well as in the documentation and/or other materials provided with the\n * distribution.\n *\n * . Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following Disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * . Neither the name of Agere Systems Inc. nor the names of the contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * Disclaimer\n *\n * THIS SOFTWARE IS PROVIDED \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY\n * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN\n * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\n * DAMAGE", - "ns1:licenseId": "LicenseRef-agere-bsd", + "ns1:licenseId": "LicenseRef-scancode-agere-bsd", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/agere-bsd.yml" } }, @@ -34,7 +34,7 @@ "ns1:hasExtractedLicensingInfo": { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "SOFTWARE LICENSE\n *\n * This software is provided subject to the following terms and conditions,\n * which you should read carefully before using the software. Using this\n * software indicates your acceptance of these terms and conditions. If you do\n * not agree with these terms and conditions, do not use the software.\n *\n * [Copyright] \u00a9 [2005] [Agere] [Systems] [Inc].\n * [All] [rights] [reserved].\n *\n * Redistribution and use in source or binary forms, with or without\n * modifications, are permitted provided that the following conditions are met:\n *\n * . Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following Disclaimer as comments in the code as\n * well as in the documentation and/or other materials provided with the\n * distribution.\n *\n * . Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following Disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * . Neither the name of Agere Systems Inc. nor the names of the contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * Disclaimer\n *\n * THIS SOFTWARE IS PROVIDED \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY\n * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN\n * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\n * DAMAGE", - "ns1:licenseId": "LicenseRef-agere-bsd", + "ns1:licenseId": "LicenseRef-scancode-agere-bsd", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/agere-bsd.yml" } }, @@ -54,7 +54,7 @@ "ns1:licenseInfoInFile": { "ns1:ExtractedLicensingInfo": { "ns1:extractedText": "SOFTWARE LICENSE\n *\n * This software is provided subject to the following terms and conditions,\n * which you should read carefully before using the software. Using this\n * software indicates your acceptance of these terms and conditions. If you do\n * not agree with these terms and conditions, do not use the software.\n *\n * [Copyright] \u00a9 [2005] [Agere] [Systems] [Inc].\n * [All] [rights] [reserved].\n *\n * Redistribution and use in source or binary forms, with or without\n * modifications, are permitted provided that the following conditions are met:\n *\n * . Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following Disclaimer as comments in the code as\n * well as in the documentation and/or other materials provided with the\n * distribution.\n *\n * . Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following Disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * . Neither the name of Agere Systems Inc. nor the names of the contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * Disclaimer\n *\n * THIS SOFTWARE IS PROVIDED \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY\n * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN\n * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\n * DAMAGE", - "ns1:licenseId": "LicenseRef-agere-bsd", + "ns1:licenseId": "LicenseRef-scancode-agere-bsd", "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/agere-bsd.yml" } } diff --git a/tests/formattedcode/data/spdx/unicode/expected.tv b/tests/formattedcode/data/spdx/unicode/expected.tv index 500714e3db5..dcca53cef3f 100644 --- a/tests/formattedcode/data/spdx/unicode/expected.tv +++ b/tests/formattedcode/data/spdx/unicode/expected.tv @@ -14,19 +14,19 @@ PackageDownloadLocation: NOASSERTION PackageVerificationCode: ce09fd939153fe02b82fefb764381ba40234e6ca PackageLicenseDeclared: NOASSERTION PackageLicenseConcluded: NOASSERTION -PackageLicenseInfoFromFiles: LicenseRef-agere-bsd +PackageLicenseInfoFromFiles: LicenseRef-scancode-agere-bsd PackageCopyrightText: Copyright (c) 2005 Agere Systems Inc. # File FileName: ./et131x.h FileChecksum: SHA1: 3903b654c47ea95203567230d72093ad1c5c4b90 LicenseConcluded: NOASSERTION -LicenseInfoInFile: LicenseRef-agere-bsd +LicenseInfoInFile: LicenseRef-scancode-agere-bsd FileCopyrightText: Copyright (c) 2005 Agere Systems Inc. Copyright (c) 2005 Agere Systems Inc. # Extracted Licenses -LicenseID: LicenseRef-agere-bsd +LicenseID: LicenseRef-scancode-agere-bsd LicenseComment: See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/agere-bsd.yml ExtractedText: SOFTWARE LICENSE