Skip to content

Commit c802e1f

Browse files
Remove license text from index.json of licenseDB
* Removes license text from index.json and index.yaml * Adds license text to respective json and yaml files. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 567e9ff commit c802e1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+668
-671
lines changed

src/licensedcode/license_db.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def generate_indexes(output_path, environment, licenses, test=False):
9898
"other_spdx_license_keys": lic.other_spdx_license_keys,
9999
"is_exception": lic.is_exception,
100100
"is_deprecated": lic.is_deprecated,
101-
"text": lic.text,
102101
"json": f"{key}.json",
103102
"yaml": f"{key}.yml",
104103
"html": f"{key}.html",
@@ -140,6 +139,7 @@ def generate_details(output_path, environment, licenses, test=False):
140139
license_details_template = environment.get_template("license_details.html")
141140
for lic in licenses.values():
142141
license_data = lic.to_dict(include_text=False, include_builtin=include_builtin)
142+
license_data_with_text = lic.to_dict(include_text=True, include_builtin=include_builtin)
143143
html = license_details_template.render(
144144
**base_context_mapping,
145145
license=lic,
@@ -149,12 +149,12 @@ def generate_details(output_path, environment, licenses, test=False):
149149
write_file(
150150
output_path,
151151
f"{lic.key}.yml",
152-
saneyaml.dump(license_data, indent=2)
152+
saneyaml.dump(license_data_with_text, indent=2)
153153
)
154154
write_file(
155155
output_path,
156156
f"{lic.key}.json",
157-
json.dumps(license_data, indent=2, sort_keys=False)
157+
json.dumps(license_data_with_text, indent=2, sort_keys=False)
158158
)
159159
lic.dump(output_path)
160160

tests/licensedcode/data/license_db/index.json-expected.json

Lines changed: 0 additions & 12 deletions
Large diffs are not rendered by default.

tests/licensedcode/data/license_db/license_dump/bash-exception-gpl.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
</p>
151151
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
152152
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
153+
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
153154
</footer>
154155
</div>
155156

tests/licensedcode/data/license_db/license_dump/bash-exception-gpl.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"spdx_license_key": "LicenseRef-scancode-bash-exception-gpl-2.0",
1010
"text_urls": [
1111
"https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283"
12-
]
12+
],
13+
"text": "The Free Software Foundation has exempted Bash from the requirement of\nParagraph 2c of the General Public License. This is to say, there is\nno requirement for Bash to print a notice when it is started\ninteractively in the usual way. We made this exception because users\nand standards expect shells not to print such messages. This\nexception applies to any program that serves as a shell and that is\nbased primarily on Bash as opposed to other GNU software."
1314
}

tests/licensedcode/data/license_db/license_dump/bash-exception-gpl.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ is_exception: yes
88
spdx_license_key: LicenseRef-scancode-bash-exception-gpl-2.0
99
text_urls:
1010
- https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283
11+
text: |
12+
The Free Software Foundation has exempted Bash from the requirement of
13+
Paragraph 2c of the General Public License. This is to say, there is
14+
no requirement for Bash to print a notice when it is started
15+
interactively in the usual way. We made this exception because users
16+
and standards expect shells not to print such messages. This
17+
exception applies to any program that serves as a shell and that is
18+
based primarily on Bash as opposed to other GNU software.

tests/licensedcode/data/license_db/license_dump/binary-linux-firmware.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
</p>
154154
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
155155
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
156+
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
156157
</footer>
157158
</div>
158159

tests/licensedcode/data/license_db/license_dump/binary-linux-firmware.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"category": "Proprietary Free",
66
"owner": "Unspecified",
77
"homepage_url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/",
8-
"spdx_license_key": "LicenseRef-scancode-binary-linux-firmware"
8+
"spdx_license_key": "LicenseRef-scancode-binary-linux-firmware",
9+
"text": "Redistribution. Redistribution and use in binary form, without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions must reproduce the above copyright notice and the\nfollowing disclaimer in the documentation and/or other materials\nprovided with the distribution.\n\n* Neither the name of the Copyright Holder nor the names of its\nsuppliers may be used to endorse or promote products derived from this\nsoftware without specific prior written permission.\n\n* No reverse engineering, decompilation, or disassembly of this software\nis permitted.\n\nDISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND\nCONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\nCOPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\nNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\nUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE"
910
}

tests/licensedcode/data/license_db/license_dump/binary-linux-firmware.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,30 @@ category: Proprietary Free
55
owner: Unspecified
66
homepage_url: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/
77
spdx_license_key: LicenseRef-scancode-binary-linux-firmware
8+
text: |
9+
Redistribution. Redistribution and use in binary form, without
10+
modification, are permitted provided that the following conditions are
11+
met:
12+
13+
* Redistributions must reproduce the above copyright notice and the
14+
following disclaimer in the documentation and/or other materials
15+
provided with the distribution.
16+
17+
* Neither the name of the Copyright Holder nor the names of its
18+
suppliers may be used to endorse or promote products derived from this
19+
software without specific prior written permission.
20+
21+
* No reverse engineering, decompilation, or disassembly of this software
22+
is permitted.
23+
24+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
25+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
26+
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
27+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28+
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
31+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
32+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

tests/licensedcode/data/license_db/license_dump/bison-exception-2.0.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
</p>
158158
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
159159
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
160+
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
160161
</footer>
161162
</div>
162163

tests/licensedcode/data/license_db/license_dump/bison-exception-2.0.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"is_exception": true,
88
"spdx_license_key": "LicenseRef-scancode-bison-exception-2.0",
99
"faq_url": "http://www.gnu.org/software/bison/manual/bison.html#Conditions",
10-
"standard_notice": "This library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this library; see the file COPYING. If not, write to the Free Software\nFoundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\nAs a special exception, when this file is copied by Bison into a Bison\noutput file, you may use that output file without restriction. This special\nexception was added by the Free Software Foundation in version 1.24 of\nBison.\n"
10+
"standard_notice": "This library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this library; see the file COPYING. If not, write to the Free Software\nFoundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\nAs a special exception, when this file is copied by Bison into a Bison\noutput file, you may use that output file without restriction. This special\nexception was added by the Free Software Foundation in version 1.24 of\nBison.\n",
11+
"text": "As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison."
1112
}

0 commit comments

Comments
 (0)